svn commit: r501197 - in head/sysutils/bareos-server: . files

Jose Alonso Cardenas Marquez acm at FreeBSD.org
Fri May 10 20:19:44 UTC 2019


Author: acm
Date: Fri May 10 20:19:42 2019
New Revision: 501197
URL: https://svnweb.freebsd.org/changeset/ports/501197

Log:
  - Fix pthread error [1]
  - Fix build when python 2.x is not default version [2]
  - Fix build when NLS option is not selected [3]
  - Fix pkg-plist
  - Few other modifications
  
  PR:		237818 237823 237825
  Submitted by:	Trond.Endrestol _ at _ ximalas.info [1][3], beldin _ at _ beldin.org [2]
  Reported by:	pkg-fallout

Added:
  head/sysutils/bareos-server/files/patch-core-CMakeLists.txt   (contents, props changed)
  head/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake   (contents, props changed)
  head/sysutils/bareos-server/files/patch-core-cmake_BareosSetVariableDefaults.cmake   (contents, props changed)
  head/sysutils/bareos-server/files/patch-core-src-include_baconfig.h   (contents, props changed)
  head/sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt   (contents, props changed)
Modified:
  head/sysutils/bareos-server/Makefile
  head/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt
  head/sysutils/bareos-server/pkg-plist

Modified: head/sysutils/bareos-server/Makefile
==============================================================================
--- head/sysutils/bareos-server/Makefile	Fri May 10 20:17:39 2019	(r501196)
+++ head/sysutils/bareos-server/Makefile	Fri May 10 20:19:42 2019	(r501197)
@@ -65,9 +65,9 @@ SCSICRYPTO_CMAKE_ON=	-Dscsi-crypto=ON
 SCSICRYPTO_CMAKE_OFF=	-Dscsi-crypto=OFF
 
 .if ${PKGNAMESUFFIX} == "-client" || ${PKGNAMESUFFIX} == "-server"  #Till end of the file
-PYTHON_USES=		  python
-PYTHON_CMAKE_ON=	-Dpython=yes
-PYTHON_CMAKE_OFF=	-Dpython=no
+PYTHON_USES=		python:2.7
+PYTHON_CMAKE_ON=	-Dpython=ON
+PYTHON_CMAKE_OFF=	-Dpython=OFF
 PYTHON_PLUGIN=		yes
 
 .if !defined(WITH_CLIENT_ONLY)
@@ -138,7 +138,7 @@ SUB_LIST=	BAREOS_USER=${BAREOS_USER} \
 		BAREOS_DIR=${BAREOS_DIR}
 
 NLS_USES=		gettext
-NLS_CMAKE_ON=		-DENABLE_NLS=1
+NLS_CMAKE_ON=		-Dnls=ON
 
 # Client only or full server version
 .if defined(WITH_CLIENT_ONLY)
@@ -192,7 +192,6 @@ MAKE_ENV+=	MAN8="${MP8}" MAN1="${MP1}"
 
 post-patch:
 	@${REINPLACE_CMD}  '21d' ${WRKSRC}/CMakeLists.txt
-	@${REINPLACE_CMD}  '579d' ${WRKSRC}/core/CMakeLists.txt
 .if ${PKGNAMESUFFIX} == "-server"
 	@${REINPLACE_CMD}  '25d' ${WRKSRC}/core/src/plugins/CMakeLists.txt
 .endif

Added: head/sysutils/bareos-server/files/patch-core-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/bareos-server/files/patch-core-CMakeLists.txt	Fri May 10 20:19:42 2019	(r501197)
@@ -0,0 +1,32 @@
+--- core/CMakeLists.txt	2019-02-13 09:25:55.000000000 -0500
++++ core/CMakeLists.txt	2019-05-10 14:14:16.122670000 -0500
+@@ -116,7 +116,9 @@
+    set(PSCMD "ps -ax -o pid,command")
+    include_directories(/usr/local/include)
+    link_directories(/usr/local/lib)
+-   link_libraries(intl)
++   IF(nls)
++     link_libraries(intl)
++   ENDIF()
+ endif()
+ 
+ IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+@@ -173,7 +175,9 @@
+    add_definitions("-D_FILE_OFFSET_BITS=64")
+ endif()
+ 
+-INCLUDE(FindIntl)
++IF(nls)
++  INCLUDE(FindIntl)
++ENDIF()
+ 
+ IF(developer)
+    add_definitions("-DDEVELOPER=1")
+@@ -576,7 +580,6 @@
+ 
+ add_subdirectory(scripts)
+ add_subdirectory(manpages)
+-add_subdirectory(platforms)
+ add_subdirectory(src)
+ 
+ STRING(TIMESTAMP NOW "%Y-%m-%d %H:%M:%S")

