aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracm <acm@FreeBSD.org>2019-05-11 04:19:42 +0800
committeracm <acm@FreeBSD.org>2019-05-11 04:19:42 +0800
commit01a199639bb0cc20f3880aa0a5e56809de430e6c (patch)
tree5dfac666734b1a62837166cb97d1837dd21a0094
parent261af2a1c6bd9521f61b2239ca7f8031f27ec0bb (diff)
downloadfreebsd-ports-gnome-01a199639bb0cc20f3880aa0a5e56809de430e6c.tar.gz
freebsd-ports-gnome-01a199639bb0cc20f3880aa0a5e56809de430e6c.tar.zst
freebsd-ports-gnome-01a199639bb0cc20f3880aa0a5e56809de430e6c.zip
- 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
-rw-r--r--sysutils/bareos-server/Makefile9
-rw-r--r--sysutils/bareos-server/files/patch-core-CMakeLists.txt32
-rw-r--r--sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake24
-rw-r--r--sysutils/bareos-server/files/patch-core-cmake_BareosSetVariableDefaults.cmake15
-rw-r--r--sysutils/bareos-server/files/patch-core-src-include_baconfig.h25
-rw-r--r--sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt35
-rw-r--r--sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt28
-rw-r--r--sysutils/bareos-server/pkg-plist22
8 files changed, 171 insertions, 19 deletions
diff --git a/sysutils/bareos-server/Makefile b/sysutils/bareos-server/Makefile
index 4e24cde4b277..9003ced45f05 100644
--- a/sysutils/bareos-server/Makefile
+++ b/sysutils/bareos-server/Makefile
@@ -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
diff --git a/sysutils/bareos-server/files/patch-core-CMakeLists.txt b/sysutils/bareos-server/files/patch-core-CMakeLists.txt
new file mode 100644
index 000000000000..0d938478efac
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-core-CMakeLists.txt
@@ -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")
diff --git a/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake b/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake
new file mode 100644
index 000000000000..8ad6bb9c6882
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake
@@ -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)
diff --git a/sysutils/bareos-server/files/patch-core-cmake_BareosSetVariableDefaults.cmake b/sysutils/bareos-server/files/patch-core-cmake_BareosSetVariableDefaults.cmake
new file mode 100644
index 000000000000..ce294505c385
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-core-cmake_BareosSetVariableDefaults.cmake
@@ -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)
diff --git a/sysutils/bareos-server/files/patch-core-src-include_baconfig.h b/sysutils/bareos-server/files/patch-core-src-include_baconfig.h
new file mode 100644
index 000000000000..4a9a9b5e839f
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-core-src-include_baconfig.h
@@ -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 */
+
diff --git a/sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt b/sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt
new file mode 100644
index 000000000000..455f2fd3cdc4
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt
@@ -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()
diff --git a/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt b/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt
index 99f6d4ca8d19..0e21b3a7a44c 100644
--- a/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt
+++ b/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt
@@ -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)
diff --git a/sysutils/bareos-server/pkg-plist b/sysutils/bareos-server/pkg-plist
index f081c8c8ba12..c509bb863eb6 100644
--- a/sysutils/bareos-server/pkg-plist
+++ b/sysutils/bareos-server/pkg-plist
@@ -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