diff options
author | ahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-02-02 17:41:24 +0800 |
---|---|---|
committer | ahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-02-02 17:41:24 +0800 |
commit | 2915ebe8e73c03fd4733eacbf2d6440d776e4365 (patch) | |
tree | 0c7a0940f38649307cdbe2233395c12631693e66 /Mk | |
parent | a6fdc4d0cbed1a54fd6e739d0c534caf929186dc (diff) | |
download | marcuscom-ports-2915ebe8e73c03fd4733eacbf2d6440d776e4365.tar.gz marcuscom-ports-2915ebe8e73c03fd4733eacbf2d6440d776e4365.tar.zst marcuscom-ports-2915ebe8e73c03fd4733eacbf2d6440d776e4365.zip |
- Sync with ports
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@3551 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 61 |
1 files changed, 57 insertions, 4 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index dbf19386d..15fba20b6 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1,7 +1,7 @@ #-*- mode: makefile; tab-width: 4; -*- # ex:ts=4 # -# $FreeBSD$ +# $FreeBSD: ports/Mk/bsd.port.mk,v 1.507 2005/02/02 09:34:04 tobez Exp $ # $NetBSD: $ # # bsd.port.mk - 940820 Jordan K. Hubbard. @@ -364,6 +364,21 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # WITH_MYSQL_VER # - User defined variable to set MySQL version. ## +# USE_PGSQL - Add PostgreSQL client dependency. +# If no version is given (by the maintainer via the port or +# by the user via defined variable), try to find the +# currently installed version. Fall back to default if +# necessary (PostgreSQL-7.4 = 74). +# DEFAULT_PGSQL_VER +# - PostgreSQL default version. Can be overridden within a port. +# Default: 74. +# WANT_PGSQL_VER +# - Maintainer can set an arbitrary version of PostgreSQL by +# using it. +# BROKEN_WITH_PGSQL +# - This variable can be defined if the ports doesn't support +# one or more versions of PostgreSQL. +## # USE_RC_SUBR - If set, the ports startup/shutdown script uses the common # routines found in etc/rc.subr and may need to # depend on the sysutils/rc_subr port. @@ -1158,9 +1173,9 @@ BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT} RUN_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT} .endif -.if ${OSVERSION} >= 502100 -PERL_VERSION?= 5.8.5 -PERL_VER?= 5.8.5 +.if ${OSVERSION} >= 500036 +PERL_VERSION?= 5.8.6 +PERL_VER?= 5.8.6 .else .if ${OSVERSION} >= 500032 PERL_VERSION?= 5.6.1 @@ -1693,6 +1708,44 @@ BROKEN= "unknown MySQL version: ${MYSQL_VER}" .endif # Check for correct libs .endif # USE_MYSQL +.if defined(USE_PGSQL) +DEFAULT_PGSQL_VER?= 74 + +# Setting/finding PostgreSQL version we want. +.if defined(WANT_PGSQL_VER) +PGSQL_VER= ${WANT_PGSQL_VER} +.elif exists(${LOCALBASE}/bin/pg_config) +PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p' +.else +PGSQL_VER= ${DEFAULT_PGSQL_VER} +.endif # WANT_PGSQL_VER + +# And now we are checking if we can use it +.if exists(${PORTSDIR}/databases/postgresql${PGSQL_VER}-client) +.if defined(BROKEN_WITH_PGSQL) +. for VER in ${BROKEN_WITH_PGSQL} +. if (${PGSQL_VER} == "${VER}") +BROKEN= "Doesn't work with PostgreSQL version : ${PGSQL_VER} (Doesn't support PostgresSQL ${BROKEN_WITH_PGSQL})" +. endif +. endfor +.endif # BROKEN_WITH_PGSQL +LIB_DEPENDS+= pq:${PORTSDIR}/databases/postgresql${PGSQL_VER}-client +.else +BROKEN= "unknown PostgreSQL version: ${PGSQL_VER}" +.endif # Check for correct version +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" +.endif # USE_PGSQL + +.if defined(USE_XLIB) +LIB_DEPENDS+= X11.6:${X_LIBRARIES_PORT} +# Add explicit X options to avoid problems with false positives in configure +.if defined(GNU_CONFIGURE) +CONFIGURE_ARGS+=--x-libraries=${X11BASE}/lib --x-includes=${X11BASE}/include +.endif +.endif + # XXX: (not yet): .if defined(USE_AUTOTOOLS) .include "${PORTSDIR}/Mk/bsd.autotools.mk" # XXX: (not yet): .endif |