[packages/syslog-ng] query for glib's static libs when trying to statically link glib

atler atler at pld-linux.org
Sat Nov 19 20:10:23 CET 2022


commit 5ce526cae0e3f58bb606b7e3a11649126b27a5e3
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat Nov 19 20:03:38 2022 +0100

    query for glib's static libs when trying to statically link glib

 glib-static.patch | 23 +++++++++++++++++++++++
 syslog-ng.spec    |  2 ++
 2 files changed, 25 insertions(+)
---
diff --git a/syslog-ng.spec b/syslog-ng.spec
index 6f351c7..d65f77a 100644
--- a/syslog-ng.spec
+++ b/syslog-ng.spec
@@ -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
 
diff --git a/glib-static.patch b/glib-static.patch
new file mode 100644
index 0000000..58229a5
--- /dev/null
+++ b/glib-static.patch
@@ -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"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/syslog-ng.git/commitdiff/952295913bb1ee6cb4b915ce58189762d9f1f498



More information about the pld-cvs-commit mailing list