-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
a3f39e4
commit 2b857bb
Showing
8 changed files
with
228 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#!/bin/bash | ||
|
||
DESC_freetds="Libraries to talk to Microsoft SQL Server and Sybase databases" | ||
|
||
# version of your package | ||
VERSION_freetds=1.2.5 | ||
LINK_ct=libct.4.dylib | ||
LINK_sybdb=libsybdb.5.dylib | ||
LINK_tdsodbc=libtdsodbc.0.so | ||
|
||
# dependencies of this recipe | ||
DEPS_freetds=(gettext libtool openssl unixodbc) | ||
|
||
# url of the package | ||
URL_freetds=https://www.freetds.org/files/stable/freetds-${VERSION_freetds}.tar.gz | ||
|
||
# md5 of the package | ||
MD5_freetds=5de473ef22bfcc6a415398a5a145c53b | ||
|
||
# default build path | ||
BUILD_freetds=$BUILD_PATH/freetds/$(get_directory $URL_freetds) | ||
|
||
# default recipe path | ||
RECIPE_freetds=$RECIPES_PATH/freetds | ||
|
||
# function called for preparing source code if needed | ||
# (you can apply patch etc here.) | ||
function prebuild_freetds() { | ||
cd $BUILD_freetds | ||
|
||
# check marker | ||
if [ -f .patched ]; then | ||
return | ||
fi | ||
|
||
patch_configure_file configure | ||
|
||
touch .patched | ||
} | ||
|
||
function shouldbuild_freetds() { | ||
# If lib is newer than the sourcecode skip build | ||
if [ ${STAGE_PATH}/lib/$LINK_ct -nt $BUILD_freetds/.patched ]; then | ||
DO_BUILD=0 | ||
fi | ||
} | ||
|
||
# function called to build the source code | ||
function build_freetds() { | ||
try rsync -a $BUILD_freetds/ $BUILD_PATH/freetds/build-$ARCH/ | ||
try cd $BUILD_PATH/freetds/build-$ARCH | ||
push_env | ||
|
||
# add unixodbc | ||
export CFLAGS="$CFLAGS -I$STAGE_PATH/unixodbc/include" | ||
export LDFLAGS="$LDFLAGS -L$STAGE_PATH/unixodbc/lib" | ||
|
||
try ${CONFIGURE} \ | ||
--with-tdsver=7.3 \ | ||
--mandir=${STAGE_PATH}/man \ | ||
--sysconfdir=${STAGE_PATH}/etc \ | ||
--with-unixodbc-includes=${STAGE_PATH}/include/unixodbc \ | ||
--with-openssl=${STAGE_PATH} \ | ||
--enable-sybase-compat \ | ||
--enable-krb5 \ | ||
--enable-odbc-wide | ||
|
||
check_file_configuration config.status | ||
try $MAKE | ||
try $MAKE install | ||
|
||
pop_env | ||
} | ||
|
||
# function called after all the compile have been done | ||
function postbuild_freetds() { | ||
verify_binary bin/tsql | ||
verify_binary bin/freebcp | ||
verify_binary bin/bsqldb | ||
verify_binary bin/defncopy | ||
verify_binary bin/datacopy | ||
verify_binary bin/bsqlodbc | ||
verify_binary lib/$LINK_ct | ||
verify_binary lib/$LINK_sybdb | ||
verify_binary lib/$LINK_tdsodbc | ||
} | ||
|
||
# function to append information to config file | ||
function add_config_info_freetds() { | ||
append_to_config_file "# freetds-${VERSION_freetds}: ${DESC_freetds}" | ||
append_to_config_file "export VERSION_freetds=${VERSION_freetds}" | ||
append_to_config_file "export LINK_ct=${LINK_ct}" | ||
append_to_config_file "export LINK_sybdb=${LINK_sybdb}" | ||
append_to_config_file "export LINK_tdsodbc=${LINK_tdsodbc}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/bash | ||
|
||
DESC_python_pymssql="Python binding of MSSQL" | ||
|
||
# version of your package | ||
# need to keep in sync with hdf5 | ||
VERSION_python_pymssql=2.1.5 | ||
|
||
# dependencies of this recipe | ||
DEPS_python_pymssql=(python freetds python_packages) | ||
|
||
# url of the package | ||
URL_python_pymssql= | ||
|
||
# md5 of the package | ||
MD5_python_pymssql= | ||
|
||
# default build path | ||
BUILD_python_pymssql=$BUILD_PATH/python_pymssql/v${VERSION_python_pymssql} | ||
|
||
# default recipe path | ||
RECIPE_python_pymssql=$RECIPES_PATH/python_pymssql | ||
|
||
# function called for preparing source code if needed | ||
# (you can apply patch etc here.) | ||
function prebuild_python_pymssql() { | ||
mkdir -p $BUILD_python_pymssql | ||
cd $BUILD_python_pymssql | ||
|
||
# check marker | ||
if [ -f .patched ]; then | ||
return | ||
fi | ||
|
||
touch .patched | ||
} | ||
|
||
function shouldbuild_python_pymssql() { | ||
# If lib is newer than the sourcecode skip build | ||
if python_package_installed pymssql; then | ||
DO_BUILD=0 | ||
fi | ||
} | ||
|
||
# function called to build the source code | ||
function build_python_pymssql() { | ||
try cd $BUILD_python_pymssql | ||
push_env | ||
|
||
DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PIP_NO_BINARY pymssql==${VERSION_python_pymssql} | ||
|
||
pop_env | ||
} | ||
|
||
# function called after all the compile have been done | ||
function postbuild_python_pymssql() { | ||
if ! python_package_installed_verbose pymssql; then | ||
error "Missing python package pymssql" | ||
fi | ||
} | ||
|
||
# function to append information to config file | ||
function add_config_info_python_pymssql() { | ||
append_to_config_file "# python_pymssql-${VERSION_python_pymssql}: ${DESC_python_pymssql}" | ||
append_to_config_file "export VERSION_python_pymssql=${VERSION_python_pymssql}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.