diff options
| -rw-r--r-- | freetds/0001-CMake-install-targets.patch | 78 | ||||
| -rw-r--r-- | freetds/0002-CMake-install-headers.patch | 36 | ||||
| -rw-r--r-- | freetds/bld.bat | 14 | ||||
| -rw-r--r-- | freetds/build.sh | 16 | ||||
| -rw-r--r-- | freetds/meta.yaml | 48 | ||||
| -rw-r--r-- | freetds/run_test.sh | 3 | ||||
| -rw-r--r-- | unixodbc/build.sh | 11 | ||||
| -rw-r--r-- | unixodbc/meta.yaml | 30 | 
8 files changed, 236 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) diff --git a/freetds/0002-CMake-install-headers.patch b/freetds/0002-CMake-install-headers.patch new file mode 100644 index 0000000..23c7d8d --- /dev/null +++ b/freetds/0002-CMake-install-headers.patch @@ -0,0 +1,36 @@ +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:53:36.127162000 +0100 ++++ freetds-1.00.9/src/ctlib/CMakeLists.txt	2016-09-03 13:12:32.584615800 +0100 +@@ -22,6 +22,8 @@ + SET_TARGET_PROPERTIES(ct PROPERTIES CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(ct-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) +  ++set_target_properties(ct PROPERTIES PUBLIC_HEADER "../../include/bkpublic.h;../../include/cspublic.h;../../include/cstypes.h;../../include/ctpublic.h;${CMAKE_BINARY_DIR}/include/tds_sysdep_public.h") ++ + target_link_libraries(ct-static tds replacements ${lib_NETWORK} ${lib_BASE}) +  + if(NOT WIN32) +@@ -31,4 +33,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) ++install(TARGETS ct-static ct ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include) +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:53:36.194162100 +0100 ++++ freetds-1.00.9/src/dblib/CMakeLists.txt	2016-09-03 13:11:42.228405700 +0100 +@@ -23,6 +23,8 @@ + SET_TARGET_PROPERTIES(sybdb PROPERTIES CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(sybdb-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) +  ++set_target_properties(sybdb PROPERTIES PUBLIC_HEADER "../../include/sqldb.h;../../include/sqlfront.h;../../include/sybdb.h;../../include/sybfront.h;../../include/syberror.h;../../include/odbcss.h") ++ + target_link_libraries(sybdb-static tds replacements ${lib_NETWORK} ${lib_BASE}) +  + if(NOT WIN32) +@@ -32,4 +34,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) ++install(TARGETS sybdb-static sybdb ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include) diff --git a/freetds/bld.bat b/freetds/bld.bat new file mode 100644 index 0000000..325d862 --- /dev/null +++ b/freetds/bld.bat @@ -0,0 +1,14 @@ +set CMAKE_GENERATOR=NMake Makefiles JOM +mkdir build +cd build + +cmake -G "%CMAKE_GENERATOR%" ^ +         -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ +         -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ +         -DCMAKE_BUILD_TYPE=Release ^ +         -DBUILD_SHARED_LIBS=True .. +if errorlevel 1 exit 1 + +cmake --build . --config Release --target all +cmake --build . --config Release --target install +if errorlevel 1 exit 1 diff --git a/freetds/build.sh b/freetds/build.sh new file mode 100644 index 0000000..f7aa417 --- /dev/null +++ b/freetds/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +if [ $ARCH -gt 32 ]; then +    if [[ `uname` == Linux ]]; then +        export LDFLAGS="-L/usr/lib64" +    fi +fi + +./configure --prefix=${PREFIX} \ +    --with-unixodbc=${PREFIX} \ +    --enable-krb5 + +make -j${CPU_COUNT} +make install diff --git a/freetds/meta.yaml b/freetds/meta.yaml new file mode 100644 index 0000000..56be856 --- /dev/null +++ b/freetds/meta.yaml @@ -0,0 +1,48 @@ +package: +  name: freetds +  version: 1.00.9 + +source: +  url: ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.9.tar.bz2 +  md5: 51e8941fbb537092e29c944e39c92f68 +  patches: +    - 0001-CMake-install-targets.patch +    - 0002-CMake-install-headers.patch + +build: +  features: +    - vc9               [win and py27] +    - vc10              [win and py34] +    - vc14              [win and py35] + +requirements: +  build: +    - openssl 1.0.* +    - readline          [not win] +    - unixodbc          [not win] +    - cmake             [win] +    - jom               [win] +    - vc   9            [win and py27] +    - vc  10            [win and py34] +    - vc  14            [win and py>34] +  run: +    - openssl 1.0.* +    - readline          [not win] +    - unixodbc          [not win] +    - vc   9            [win and py27] +    - vc  10            [win and py34] +    - vc  14            [win and py>34] + +about: +  home: http://www.freetds.org/index.html +  license: GNU Library or Lesser General Public License (LGPL) +  license_family: LGPL +  summary: 'Natively talk to Microsoft SQL Server and Sybase databases' +  description: | +    FreeTDS is an open source implementation of the TDS (Tabular Data Stream) +    protocol used by these databases for their own clients. It supports many +    different flavors of the protocol and three APIs to access it. +    Additionally FreeTDS works with other software such as Perl and PHP, +    providing access from those languages as well. +  doc_url: http://www.freetds.org/docs.html +  dev_url: https://github.com/FreeTDS/freetds/ diff --git a/freetds/run_test.sh b/freetds/run_test.sh new file mode 100644 index 0000000..c6ab8c5 --- /dev/null +++ b/freetds/run_test.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +tsql -C diff --git a/unixodbc/build.sh b/unixodbc/build.sh new file mode 100644 index 0000000..a83ac44 --- /dev/null +++ b/unixodbc/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +./configure --prefix=$PREFIX \ +    --enable-threads \ +    --enable-readline \ +    --enable-ltdl-install \ +    --enable-drivers \ +    --enable-drivers-conf +     +make -j${CPU_COUNT} +make install diff --git a/unixodbc/meta.yaml b/unixodbc/meta.yaml new file mode 100644 index 0000000..c9e0cb2 --- /dev/null +++ b/unixodbc/meta.yaml @@ -0,0 +1,30 @@ +{% set name = 'unixodbc' %} +{% set badname = 'unixODBC' %} +{% set version = '2.3.4' %} +{% set number = '0' %} + +about: +    home: http://www.unixodbc.org +    license: GPL +    summary: | +        ODBC is an open specification for providing application developers with +        a predictable API with which to access Data Sources + +build: +    number: {{number}} + +package: +    name: {{name}} +    version: {{version}} + +requirements: +    build: +    - readline +    - pkgconfig + +    run: +    - readline + +source: +    fn: {{badname}}-{{version}}.tar.gz +    url: http://www.unixodbc.org/{{badname}}-{{version}}.tar.gz | 
