diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2015-07-28 22:48:32 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2015-07-28 22:48:32 +0800 |
commit | 2cef132dbd1cb5b2bb0845ca185e791119fe6386 (patch) | |
tree | d347c6d6eb051025b5f1ddd1c29ef9ea505229ea /science | |
parent | 6799ca89ea7076c07d4069673af60dab0d52c421 (diff) | |
download | freebsd-ports-gnome-2cef132dbd1cb5b2bb0845ca185e791119fe6386.tar.gz freebsd-ports-gnome-2cef132dbd1cb5b2bb0845ca185e791119fe6386.tar.zst freebsd-ports-gnome-2cef132dbd1cb5b2bb0845ca185e791119fe6386.zip |
- Add science/orthanc-postgresql
The plugin replaces the default SQLite engine of Orthanc with a
PostgreSQL back-end.
WWW: http://www.orthanc-server.com/
PR: 201673
Submitted by: mp39590@gmail.com
Diffstat (limited to 'science')
-rw-r--r-- | science/Makefile | 1 | ||||
-rw-r--r-- | science/orthanc-postgresql/Makefile | 38 | ||||
-rw-r--r-- | science/orthanc-postgresql/distinfo | 2 | ||||
-rw-r--r-- | science/orthanc-postgresql/files/patch-CMakeLists.txt | 54 | ||||
-rw-r--r-- | science/orthanc-postgresql/pkg-descr | 4 |
5 files changed, 99 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile index 8f36f7524915..d6f8d88c890b 100644 --- a/science/Makefile +++ b/science/Makefile @@ -98,6 +98,7 @@ SUBDIR += openbabel SUBDIR += openkim SUBDIR += orthanc + SUBDIR += orthanc-postgresql SUBDIR += orthanc-webviewer SUBDIR += p5-Algorithm-SVMLight SUBDIR += p5-Chemistry-3DBuilder diff --git a/science/orthanc-postgresql/Makefile b/science/orthanc-postgresql/Makefile new file mode 100644 index 000000000000..7b81f3a19f5d --- /dev/null +++ b/science/orthanc-postgresql/Makefile @@ -0,0 +1,38 @@ +# Created by: mp39590@gmail.com +# $FreeBSD$ + +PORTNAME= orthanc-portgresql +PORTVERSION= 1.1 +CATEGORIES= science graphics +MASTER_SITES= http://orthanc-server.com/downloads/get.php?path=/plugin-postgresql/ +DISTNAME= OrthancPostgreSQL-${PORTVERSION} +DIST_SUBDIR= orthanc + +MAINTAINER= mp39590@gmail.com +COMMENT= PostgreSQL plugin for Orthanc + +LICENSE= AGPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= ${LOCALBASE}/include/orthanc/OrthancCPlugin.h:${PORTSDIR}/science/orthanc +LIB_DEPENDS= libboost_system.so:${PORTSDIR}/devel/boost-libs \ + libjsoncpp.so:${PORTSDIR}/devel/jsoncpp + +## UnitTests require running PostgreSQL server, so it's pointless to build/run them +CMAKE_ARGS= -DBUILD_UNIT_TESTS=OFF + +CXXFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +USES= cmake:outsource pgsql python:build +WRKSRC= ${WRKDIR}/OrthancPostgreSQL-${PORTVERSION} + +PLIST_FILES= share/orthanc/plugins/libOrthancPostgreSQLIndex.so \ + share/orthanc/plugins/libOrthancPostgreSQLIndex.so.${PORTVERSION} \ + share/orthanc/plugins/libOrthancPostgreSQLStorage.so \ + share/orthanc/plugins/libOrthancPostgreSQLStorage.so.${PORTVERSION} + +post-extract: + @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/Resources/CMake/*.cmake + +.include <bsd.port.mk> diff --git a/science/orthanc-postgresql/distinfo b/science/orthanc-postgresql/distinfo new file mode 100644 index 000000000000..b0d1370e86ab --- /dev/null +++ b/science/orthanc-postgresql/distinfo @@ -0,0 +1,2 @@ +SHA256 (orthanc/OrthancPostgreSQL-1.1.tar.gz) = f68d98a1f282ad31ac3fde2ff11449db840a5daf8a9605f3a9d5678691bd9b84 +SIZE (orthanc/OrthancPostgreSQL-1.1.tar.gz) = 56750 diff --git a/science/orthanc-postgresql/files/patch-CMakeLists.txt b/science/orthanc-postgresql/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..9ba3de08dafb --- /dev/null +++ b/science/orthanc-postgresql/files/patch-CMakeLists.txt @@ -0,0 +1,54 @@ +--- CMakeLists.txt.orig 2015-07-03 09:22:49 UTC ++++ CMakeLists.txt +@@ -32,6 +32,7 @@ set(USE_SYSTEM_JSONCPP ON CACHE BOOL "Us + set(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of Boost") + set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") + set(USE_SYSTEM_LIBPQ ON CACHE BOOL "Use the system version of the PostgreSQL client library") ++set(BUILD_UNIT_TESTS ON CACHE BOOL "Build UnitTests") + + # Distribution-specific settings + set(USE_GTEST_DEBIAN_SOURCE_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)") +@@ -47,7 +48,10 @@ include(${CMAKE_SOURCE_DIR}/Resources/CM + include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake) + include(${CMAKE_SOURCE_DIR}/Resources/CMake/PostgreSQLConfiguration.cmake) + include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake) +-include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) ++ ++if (BUILD_UNIT_TESTS) ++ include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) ++endif() + + + # Check that the Orthanc SDK headers are available or download them +@@ -123,14 +127,21 @@ set_target_properties(OrthancPostgreSQLI + SOVERSION ${ORTHANC_POSTGRESQL_VERSION} + ) + ++install( ++ TARGETS OrthancPostgreSQLStorage OrthancPostgreSQLIndex ++ RUNTIME DESTINATION lib # Destination for Windows ++ LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux ++) + +-add_executable(UnitTests +- ${CORE_SOURCES} +- ${GTEST_SOURCES} +- ${AUTOGENERATED_SOURCES} +- ${CMAKE_SOURCE_DIR}/IndexPlugin/PostgreSQLWrapper.cpp +- ${CMAKE_SOURCE_DIR}/StoragePlugin/PostgreSQLStorageArea.cpp +- ${CMAKE_SOURCE_DIR}/UnitTestsSources/UnitTestsMain.cpp +- ${CMAKE_SOURCE_DIR}/UnitTestsSources/PostgreSQLTests.cpp +- ${CMAKE_SOURCE_DIR}/UnitTestsSources/PostgreSQLWrapperTests.cpp +- ) ++if (BUILD_UNIT_TESTS) ++ add_executable(UnitTests ++ ${CORE_SOURCES} ++ ${GTEST_SOURCES} ++ ${AUTOGENERATED_SOURCES} ++ ${CMAKE_SOURCE_DIR}/IndexPlugin/PostgreSQLWrapper.cpp ++ ${CMAKE_SOURCE_DIR}/StoragePlugin/PostgreSQLStorageArea.cpp ++ ${CMAKE_SOURCE_DIR}/UnitTestsSources/UnitTestsMain.cpp ++ ${CMAKE_SOURCE_DIR}/UnitTestsSources/PostgreSQLTests.cpp ++ ${CMAKE_SOURCE_DIR}/UnitTestsSources/PostgreSQLWrapperTests.cpp ++ ) ++endif() diff --git a/science/orthanc-postgresql/pkg-descr b/science/orthanc-postgresql/pkg-descr new file mode 100644 index 000000000000..78b856494f60 --- /dev/null +++ b/science/orthanc-postgresql/pkg-descr @@ -0,0 +1,4 @@ +The plugin replaces the default SQLite engine of Orthanc with a +PostgreSQL back-end. + +WWW: http://www.orthanc-server.com/ |