diff options
author | jlam <jlam@pkgsrc.org> | 2001-05-16 05:28:55 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-05-16 05:28:55 +0000 |
commit | 421b1ef2f020b2b64b9a724658b170cae9cc0168 (patch) | |
tree | 0cabf54144e1bbc1a2935d2383264e5ccd850dda /databases | |
parent | 2b1572b5ee3ba6016f9d3c29fec0b3c088d85302 (diff) | |
download | pkgsrc-421b1ef2f020b2b64b9a724658b170cae9cc0168.tar.gz |
Adapt postgresql-client to use devel/readline/Makefile.readline instead
of the one in databases/postgresql. Remove the Makefile.readline in
databases/postgresql as it's no longer used by any packages.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/postgresql-client/Makefile | 12 | ||||
-rw-r--r-- | databases/postgresql/Makefile.common | 12 | ||||
-rw-r--r-- | databases/postgresql/Makefile.readline | 31 |
3 files changed, 18 insertions, 37 deletions
diff --git a/databases/postgresql-client/Makefile b/databases/postgresql-client/Makefile index 2845f75c961..44fe90dfb85 100644 --- a/databases/postgresql-client/Makefile +++ b/databases/postgresql-client/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.1.1.1 2001/05/14 14:45:36 jlam Exp $ +# $NetBSD: Makefile,v 1.2 2001/05/16 05:28:56 jlam Exp $ .include "../../databases/postgresql/Makefile.common" -.include "../../databases/postgresql/Makefile.getopt" -.include "../../databases/postgresql/Makefile.readline" .include "../../databases/postgresql/Makefile.ssl" +.include "../../devel/libgetopt/Makefile.getopt" +.include "../../devel/readline/Makefile.readline" PKGNAME= postgresql-client-${PG_VERS} PG_PKG_VERS= # empty @@ -12,10 +12,14 @@ COMMENT= PostgreSQL database client programs DEPENDS+= postgresql-lib>=${PG_BASE_VERS}:../../databases/postgresql-lib MAKE_ENV+= INSTALLED_LIBPQ=1 +CONFIGURE_ARGS+= --enable-readline + +CFLAGS+= -L${WRKLIBDIR} +LDFLAGS+= -L${WRKLIBDIR} DIRS_TO_BUILD= src/bin -pre-configure: link-getopt-headers link-readline-headers +pre-configure: link-getopt-headers link-readline-headers link-readline-libs pre-build: cd ${WRKSRC}/src/bin/psql && \ diff --git a/databases/postgresql/Makefile.common b/databases/postgresql/Makefile.common index 1cbd9814335..009668fc21e 100644 --- a/databases/postgresql/Makefile.common +++ b/databases/postgresql/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.14 2001/05/15 15:59:22 jlam Exp $ +# $NetBSD: Makefile.common,v 1.15 2001/05/16 05:28:55 jlam Exp $ # # This Makefile fragment is included by all PostgreSQL packages built from # the main sources of the PostgreSQL distribution. @@ -80,11 +80,19 @@ CONFIGURE_ENV+= LIBS="${LIBS}" MAKE_ENV+= CUSTOM_COPT="${CFLAGS}" WRKINCDIR= ${WRKDIR}/include +WRKLIBDIR= ${WRKDIR}/lib CPPFLAGS+= -I${WRKINCDIR} CFLAGS+= -I${WRKINCDIR} +LDFLAGS+= -L${WRKLIBDIR} + +# The following is a hack to force ${WRKLIBDIR} to the front of the linker's +# library search path without having to patch a lot of Makefile. It works +# because the PostgreSQL Makefiles invoke the linker with $(CFLAGS) as well. +# +CFLAGS+= -L${WRKLIBDIR} post-extract: - ${MKDIR} -p ${WRKINCDIR} + ${MKDIR} -p ${WRKINCDIR} ${WRKLIBDIR} if [ -d ${WRKSRC}/src ]; then \ ${RM} -f ${WRKSRC}/src/Makefile.custom; \ ${CP} -f ${COMMON_FILESDIR}/Makefile.custom \ diff --git a/databases/postgresql/Makefile.readline b/databases/postgresql/Makefile.readline deleted file mode 100644 index e15e0de323d..00000000000 --- a/databases/postgresql/Makefile.readline +++ /dev/null @@ -1,31 +0,0 @@ -# $NetBSD: Makefile.readline,v 1.2 2001/05/15 19:24:27 jlam Exp $ -# -# This Makefile fragment is included by PostgreSQL packages built from the -# main sources of the PostgreSQL distribution that use readline() -# functionality. - -.if exists(/usr/include/readline.h) -READLINE_H= /usr/include/readline.h -HISTORY_H= /usr/include/history.h -CONFIGURE_ENV+= pgac_cv_check_readline="-ledit -ltermcap" -.elif exists(/usr/include/readline/readline.h) -READLINE_H= /usr/include/readline/readline.h -HISTORY_H= /usr/include/readline/history.h -CONFIGURE_ENV+= pgac_cv_check_readline="-ledit -ltermcap" -.else -READLINE_H= ${LOCALBASE}/readline/readline.h -HISTORY_H= ${LOCALBASE}/readline/history.h -DEPENDS+= readline>=4.0:../../devel/readline -.endif - -WRKINCDIR?= ${WRKDIR}/include - -# This target links the readline and history headers into -# ${WRKINCDIR}/include, which is searched first by the C preprocessor. -# -link-readline-headers: - ${MKDIR} -p ${WRKINCDIR}/readline - ${RM} -f ${WRKINCDIR}/readline/readline.h - ${RM} -f ${WRKINCDIR}/readline/history.h - ${LN} -sf ${READLINE_H} ${WRKINCDIR}/readline - ${LN} -sf ${HISTORY_H} ${WRKINCDIR}/readline |