guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

08/08: gnu: serf: Build with Python 3.


From: guix-commits
Subject: 08/08: gnu: serf: Build with Python 3.
Date: Sat, 19 Dec 2020 16:56:03 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit f6f6e1efeecd553c3af4c31695b17fb69849967b
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Sat Dec 19 21:59:03 2020 +0100

    gnu: serf: Build with Python 3.
    
    * gnu/packages/patches/serf-python3.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
    * gnu/packages/web.scm (serf)[source](patches): New field.
    [arguments]: Remove #:scons.
---
 gnu/local.mk                            |  1 +
 gnu/packages/patches/serf-python3.patch | 29 +++++++++++++++++++++++++++++
 gnu/packages/web.scm                    |  4 ++--
 3 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 98590ae..11cb580 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1609,6 +1609,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/sdl-libx11-1.6.patch                    \
   %D%/packages/patches/seed-webkit.patch                       \
   %D%/packages/patches/seq24-rename-mutex.patch                        \
+  %D%/packages/patches/serf-python3.patch                      \
   %D%/packages/patches/sharutils-CVE-2018-1000097.patch                \
   %D%/packages/patches/shadow-hurd-pctrl.patch                 \
   %D%/packages/patches/shishi-fix-libgcrypt-detection.patch    \
diff --git a/gnu/packages/patches/serf-python3.patch 
b/gnu/packages/patches/serf-python3.patch
new file mode 100644
index 0000000..636f51e
--- /dev/null
+++ b/gnu/packages/patches/serf-python3.patch
@@ -0,0 +1,29 @@
+Fix build with Python 3 scons.
+
+Patch taken from Arch Linux:
+https://github.com/archlinux/svntogit-packages/blob/packages/serf/trunk/scons-python3.patch
+
+--- serf-1.3.9/SConstruct.orig 2019-07-26 17:49:30.910189251 +0000
++++ serf-1.3.9/SConstruct      2019-07-26 17:49:54.073821735 +0000
+@@ -163,9 +163,9 @@
+               suffix='.def', src_suffix='.h')
+   })
+ 
+-match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
+-                  'SERF_MINOR_VERSION ([0-9]+).*'
+-                  'SERF_PATCH_VERSION ([0-9]+)',
++match = re.search(b'SERF_MAJOR_VERSION ([0-9]+).*'
++                  b'SERF_MINOR_VERSION ([0-9]+).*'
++                  b'SERF_PATCH_VERSION ([0-9]+)',
+                   env.File('serf.h').get_contents(),
+                   re.DOTALL)
+ MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
+@@ -183,7 +183,7 @@
+ 
+ unknown = opts.UnknownVariables()
+ if unknown:
+-  print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
++  print ('Warning: Used unknown variables:', ', '.join(unknown.keys()))
+ 
+ apr = str(env['APR'])
+ apu = str(env['APU'])
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 39820f7..584003a 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -1792,6 +1792,7 @@ from streaming URLs.  It is a command-line wrapper for 
the libquvi library.")
        (method url-fetch)
        (uri (string-append "mirror://apache/serf/serf-"
                            version ".tar.bz2"))
+       (patches (search-patches "serf-python3.patch"))
        (sha256
         (base32 "1k47gbgpp52049andr28y28nbwh9m36bbb0g8p0aka3pqlhjv72l"))))
     (build-system scons-build-system)
@@ -1804,8 +1805,7 @@ from streaming URLs.  It is a command-line wrapper for 
the libquvi library.")
        ;;("gss" ,gss)
        ("zlib" ,zlib)))
     (arguments
-     `(#:scons ,scons-python2
-       #:scons-flags (list (string-append "APR=" (assoc-ref %build-inputs 
"apr"))
+     `(#:scons-flags (list (string-append "APR=" (assoc-ref %build-inputs 
"apr"))
                            (string-append "APU=" (assoc-ref %build-inputs 
"apr-util"))
                            (string-append "OPENSSL=" (assoc-ref %build-inputs 
"openssl"))
                            ;; (string-append "GSSAPI=" (assoc-ref 
%build-inputs "gss"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]