ca70938428
which are the full option names used to set rpath directives for the linker and the compiler, respectively. In places were we are invoking the linker, use "${LINKER_RPATH_FLAG} <path>", where the space is inserted in case the flag is a word, e.g. -rpath. The default values of *_RPATH_FLAG are set by the compiler/*.mk files, depending on the compiler that you use. They may be overridden on a ${OPSYS}-specific basis by setting _OPSYS_LINKER_RPATH_FLAG and _OPSYS_COMPILER_RPATH_FLAG, respectively. Garbage-collect _OPSYS_RPATH_NAME and _COMPILER_LD_FLAG.
56 lines
1.7 KiB
Makefile
56 lines
1.7 KiB
Makefile
# $NetBSD: Makefile.common,v 1.5 2004/08/27 06:29:07 jlam Exp $
|
|
|
|
DISTNAME= sqsh-2.1-src
|
|
CATEGORIES= databases
|
|
MASTER_SITES= ${HOMEPAGE}
|
|
|
|
MAINTAINER= tsarna@NetBSD.org
|
|
HOMEPAGE= http://www.sqsh.org/
|
|
COMMENT?= SQL shell for Sybase and MS-SQL servers
|
|
|
|
ALL_TARGET= build
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME:C|-src||}
|
|
USE_BUILDLINK3= yes
|
|
USE_PKGINSTALL= yes
|
|
GNU_CONFIGURE= yes
|
|
CONFIGURE_ARGS+= --with-readline
|
|
|
|
CONF_FILES+= ${PREFIX}/share/examples/sqsh/sample.sqshrc ${PKG_SYSCONFDIR}/sqshrc
|
|
|
|
# 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
|
|
CONFIGURE_ENV+= SYBASE_LIBS=-lct
|
|
MAKE_FLAGS+= SYBASE_LIBS=-lct
|
|
.endif
|
|
|
|
LDFLAGS+= ${COMPILER_RPATH_FLAG}${_SYBASE}/lib
|
|
CONFIGURE_ENV+= SYBASE="${_SYBASE}"
|
|
CONFIGURE_ENV+= INCDIRS="${BUILDLINK_PREFIX.readline}/include"
|
|
CONFIGURE_ENV+= LIBDIRS="${BUILDLINK_PREFIX.readline}/lib"
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/sqsh ${PREFIX}/bin
|
|
${INSTALL_MAN} ${WRKSRC}/doc/sqsh.1 ${PREFIX}/man/man1/sqsh.1
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/sqsh
|
|
${INSTALL_DATA} ${WRKSRC}/doc/sample.sqshrc ${PREFIX}/share/examples/sqsh
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
.if !defined(USE_SYBASE_OPENCLIENT)
|
|
. include "../../databases/freetds/buildlink3.mk"
|
|
.endif
|
|
|
|
.include "../../devel/dlcompat/buildlink3.mk"
|
|
.include "../../devel/readline/buildlink3.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|