]> git.pld-linux.org Git - packages/syslog-ng.git/commitdiff
query for glib's static libs when trying to statically link glib
authorJan Palus <atler@pld-linux.org>
Sat, 19 Nov 2022 19:03:38 +0000 (20:03 +0100)
committerJan Palus <atler@pld-linux.org>
Sat, 19 Nov 2022 19:03:38 +0000 (20:03 +0100)
glib-static.patch [new file with mode: 0644]
syslog-ng.spec

diff --git a/glib-static.patch b/glib-static.patch
new file mode 100644 (file)
index 0000000..58229a5
--- /dev/null
@@ -0,0 +1,23 @@
+--- syslog-ng-3.36.1/configure.ac.orig 2022-11-19 19:54:27.666859016 +0100
++++ syslog-ng-3.36.1/configure.ac      2022-11-19 19:55:44.214304211 +0100
+@@ -919,16 +919,18 @@
+ dnl ***************************************************************************
+ GLIB_ADDONS="gmodule-2.0 gthread-2.0"
+-PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_MIN_VERSION $GLIB_ADDONS,,)
+ if test "$linking_mode" != "dynamic"; then
++      PKG_CHECK_MODULES_STATIC(GLIB, glib-2.0 >= $GLIB_MIN_VERSION $GLIB_ADDONS,,)
+       # strip out -ldl & -lrt as it cannot be linked statically
+-      GLIB_LIBS=`echo $GLIB_LIBS | tr ' ' '\n' | egrep -v "^(-ldld?)|(-lrt)$" | tr '\n' ' '`
++      GLIB_LIBS=`echo $GLIB_LIBS | tr ' ' '\n' | egrep -v "^(-ldld?)|(-lrt)|(-lm)$" | tr '\n' ' '`
+       old_LIBS=$LIBS
+       LIBS="$LD_START_STATIC $GLIB_LIBS $LD_END_STATIC $BASE_LIBS"
+       AC_CHECK_FUNC(g_hash_table_new, blb_cv_static_glib=yes, blb_cv_static_glib=no)
+       LIBS=$old_LIBS
++else
++      PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_MIN_VERSION $GLIB_ADDONS,,)
+ fi
+ GLIB_CFLAGS="${GLIB_CFLAGS} -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"
index 6f351c71b1d88eb572d1d11a70dbc6d140af8b92..d65f77aa34d973be85366350e0e9bc4bb67cb661 100644 (file)
@@ -66,6 +66,7 @@ Patch5:               %{name}-link.patch
 Patch6:                no_shared_ivykis.patch
 Patch7:                32bit.patch
 Patch8:                openssl3.patch
+Patch9:                glib-static.patch
 URL:           https://syslog-ng.org/
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake
@@ -375,6 +376,7 @@ rmdir lib/ivykis
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 cp -p %{SOURCE4} doc
 cp -p %{SOURCE5} contrib/syslog-ng.conf.simple
 
This page took 0.179512 seconds and 4 git commands to generate.