git: 5d4d8e581b5f - main - sysutils/bareos*: Fix build

From: Jose Alonso Cardenas Marquez <acm_at_FreeBSD.org>
Date: Sun, 06 Mar 2022 20:20:48 UTC
The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5d4d8e581b5f761ab8d32dd76d9f3a8f6d4e467e

commit 5d4d8e581b5f761ab8d32dd76d9f3a8f6d4e467e
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2022-03-06 20:17:48 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2022-03-06 20:17:48 +0000

    sysutils/bareos*: Fix build
    
    - Fix build
    - Fix issue where pid file is missing [1]
    - Bump PORTREVISION
    PR:             262151
    Reported by:    feldeci  _at_  gmail.com [1]
---
 sysutils/bareos-server/Makefile                      |  2 +-
 sysutils/bareos-server/files/bareos-dir.in           |  2 +-
 sysutils/bareos-server/files/bareos-fd.in            |  2 +-
 sysutils/bareos-server/files/bareos-sd.in            |  2 +-
 .../files/patch-core-src-stored_CMakelists.txt       | 20 ++++++++++++++++++++
 sysutils/bareos18-server/Makefile                    |  2 +-
 .../files/patch-core-src-stored_CMakeLists.txt       | 11 ++++++-----
 sysutils/bareos19-server/Makefile                    |  2 +-
 .../files/patch-core-src-stored_CMakeLists.txt       |  6 +++---
 9 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/sysutils/bareos-server/Makefile b/sysutils/bareos-server/Makefile
index c83ff0b1efbc..060af656f49e 100644
--- a/sysutils/bareos-server/Makefile
+++ b/sysutils/bareos-server/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	bareos
 DISTVERSIONPREFIX=	Release/
 DISTVERSION=	21.0.0
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES?=	sysutils
 PKGNAMEPREFIX?=	#
 PKGNAMESUFFIX?=	-server
diff --git a/sysutils/bareos-server/files/bareos-dir.in b/sysutils/bareos-server/files/bareos-dir.in
index 86b62370cbb7..22272cf86231 100644
--- a/sysutils/bareos-server/files/bareos-dir.in
+++ b/sysutils/bareos-server/files/bareos-dir.in
@@ -26,7 +26,7 @@ load_rc_config $name
 : ${bareos_dir_pidfile="/var/run/bareos/bareos-dir.9101.pid"}
 
 command=%%PREFIX%%/sbin/bareos-dir
-command_args="-c ${bareos_dir_config}"
+command_args="-c ${bareos_dir_config} -p ${bareos_dir_pidfile}"
 pidfile="${bareos_dir_pidfile}"
 bconsole_command=/usr/local/bin/bconsole
 start_precmd="bareos_start_precmd"
diff --git a/sysutils/bareos-server/files/bareos-fd.in b/sysutils/bareos-server/files/bareos-fd.in
index 54647786b12c..8d57c3c858bc 100644
--- a/sysutils/bareos-server/files/bareos-fd.in
+++ b/sysutils/bareos-server/files/bareos-fd.in
@@ -26,7 +26,7 @@ load_rc_config $name
 : ${bareos_fd_pidfile="/var/run/bareos/bareos-fd.9102.pid"}
 
 command=%%PREFIX%%/sbin/bareos-fd
-command_args="-c ${bareos_fd_config}"
+command_args="-c ${bareos_fd_config} -p ${bareos_fd_pidfile}"
 pidfile="${bareos_fd_pidfile}"
 start_precmd="bareos_start_precmd"
 
diff --git a/sysutils/bareos-server/files/bareos-sd.in b/sysutils/bareos-server/files/bareos-sd.in
index a5efe78e80f7..529cf55140c0 100644
--- a/sysutils/bareos-server/files/bareos-sd.in
+++ b/sysutils/bareos-server/files/bareos-sd.in
@@ -26,7 +26,7 @@ load_rc_config $name
 : ${bareos_sd_pidfile="/var/run/bareos/bareos-sd.9103.pid"}
 
 command=%%PREFIX%%/sbin/bareos-sd
-command_args="-c ${bareos_sd_config}"
+command_args="-c ${bareos_sd_config} -p ${bareos_sd_pidfile}"
 pidfile="${bareos_sd_pidfile}"
 start_precmd="bareos_start_precmd"
 