Added: head/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake	Fri May 10 20:19:42 2019	(r501197)
@@ -0,0 +1,24 @@
+--- core/cmake/BareosFindAllLibraries.cmake	2019-05-10 00:27:21.421777000 -0500
++++ core/cmake/BareosFindAllLibraries.cmake	2019-05-10 00:28:47.016424000 -0500
+@@ -25,13 +25,15 @@
+ 
+ 
+ if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+-   # make sure we get python 2 not 3
+-   set(Python_ADDITIONAL_VERSIONS 2.5 2.6 2.7 2.8 2.9)
+-   find_package(PythonInterp)
+-   INCLUDE(FindPythonLibs)
++   if (python)
++     # make sure we get python 2 not 3
++     set(Python_ADDITIONAL_VERSIONS 2.5 2.6 2.7 2.8 2.9)
++     find_package(PythonInterp)
++     INCLUDE(FindPythonLibs)
+ 
+-   if (${PYTHONLIBS_FOUND})
+-      SET(HAVE_PYTHON 1)
++     if (${PYTHONLIBS_FOUND})
++        SET(HAVE_PYTHON 1)
++     endif()
+    endif()
+ 
+    INCLUDE(FindPostgreSQL)

Added: head/sysutils/bareos-server/files/patch-core-cmake_BareosSetVariableDefaults.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/bareos-server/files/patch-core-cmake_BareosSetVariableDefaults.cmake	Fri May 10 20:19:42 2019	(r501197)
@@ -0,0 +1,15 @@
+--- core/cmake/BareosSetVariableDefaults.cmake	2019-05-10 11:53:19.620402000 -0500
++++ core/cmake/BareosSetVariableDefaults.cmake	2019-05-10 12:13:55.910452000 -0500
+@@ -669,7 +669,11 @@
+ SET(PACKAGE_URL "\"\"")
+ SET(PACKAGE_VERSION "\"${BAREOS_NUMERIC_VERSION}\"")
+ 
+-set(ENABLE_NLS 1)
++IF(DEFINED nls)
++  SET(ENABLE_NLS 1)
++ELSE()
++  SET(ENABLE_NLS 0)
++ENDIF()
+ 
+ 
+ IF(HAVE_WIN32)

Added: head/sysutils/bareos-server/files/patch-core-src-include_baconfig.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/bareos-server/files/patch-core-src-include_baconfig.h	Fri May 10 20:19:42 2019	(r501197)
@@ -0,0 +1,25 @@
+--- core/src/include/baconfig.h	2019-05-10 14:32:06.160940000 -0500
++++ core/src/include/baconfig.h	2019-05-10 14:32:32.142847000 -0500
+@@ -120,11 +120,11 @@
+       #define N_(s) (s)
+    #endif /* N_ */
+ #else /* !ENABLE_NLS */
++   #include <locale.h>
+    #undef _
+    #undef N_
+    #undef textdomain
+    #undef bindtextdomain
+-   #undef setlocale
+ 
+    #ifndef _
+       #define _(s) (s)
+@@ -137,9 +137,6 @@
+    #endif
+    #ifndef bindtextdomain
+       #define bindtextdomain(p, d)
+-   #endif
+-   #ifndef setlocale
+-      #define setlocale(p, d)
+    #endif
+ #endif /* ENABLE_NLS */
+ 

Added: head/sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt	Fri May 10 20:19:42 2019	(r501197)
@@ -0,0 +1,35 @@
+--- core/src/plugins/filed/CMakeLists.txt	2019-05-10 13:49:40.521620000 -0500
++++ core/src/plugins/filed/CMakeLists.txt	2019-05-10 13:50:25.954964000 -0500
+@@ -99,18 +99,18 @@
+    INSTALL(TARGETS test-plugin-fd DESTINATION ${plugindir})
+ endif()
+ 
+-set (PYFILES
+-    bareos-fd.py.template
+-    bareos-fd-local-fileset.py
+-    bareos-fd-mock-test.py
+-    BareosFdPluginBaseclass.py
+-    BareosFdPluginLocalFileset.py
+-    BareosFdWrapper.py
+-    bareos_fd_consts.py
+-    bareos-fd-ldap.py
+-    BareosFdPluginLDAP.py
+-    )
++if (python)
++  set (PYFILES
++      bareos-fd.py.template
++      bareos-fd-local-fileset.py
++      bareos-fd-mock-test.py
++      BareosFdPluginBaseclass.py
++      BareosFdPluginLocalFileset.py
++      BareosFdWrapper.py
++      bareos_fd_consts.py
++      bareos-fd-ldap.py
++      BareosFdPluginLDAP.py
++      )
+ 
+-INSTALL(FILES ${PYFILES} DESTINATION ${plugindir})
+-
+-
++  INSTALL(FILES ${PYFILES} DESTINATION ${plugindir})
++endif()

