summaryrefslogtreecommitdiff
path: root/gnu/packages/tls.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2021-03-14 16:28:48 -0400
committerLeo Famulari <leo@famulari.name>2021-03-14 16:33:12 -0400
commitb082ea9406f19f0d0c296227510256b87fe11e3c (patch)
tree2823d6da10b5b4cc5c4b9cd8504eee085767f86c /gnu/packages/tls.scm
parentbb2427fa283555a997049f107a5fec2e1434eeb7 (diff)
downloadguix-patches-b082ea9406f19f0d0c296227510256b87fe11e3c.tar
guix-patches-b082ea9406f19f0d0c296227510256b87fe11e3c.tar.gz
gnu: OpenSSL: Refer to the version number in a more robust way.
* gnu/packages/tls.scm (openssl)[arguments]: Replace use of VERSION with (PACKAGE-VERSION THIS-PACKAGE). (openssl/fixed): Adjust accordingly.
Diffstat (limited to 'gnu/packages/tls.scm')
-rw-r--r--gnu/packages/tls.scm107
1 files changed, 6 insertions, 101 deletions
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index e8e1350e29..c10975ed52 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -296,6 +296,7 @@ required structures.")
(define-public openssl
(package
(name "openssl")
+ (replacement openssl/fixed)
(version "1.1.1i")
(source (origin
(method url-fetch)
@@ -310,7 +311,6 @@ required structures.")
(sha256
(base32
"0hjj1phcwkz69lx1lrvr9grhpl4y529mwqycqc1hdla1zqsnmgp8"))))
- (replacement openssl/fixed)
(build-system gnu-build-system)
(outputs '("out"
"doc" ;6.8 MiB of man3 pages and full HTML documentation
@@ -371,7 +371,8 @@ required structures.")
;; PREFIX/ssl. Change that to something more
;; conventional.
(string-append "--openssldir=" out
- "/share/openssl-" ,version)
+ "/share/openssl-"
+ ,(package-version this-package))
(string-append "--prefix=" out)
(string-append "-Wl,-rpath," lib)
@@ -411,7 +412,8 @@ required structures.")
;; scripts. Remove them to avoid retaining a reference on Perl.
(let ((out (assoc-ref outputs "out")))
(delete-file-recursively (string-append out "/share/openssl-"
- ,version "/misc"))
+ ,(package-version this-package)
+ "/misc"))
#t))))))
(native-search-paths
(list (search-path-specification
@@ -445,104 +447,7 @@ required structures.")
(patches (search-patches "openssl-1.1-c-rehash-in.patch"))
(sha256
(base32
- "1gw17520vh13izy1xf5q0a2fqgcayymjjj5bk0dlkxndfnszrwma"))))
- (arguments
- `(#:parallel-tests? #f
- #:test-target "test"
-
- ;; Changes to OpenSSL sometimes cause Perl to "sneak in" to the closure,
- ;; so we explicitly disallow it here.
- #:disallowed-references ,(list (canonical-package perl))
- #:phases
- (modify-phases %standard-phases
- ,@(if (%current-target-system)
- '((add-before
- 'configure 'set-cross-compile
- (lambda* (#:key target outputs #:allow-other-keys)
- (setenv "CROSS_COMPILE" (string-append target "-"))
- (setenv "CONFIGURE_TARGET_ARCH"
- (cond
- ((string-prefix? "i586" target)
- "hurd-x86")
- ((string-prefix? "i686" target)
- "linux-x86")
- ((string-prefix? "x86_64" target)
- "linux-x86_64")
- ((string-prefix? "mips64el" target)
- "linux-mips64")
- ((string-prefix? "arm" target)
- "linux-armv4")
- ((string-prefix? "aarch64" target)
- "linux-aarch64")
- ((string-prefix? "powerpc64le" target)
- "linux-ppc64le")
- ((string-prefix? "powerpc64" target)
- "linux-ppc64")
- ((string-prefix? "powerpc" target)
- "linux-ppc")))
- #t)))
- '())
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lib (string-append out "/lib")))
- ;; It's not a shebang so patch-source-shebangs misses it.
- (substitute* "config"
- (("/usr/bin/env")
- (string-append (assoc-ref %build-inputs "coreutils")
- "/bin/env")))
- (invoke ,@(if (%current-target-system)
- '("./Configure")
- '("./config"))
- "shared" ;build shared libraries
- "--libdir=lib"
-
- ;; The default for this catch-all directory is
- ;; PREFIX/ssl. Change that to something more
- ;; conventional.
- (string-append "--openssldir=" out
- "/share/openssl-" ,version)
-
- (string-append "--prefix=" out)
- (string-append "-Wl,-rpath," lib)
- ,@(if (%current-target-system)
- '((getenv "CONFIGURE_TARGET_ARCH"))
- '())))))
- (add-after 'install 'move-static-libraries
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move static libraries to the "static" output.
- (let* ((out (assoc-ref outputs "out"))
- (lib (string-append out "/lib"))
- (static (assoc-ref outputs "static"))
- (slib (string-append static "/lib")))
- (for-each (lambda (file)
- (install-file file slib)
- (delete-file file))
- (find-files lib "\\.a$"))
- #t)))
- (add-after 'install 'move-extra-documentation
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move man3 pages and full HTML documentation to "doc".
- (let* ((out (assoc-ref outputs "out"))
- (man3 (string-append out "/share/man/man3"))
- (html (string-append out "/share/doc/openssl"))
- (doc (assoc-ref outputs "doc"))
- (man-target (string-append doc "/share/man/man3"))
- (html-target (string-append doc "/share/doc/openssl")))
- (copy-recursively man3 man-target)
- (delete-file-recursively man3)
- (copy-recursively html html-target)
- (delete-file-recursively html)
- #t)))
- (add-after
- 'install 'remove-miscellany
- (lambda* (#:key outputs #:allow-other-keys)
- ;; The 'misc' directory contains random undocumented shell and Perl
- ;; scripts. Remove them to avoid retaining a reference on Perl.
- (let ((out (assoc-ref outputs "out")))
- (delete-file-recursively (string-append out "/share/openssl-"
- ,version "/misc"))
- #t))))))))
+ "1gw17520vh13izy1xf5q0a2fqgcayymjjj5bk0dlkxndfnszrwma"))))))
(define-public openssl-1.0
(package