aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Langille <dvl@FreeBSD.org>2015-10-21 22:46:07 +0000
committerDan Langille <dvl@FreeBSD.org>2015-10-21 22:46:07 +0000
commitb1806eba48834476cede0d6e63b090832cd95a01 (patch)
tree8bf6d7389abc101f2a07e20d0c3f2070f234fa6a
parentf8420c6f9685fa2ba56e7e44fcd15b4d82045446 (diff)
downloadports-b1806eba48834476cede0d6e63b090832cd95a01.tar.gz
ports-b1806eba48834476cede0d6e63b090832cd95a01.zip
Improve the upgrade process with respect to shared libraries
My thanks to Larry Rosenman who did all the heavy lifting on this patch. The existing port relied heavily upon an agressive sed which seems to have adverse affects. Submitted by: ler@lerctr.org PR: 193641 193617 Approved by: mat (mentor)
Notes
Notes: svn path=/head/; revision=399938
-rw-r--r--sysutils/bacula-client/Makefile2
-rw-r--r--sysutils/bacula-server/Makefile34
-rw-r--r--sysutils/bacula-server/Makefile.common2
-rw-r--r--sysutils/bacula-server/files/patch-src_console_Makefile.in26
-rw-r--r--sysutils/bacula-server/files/patch-src_dird_Makefile.in28
-rw-r--r--sysutils/bacula-server/files/patch-src_filed_Makefile.in26
-rw-r--r--sysutils/bacula-server/files/patch-src_qt-console_bat.pro.in (renamed from sysutils/bacula-server/files/patch-src__qt-configle__bat.pro.in)6
-rw-r--r--sysutils/bacula-server/files/patch-src_stored_Makefile.in71
-rw-r--r--sysutils/bacula-server/files/patch-src_tools_Makefile.in105
9 files changed, 285 insertions, 15 deletions
diff --git a/sysutils/bacula-client/Makefile b/sysutils/bacula-client/Makefile
index e90c23a8ce80..b583fb0ba30d 100644
--- a/sysutils/bacula-client/Makefile
+++ b/sysutils/bacula-client/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= bacula
-PORTREVISION= 2
+PORTREVISION= 3
PKGNAMESUFFIX= -client
COMMENT= Network backup solution (client)
diff --git a/sysutils/bacula-server/Makefile b/sysutils/bacula-server/Makefile
index ae521902f45b..29c90a2f96bc 100644
--- a/sysutils/bacula-server/Makefile
+++ b/sysutils/bacula-server/Makefile
@@ -3,6 +3,7 @@
PORTNAME= bacula
DISTVERSION= 7.2.0
+PORTREVISION?= 1
CATEGORIES?= sysutils
MASTER_SITES= SF/bacula/bacula/${PORTVERSION}
PKGNAMEPREFIX?= #
@@ -11,7 +12,7 @@ PKGNAMESUFFIX?= -server
MAINTAINER= dvl@FreeBSD.org
COMMENT?= Network backup solution (server)
-USES+= libtool shebangfix
+USES+= libtool readline shebangfix
SHEBANG_FILES= scripts/dvd-handler.in
python_OLD_CMD= @PYTHON@
USE_OPENSSL= yes
@@ -41,7 +42,7 @@ PYTHON_USES= python
PYTHON_CONFIGURE_ON= --with-python=yes
.if !defined(WITH_CLIENT_ONLY)
-LIB_DEPENDS+= libbac.so:${PORTSDIR}/sysutils/bacula-client
+LIB_DEPENDS+= libbac-${DISTVERSION}.so:${PORTSDIR}/sysutils/bacula-client
USE_RC_SUBR?= bacula-dir bacula-sd
.endif
@@ -56,7 +57,6 @@ CONFIGURE_ARGS+=--with-tcp-wrappers=/usr/lib \
--sysconfdir=${ETCDIR} \
--with-working-dir=${BACULA_DIR} \
--with-scriptdir=${PREFIX}/share/${PORTNAME} \
- --with-readline=yes \
--disable-conio \
--enable-batch-insert \
--with-plugindir=${PREFIX}/lib \
@@ -133,6 +133,15 @@ SUB_LIST+= REQ_MYSQL="" REQ_PGSQL=postgresql
PLIST_SUB+= DBTYPE=${DBTYPE}
.endif
+.include <bsd.port.pre.mk>
+.if ${readline_ARGS} == "port"
+readline_CONFIGURE= ${LOCALBASE}
+.else
+readline_CONFIGURE= yes
+.endif
+
+CONFIGURE_ARGS+= --with-readline=${readline_CONFIGURE}
+
.if defined(WITH_CLIENT_ONLY)
MP8+= bacula.8 bacula-fd.8 bconsole.8
.else
@@ -166,13 +175,7 @@ post-patch:
.else
# In server port don't install filed
@${REINPLACE_CMD} -e '/^fd_subdirs = /s|src/filed||' -e 's|src/console||' \
- -e 's|src/lib||' -e 's|src/findlib||' -e 's|@FD_PLUGIN_DIR@||' ${WRKSRC}/Makefile.in
- @${REINPLACE_CMD} \
- -e 's|../lib/[^[:space:]]*||g' \
- -e 's|../findlib/[^[:space:]]*||g' \
- ${WRKSRC}/src/dird/Makefile.in \
- ${WRKSRC}/src/stored/Makefile.in \
- ${WRKSRC}/src/tools/Makefile.in
+ ${WRKSRC}/Makefile.in
.endif
.if !target(post-install)
@@ -182,6 +185,15 @@ post-install:
.else
${INSTALL_SCRIPT} ${FILESDIR}/chio-bacula ${STAGEDIR}${PREFIX}/sbin
${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${STAGEDIR}${ETCDIR}/bacula-barcodes.sample
+ #the following are installed by the -CLIENT port, and I (ler@lerctr.org)
+ #don't know how to remove them from being built for the -SERVER port.
+ ${RM} ${STAGEDIR}${LOCALBASE}/lib/bpipe-fd.so
+ ${RM} ${STAGEDIR}${LOCALBASE}/lib/libbac-${PORTVERSION}.so
+ ${RM} ${STAGEDIR}${LOCALBASE}/lib/libbac.so
+ ${RM} ${STAGEDIR}${LOCALBASE}/lib/libbaccfg-${PORTVERSION}.so
+ ${RM} ${STAGEDIR}${LOCALBASE}/lib/libbaccfg.so
+ ${RM} ${STAGEDIR}${LOCALBASE}/lib/libbacfind-${PORTVERSION}.so
+ ${RM} ${STAGEDIR}${LOCALBASE}/lib/libbacfind.so
.endif
for na in ${CONFFILES}; do \
${MV} ${STAGEDIR}${ETCDIR}/bacula-$$na.conf ${STAGEDIR}${ETCDIR}/bacula-$$na.conf.sample; \
@@ -191,4 +203,4 @@ post-install:
.include "${MASTERDIR}/Makefile.common"
.endif # -client and -server are defined
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/sysutils/bacula-server/Makefile.common b/sysutils/bacula-server/Makefile.common
index 2176774ee74b..503791fbb09e 100644
--- a/sysutils/bacula-server/Makefile.common
+++ b/sysutils/bacula-server/Makefile.common
@@ -1,3 +1,5 @@
+.include <bsd.port.pre.mk>
+
post-build:
.if ${PKGNAMEPREFIX} == "nagios-check_"
${MAKE_CMD} -C ${WRKSRC}/examples/nagios/check_bacula
diff --git a/sysutils/bacula-server/files/patch-src_console_Makefile.in b/sysutils/bacula-server/files/patch-src_console_Makefile.in
new file mode 100644
index 000000000000..4b59666d296a
--- /dev/null
+++ b/sysutils/bacula-server/files/patch-src_console_Makefile.in
@@ -0,0 +1,26 @@
+--- src/console/Makefile.in.orig 2015-08-13 13:52:24 UTC
++++ src/console/Makefile.in
+@@ -48,12 +48,12 @@ all: Makefile bconsole @STATIC_CONS@
+
+
+ bconsole: Makefile $(CONSOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
++ $(LIBTOOL_LINK) $(CXX) -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(CONSOBJS) \
+ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+ $(OPENSSL_LIBS)
+
+ static-bconsole: Makefile $(CONSOBJS) ../lib/libbac.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
++ $(LIBTOOL_LINK) $(CXX) -static -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(CONSOBJS) \
+ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+ $(OPENSSL_LIBS)
+ strip $@
+@@ -121,7 +121,7 @@ uninstall:
+ depend:
+ @$(MV) Makefile Makefile.bak
+ @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
+- @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
++ @echo "# DO NOT DELETE: nice dependency list follows" >> Makefile
+ @$(CXX) -S -M $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
+ @if test -f Makefile ; then \
+ $(RMF) Makefile.bak; \
diff --git a/sysutils/bacula-server/files/patch-src_dird_Makefile.in b/sysutils/bacula-server/files/patch-src_dird_Makefile.in
new file mode 100644
index 000000000000..1254a5e508e3
--- /dev/null
+++ b/sysutils/bacula-server/files/patch-src_dird_Makefile.in
@@ -0,0 +1,28 @@
+--- src/dird/Makefile.in.orig 2015-08-13 13:52:24 UTC
++++ src/dird/Makefile.in
+@@ -65,14 +65,14 @@ bacula-dir: Makefile $(SVROBJS) ../lib/l
+ ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
+ ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
+ @echo "Linking $@ ..."
+- $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
++ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) -L../lib -L../cats -L../findlib $(LDFLAGS) -o $@ $(SVROBJS) \
+ -lbacfind -lbacsql -lbaccats -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
+ $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
+
+ static-bacula-dir: Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
+ ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
+ ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
++ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) -static -L../lib -L../cats -L../findlib $(LDFLAGS) -o $@ $(SVROBJS) \
+ -lbacfind -lbacsql -lbaccats -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
+ $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
+ strip $@
+@@ -137,7 +137,7 @@ uninstall:
+ depend:
+ @$(MV) Makefile Makefile.bak
+ @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
+- @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
++ @echo "# DO NOT DELETE: nice dependency list follows" >> Makefile
+ @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) *.c >> Makefile
+ @if test -f Makefile ; then \
+ $(RMF) Makefile.bak; \
diff --git a/sysutils/bacula-server/files/patch-src_filed_Makefile.in b/sysutils/bacula-server/files/patch-src_filed_Makefile.in
new file mode 100644
index 000000000000..797cf5030028
--- /dev/null
+++ b/sysutils/bacula-server/files/patch-src_filed_Makefile.in
@@ -0,0 +1,26 @@
+--- src/filed/Makefile.in.orig 2015-08-13 13:52:24 UTC
++++ src/filed/Makefile.in
+@@ -65,12 +65,12 @@ acl.o: acl.c
+
+ bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+ @echo "Linking $@ ..."
+- $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
++ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) -L../lib -L../findlib $(LDFLAGS) -o $@ $(SVROBJS) \
+ $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
+ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
+
+ static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
++ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) -static -L../lib -L../findlib $(LDFLAGS) -o $@ $(SVROBJS) \
+ $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
+ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
+ strip $@
+@@ -127,7 +127,7 @@ uninstall:
+ depend:
+ @$(MV) Makefile Makefile.bak
+ @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
+- @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
++ @echo "# DO NOT DELETE: nice dependency list follows" >> Makefile
+ @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(LZO_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
+ @if test -f Makefile ; then \
+ $(RMF) Makefile.bak; \
diff --git a/sysutils/bacula-server/files/patch-src__qt-configle__bat.pro.in b/sysutils/bacula-server/files/patch-src_qt-console_bat.pro.in
index 3e9dafa261ed..1bca6f6d819b 100644
--- a/sysutils/bacula-server/files/patch-src__qt-configle__bat.pro.in
+++ b/sysutils/bacula-server/files/patch-src_qt-console_bat.pro.in
@@ -1,6 +1,6 @@
---- src/qt-console/bat.pro.in.orig 2012-09-13 10:51:19.000000000 +0200
-+++ src/qt-console/bat.pro.in 2014-07-02 18:02:18.587979885 +0200
-@@ -19,7 +19,7 @@
+--- src/qt-console/bat.pro.in.orig 2015-08-13 13:52:24 UTC
++++ src/qt-console/bat.pro.in
+@@ -19,7 +19,7 @@ TEMPLATE = app
TARGET = bat
DEPENDPATH += .
INCLUDEPATH += .. . ./console ./restore ./select
diff --git a/sysutils/bacula-server/files/patch-src_stored_Makefile.in b/sysutils/bacula-server/files/patch-src_stored_Makefile.in
new file mode 100644
index 000000000000..d2afbd28ecd0
--- /dev/null
+++ b/sysutils/bacula-server/files/patch-src_stored_Makefile.in
@@ -0,0 +1,71 @@
+--- src/stored/Makefile.in.orig 2015-08-13 13:52:24 UTC
++++ src/stored/Makefile.in
+@@ -115,12 +115,12 @@ all: Makefile bacula-sd @STATIC_SD@ bls
+
+ bacula-sd: Makefile $(SDOBJS) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+ @echo "Linking $@ ..."
+- $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -o $@ $(SDOBJS) $(ZLIBS) \
++ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) -L../lib $(LDFLAGS) -o $@ $(SDOBJS) $(ZLIBS) \
+ -lbaccfg -lbac -lm $(DLIB) $(LIBS) $(WRAPLIBS) \
+ $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
+
+ static-bacula-sd: Makefile $(SDOBJS) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -o $@ $(SDOBJS) $(ZLIBS) \
++ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) -static -L../lib $(LDFLAGS) -o $@ $(SDOBJS) $(ZLIBS) \
+ -lbaccfg -lbac -lm $(DLIB) $(LIBS) $(WRAPLIBS) \
+ $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
+ strip $@
+@@ -131,7 +131,7 @@ btape.o: btape.c
+ -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
+
+ btape: Makefile $(TAPEOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -o $@ $(TAPEOBJS) \
++ $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) -L../lib $(LDFLAGS) -o $@ $(TAPEOBJS) \
+ -lbaccfg -lbac $(DLIB) -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ bls.o: bls.c
+@@ -141,7 +141,7 @@ bls.o: bls.c
+
+ bls: Makefile $(BLSOBJS) ../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) -L../lib -L../findlib $(LDFLAGS) -o $@ $(BLSOBJS) $(DLIB) \
+ -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ bextract.o: bextract.c
+@@ -151,7 +151,7 @@ bextract.o: bextract.c
+
+ bextract: Makefile $(BEXTOBJS) ../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) -L../lib -L../findlib $(LDFLAGS) -o $@ $(BEXTOBJS) $(DLIB) $(ZLIBS) $(LZO_LIBS) \
+ -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ bscan.o: bscan.c
+@@ -161,7 +161,7 @@ bscan.o: bscan.c
+
+ bscan: Makefile $(SCNOBJS) ../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) -L../lib -L../cats -L../findlib $(LDFLAGS) -o $@ $(SCNOBJS) \
+ -lbacsql -lbaccats $(DB_LIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ bcopy.o: bcopy.c
+@@ -170,7 +170,7 @@ bcopy.o: bcopy.c
+ -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
+
+ bcopy: Makefile $(COPYOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -o $@ $(COPYOBJS) \
++ $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) -L../lib $(LDFLAGS) -o $@ $(COPYOBJS) \
+ -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
+@@ -235,7 +235,7 @@ devclean: realclean
+ depend:
+ @$(MV) Makefile Makefile.bak
+ @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
+- @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
++ @echo "# DO NOT DELETE: nice dependency list follows" >> Makefile
+ @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) *.c >> Makefile
+ @if test -f Makefile ; then \
+ $(RMF) Makefile.bak; \
diff --git a/sysutils/bacula-server/files/patch-src_tools_Makefile.in b/sysutils/bacula-server/files/patch-src_tools_Makefile.in
new file mode 100644
index 000000000000..623f7c488976
--- /dev/null
+++ b/sysutils/bacula-server/files/patch-src_tools_Makefile.in
@@ -0,0 +1,105 @@
+--- src/tools/Makefile.in.orig 2015-08-13 13:52:24 UTC
++++ src/tools/Makefile.in
+@@ -57,26 +57,26 @@ all: Makefile $(TOOLS) gigaslam grow
+ @echo " "
+
+ bsmtp: Makefile bsmtp.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bsmtp.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++ $(LIBTOOL_LINK) $(CXX) -L../lib $(LDFLAGS) -o $@ bsmtp.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ bsnapshot: Makefile bsnapshot.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bsnapshot.o ../lib/ini$(DEFAULT_OBJECT_TYPE) -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS)
++ $(LIBTOOL_LINK) $(CXX) -L../lib $(LDFLAGS) -o $@ bsnapshot.o ../lib/ini$(DEFAULT_OBJECT_TYPE) -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS)
+
+
+ bregtest: Makefile bregtest.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bregtest.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++ $(LIBTOOL_LINK) $(CXX) -L../lib $(LDFLAGS) -o $@ bregtest.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ dbcheck: Makefile dbcheck.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
+ ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) $(DIRCONFOBJS)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ dbcheck.o $(DIRCONFOBJS) \
++ $(LIBTOOL_LINK) $(CXX) -L../lib -L../cats $(LDFLAGS) -o $@ dbcheck.o $(DIRCONFOBJS) \
+ -lbaccats -lbacsql -lbaccfg -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ fstype: Makefile fstype.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ fstype.o -lbacfind -lbac -lm \
++ $(LIBTOOL_LINK) $(CXX) -L../lib -L../findlib $(LDFLAGS) -o $@ fstype.o -lbacfind -lbac -lm \
+ $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ drivetype: Makefile drivetype.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ drivetype.o -lbacfind -lbac -lm \
++ $(LIBTOOL_LINK) $(CXX) -L../lib -L../findlib $(LDFLAGS) -o $@ drivetype.o -lbacfind -lbac -lm \
+ $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ dird_conf.o: ../dird/dird_conf.c
+@@ -94,29 +94,29 @@ timelimit: timelimit.o
+
+ testfind: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
+ ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) $(FINDOBJS)
+- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -o $@ $(FINDOBJS) -L. -L../lib -L../findlib \
++ $(LIBTOOL_LINK) $(CXX) -g -o $@ $(FINDOBJS) -L. -L../lib -L../findlib $(LDFLAGS) \
+ $(DLIB) -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ testls: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) testls.o
+- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L. -L../lib -L../findlib -o $@ testls.o \
++ $(LIBTOOL_LINK) $(CXX) -g -L. -L../lib -L../findlib $(LDFLAGS) -o $@ testls.o \
+ $(DLIB) -lbacfind -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ bregex: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) bregex.o
+- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L. -L../lib -o $@ bregex.o \
++ $(LIBTOOL_LINK) $(CXX) -g -L. -L../lib $(LDFLAGS) -o $@ bregex.o \
+ $(DLIB) -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ bwild: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) bwild.o
+- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L. -L../lib -o $@ bwild.o \
++ $(LIBTOOL_LINK) $(CXX) -g -L. -L../lib $(LDFLAGS) -o $@ bwild.o \
+ $(DLIB) -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ bbatch: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
+ ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) bbatch.o
+- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -o $@ bbatch.o \
++ $(LIBTOOL_LINK) $(CXX) -g -L../cats -L. -L../lib $(LDFLAGS) -o $@ bbatch.o \
+ -lbaccats -lbacsql -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ bvfs_test: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) \
+ ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) bvfs_test.o
+- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -L../findlib -o $@ bvfs_test.o \
++ $(LIBTOOL_LINK) $(CXX) -g -L../cats -L. -L../lib -L../findlib $(LDFLAGS) -o $@ bvfs_test.o \
+ -lbaccats -lbacsql -lbacfind -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ cats_test.o: cats_test.c
+@@ -124,7 +124,7 @@ cats_test.o: cats_test.c
+ $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
+
+ cats_test: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) cats_test.o
+- $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -L../findlib -o $@ cats_test.o \
++ $(LIBTOOL_LINK) $(CXX) -g -L../cats -L. -L../lib -L../findlib $(LDFLAGS) -o $@ cats_test.o \
+ -lbaccats -lbacsql -lbacfind -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ gigaslam.o: gigaslam.c
+@@ -134,13 +134,13 @@ gigaslam: gigaslam.o
+ $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -o $@ gigaslam.o
+
+ grow: Makefile grow.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ grow.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++ $(LIBTOOL_LINK) $(CXX) -L../lib $(LDFLAGS) -o $@ grow.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ bpluginfo.o: bpluginfo.c
+ $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) -I../filed -I../dird -I../stored $(DINCLUDE) $(CFLAGS) $<
+
+ bpluginfo: Makefile bpluginfo.o
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bpluginfo.o -lbac $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++ $(LIBTOOL_LINK) $(CXX) -L../lib $(LDFLAGS) -o $@ bpluginfo.o -lbac $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
+ cd $(topdir) \
+@@ -197,7 +197,7 @@ uninstall:
+ depend:
+ @$(MV) Makefile Makefile.bak
+ @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
+- @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
++ @echo "# DO NOT DELETE: nice dependency list follows" >> Makefile
+ @$(CXX) -S -M $(CPPFLAGS) -I$(srcdir) -I$(basedir) *.c >> Makefile
+ @if test -f Makefile ; then \
+ $(RMF) Makefile.bak; \