diff --git a/sysutils/bareos-server/files/patch-core-src-stored_CMakelists.txt b/sysutils/bareos-server/files/patch-core-src-stored_CMakelists.txt
new file mode 100644
index 000000000000..64ee102c21f5
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-core-src-stored_CMakelists.txt
@@ -0,0 +1,20 @@
+--- core/src/stored/CMakeLists.txt	2021-12-21 06:00:49.000000000 -0500
++++ core/src/stored/CMakeLists.txt	2022-03-04 20:56:52.809609000 -0500
+@@ -219,7 +219,7 @@
+ add_executable(bareos-sd stored.cc)
+ 
+ target_link_libraries(
+-  bareos-sd PRIVATE stored_objects bareos bareossd bareosfind Threads::Threads
++  bareos-sd PRIVATE stored_objects bareos bareossd bareosfind Threads::Threads ${JANSSON_LIBRARIES}
+ )
+ 
+ if(HAVE_WIN32)
+@@ -228,7 +228,7 @@
+ endif()
+ if(HAVE_NDMP)
+   target_link_libraries(stored_objects PRIVATE bareosndmp)
+-  target_link_libraries(bareos-sd PRIVATE bareosndmp)
++  target_link_libraries(bareos-sd PRIVATE bareosndmp ${JANSSON_LIBRARIES})
+ endif()
+ 
+ add_executable(bls ${BLSSRCS})
diff --git a/sysutils/bareos18-server/Makefile b/sysutils/bareos18-server/Makefile
index 9e57e9c01510..19f1354962d8 100644
--- a/sysutils/bareos18-server/Makefile
+++ b/sysutils/bareos18-server/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	bareos
 DISTVERSIONPREFIX=	Release/
 DISTVERSION=	18.2.12
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES?=	sysutils
 PKGNAMEPREFIX?=	#
 PKGNAMESUFFIX?=	18-server
diff --git a/sysutils/bareos18-server/files/patch-core-src-stored_CMakeLists.txt b/sysutils/bareos18-server/files/patch-core-src-stored_CMakeLists.txt
index 2b2618ef7ada..30ea5dd024d0 100644
--- a/sysutils/bareos18-server/files/patch-core-src-stored_CMakeLists.txt
+++ b/sysutils/bareos18-server/files/patch-core-src-stored_CMakeLists.txt
@@ -1,6 +1,6 @@
---- core/src/stored/CMakeLists.txt	2020-12-11 10:27:01.000000000 -0500
-+++ core/src/stored/CMakeLists.txt	2021-02-19 18:05:23.992747000 -0500
-@@ -193,26 +193,34 @@
+--- core/src/stored/CMakeLists.txt	2021-09-13 03:57:27.000000000 -0500
++++ core/src/stored/CMakeLists.txt	2022-03-04 20:39:26.209621000 -0500
+@@ -193,26 +193,35 @@
  target_link_libraries(bareos-sd
     stored_objects
     ${BAREOS_SD_LIBRARIES}
@@ -11,6 +11,7 @@
  add_executable(bls ${BLSSRCS})
  target_link_libraries(bls
     bareos bareossd bareosfind 
++   ${JANSSON_LIBRARIES}
 +   ${PTHREAD_LIBRARIES}
     )
  
@@ -35,7 +36,7 @@
      )
  
  add_executable(bcopy ${BCOPYSRCS})
-@@ -220,6 +228,8 @@
+@@ -220,6 +229,8 @@
  
  target_link_libraries(bcopy
     bareossd bareos 
@@ -44,7 +45,7 @@
      )
  
  INSTALL(TARGETS bareossd DESTINATION ${libdir})
-@@ -232,7 +242,7 @@
+@@ -232,7 +243,7 @@
  install(CODE "set(SRC_DIR \"${PROJECT_SOURCE_DIR}\")")
  install(SCRIPT ${PROJECT_SOURCE_DIR}/cmake/install-stored-configfiles.cmake)
  
diff --git a/sysutils/bareos19-server/Makefile b/sysutils/bareos19-server/Makefile
index d0e74e571070..6c0206544a0c 100644
--- a/sysutils/bareos19-server/Makefile
+++ b/sysutils/bareos19-server/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	bareos
 DISTVERSIONPREFIX=	Release/
 DISTVERSION=	19.2.11
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES?=	sysutils
 PKGNAMEPREFIX?=	#
 PKGNAMESUFFIX?=	19-server
diff --git a/sysutils/bareos19-server/files/patch-core-src-stored_CMakeLists.txt b/sysutils/bareos19-server/files/patch-core-src-stored_CMakeLists.txt
index 63cff21da895..a20aba01e3f2 100644
--- a/sysutils/bareos19-server/files/patch-core-src-stored_CMakeLists.txt
+++ b/sysutils/bareos19-server/files/patch-core-src-stored_CMakeLists.txt
@@ -1,5 +1,5 @@
---- core/src/stored/CMakeLists.txt	2020-12-11 08:44:43.000000000 -0500
-+++ core/src/stored/CMakeLists.txt	2021-02-19 17:45:53.384978000 -0500
+--- core/src/stored/CMakeLists.txt	2021-09-13 11:07:41.000000000 -0500
++++ core/src/stored/CMakeLists.txt	2022-03-04 20:43:08.042458000 -0500
 @@ -213,23 +213,23 @@
    list(APPEND BAREOS_SD_LIBRARIES comctl32)
  endif()
@@ -9,7 +9,7 @@
  
  add_executable(bls ${BLSSRCS})
 -target_link_libraries(bls bareos bareossd bareosfind)
-+target_link_libraries(bls bareos bareossd bareosfind ${PTHREAD_LIBRARIES})
++target_link_libraries(bls bareos bareossd bareosfind ${JANSSON_LIBRARIES} ${PTHREAD_LIBRARIES})
  
  add_executable(bextract ${BEXTRACTSRS})
 -target_link_libraries(bextract bareossd bareosfind bareos)