Modified: head/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt
==============================================================================
--- head/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt	Fri May 10 20:17:39 2019	(r501196)
+++ head/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt	Fri May 10 20:19:42 2019	(r501197)
@@ -1,5 +1,5 @@
 --- core/src/stored/CMakeLists.txt	2019-02-13 09:25:55.000000000 -0500
-+++ core/src/stored/CMakeLists.txt	2019-05-09 00:06:43.118374000 -0500
++++ core/src/stored/CMakeLists.txt	2019-05-10 14:55:03.636098000 -0500
 @@ -192,6 +192,8 @@
  target_link_libraries(bareos-sd
     stored_objects
@@ -9,7 +9,31 @@
     )
  
  add_executable(bls ${BLSSRCS})
-@@ -231,7 +233,7 @@
+@@ -202,6 +204,7 @@
+ add_executable(bextract ${BEXTRACTSRS})
+ target_link_libraries(bextract
+    bareossd bareosfind bareos 
++   ${PTHREAD_LIBRARIES}
+     )
+ 
+ add_executable(bscan ${BSCANSRCS})
+@@ -212,6 +215,7 @@
+ add_executable(btape ${BTAPESRCS})
+ target_link_libraries(btape
+    bareossd bareos 
++   ${PTHREAD_LIBRARIES}
+     )
+ 
+ add_executable(bcopy ${BCOPYSRCS})
+@@ -219,6 +223,7 @@
+ 
+ target_link_libraries(bcopy
+    bareossd bareos 
++   ${PTHREAD_LIBRARIES}
+     )
+ 
+ INSTALL(TARGETS bareossd DESTINATION ${libdir})
+@@ -231,7 +236,7 @@
  install(CODE "set(SRC_DIR \"${PROJECT_SOURCE_DIR}\")")
  install(SCRIPT ${PROJECT_SOURCE_DIR}/cmake/install-stored-configfiles.cmake)
  

Modified: head/sysutils/bareos-server/pkg-plist
==============================================================================
--- head/sysutils/bareos-server/pkg-plist	Fri May 10 20:17:39 2019	(r501196)
+++ head/sysutils/bareos-server/pkg-plist	Fri May 10 20:19:42 2019	(r501197)
@@ -41,23 +41,21 @@ bin/timelimit
 @sample(,bareos,640) %%ETCDIR%%/bareos-sd.d/storage/bareos-sd.conf.sample
 %%MTX%%@sample(,bareos,640) %%ETCDIR%%/mtx-changer.conf.sample
 etc/logrotate.d/bareos-dir
-etc/rc.d/bareos-dir
-etc/rc.d/bareos-sd
 lib/bareos/backends/libbareoscats-%%DBTYPE%%.so
 lib/bareos/backends/libbareossd-fifo.so
 lib/bareos/backends/libbareossd-gentape.so
 lib/bareos/backends/libbareossd-tape.so
-lib/bareos/plugins/BareosDirPluginBaseclass.py
-lib/bareos/plugins/BareosDirWrapper.py
-lib/bareos/plugins/BareosSdPluginBaseclass.py
-lib/bareos/plugins/BareosSdWrapper.py
+%%PYTHON%%lib/bareos/plugins/BareosDirPluginBaseclass.py
+%%PYTHON%%lib/bareos/plugins/BareosDirWrapper.py
+%%PYTHON%%lib/bareos/plugins/BareosSdPluginBaseclass.py
+%%PYTHON%%lib/bareos/plugins/BareosSdWrapper.py
 lib/bareos/plugins/autoxflate-sd.so
-lib/bareos/plugins/bareos-dir-class-plugin.py
-lib/bareos/plugins/bareos-dir.py.template
-lib/bareos/plugins/bareos-sd-class-plugin.py
-lib/bareos/plugins/bareos-sd.py.template
-lib/bareos/plugins/bareos_dir_consts.py
-lib/bareos/plugins/bareos_sd_consts.py
+%%PYTHON%%lib/bareos/plugins/bareos-dir-class-plugin.py
+%%PYTHON%%lib/bareos/plugins/bareos-dir.py.template
+%%PYTHON%%lib/bareos/plugins/bareos-sd-class-plugin.py
+%%PYTHON%%lib/bareos/plugins/bareos-sd.py.template
+%%PYTHON%%lib/bareos/plugins/bareos_dir_consts.py
+%%PYTHON%%lib/bareos/plugins/bareos_sd_consts.py
 %%PYTHON%%lib/bareos/plugins/python-dir.so
 %%PYTHON%%lib/bareos/plugins/python-sd.so
 %%SCSICRYPTO%%lib/bareos/plugins/scsicrypto-sd.so


More information about the svn-ports-all mailing list