projects/guix·blob java-team · refs

130 lines · 5.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Cyril Roelandt <[email protected]>
3;;; Copyright © 2014, 2015, 2018 Mark H Weaver <[email protected]>
4;;; Copyright © 2023 Efraim Flashner <[email protected]>
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
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 ;; Sometimes we end up with two processes concurrently trying to make
51 ;; 'libmod_test.la': <http://hydra.gnu.org/build/60266/nixlog/2/raw>.
52 ;; Thus, build sequentially.
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
83maintain software libraries that provide a predictable and consistent interface
84to underlying platform-specific implementations. The primary goal is to provide
85an API to which software developers may code and be assured of predictable if
86not identical behaviour regardless of the platform on which their software is
87built, relieving them of the need to code special-case conditions to work
88around 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 ;; There are race conditions during 'make check'. Typically, the
122 ;; 'testall' executable is not built yet by the time 'make check' tries
123 ;; to run it. See
124 ;; <http://lists.gnu.org/archive/html/guix-devel/2014-03/msg00261.html>.
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)))