aboutsummaryrefslogtreecommitdiff
path: root/devel/libpreps-devel/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'devel/libpreps-devel/Makefile')
-rw-r--r--devel/libpreps-devel/Makefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/devel/libpreps-devel/Makefile b/devel/libpreps-devel/Makefile
index fc66e9ef3ff4..65056280b63f 100644
--- a/devel/libpreps-devel/Makefile
+++ b/devel/libpreps-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= libpreps
PORTVERSION= 1.9.0
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://webpages.charter.net/stuffle/linux/preps/
PKGNAMESUFFIX= -devel
@@ -15,13 +16,12 @@ DIST_SUBDIR= prep
MAINTAINER= shadow@psoft.net
COMMENT= Problem reporting system
-LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7
-
CONFLICTS= libpreps-1.6.*
LATEST_LINK= libpreps-devel
INSTALLS_SHLIB= yes
+USE_PGSQL= yes
USE_GMAKE= yes
USE_REINPLACE= yes
USE_GNOME= glib12
@@ -30,6 +30,8 @@ GNU_CONFIGURE= yes
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS+=--with-pgsqldir=${LOCALBASE} --with-plpgsqldir=${LOCALBASE}
+.include <bsd.port.pre.mk>
+
.if defined(WITHOUT_SERVER)
CONFIGURE_ARGS+=--disable-server
PKGNAMESUFFIX= -client
@@ -39,4 +41,15 @@ MAN1= create_prepsdb.1 update_prepsdb.1
PLIST_SUB+= SERVER=""
.endif
-.include <bsd.port.mk>
+# Setting/finding PostgreSQL version we want.
+.if exists(${LOCALBASE}/bin/postmaster)
+PGSQL_VER!= ${LOCALBASE}/bin/postmaster -V | \
+ ${SED} -n 's/postmaster.*PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
+.else
+PGSQL_VER= ${DEFAULT_PGSQL_VER}
+.endif
+PGSQL_PORT= ${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
+BUILD_DEPENDS+= postgres:${PGSQL_PORT}
+RUN_DEPENDS+= postgres:${PGSQL_PORT}
+
+.include <bsd.port.post.mk>