[med-svn] r19570 - trunk/packages/hyphy/trunk/debian/patches
Andreas Tille
tille at moszumanska.debian.org
Wed Jul 8 15:07:22 UTC 2015
Author: tille
Date: 2015-07-08 15:07:21 +0000 (Wed, 08 Jul 2015)
New Revision: 19570
Modified:
trunk/packages/hyphy/trunk/debian/patches/use_debian_sqlite.patch
Log:
Build against Debian packaged sqlite3
Modified: trunk/packages/hyphy/trunk/debian/patches/use_debian_sqlite.patch
===================================================================
--- trunk/packages/hyphy/trunk/debian/patches/use_debian_sqlite.patch 2015-07-08 14:04:44 UTC (rev 19569)
+++ trunk/packages/hyphy/trunk/debian/patches/use_debian_sqlite.patch 2015-07-08 15:07:21 UTC (rev 19570)
@@ -1,7 +1,44 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -211,13 +211,12 @@ file(GLOB SRC_NEW src/new/*.cpp)
+@@ -179,6 +179,36 @@ if(${CURL_FOUND})
+ endif(${CURL_FOUND})
+ #-------------------------------------------------------------------------------
++# check for Debian packaged sqlite
++# stolen from https://sources.debian.net/src/u1db/13.10-6/debian/patches/fix_linking/?hl=103
++#-------------------------------------------------------------------------------
++find_package(PkgConfig)
++pkg_check_modules(PC_SQLITE3 sqlite3)
++
++find_path(SQLITE3_INCLUDE_DIR sqlite3.h
++ HINTS
++ ${PC_SQLITE3_INCLUDE_DIRS}
++ /usr/include
++ /usr/local/include
++ /opt/local/include
++)
++
++find_library(SQLITE3_LIBRARY
++ NAMES ${SQLITE3_NAMES} libsqlite3.so libsqlite3.a
++ HINTS ${PC_SQLITE3_LIBRARY_DIRS}
++ /usr/lib /usr/local/lib /opt/local/lib
++)
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(SQLITE3 DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)
++
++if(SQLITE3_FOUND)
++ # set(SQLITE3_LIBRARIES ${SQLITE3_LIBRARY})
++ set(DEFAULT_LIBRARIES dl pthread crypto curl ssl sqlite3)
++ set(SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR})
++endif()
++
++#-------------------------------------------------------------------------------
+ # gtest dependency
+ #-------------------------------------------------------------------------------
+ add_subdirectory(contrib/gtest-1.7.0)
+@@ -211,13 +241,12 @@ file(GLOB SRC_NEW src/new/*.cpp)
+
set(SRC_LINK src/lib/Link/THyPhy.cpp)
set(SRC_PREFS src/gui/preferences.cpp)
-set(SRC_SQLITE3 contrib/SQLite-3.8.2/sqlite3.c)
@@ -15,7 +52,7 @@
#-------------------------------------------------------------------------------
-@@ -229,11 +228,6 @@ set_property(
+@@ -229,11 +258,6 @@ set_property(
)
set_property(
@@ -27,7 +64,7 @@
SOURCE src/core/calcnode2.cpp
PROPERTY COMPILE_FLAGS "-fstrict-aliasing -funroll-loops"
)
-@@ -250,7 +244,6 @@ endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+@@ -250,7 +274,6 @@ endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
include_directories(
src/core/include
src/lib/Link src/new/include
@@ -35,38 +72,11 @@
src/gui/include
src/gui/include/Components
src/gui/include/WindowClasses
-@@ -438,11 +431,38 @@ set_target_properties(
+@@ -438,11 +461,11 @@ set_target_properties(
LINK_FLAGS "${DEFAULT_COMPILE_FLAGS} ${OpenMP_CXX_FLAGS} -msse3 -g -fprofile-arcs -ftest-coverage -pg"
)
-+# check for Debian packaged sqlite
-+# stolen from https://sources.debian.net/src/u1db/13.10-6/debian/patches/fix_linking/?hl=103
-+find_package(PkgConfig)
-+pkg_check_modules(PC_SQLITE3 sqlite3)
+
-+find_path(SQLITE3_INCLUDE_DIR sqlite3.h
-+ HINTS
-+ ${PC_SQLITE3_INCLUDE_DIRS}
-+ /usr/include
-+ /usr/local/include
-+ /opt/local/include
-+)
-+
-+find_library(SQLITE3_LIBRARY
-+ NAMES ${SQLITE3_NAMES} libsqlite3.so libsqlite3.a
-+ HINTS ${PC_SQLITE3_LIBRARY_DIRS}
-+ /usr/lib /usr/local/lib /opt/local/lib
-+)
-+
-+include(FindPackageHandleStandardArgs)
-+find_package_handle_standard_args(SQLITE3 DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)
-+
-+if(SQLITE3_FOUND)
-+ set(SQLITE3_LIBRARIES ${SQLITE3_LIBRARY})
-+ set(SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR})
-+endif()
-+
-+
#-------------------------------------------------------------------------------
# hyphy gtk+ target
#-------------------------------------------------------------------------------
@@ -75,7 +85,7 @@
find_package(GTK2 2.6)
if((${GTK2_FOUND}))
-@@ -454,6 +474,7 @@ if((${GTK2_FOUND}))
+@@ -454,6 +477,7 @@ if((${GTK2_FOUND}))
)
include_directories(
${GTK2_INCLUDE_DIRS}
@@ -83,16 +93,7 @@
src/gui/gtk/include
src/gui/gtk/include/Components
/Developer/Headers/FlatCarbon
-@@ -463,7 +484,7 @@ if((${GTK2_FOUND}))
- EXCLUDE_FROM_ALL
- ${SRC_GUI_GTK} ${SRC_GTKMAIN} ${SRC_GUI} ${SRC_COMMON}
- )
-- target_link_libraries(HYPHYGTK ${DEFAULT_LIBRARIES} ${GTK2_LIBRARIES})
-+ target_link_libraries(HYPHYGTK ${DEFAULT_LIBRARIES} ${GTK2_LIBRARIES} ${SQLITE3_LIBRARIES})
-
- add_custom_target(GTK DEPENDS HYPHYGTK)
-
-@@ -544,7 +565,7 @@ if(APPLE AND NOT ${MACOSX_GT_LION})
+@@ -544,7 +568,7 @@ if(APPLE AND NOT ${MACOSX_GT_LION})
add_executable(HyPhy
MACOSX_BUNDLE
EXCLUDE_FROM_ALL
More information about the debian-med-commit
mailing list