commit:     6a72f6909ba8649fa6e6fe7336b0c5cc8116b4c7
Author:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 15 13:51:09 2023 +0000
Commit:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Wed Nov 15 13:53:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a72f690

app-backup/bacula: Fix library search path for build with slibtool

Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
Closes: https://bugs.gentoo.org/914389

 app-backup/bacula/bacula-13.0.3-r2.ebuild  |  3 ++
 app-backup/bacula/files/fix_slibtool.patch | 67 ++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)

diff --git a/app-backup/bacula/bacula-13.0.3-r2.ebuild 
b/app-backup/bacula/bacula-13.0.3-r2.ebuild
index 215b36e4ef79..024d64df49ea 100644
--- a/app-backup/bacula/bacula-13.0.3-r2.ebuild
+++ b/app-backup/bacula/bacula-13.0.3-r2.ebuild
@@ -134,6 +134,9 @@ src_prepare() {
        # fix soname in libbaccat.so, see bugs #602952, #790140 and #845126
        eapply "${FILESDIR}/bacula-fix-sonames-new.patch"
 
+       # correct library search path for slibtool usage (bug #914389)
+       eapply -p0 "${FILESDIR}/fix_slibtool.patch"
+
        # do not strip binaries
        sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die
        sed -i -e "s/strip /# strip /" src/console/Makefile.in || die

diff --git a/app-backup/bacula/files/fix_slibtool.patch 
b/app-backup/bacula/files/fix_slibtool.patch
new file mode 100644
index 000000000000..e38448faa30c
--- /dev/null
+++ b/app-backup/bacula/files/fix_slibtool.patch
@@ -0,0 +1,67 @@
+# slibtool creates library in .libs directory but need -L. to find them
+# Bug #914389
+--- src/stored/Makefile.in.orig        2023-11-15 14:20:23.135630968 +0100
++++ src/stored/Makefile.in     2023-11-15 14:22:35.771246680 +0100
+@@ -267,7 +267,7 @@
+          -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
+ 
+ btape: Makefile  $(TAPEOBJS) libbacsd.la drivers 
../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+-      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib 
-L../findlib -o $@ $(TAPEOBJS) \
++      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib 
-L../findlib -o $@ $(TAPEOBJS) \
+         $(SD_LIBS) $(DLIB) -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+ 
+ 
+@@ -277,7 +277,7 @@
+            -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
+ 
+ cloud_test: Makefile cloud_test.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)  
$(BLSOBJS)  libbacsd.la drivers
+-      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib 
-L../findlib -o $@ $(CLOUDTESTOBJS) $(DLIB) \
++      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib 
-L../findlib -o $@ $(CLOUDTESTOBJS) $(DLIB) \
+            $(SD_LIBS) -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+ 
+ bcloud.o: bcloud.c
+@@ -286,7 +286,7 @@
+            -I$(basedir) $(DINCLUDE) $(S3_INC) $(CFLAGS) $<
+ 
+ bcloud: Makefile bcloud.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)  $(BLSOBJS)  
libbacsd.la drivers
+-      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib 
-L../findlib -o $@ $(CLOUDCLIOBJS) $(DLIB) \
++      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib 
-L../findlib -o $@ $(CLOUDCLIOBJS) $(DLIB) \
+            $(SD_LIBS) -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(S3_LIBS)
+ 
+ bls.o:        bls.c
+@@ -296,7 +296,7 @@
+ 
+ bls:  Makefile $(BLSOBJS) libbacsd.la drivers  
../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) 
../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+       @echo "Compiling $<"
+-      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib 
-L../findlib -o $@ $(BLSOBJS) $(DLIB) \
++      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib 
-L../findlib -o $@ $(BLSOBJS) $(DLIB) \
+          $(SD_LIBS) -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+ 
+ bextract.o: bextract.c
+@@ -306,7 +306,7 @@
+ 
+ bextract: Makefile $(BEXTOBJS) libbacsd.la drivers 
../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) 
../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+       @echo "Compiling $<"
+-      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib 
-L../findlib -o $@ $(BEXTOBJS) $(DLIB) $(ZLIBS) $(LZO_LIBS) \
++      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib 
-L../findlib -o $@ $(BEXTOBJS) $(DLIB) $(ZLIBS) $(LZO_LIBS) \
+          $(SD_LIBS) -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+ 
+ bscan.o: bscan.c
+@@ -316,7 +316,7 @@
+ 
+ bscan:        Makefile $(SCNOBJS) libbacsd.la drivers 
../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) 
../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
+       ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) 
../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE)
+-      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats 
-L../findlib -o $@ $(SCNOBJS) \
++      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib 
-L../cats -L../findlib -o $@ $(SCNOBJS) \
+          $(SD_LIBS) -lbacsql -lbaccats $(DB_LIBS) $(ZLIBS) -lbacfind -lbaccfg 
-lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+ 
+ bcopy.o: bcopy.c
+@@ -325,7 +325,7 @@
+          -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
+ 
+ bcopy:        Makefile $(COPYOBJS) libbacsd.la drivers 
../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) 
../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+-      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib 
-L../findlib -o $@ $(COPYOBJS) \
++      $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib 
-L../findlib -o $@ $(COPYOBJS) \
+          $(SD_LIBS) -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+ 
+ cloud_parts_test: Makefile cloud_parts.c

Reply via email to