This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch serf
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit c1c6d5ba89c46fb48f161738f108389617b09eb1
Author: Arrigo Marchiori <ard...@yahoo.it>
AuthorDate: Tue Nov 16 22:08:16 2021 +0100

    Switch to serf-1.3.9
    
    Scons is required as an external dependency
---
 ext_libraries/serf/makefile.mk            | 46 +++++++++++--------------------
 ext_libraries/serf/serf-1.3.9.scons.patch | 20 ++++++++++++++
 ext_libraries/serf/serf_version.mk        |  4 +--
 main/external_deps.lst                    |  6 ++--
 main/scp2/source/ooo/file_library_ooo.scp |  4 +--
 main/scp2/source/ooo/shortcut_ooo.scp     |  4 +--
 6 files changed, 45 insertions(+), 39 deletions(-)

diff --git a/ext_libraries/serf/makefile.mk b/ext_libraries/serf/makefile.mk
index d3f7c55..d4cb40e 100644
--- a/ext_libraries/serf/makefile.mk
+++ b/ext_libraries/serf/makefile.mk
@@ -44,9 +44,9 @@ LIBSERFVERSION=$(SERF_MAJOR).$(SERF_MINOR).$(SERF_MICRO)
 TARFILE_NAME=$(PRJNAME)-$(LIBSERFVERSION)
 # This is the SHA1 checksum, not MD5 but tg_ext.mk does not now about this and,
 # thankfully, does not care.
-TARFILE_MD5=f65fbbd72926c8e7cf0dbd4ada03b0d226f461fd
+TARFILE_MD5=26015c63e3bbb108c1689bf2090e4c26351db674
 
-PATCH_FILES=NULbytes.patch
+PATCH_FILES+=$(TARFILE_NAME).scons.patch
 
 .IF "$(OS)"=="WNT"
 
@@ -65,17 +65,6 @@ BUILD_FLAGS+= -f ../../../../win/Makefile -j$(EXTMAXPROCESS)
 
 .ELSE
 
-.IF "$(OS)"=="MACOSX" || "$(OS)"=="FREEBSD" || "$(OS)"=="LINUX"
-# Do not link against expat.  It is not necessary (apr-util is already linked 
against it)
-# and does not work (we use a different expat library schema.)
-PATCH_FILES+=$(TARFILE_NAME).libs.patch
-.ENDIF
-
-.IF "$(OS)"=="LINUX"
-# Add -ldl as last library so that the linker has no trouble resolving 
dependencies.
-PATCH_FILES+=$(TARFILE_NAME).ldl.patch
-.ENDIF
-
 # Export ENABLE_SERF_LOGGING=YES to enable serf logging
 .IF "$(ENABLE_SERF_LOGGING)" == "YES"
 PATCH_FILES+=$(TARFILE_NAME).logging.patch
@@ -83,33 +72,30 @@ CDEFS+=-DENABLE_SERF_VERBOSE -DSERF_VERBOSE
 .ENDIF
 
 CONFIGURE_DIR=
-CONFIGURE_ACTION=autoconf && .$/configure
+CONFIGURE_ACTION=
+CONFIGURE_FLAGS=
+SCONS_FLAGS=
 
-.IF "$(OS)"=="LINUX"
-.IF "$(SYSTEM_OPENSSL)"=="YES"
-CDEFS+=$(OPENSSL_CFLAGS)
-.ELSE
+.IF "$(SYSTEM_OPENSSL)"!="YES"
 OPENSSLINCDIR=external
-CDEFS+=-I$(SOLARINCDIR)$/$(OPENSSLINCDIR)
-.ENDIF
+SCONS_FLAGS+=OPENSSL=$(SOLARINCDIR)/$(OPENSSLINCDIR)
 .ENDIF
 
-# On Linux/Mac we need the content of CDEFS in CFLAGS so that the ssl headers 
are searched for
-.IF "$(OS)"=="MACOSX" || "$(OS)"=="LINUX"
-# in a directory that corresponds to the directory that is searched for the 
ssl library.
-CONFIGURE_FLAGS='CFLAGS=$(CDEFS)'
+.IF "$(SYSTEM_APR)"!="YES"
+SCONS_FLAGS+=APR=$(OUTDIR)
+SCONS_FLAGS+=APU=$(OUTDIR)
 .ENDIF
 
 BUILD_DIR=$(CONFIGURE_DIR)
-BUILD_ACTION=$(GNUMAKE)
-BUILD_FLAGS+= -j$(EXTMAXPROCESS)
+BUILD_ACTION=scons
+BUILD_FLAGS=$(SCONS_FLAGS)
 
 .IF "$(OS)"=="MACOSX"
 # Serf names its library only with the major number.
 # We are using minor and micro as well.  Fix that here
 # by creating a copy with the right name.
-SERF_ORIGINAL_LIB=.libs/libserf-$(SERF_MAJOR).0.dylib
-SERF_FIXED_LIB=.libs/libserf-$(LIBSERFVERSION).0.dylib
+SERF_ORIGINAL_LIB=libserf-$(SERF_MAJOR).0.dylib
+SERF_FIXED_LIB=libserf-$(LIBSERFVERSION).0.dylib
 INSTALL_ACTION=if [ -f "$(SERF_ORIGINAL_LIB)" -a ! -f "$(SERF_FIXED_LIB)" ]; 
