allow linking against the native Sybase Open Client by defining

USE_SYBASE_OPENCLIENT and setting SYBASE to the root of the Sybase
Open Client installation.
This commit is contained in:
grant 2004-03-29 01:50:39 +00:00
parent 588ceb5e02
commit 4967aa5872
3 changed files with 29 additions and 21 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.18 2004/01/20 12:12:49 agc Exp $
# $NetBSD: Makefile,v 1.19 2004/03/29 01:50:39 grant Exp $
DISTNAME= sqsh-1.7-src
PKGNAME= sqsh-1.7
@ -17,11 +17,25 @@ WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
USE_BUILDLINK2= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-readline
CONFIGURE_ENV+= SYBASE="${BUILDLINK_PREFIX.freetds}/${SYBASE}"
SYBASE= freetds
LDFLAGS+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.freetds}/${SYBASE}/lib
# support for the native Sybase Open Client
BUILD_DEFS+= USE_SYBASE_OPENCLIENT
BUILD_DEFS+= SYBASE
.if defined(USE_SYBASE_OPENCLIENT) && empty(USE_SYBASE_OPENCLIENT:M[Nn][Oo])
. if defined(SYBASE) && exists(${SYBASE}/lib/libct.so)
BUILDLINK_PASSTHRU_DIRS=${SYBASE}
_SYBASE= ${SYBASE}
. else
PKG_FAIL_REASON+= "You must define SYBASE to the base directory of Open Client."
. endif
.else
_SYBASE= ${BUILDLINK_PREFIX.freetds}/freetds
MAKE_FLAGS+= SYBASE_LIBS=-lct
.endif
LDFLAGS+= -Wl,${RPATH_FLAG}${_SYBASE}/lib
CONFIGURE_ENV+= SYBASE="${_SYBASE}"
CONFIGURE_ENV+= INCDIRS="${BUILDLINK_PREFIX.readline}/include"
CONFIGURE_ENV+= LIBDIRS="${BUILDLINK_PREFIX.readline}/lib"
@ -29,6 +43,9 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sqsh ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/doc/sqsh.1 ${PREFIX}/man/man1/sqsh.1
.include "../../databases/freetds/buildlink2.mk"
.if !defined(USE_SYBASE_OPENCLIENT)
. include "../../databases/freetds/buildlink2.mk"
.endif
.include "../../devel/readline/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,8 +1,8 @@
$NetBSD: distinfo,v 1.4 2001/06/09 15:01:58 wiz Exp $
$NetBSD: distinfo,v 1.5 2004/03/29 01:50:39 grant Exp $
SHA1 (sqsh-1.7-src.tar.gz) = 8526cced3350024ef262a0a572d2822c6059159c
Size (sqsh-1.7-src.tar.gz) = 296618 bytes
SHA1 (patch-aa) = 45f41fa23ee44d49a132c2cd0ff884219c70192f
SHA1 (patch-aa) = e9f0669a15db33327364ba5bef818222954bb0da
SHA1 (patch-ab) = b46405fbe1b97dcd8d019cd5f89922552e12b175
SHA1 (patch-ac) = d86ad97113bc8521764ed5b6898ab524a0079285
SHA1 (patch-ad) = 435a1abadf38e63bf97c9c872e6664fee1729368

View file

@ -1,17 +1,8 @@
$NetBSD: patch-aa,v 1.3 2001/06/09 15:01:58 wiz Exp $
$NetBSD: patch-aa,v 1.4 2004/03/29 01:50:39 grant Exp $
--- configure.orig Tue Jan 5 21:33:39 1999
+++ configure Tue May 22 00:50:38 2001
@@ -1095,7 +1095,7 @@
# The basic client libraries that are always needed
# on all platforms.
#
- SYBASE_LIBS="-lblk -lcs -lct -lcomn -ltcl -lintl"
+ SYBASE_LIBS="-lct"
MAJOR_VERSION=`echo $SYBASE_VERSION | cut -d '.' -f 1`
@@ -1146,6 +1146,8 @@
--- configure.orig 1999-01-06 13:33:39.000000000 +1100
+++ configure
@@ -1146,6 +1146,8 @@ echo "configure:1127: checking Open Clie
SYBASE_OS="-lm -ldl -ldgc";;
aix*)
SYBASE_OS="-lm";;
@ -20,7 +11,7 @@ $NetBSD: patch-aa,v 1.3 2001/06/09 15:01:58 wiz Exp $
*)
SYBASE_OS="-lm -ldl";;
esac
@@ -1301,7 +1303,7 @@
@@ -1301,7 +1303,7 @@ else
CPPFLAGS="${CPPFLAGS} -L${READLINE_LIBDIR}"
fi