| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 |
|
| 21 | (define-module (gnu packages apr)
|
| 22 | #:use-module ((guix licenses) #:prefix l:)
|
| 23 | #:use-module (guix packages)
|
| 24 | #:use-module (guix download)
|
| 25 | #:use-module (guix gexp)
|
| 26 | #:use-module (guix utils)
|
| 27 | #:use-module (guix build-system gnu)
|
| 28 | #:use-module (gnu packages)
|
| 29 | #:use-module (gnu packages crypto)
|
| 30 | #:use-module (gnu packages perl)
|
| 31 | #:use-module (gnu packages xml)
|
| 32 | #:use-module (gnu packages autotools))
|
| 33 |
|
| 34 | (define-public apr
|
| 35 | (package
|
| 36 | (name "apr")
|
| 37 | (version "1.7.6")
|
| 38 | (source (origin
|
| 39 | (method url-fetch)
|
| 40 | (uri (string-append "mirror://apache/apr/apr-"
|
| 41 | version ".tar.bz2"))
|
| 42 | (sha256
|
| 43 | (base32
|
| 44 | "0cpbbmng9ir8rjl9nxwljkzmrkpk4b1nsj8vg4ssfpapsa90s0s9"))
|
| 45 | (patches
|
| 46 | (search-patches "apr-skip-getservbyname-test.patch"))
|
| 47 | (patch-flags '("-p0"))))
|
| 48 | (build-system gnu-build-system)
|
| 49 | (arguments
|
| 50 | |
| 51 | |
| 52 | |
| 53 | `(#:parallel-build? #f
|
| 54 | #:parallel-tests? #f
|
| 55 | #:phases
|
| 56 | (modify-phases %standard-phases
|
| 57 | ,@(if (target-ppc32?)
|
| 58 | `((add-after 'unpack 'patch-sources
|
| 59 | (lambda* (#:key inputs native-inputs #:allow-other-keys)
|
| 60 | (invoke "patch" "-p1" "--force" "--input"
|
| 61 | (assoc-ref (or native-inputs inputs)
|
| 62 | "atomics-patch")))))
|
| 63 | '())
|
| 64 | (add-after 'install 'patch-libxcrypt-reference
|
| 65 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 66 | (define out (assoc-ref outputs "out"))
|
| 67 | (define libxcrypt
|
| 68 | (dirname (search-input-file inputs "/lib/libcrypt.so.1")))
|
| 69 | (substitute* (list (string-append out "/bin/apr-1-config")
|
| 70 | (string-append out "/lib/pkgconfig/apr-1.pc"))
|
| 71 | (("-lcrypt")
|
| 72 | (string-append "-L" libxcrypt " -lcrypt"))))))))
|
| 73 | (inputs (list perl libltdl libxcrypt))
|
| 74 | (native-inputs
|
| 75 | `(,@(if (target-ppc32?)
|
| 76 | `(("atomics-patch"
|
| 77 | ,(local-file (search-patch "apr-fix-atomics.patch"))))
|
| 78 | '())))
|
| 79 | (home-page "https://apr.apache.org/")
|
| 80 | (synopsis "The Apache Portable Runtime Library")
|
| 81 | (description
|
| 82 | "The mission of the Apache Portable Runtime (APR) project is to create and
|
| 83 | maintain software libraries that provide a predictable and consistent interface
|
| 84 | to underlying platform-specific implementations. The primary goal is to provide
|
| 85 | an API to which software developers may code and be assured of predictable if
|
| 86 | not identical behaviour regardless of the platform on which their software is
|
| 87 | built, relieving them of the need to code special-case conditions to work
|
| 88 | around or take advantage of platform-specific deficiencies or features.")
|
| 89 | (license l:asl2.0)))
|
| 90 |
|
| 91 | (define-public apr-util
|
| 92 | (package
|
| 93 | (name "apr-util")
|
| 94 | (version "1.6.3")
|
| 95 | (source (origin
|
| 96 | (method url-fetch)
|
| 97 | (uri (string-append "mirror://apache/apr/apr-util-"
|
| 98 | version ".tar.bz2"))
|
| 99 | (sha256
|
| 100 | (base32
|
| 101 | "1dbjjwyfqvq7xa7xsxq2rv0clkwsmna2j12575n34ih7f7ipc454"))))
|
| 102 | (build-system gnu-build-system)
|
| 103 | (inputs
|
| 104 | (list apr libxcrypt))
|
| 105 | (propagated-inputs
|
| 106 | (list expat))
|
| 107 | (arguments
|
| 108 | '(#:phases
|
| 109 | (modify-phases %standard-phases
|
| 110 | (replace 'configure
|
| 111 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 112 | (let ((out (assoc-ref outputs "out"))
|
| 113 | (apr (assoc-ref inputs "apr"))
|
| 114 | (expat (assoc-ref inputs "expat")))
|
| 115 | (setenv "CONFIG_SHELL" (which "bash"))
|
| 116 | (invoke "./configure"
|
| 117 | (string-append "--prefix=" out)
|
| 118 | (string-append "--with-apr=" apr)
|
| 119 | (string-append "--with-expat=" expat))))))
|
| 120 |
|
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | #:parallel-tests? #f))
|
| 126 | (home-page "https://apr.apache.org/")
|
| 127 | (synopsis "One of the Apache Portable Runtime Library companions")
|
| 128 | (description
|
| 129 | "APR-util provides a number of helpful abstractions on top of APR.")
|
| 130 | (license l:asl2.0)))
|