Archived
1
0
Fork 0

Revert "gnu: nss: Use 'modify-phases' syntax."

This reverts commit 87f1c7efc1.
This commit is contained in:
Marius Bakke 2017-03-14 22:25:55 +01:00
parent 031349075a
commit 796d2f2d0b
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -221,52 +221,55 @@ in the Mozilla clients.")
(ice-9 match) (ice-9 match)
(srfi srfi-26)) (srfi srfi-26))
#:phases #:phases
(modify-phases %standard-phases (alist-replace
(replace 'configure 'configure
(lambda* (#:key system inputs #:allow-other-keys) (lambda* (#:key system inputs #:allow-other-keys)
(setenv "CC" "gcc") (setenv "CC" "gcc")
;; Tells NSS to build for the 64-bit ABI if we are 64-bit system. ;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
(when (string-prefix? "x86_64" system) (when (string-prefix? "x86_64" system)
(setenv "USE_64" "1")) (setenv "USE_64" "1"))
#t)) #t)
(replace 'check (alist-replace
(lambda _ 'check
;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing. (lambda _
;; The later requires a working DNS or /etc/hosts. ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing.
(setenv "DOMSUF" "(none)") ;; The later requires a working DNS or /etc/hosts.
(setenv "USE_IP" "TRUE") (setenv "DOMSUF" "(none)")
(setenv "IP_ADDRESS" "127.0.0.1") (setenv "USE_IP" "TRUE")
(zero? (system* "./nss/tests/all.sh")))) (setenv "IP_ADDRESS" "127.0.0.1")
(replace 'install (zero? (system* "./nss/tests/all.sh")))
(lambda* (#:key outputs #:allow-other-keys) (alist-replace
(let* ((out (assoc-ref outputs "out")) 'install
(bin (string-append (assoc-ref outputs "bin") "/bin")) (lambda* (#:key outputs #:allow-other-keys)
(inc (string-append out "/include/nss")) (let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib/nss")) (bin (string-append (assoc-ref outputs "bin") "/bin"))
(obj (match (scandir "dist" (cut string-suffix? "OBJ" <>)) (inc (string-append out "/include/nss"))
((obj) (string-append "dist/" obj))))) (lib (string-append out "/lib/nss"))
;; Install nss-config to $out/bin. (obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
(install-file (string-append obj "/bin/nss-config") ((obj) (string-append "dist/" obj)))))
(string-append out "/bin")) ;; Install nss-config to $out/bin.
(delete-file (string-append obj "/bin/nss-config")) (install-file (string-append obj "/bin/nss-config")
;; Install nss.pc to $out/lib/pkgconfig. (string-append out "/bin"))
(install-file (string-append obj "/lib/pkgconfig/nss.pc") (delete-file (string-append obj "/bin/nss-config"))
(string-append out "/lib/pkgconfig")) ;; Install nss.pc to $out/lib/pkgconfig.
(delete-file (string-append obj "/lib/pkgconfig/nss.pc")) (install-file (string-append obj "/lib/pkgconfig/nss.pc")
(rmdir (string-append obj "/lib/pkgconfig")) (string-append out "/lib/pkgconfig"))
;; Install other files. (delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
(copy-recursively "dist/public/nss" inc) (rmdir (string-append obj "/lib/pkgconfig"))
(copy-recursively (string-append obj "/bin") bin) ;; Install other files.
(copy-recursively (string-append obj "/lib") lib) (copy-recursively "dist/public/nss" inc)
(copy-recursively (string-append obj "/bin") bin)
(copy-recursively (string-append obj "/lib") lib)
;; FIXME: libgtest1.so is installed in the above step, and it's ;; FIXME: libgtest1.so is installed in the above step, and it's
;; (unnecessarily) linked with several NSS libraries, but ;; (unnecessarily) linked with several NSS libraries, but
;; without the needed rpaths, causing the 'validate-runpath' ;; without the needed rpaths, causing the 'validate-runpath'
;; phase to fail. Here we simply delete libgtest1.so, since it ;; phase to fail. Here we simply delete libgtest1.so, since it
;; seems to be used only during the tests. ;; seems to be used only during the tests.
(delete-file (string-append lib "/libgtest1.so")) (delete-file (string-append lib "/libgtest1.so"))
#t)))))) #t))
%standard-phases)))))
(inputs (inputs
`(("sqlite" ,sqlite) `(("sqlite" ,sqlite)
("zlib" ,zlib))) ("zlib" ,zlib)))