| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (gnu packages darwin)
|
| 20 | #:use-module (gnu packages)
|
| 21 | #:use-module (gnu packages autotools)
|
| 22 | #:use-module (gnu packages gnustep)
|
| 23 | #:use-module (gnu packages llvm)
|
| 24 | #:use-module (guix build-system gnu)
|
| 25 | #:use-module (guix gexp)
|
| 26 | #:use-module (guix git-download)
|
| 27 | #:use-module (guix packages)
|
| 28 | #:use-module (guix utils)
|
| 29 | #:use-module ((guix licenses) #:prefix license:))
|
| 30 |
|
| 31 | (define-public cctools
|
| 32 | (let ((cctools-version "973.0.1")
|
| 33 | (ld64-version "609")
|
| 34 | (revision "0")
|
| 35 | (commit "04663295d0425abfac90a42440a7ec02d7155fea"))
|
| 36 | (package
|
| 37 | (name "cctools")
|
| 38 | (version (git-version (string-append cctools-version
|
| 39 | "-ld64-"
|
| 40 | ld64-version)
|
| 41 | revision
|
| 42 | commit))
|
| 43 | (source
|
| 44 | (origin
|
| 45 | (method git-fetch)
|
| 46 | (uri (git-reference
|
| 47 | (url "https://github.com/tpoechtrager/cctools-port")
|
| 48 | (commit commit)))
|
| 49 | (sha256
|
| 50 | (base32 "0vihfa8y64vvd3pxy8qh4mhcnzinxh9flpz9dvw4wch4zj2nnfjs"))
|
| 51 | (file-name (git-file-name name version))
|
| 52 | (snippet
|
| 53 | #~(begin
|
| 54 | (use-modules (guix build utils))
|
| 55 | (with-directory-excursion "cctools"
|
| 56 | |
| 57 | (substitute* "configure.ac"
|
| 58 | (("AC_CONFIG_FILES[(]\\[libobjc2/Makefile][)]")
|
| 59 | ""))
|
| 60 | (substitute* "Makefile.am"
|
| 61 | (("SUBDIRS=libobjc2 ")
|
| 62 | "SUBDIRS="))
|
| 63 | (substitute* "otool/Makefile.am"
|
| 64 | (("\\$[(]top_builddir[)]/libobjc2/libobjc\\.la")
|
| 65 | "-lobjc")
|
| 66 | (("-I\\$[(]top_srcdir[)]/libobjc2")
|
| 67 | ""))
|
| 68 | |
| 69 | (for-each (lambda (pth)
|
| 70 | (when (file-exists? pth)
|
| 71 | (delete-file-recursively pth)))
|
| 72 | `("include/gnu/symseg.h" |
| 73 | "libobjc2" |
| 74 | |
| 75 | "compile"
|
| 76 | "config.guess"
|
| 77 | "config.sub"
|
| 78 | "configure"
|
| 79 | "install-sh"
|
| 80 | "ltmain.sh"
|
| 81 | "missing"
|
| 82 | ,@(find-files "." "^Makefile\\.in$"))))))))
|
| 83 | (inputs (list libobjc2
|
| 84 | clang-toolchain-13))
|
| 85 | (native-inputs (list libtool
|
| 86 | autoconf
|
| 87 | automake
|
| 88 | clang-toolchain-13))
|
| 89 | (build-system gnu-build-system)
|
| 90 | (arguments
|
| 91 | (list
|
| 92 | #:phases
|
| 93 | #~(modify-phases %standard-phases
|
| 94 | (add-after 'unpack 'chdir
|
| 95 | (lambda args
|
| 96 | (chdir "cctools"))))))
|
| 97 | (home-page "https://github.com/tpoechtrager/cctools-port")
|
| 98 | (synopsis "Darwin's @code{cctools} and @code{ld64}")
|
| 99 | |
| 100 | |
| 101 | (description
|
| 102 | "Darwin's @code{cctools} are a set of tools somewhat similar in purpose
|
| 103 | to GNU Binutils, but for Mach-O files targeting Darwin. The suite includes
|
| 104 | @command{install_name_tool}, @command{dyldinfo}, and other specialized tools
|
| 105 | in addition to standard utilities like @command{ld} and @command{as}. This
|
| 106 | package provides portable versions of the tools.")
|
| 107 | (license license:apsl2))))
|