new subpackage that adds support for pgsql

feedback & ok robert@
This commit is contained in:
simon 2007-06-19 16:09:12 +00:00
parent 02c388c866
commit 61423a0bef
5 changed files with 86 additions and 3 deletions

View File

@ -1,14 +1,16 @@
# $OpenBSD: Makefile,v 1.26 2007/06/11 11:01:27 simon Exp $
# $OpenBSD: Makefile,v 1.27 2007/06/19 16:09:12 simon Exp $
SHARED_ONLY= Yes
COMMENT-main= "ISO-C API and CLI for generating UUIDs"
COMMENT-perl= "UUID modules for Perl"
COMMENT-pgsql= "UUID extension for PostgreSQL"
VERSION= 1.6.0
DISTNAME= uuid-${VERSION}
FULLPKGNAME-main= uuid-${VERSION}
FULLPKGNAME-perl= p5-UUID-${VERSION}p0
FULLPKGNAME-pgsql= postgresql-uuid-${VERSION}
CATEGORIES= devel
SHARED_LIBS= uuid 13.22 \
uuid++ 14.21
@ -24,7 +26,7 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MULTI_PACKAGES= -main -perl
MULTI_PACKAGES= -main -perl -pgsql
WANTLIB-main= c
@ -32,10 +34,19 @@ CATEGORIES-perl= devel perl5
WANTLIB-perl=
LIB_DEPENDS-perl= uuid.>=12::devel/uuid
CATEGORIES-pgsql= devel databases
WANTLIB-pgsql= c
LIB_DEPENDS-pgsql= uuid.>=12::devel/uuid
RUN_DEPENDS-pgsql= :postgresql-server-*:databases/postgresql,-server
BUILD_DEPENDS-pgsql= ${RUN_DEPENDS-pgsql}
USE_LIBTOOL= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= --with-perl --with-cxx \
--without-php --without-pgsql
--without-php --with-pgsql
pre-build:
@cp ${FILESDIR}/Makefile ${WRKSRC}/pgsql
.include <bsd.port.mk>

48
devel/uuid/files/Makefile Normal file
View File

@ -0,0 +1,48 @@
LIB= uuid
PG_CONFIG?= pg_config
PG_CFLAGS!= ${PG_CONFIG} --cflags
PG_CPPFLAGS!= ${PG_CONFIG} --cppflags
PG_INCDIR!= ${PG_CONFIG} --pkgincludedir
PG_LIBDIR!= ${PG_CONFIG} --pkglibdir
PG_SHAREDIR!= ${PG_CONFIG} --sharedir
PG_DOCDIR!= ${PG_CONFIG} --docdir
CFLAGS= ${PG_CFLAGS}
CPPFLAGS= ${PG_CPPFLAGS} -I.. -I${PG_INCDIR}/server -I${PG_INCDIR}/internal
LDFLAGS= -L../.libs -L${PG_LIBDIR}
LDADD= -luuid -lc
.SUFFIXES: .sql .sql.in .c .o .so
all: ${LIB:=.sql} ${LIB:=.so}
.sql.in.sql:
sed -e 's,MODULE_PATHNAME,$$libdir/$*,g' $< >$@
.c.o:
${COMPILE.c} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}
.o.so:
${AR} cr ${LIB}.a uuid.o
${RANLIB} ${LIB}.a
${CC} ${CFLAGS} ${PICFLAG} -DPIC -shared -Wl,-x ${.IMPSRC} \
${LDFLAGS} ${LDADD} -o ${.TARGET}
install: all
${INSTALL} -d ${DESTDIR}${PG_LIBDIR}
${INSTALL} ${LIB:=.so} ${DESTDIR}${PG_LIBDIR}/${LIB:=.so}
${INSTALL} -d ${DESTDIR}${PG_SHAREDIR}
${INSTALL} uuid.sql ${DESTDIR}${PG_SHAREDIR}/uuid.sql
${INSTALL} -d ${DESTDIR}${PG_DOCDIR}
${INSTALL} uuid.txt ${DESTDIR}${PG_DOCDIR}/uuid.txt
clean:
rm -f a.out [Ee]rrs mklog core *.core
rm -f ${LIB:=.sql} ${LIB}*.{a,o,so}
.PHONY: clean
.include <bsd.own.mk>

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-configure,v 1.1 2007/06/19 16:09:12 simon Exp $
--- configure.orig Sat May 19 22:01:41 2007
+++ configure Mon Jun 11 09:46:40 2007
@@ -25679,11 +25679,6 @@ test -n "$PG_CONFIG" || PG_CONFIG="NA"
echo "$as_me: error: required PostgreSQL pg_config utility not found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
fi
- if test ".$ac_cv_with_pgsql" = ".yes" -a ".`${MAKE-make} -v 2>/dev/null | grep GNU`" = .; then
- { { echo "$as_me:$LINENO: error: PostgreSQL bindings require GNU make to build" >&5
-echo "$as_me: error: PostgreSQL bindings require GNU make to build" >&2;}
- { (exit 1); exit 1; }; }
- fi
ac_config_headers="$ac_config_headers config.h"

View File

@ -0,0 +1,2 @@
This is the OSSP uuid binding for the PostgreSQL RDBMS, providing
native UUID data type support.

View File

@ -0,0 +1,7 @@
@comment $OpenBSD: PLIST-pgsql,v 1.1 2007/06/19 16:09:12 simon Exp $
lib/postgresql/
lib/postgresql/uuid.so
share/doc/postgresql/
share/doc/postgresql/uuid.txt
share/postgresql/
share/postgresql/uuid.sql