then cp $(SERF_ORIGINAL_LIB) $(SERF_FIXED_LIB); fi         
 .ENDIF
 
@@ -118,9 +104,9 @@ OUT2INC_SUBDIR=serf
 
 .IF "$(OS)"=="MACOSX"
 OUT2LIB+=$(SERF_FIXED_LIB)
-OUT2LIB+=.libs/libserf-1.*dylib
+OUT2LIB+=/libserf-1.*dylib
 .ELSE
-OUT2LIB=.libs/libserf-1.so*
+OUT2LIB=libserf-1.so*
 .ENDIF
 
 .ENDIF
diff --git a/ext_libraries/serf/serf-1.3.9.scons.patch 
b/ext_libraries/serf/serf-1.3.9.scons.patch
new file mode 100644
index 0000000..c082fab
--- /dev/null
+++ b/ext_libraries/serf/serf-1.3.9.scons.patch
@@ -0,0 +1,20 @@
+--- misc/serf-1.3.9.orig/SConstruct    2015-09-17 14:46:24.000000000 +0200
++++ misc/build/serf-1.3.9/SConstruct   2021-11-13 15:55:56.978550449 +0100
+@@ -166,7 +166,7 @@
+ match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
+                   'SERF_MINOR_VERSION ([0-9]+).*'
+                   'SERF_PATCH_VERSION ([0-9]+)',
+-                  env.File('serf.h').get_contents(),
++                  env.File('serf.h').get_contents().decode("utf-8"),
+                   re.DOTALL)
+ MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
+ env.Append(MAJOR=str(MAJOR))
+@@ -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/ext_libraries/serf/serf_version.mk 
b/ext_libraries/serf/serf_version.mk
index 4cf1379..b667e97 100644
--- a/ext_libraries/serf/serf_version.mk
+++ b/ext_libraries/serf/serf_version.mk
@@ -20,5 +20,5 @@
 #**************************************************************
 
 SERF_MAJOR=1
-SERF_MINOR=2
-SERF_MICRO=1
+SERF_MINOR=3
+SERF_MICRO=9
diff --git a/main/external_deps.lst b/main/external_deps.lst
index d39f8d5..176694b 100644
--- a/main/external_deps.lst
+++ b/main/external_deps.lst
@@ -127,9 +127,9 @@ if ( true )
     URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
 if ( true )
-    SHA1 = f65fbbd72926c8e7cf0dbd4ada03b0d226f461fd
-    name = serf-1.2.1.tar.bz2
-    URL1 = https://archive.apache.org/dist/serf/serf-1.2.1.tar.bz2
+    SHA1 = 26015c63e3bbb108c1689bf2090e4c26351db674
+    name = serf-1.3.9.tar.bz2
+    URL1 = https://archive.apache.org/dist/serf/serf-1.3.9.tar.bz2
     URL2 = $(OOO_EXTRAS)$(SHA1)-$(name)
 
 if (SOLAR_JAVA==TRUE && (ENABLE_MEDIAWIKI==YES || ENABLE_REPORTBUILDER==YES))
diff --git a/main/scp2/source/ooo/file_library_ooo.scp 
b/main/scp2/source/ooo/file_library_ooo.scp
index d8eda0b..2aac7c4 100644
--- a/main/scp2/source/ooo/file_library_ooo.scp
+++ b/main/scp2/source/ooo/file_library_ooo.scp
@@ -2056,9 +2056,9 @@ File gid_File_Lib_Serf
        #ifdef MACOSX
             Name = STRING(CONCAT3(libserf-,SERF_MAJOR,UNXSUFFIX));
        #elif FREEBSD
-            Name = STRING(CONCAT3(libserf-1,UNXSUFFIX,.0));
+            Name = STRING(CONCAT3(libserf-1,UNXSUFFIX,.1));
        #else
-            Name = STRING(CONCAT3(libserf-1,UNXSUFFIX,.0.0.0));
+            Name = STRING(CONCAT3(libserf-1,UNXSUFFIX,.1.3.0));
        #endif
     #endif
     PACKED_LIB_FILE_BODY;
diff --git a/main/scp2/source/ooo/shortcut_ooo.scp 
b/main/scp2/source/ooo/shortcut_ooo.scp
index 9fbc33f..132461a 100644
--- a/main/scp2/source/ooo/shortcut_ooo.scp
+++ b/main/scp2/source/ooo/shortcut_ooo.scp
@@ -142,9 +142,9 @@ Shortcut gid_Shortcut_Lib_Serf
     FileID = gid_File_Lib_Serf;
     Dir = SCP2_OOO_BIN_DIR;
     #ifdef MACOSX
-        Name = STRING(CONCAT2(libserf-1.0,UNXSUFFIX));
+        Name = STRING(CONCAT2(libserf-1.1,UNXSUFFIX));
     #else
-        Name = STRING(CONCAT3(libserf-1,UNXSUFFIX,.0));
+        Name = STRING(CONCAT3(libserf-1,UNXSUFFIX,.1));
     #endif
     Styles = (NETWORK,RELATIVE,FORCE_INTO_UPDATE_PACKAGE);
 End

Reply via email to