[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/08: gnu: nginx: Respect #:configure-flags.
From: |
guix-commits |
Subject: |
07/08: gnu: nginx: Respect #:configure-flags. |
Date: |
Thu, 7 Apr 2022 17:19:01 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit c9ce02ecff769449bb79f9f0db33c69e2c7564f0
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Thu Apr 7 22:55:16 2022 +0200
gnu: nginx: Respect #:configure-flags.
* gnu/packages/web.scm (nginx)[arguments]: Add #:configure-flags. Move
default settings out of the 'configure' phase.
---
gnu/packages/web.scm | 78 ++++++++++++++++++++++++++--------------------------
1 file changed, 39 insertions(+), 39 deletions(-)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 068f17dff5..eafb22b285 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -386,6 +386,35 @@ the same, being completely separated from the Internet.")
(arguments
(list
#:tests? #f ; no test target
+ #:configure-flags
+ #~(list "--with-http_ssl_module"
+ "--with-http_v2_module"
+ "--with-http_xslt_module"
+ "--with-http_gzip_static_module"
+ "--with-http_gunzip_module"
+ "--with-http_addition_module"
+ "--with-http_sub_module"
+ "--with-pcre-jit"
+ "--with-debug"
+ "--with-stream"
+ ;; Even when not cross-building, we pass the
+ ;; --crossbuild option to avoid customizing for the
+ ;; kernel version on the build machine.
+ #$(let ((system "Linux") ; uname -s
+ (release "3.2.0") ; uname -r
+ ;; uname -m
+ (machine (match (or (%current-target-system)
+ (%current-system))
+ ("x86_64-linux" "x86_64")
+ ("i686-linux" "i686")
+ ("mips64el-linux" "mips64")
+ ;; Prevent errors when querying
+ ;; this package on unsupported
+ ;; platforms, e.g. when running
+ ;; "guix package --search="
+ (_ "UNSUPPORTED"))))
+ (string-append "--crossbuild="
+ system ":" release ":" machine)))
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'patch-/bin/sh
@@ -394,45 +423,16 @@ the same, being completely separated from the Internet.")
(("/bin/sh") (which "sh")))))
(replace 'configure
;; The configure script is hand-written, not from GNU autotools.
- (lambda* (#:key configure-flags inputs outputs #:allow-other-keys)
- (let ((flags
- (append (list (string-append "--prefix=" (assoc-ref
outputs "out"))
- "--with-http_ssl_module"
- "--with-http_v2_module"
- "--with-http_xslt_module"
- "--with-http_gzip_static_module"
- "--with-http_gunzip_module"
- "--with-http_addition_module"
- "--with-http_sub_module"
- "--with-pcre-jit"
- "--with-debug"
- "--with-stream"
- ;; Even when not cross-building, we pass the
- ;; --crossbuild option to avoid customizing
for the
- ;; kernel version on the build machine.
- #$(let ((system "Linux") ; uname -s
- (release "3.2.0") ; uname -r
- ;; uname -m
- (machine (match (or
(%current-target-system)
-
(%current-system))
- ("x86_64-linux"
"x86_64")
- ("i686-linux" "i686")
- ("mips64el-linux"
"mips64")
- ;; Prevent errors when
querying
- ;; this package on
unsupported
- ;; platforms, e.g. when
running
- ;; "guix package
--search="
- (_
"UNSUPPORTED"))))
- (string-append "--crossbuild="
- system ":" release ":"
machine)))
- configure-flags)))
- (setenv "CC" #$(cc-for-target))
- ;; Fix ./configure test for ‘#include <libxml/parser.h>’.
- (setenv "CFLAGS" ; CPPFLAGS is not respected
- (string-append "-I" (assoc-ref inputs "libxml2")
- "/include/libxml2"))
- (format #t "configure flags: ~s~%" flags)
- (apply invoke "./configure" flags))))
+ (lambda* (#:key configure-flags inputs #:allow-other-keys)
+ (setenv "CC" #$(cc-for-target))
+ ;; Fix ./configure test for ‘#include <libxml/parser.h>’.
+ (setenv "CFLAGS" ; CPPFLAGS is not respected
+ (string-append "-I" (search-input-directory
+ inputs "/include/libxml2")))
+ (format #t "configure flags: ~s~%" configure-flags)
+ (apply invoke "./configure"
+ (string-append "--prefix=" #$output)
+ configure-flags)))
(add-after 'install 'install-man-page
(lambda _
(let ((man (string-append #$output "/share/man")))
- branch master updated (b749329888 -> 1d4f2cdc82), guix-commits, 2022/04/07
- 06/08: gnu: nginx: Use G-expressions., guix-commits, 2022/04/07
- 07/08: gnu: nginx: Respect #:configure-flags.,
guix-commits <=
- 02/08: gnu: LLVM, Clang: Add 14.0.0., guix-commits, 2022/04/07
- 03/08: gnu: ungoogled-chromium: Update to 99.0.4844.84-1., guix-commits, 2022/04/07
- 01/08: gnu: radeontop: Simplify inputs., guix-commits, 2022/04/07
- 05/08: gnu: uBlock Origin: Update to 1.42.4., guix-commits, 2022/04/07
- 04/08: gnu: ungoogled-chromium: Update to 100.0.4896.75-1., guix-commits, 2022/04/07
- 08/08: gnu: nginx: Build optimized binaries., guix-commits, 2022/04/07