Lars Engels wrote on 19.06.2014 16:08:
On Thu, Jun 19, 2014 at 03:51:20PM +0200, Marco Steinbach wrote:
Lars Engels wrote on 18.06.2014 16:36:
Hey folks,

[Icinga2 port, patch]


Good catch, thanks for this!

I just updated the shar file and also added WWW to pkg-descr.


This patch tries to make Icinga2 only link to what database client the user selected, instead of linking to whatever database client cmake stumbles over in addition to the users selection.

MfG CoCo

diff -Naur net-mgmt.orig/icinga2/Makefile net-mgmt/icinga2/Makefile
--- net-mgmt.orig/icinga2/Makefile      2014-06-19 14:12:45.000000000 +0000
+++ net-mgmt/icinga2/Makefile   2014-06-19 14:11:14.000000000 +0000
@@ -25,6 +25,9 @@
 
 OPTIONS_DEFAULT=       MYSQL
 
+MYSQL_CMAKE_ON= -DWITH_MYSQL:BOOL=true
+PGSQL_CMAKE_ON= -DWITH_PGSQL:BOOL=true
+
 ICINGA2USER?=  icinga
 ICINGA2GROUP?= icinga
 USERS=         ${ICINGA2USER}
diff -Naur net-mgmt.orig/icinga2/files/patch-CMakeLists.txt 
net-mgmt/icinga2/files/patch-CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-CMakeLists.txt    1970-01-01 
00:00:00.000000000 +0000
+++ net-mgmt/icinga2/files/patch-CMakeLists.txt 2014-06-16 23:21:34.000000000 
+0000
@@ -0,0 +1,12 @@
+--- CMakeLists.txt.orig        2014-06-16 23:18:51.000000000 +0000
++++ CMakeLists.txt     2014-06-16 23:19:01.000000000 +0000
+@@ -27,6 +27,9 @@
+       FORCE)
+ endif()
+ 
++option(WITH_MYSQL "MySQL support" OFF)
++option(WITH_PGSQL "PostgreSQL support" OFF)
++
+ file(STRINGS icinga2.spec VERSION_LINE REGEX "^Version: ")
+ string(REPLACE "Version: " "" ICINGA2_VERSION ${VERSION_LINE})
+ 
diff -Naur net-mgmt.orig/icinga2/files/patch-components__CMakeLists.txt 
net-mgmt/icinga2/files/patch-components__CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-components__CMakeLists.txt        
1970-01-01 00:00:00.000000000 +0000
+++ net-mgmt/icinga2/files/patch-components__CMakeLists.txt     2014-06-16 
23:21:47.000000000 +0000
@@ -0,0 +1,19 @@
+--- components/CMakeLists.txt.orig     2014-06-16 23:20:12.000000000 +0000
++++ components/CMakeLists.txt  2014-06-16 23:20:18.000000000 +0000
+@@ -1,7 +1,14 @@
+ add_subdirectory(checker)
+ add_subdirectory(compat)
+-add_subdirectory(db_ido_mysql)
+-add_subdirectory(db_ido_pgsql)
++
++if(WITH_MYSQL)
++      add_subdirectory(db_ido_mysql)
++endif()
++
++if(WITH_PGSQL)
++      add_subdirectory(db_ido_pgsql)
++endif()
++
+ add_subdirectory(demo)
+ add_subdirectory(livestatus)
+ add_subdirectory(notification)
diff -Naur 
net-mgmt.orig/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt 
net-mgmt/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt  
1970-01-01 00:00:00.000000000 +0000
+++ net-mgmt/icinga2/files/patch-components__db_ido_mysql__CMakeLists.txt       
2014-06-16 23:33:59.000000000 +0000
@@ -0,0 +1,9 @@
+--- components/db_ido_mysql/CMakeLists.txt.orig        2014-06-16 
23:31:26.000000000 +0000
++++ components/db_ido_mysql/CMakeLists.txt     2014-06-16 23:31:37.000000000 
+0000
+@@ -38,4 +38,6 @@
+       RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
+       LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
+     )
++else()
++    message( FATAL_ERROR "You have selected MySQL support, but MySQL could 
not be found." )
+ endif()
diff -Naur 
net-mgmt.orig/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt 
net-mgmt/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt
--- net-mgmt.orig/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt  
1970-01-01 00:00:00.000000000 +0000
+++ net-mgmt/icinga2/files/patch-components__db_ido_pgsql__CMakeLists.txt       
2014-06-16 23:34:55.000000000 +0000
@@ -0,0 +1,9 @@
+--- components/db_ido_pgsql/CMakeLists.txt.orig        2014-06-16 
23:27:15.000000000 +0000
++++ components/db_ido_pgsql/CMakeLists.txt     2014-06-16 23:29:03.000000000 
+0000
+@@ -40,4 +40,6 @@
+       RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
+       LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
+     )
++else()
++    message( FATAL_ERROR "You have selected PostgreSQL support, but 
PostgreSQL could not be found." )
+ endif()
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to