summaryrefslogtreecommitdiff
path: root/freetds/0001-CMake-install-targets.patch
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2016-11-14 15:43:53 -0500
committerGitHub <noreply@github.com>2016-11-14 15:43:53 -0500
commitbab5cee26bce4f2393fb51030f7be35c171ed44c (patch)
tree7d949268a70066602cd3ed6abca2ac97598beba5 /freetds/0001-CMake-install-targets.patch
parentd47f07051f6d05af894b6799e1cee6c03b3351e9 (diff)
downloadastroconda-dev-bab5cee26bce4f2393fb51030f7be35c171ed44c.tar.gz
Add freetds and unixODBC (#10)
* Initial commit of freetds * Ensure linkage is 64-bit * Add unixODBC * Add unixodbc dependency; Remove Continuum kerberos
Diffstat (limited to 'freetds/0001-CMake-install-targets.patch')
-rw-r--r--freetds/0001-CMake-install-targets.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/freetds/0001-CMake-install-targets.patch b/freetds/0001-CMake-install-targets.patch
new file mode 100644
index 0000000..e150d1a
--- /dev/null
+++ b/freetds/0001-CMake-install-targets.patch
@@ -0,0 +1,78 @@
+diff -urN freetds-1.00.9.orig/src/apps/CMakeLists.txt freetds-1.00.9/src/apps/CMakeLists.txt
+--- freetds-1.00.9.orig/src/apps/CMakeLists.txt 2016-09-03 12:28:52.287102400 +0100
++++ freetds-1.00.9/src/apps/CMakeLists.txt 2016-09-03 12:29:12.049890000 +0100
+@@ -15,3 +15,4 @@
+
+ add_executable(bsqlodbc bsqlodbc.c)
+ target_link_libraries(bsqlodbc tdsodbc replacements ${libs})
++install(TARGETS freebcp bsqldb defncopy datacopy bsqlodbc tsql RUNTIME DESTINATION bin)
+diff -urN freetds-1.00.9.orig/src/ctlib/CMakeLists.txt freetds-1.00.9/src/ctlib/CMakeLists.txt
+--- freetds-1.00.9.orig/src/ctlib/CMakeLists.txt 2016-09-03 12:28:52.177727100 +0100
++++ freetds-1.00.9/src/ctlib/CMakeLists.txt 2016-09-03 12:29:12.049890000 +0100
+@@ -31,3 +31,4 @@
+ if(MINGW OR CYGWIN)
+ set_target_properties(ct PROPERTIES LINK_FLAGS "--static")
+ endif(MINGW OR CYGWIN)
++install(TARGETS ct-static ct ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
+diff -urN freetds-1.00.9.orig/src/dblib/CMakeLists.txt freetds-1.00.9/src/dblib/CMakeLists.txt
+--- freetds-1.00.9.orig/src/dblib/CMakeLists.txt 2016-09-03 12:28:52.208977500 +0100
++++ freetds-1.00.9/src/dblib/CMakeLists.txt 2016-09-03 12:40:16.285967900 +0100
+@@ -1,8 +1,10 @@
+ add_subdirectory(unittests)
+
++set(static_lib_name sybdb)
+ if(WIN32)
+ add_definitions(-DDLL_EXPORT)
+ set(win_SRCS winmain.c dblib.def dbopen.c)
++ set(static_lib_name libsybdb)
+ endif()
+
+ # TODO add dbopen.c if necessary
+@@ -12,10 +14,16 @@
+ )
+ target_link_libraries(sybdb tds replacements ${lib_NETWORK} ${lib_BASE})
+
+-add_library(db-lib STATIC
++add_library(sybdb-static STATIC
+ dblib.c dbutil.c rpc.c bcp.c xact.c dbpivot.c buffering.h
+ )
+-target_link_libraries(db-lib tds replacements ${lib_NETWORK} ${lib_BASE})
++
++# See http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_make_my_shared_and_static_libraries_have_the_same_root_name.2C_but_different_suffixes.3F
++SET_TARGET_PROPERTIES(sybdb-static PROPERTIES OUTPUT_NAME ${static_lib_name})
++SET_TARGET_PROPERTIES(sybdb PROPERTIES CLEAN_DIRECT_OUTPUT 1)
++SET_TARGET_PROPERTIES(sybdb-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
++
++target_link_libraries(sybdb-static tds replacements ${lib_NETWORK} ${lib_BASE})
+
+ if(NOT WIN32)
+ set_target_properties(sybdb PROPERTIES SOVERSION "5.0.0")
+@@ -24,3 +32,4 @@
+ if(MINGW OR CYGWIN)
+ set_target_properties(sybdb PROPERTIES LINK_FLAGS "--static")
+ endif(MINGW OR CYGWIN)
++install(TARGETS sybdb-static sybdb ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
+diff -urN freetds-1.00.9.orig/src/odbc/CMakeLists.txt freetds-1.00.9/src/odbc/CMakeLists.txt
+--- freetds-1.00.9.orig/src/odbc/CMakeLists.txt 2016-09-03 12:28:52.302726800 +0100
++++ freetds-1.00.9/src/odbc/CMakeLists.txt 2016-09-03 12:29:12.065516500 +0100
+@@ -33,3 +33,4 @@
+ if(MINGW OR CYGWIN)
+ set_target_properties(tdsodbc PROPERTIES LINK_FLAGS "--static -Wl,--kill-at -Wl,--enable-stdcall-fixup")
+ endif(MINGW OR CYGWIN)
++install(TARGETS tdsodbc RUNTIME DESTINATION bin)
+diff -urN freetds-1.00.9.orig/src/replacements/CMakeLists.txt freetds-1.00.9/src/replacements/CMakeLists.txt
+--- freetds-1.00.9.orig/src/replacements/CMakeLists.txt 2016-05-18 21:02:15.000000000 +0100
++++ freetds-1.00.9/src/replacements/CMakeLists.txt 2016-09-04 18:26:46.790959400 +0100
+@@ -26,3 +26,4 @@
+ endif()
+
+ add_subdirectory(unittests)
++install(TARGETS replacements ARCHIVE DESTINATION lib)
+diff -urN freetds-1.00.9.orig/src/tds/CMakeLists.txt freetds-1.00.9/src/tds/CMakeLists.txt
+--- freetds-1.00.9.orig/src/tds/CMakeLists.txt 2016-05-18 21:02:15.000000000 +0100
++++ freetds-1.00.9/src/tds/CMakeLists.txt 2016-09-04 18:26:12.322089000 +0100
+@@ -47,3 +47,4 @@
+ if (NOT WIN32)
+ set_target_properties(tds PROPERTIES COMPILE_FLAGS -fPIC)
+ endif()
++install(TARGETS tds ARCHIVE DESTINATION lib)