From 0c0fd12fbae966200be2c0d63347bd9f2586655d Mon Sep 17 00:00:00 2001 From: grant Date: Mon, 29 Mar 2004 09:58:28 +0000 Subject: 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. --- databases/p5-DBD-Sybase/Makefile | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'databases') diff --git a/databases/p5-DBD-Sybase/Makefile b/databases/p5-DBD-Sybase/Makefile index 07f4fe98aec..8a795596bcf 100644 --- a/databases/p5-DBD-Sybase/Makefile +++ b/databases/p5-DBD-Sybase/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2003/07/21 16:39:07 martti Exp $ +# $NetBSD: Makefile,v 1.14 2004/03/29 09:58:28 grant Exp $ # DISTNAME= DBD-Sybase-0.94 @@ -15,10 +15,27 @@ COMMENT= Perl DBI/DBD driver for Sybase/MS-SQL databases USE_BUILDLINK2= YES PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/DBD/Sybase/.packlist -PERL5_LDFLAGS+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.freetds}/freetds/lib -MAKE_ENV+= SYBASE=${BUILDLINK_PREFIX.freetds}/freetds +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 your Open Client." +. endif +.else +_SYBASE= ${BUILDLINK_PREFIX.freetds}/freetds +.endif + +PERL5_LDFLAGS+= -Wl,${RPATH_FLAG}${_SYBASE}/lib +MAKE_ENV+= SYBASE=${_SYBASE} + +.if !defined(USE_SYBASE_OPENCLIENT) +. include "../../databases/freetds/buildlink2.mk" +.endif -.include "../../databases/freetds/buildlink2.mk" .include "../../databases/p5-DBI/buildlink2.mk" .include "../../lang/perl5/module.mk" .include "../../mk/bsd.pkg.mk" -- cgit v1.2.3