ports/139693: [patch] databases/postgis: enhancements and fix NOPORTDOCS build
Mel Flynn
mel at rachie.is-a-geek.net
Sat Oct 17 03:00:17 UTC 2009
>Number: 139693
>Category: ports
>Synopsis: [patch] databases/postgis: enhancements and fix NOPORTDOCS build
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 17 03:00:16 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Mel Flynn
>Release: FreeBSD 7.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD squish.rachie.is-a-geek.net 7.2-STABLE FreeBSD 7.2-STABLE #0: Tue Sep 8 09:06:30 AKDT 2009 mdev at squish.rachie.is-a-geek.net:/data/obj/data/RELENG_7/src/sys/SQUISH i386
>Description:
With NOPORTDOCS set in /etc/make.conf, port doesn't build as it's not read by
gmake and not exported to MAKE_ENV.
Further enchancements in the patch:
- Add option to build the comments SQL file.
- Add option to build docs
- Add ImageMagick as build dependency to doc build
- Mark jobs unsafe
>How-To-Repeat:
Build the port with NOPORTDOCS set in /etc/make.conf.
>Fix:
--- patch-databases::postgis begins here ---
Index: databases/postgis/Makefile
===================================================================
RCS file: /home/ncvs/ports/databases/postgis/Makefile,v
retrieving revision 1.52
diff -u -r1.52 Makefile
--- databases/postgis/Makefile 7 Oct 2009 14:10:57 -0000 1.52
+++ databases/postgis/Makefile 15 Oct 2009 17:15:34 -0000
@@ -23,25 +23,46 @@
USE_GMAKE= yes
USE_LDCONFIG= yes
USE_PERL5_BUILD= yes
+MAKE_JOBS_UNSAFE= yes
INSTALL_TARGET= install
+ALL_TARGET= all
GNU_CONFIGURE= yes
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_ENV= DATADIR=${DATADIR} DOCSDIR=${DOCSDIR}
CONFIGURE_ARGS= --with-projdir=${LOCALBASE}
+OPTIONS= COMMENTS "Create comments file (needs xsltproc)" off
+.if defined(NOPORTDOCS)
+DOCS_DFLT= on
+.else
+DOCS_DFLT= off
+.endif
+OPTIONS+= DOCS "Build docs (needs ImageMagick+xsltproc)" ${DOCS_DFLT}
.include <bsd.port.pre.mk>
-.if !defined(NOPORTDOCS)
+.if defined(WITH_DOCS) && defined(NOPORTDOCS)
+.error "Docs selected through options, but NOPORTDOCS is defined."
+.endif
+.if defined(WITH_DOCS)
BUILD_DEPENDS+= xsltproc:${PORTSDIR}/textproc/libxslt \
- ${LOCALBASE}/share/xsl/docbook/html/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl
+ ${LOCALBASE}/share/xsl/docbook/html/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl \
+ convert:${PORTSDIR}/graphics/ImageMagick
CONFIGURE_ARGS+= --with-xsldir=${LOCALBASE}/share/xsl/docbook
MAN1= pgsql2shp.1 shp2pgsql.1
PORTDOCS= *
-#.else
-#MAKE_ARGS+= NOPORTDOCS=yes
+.else
+MAKE_ARGS+= NOPORTDOCS=yes
+.endif
+.if defined(WITH_COMMENTS)
+BUILD_DEPENDS+= xsltproc:${PORTSDIR}/textproc/libxslt
+ALL_TARGET+= comments
+INSTALL_TARGET+= comments-install
+PLIST_SUB+= COMMENTS=""
+.else
+PLIST_SUB+= COMMENTS="@comment "
.endif
post-extract:
Index: databases/postgis/pkg-plist
===================================================================
RCS file: /home/ncvs/ports/databases/postgis/pkg-plist,v
retrieving revision 1.11
diff -u -r1.11 pkg-plist
--- databases/postgis/pkg-plist 7 Oct 2009 14:10:57 -0000 1.11
+++ databases/postgis/pkg-plist 15 Oct 2009 17:14:50 -0000
@@ -8,6 +8,7 @@
share/postgis/contrib/postgis_upgrade.sql
share/postgis/contrib/spatial_ref_sys.sql
share/postgis/contrib/uninstall_postgis.sql
+%%COMMENTS%%share/postgis/contrib/postgis_comments.sql
share/postgis/utils/create_undef.pl
share/postgis/utils/new_postgis_restore.pl
share/postgis/utils/postgis_proc_upgrade.pl
Index: databases/postgis/files/patch-doc-Makefile.in
===================================================================
RCS file: /home/ncvs/ports/databases/postgis/files/patch-doc-Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 patch-doc-Makefile.in
--- databases/postgis/files/patch-doc-Makefile.in 7 Oct 2009 14:10:58 -0000 1.1
+++ databases/postgis/files/patch-doc-Makefile.in 15 Oct 2009 17:13:30 -0000
@@ -1,7 +1,15 @@
---- doc/Makefile.in.orig 2009-07-08 12:16:53.000000000 -0300
-+++ doc/Makefile.in 2009-09-20 10:12:53.000000000 -0300
-@@ -135,12 +135,12 @@
- rm -f $(PGSQL_SHAREDIR)/contrib/postgis_comments.sql
+--- doc/Makefile.in.orig 2009-07-08 07:16:53.000000000 -0800
++++ doc/Makefile.in 2009-10-15 09:12:34.000000000 -0800
+@@ -129,18 +129,18 @@
+ comments: postgis_comments.sql
+
+ comments-install: comments
+- cp postgis_comments.sql $(PGSQL_SHAREDIR)/contrib/postgis_comments.sql
++ cp postgis_comments.sql $(DATADIR)/contrib/postgis_comments.sql
+
+ comments-uninstall:
+- rm -f $(PGSQL_SHAREDIR)/contrib/postgis_comments.sql
++ rm -f $(DATADIR)/contrib/postgis_comments.sql
install: html/postgis.html man/shp2pgsql.1 man/pgsql2shp.1
- @mkdir -p $(PGSQL_DOCDIR)/postgis
--- /dev/null 2009-10-16 02:03:48.000000000 -0800
+++ databases/postgis/files/patch-Makefile 2009-10-15 08:55:47.000000000 -0800
@@ -0,0 +1,11 @@
+--- Makefile.orig 2006-06-16 06:18:28.000000000 -0800
++++ Makefile 2009-10-15 08:55:28.000000000 -0800
+@@ -2,7 +2,7 @@
+ # this file copied and adapted from PostgreSQL source
+ # to allow easy build on BSD systems
+
+-all install uninstall clean distclean maintainer-clean test check docs docs-install docs-uninstall utils:
++all install uninstall clean distclean maintainer-clean test check docs docs-install docs-uninstall utils comments comments-install:
+ @IFS=':' ; \
+ for dir in $$PATH; do \
+ for prog in gmake gnumake make; do \
--- patch-databases::postgis ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list