Summary: | [NEW PORT] graphics/jumpgis: A GUI based application for viewing and processing spatial data | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Sam Lawrance <boris> | ||||
Component: | Individual Port(s) | Assignee: | freebsd-ports-bugs (Nobody) <ports-bugs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Sam Lawrance
2004-06-17 17:30:35 UTC
Whoops, please add in USE_REINPLACE=yes -Sam After a question to ports@ I am told that this is the preferred way of altering the plist conditionally (also adds USE_REINPLACE): --- Makefile.old Fri Jun 18 12:50:43 2004 +++ Makefile Fri Jun 18 12:45:04 2004 @@ -21,6 +21,7 @@ TARGET_DIR= ${PREFIX}/${PORTNAME} USE_JAVA= 1.4+ USE_ZIP= yes +USE_REINPLACE= yes NO_BUILD= yes WANT_GNOME= yes PORTDOCS= * @@ -28,11 +29,9 @@ .include <bsd.port.pre.mk> .if ${HAVE_GNOME:Mgnomelibs}!="" -PLIST_SUB+= PREFIX=${PREFIX} -PLIST_FILES+= "@cwd %%X11BASE%%" \ - share/gnome/applications/jump.desktop \ - share/gnome/pixmaps/jump.png \ - "@cwd %%PREFIX%%" +PLIST_SUB+= GNOMELINKS="" +.else +PLIST_SUB+= GNOMELINKS="@comment " .endif do-extract: --- pkg-plist.old Fri Jun 18 12:50:43 2004 +++ pkg-plist Fri Jun 18 12:37:24 2004 @@ -9,3 +9,6 @@ @dirrm jumpgis/lib/ext @dirrm jumpgis/lib @dirrm jumpgis +@cwd %%X11BASE%% +%%GNOMELINKS%%share/gnome/applications/jump.desktop +%%GNOMELINKS%%share/gnome/pixmaps/jump.png State Changed From-To: open->feedback Thanks for your submission. But could you please rework it a little? Since you have included <bsd.port.mk> (or <bsd.port.pre.mk>), you don't have to rewrite the standard targets. For example do-extract: seems unnecessary, and you should keep do-patch: for eventual patches (put your REINPLACE_CMD in a post-patch target). Regards, [Follow-up already sent, but lost in cyberspace] Le Ven 9 jul 04 à 5:16:06 +0200, Sam Lawrance <boris@brooknet.com.au> écrivait : > Apologies for slow response, was on a holiday :) And I have misfiled your mail... > > For example do-extract: seems unnecessary > > I made the do-extract the way it is because the distfile isn't > structured the usual way - it doesn't extract into a single > subdirectory. eg: > > sam@dirk distfiles$ unzip -t jump-1.1.1.zip > Archive: jump-1.1.1.zip > testing: bin/ OK > testing: doc/ OK > testing: lib/ OK > testing: lib/ext/ OK > testing: bin/JUMPWorkbench-mac.sh OK > testing: bin/JUMPWorkbench-unix.sh OK > and so on. So the do-extract creates WRKSRC on top of WRKDIR (usually > WRKSRC is created by extracting the archive) and then extracts in to it. > > If I can do it a better way drop a hint. The following patch should do what you want: --- jumpgis.diff begins here --- diff -urN graphics/jumpgis.orig/Makefile graphics/jumpgis/Makefile --- graphics/jumpgis.orig/Makefile Sat Jul 17 11:12:45 2004 +++ graphics/jumpgis/Makefile Sat Jul 17 11:29:02 2004 @@ -18,13 +18,18 @@ COMMENT= A GUI based application for viewing and processing spatial data WRKSRC= ${WRKDIR}/jump +EXTRACT_AFTER_ARGS= -d ${WRKSRC} TARGET_DIR= ${PREFIX}/${PORTNAME} + USE_JAVA= 1.4+ USE_ZIP= yes NO_BUILD= yes WANT_GNOME= yes PORTDOCS= * +USE_REINPLACE= yes +REINPLACE_ARGS= -i "" + .include <bsd.port.pre.mk> .if ${HAVE_GNOME:Mgnomelibs}!="" @@ -35,34 +40,30 @@ "@cwd %%PREFIX%%" .endif -do-extract: - @${MKDIR} ${WRKDIR} - @${MKDIR} ${WRKSRC} - @${UNZIP_CMD} -q ${DISTDIR}/jump-1.1.1.zip -d ${WRKSRC} - -do-patch: - @${REINPLACE_CMD} -i "" -e "s,#!sh,#!/bin/sh,g" ${WRKSRC}/bin/JUMPWorkbench-unix.sh - @${REINPLACE_CMD} -i "" -e "s,^set LIB=../lib,LIB=${TARGET_DIR}/lib,g" ${WRKSRC}/bin/JUMPWorkbench-unix.sh - @${REINPLACE_CMD} -i "" -e "s,workbench-properties.xml,~/.jump-workbench-properties.xml,g" ${WRKSRC}/bin/JUMPWorkbench-unix.sh +post-patch: + @${REINPLACE_CMD} -e "s,#!sh,#!/bin/sh,g" \ + -e "s,^set LIB=../lib,LIB=${TARGET_DIR}/lib,g" \ + -e "s,workbench-properties.xml,~/.jump-workbench-properties.xml,g" \ + ${WRKSRC}/bin/JUMPWorkbench-unix.sh do-install: @${ECHO_CMD} "---> Installing JAR files" ${MKDIR} ${TARGET_DIR}/lib ${INSTALL_DATA} ${WRKSRC}/lib/*.jar ${TARGET_DIR}/lib ${INSTALL_DATA} -d ${TARGET_DIR}/lib/ext - @${ECHO} "Installing startup script" + @${ECHO_MSG} "Installing startup script" ${INSTALL_SCRIPT} ${WRKSRC}/bin/JUMPWorkbench-unix.sh ${PREFIX}/bin/jumpgis .if !defined(NOPORTDOCS) - @${ECHO} "---> Installing documentation" + @${ECHO_MSG} "---> Installing documentation" ${MKDIR} ${DOCSDIR} ${CP} -r ${WRKSRC}/doc/* ${DOCSDIR} .else - @${ECHO} "---> Skipping documentation" + @${ECHO_MSG} "---> Skipping documentation" .endif .if ${HAVE_GNOME:Mgnomelibs}!="" - @${ECHO} "---> Installing GNOME application links" + @${ECHO_MSG} "---> Installing GNOME application links" ${INSTALL_DATA} ${DISTDIR}/jump.desktop ${X11BASE}/share/gnome/applications/ ${INSTALL_DATA} ${DISTDIR}/jump.png ${X11BASE}/share/gnome/pixmaps/ .endif --- jumpgis.diff ends here --- However, the files listed as PATCHFILES don't contain patches: you should use DISTFILES and EXTRACT_ONLY. Regards, -- Th. Thomas. Sam, Since bsd.java.mk 2.0, the correct syntax would be: USE_JAVA= yes JAVA_VERSION= 1.4+ The current version of your port would work without such a modification but we plan to remove backward compatibility in the near future so porters are strongly encouraged to use 2.0 syntax for new ports. You'll find further information on the subject in [1]. Should you require any information that is not (yet) in this document, feel free to ask me directly. Herve [1] Porter's handbook - Using Java http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/using-java.html Thanks. I will spend some time on this and prior suggestions now. Sam Changes incorporated into the shar below. - Fixed java variables, and reduced version requirement to 1.3 - PATCHFILES removed, DISTFILES instead - Changed indent under targets from 2 to 1 tab - Thomas' patch # Shell archive. # echo x - jumpgis/Makefile sed 's/^X//' >jumpgis/Makefile << 'END-of-jumpgis/Makefile' X# New ports collection makefile for: JUMP Unified Mapping Platform X# Date created: June 16 2004 X# Whom: Sam Lawrance <boris@brooknet.com.au> X# X# $FreeBSD$ X# X XPORTNAME= jumpgis XPORTVERSION= 1.1.1 XCATEGORIES= graphics java XMASTER_SITES= http://www.jump-project.org/downloads/jump/:main \ X http://sam.stral.net/freebsd/:extra XDISTFILES= jump-${PORTVERSION}.zip:main \ X jump.png:extra jump.desktop:extra X XMAINTAINER= boris@brooknet.com.au XCOMMENT= A GUI based application for viewing and processing spatial data X XWRKSRC= ${WRKDIR}/jump XEXTRACT_AFTER_ARGS= -d ${WRKSRC} XTARGET_DIR= ${PREFIX}/${PORTNAME} X XUSE_JAVA= yes XJAVA_VERSION= 1.3+ XEXTRACT_ONLY= jump-${PORTVERSION}.zip XUSE_ZIP= yes XUSE_REINPLACE= yes XNO_BUILD= yes XWANT_GNOME= yes XPORTDOCS= * X XUSE_REINPLACE= yes XREINPLACE_ARGS= -i "" X X.include <bsd.port.pre.mk> X X.if ${HAVE_GNOME:Mgnomelibs}!="" XPLIST_SUB+= GNOMELINKS="" X.else XPLIST_SUB+= GNOMELINKS="@comment " X.endif X Xpost-patch: X @${REINPLACE_CMD} -e "s,#!sh,#!/bin/sh,g" \ X -e "s,^set LIB=../lib,LIB=${TARGET_DIR}/lib,g" \ X -e "s,workbench-properties.xml,~/.jump-workbench-properties.xml,g" \ X ${WRKSRC}/bin/JUMPWorkbench-unix.sh X Xdo-install: X @${ECHO_CMD} "---> Installing JAR files" X ${MKDIR} ${TARGET_DIR}/lib X ${INSTALL_DATA} ${WRKSRC}/lib/*.jar ${TARGET_DIR}/lib X ${INSTALL_DATA} -d ${TARGET_DIR}/lib/ext X @${ECHO_MSG} "Installing startup script" X ${INSTALL_SCRIPT} ${WRKSRC}/bin/JUMPWorkbench-unix.sh ${PREFIX}/bin/jumpgis X X.if !defined(NOPORTDOCS) X @${ECHO_MSG} "---> Installing documentation" X ${MKDIR} ${DOCSDIR} X ${CP} -r ${WRKSRC}/doc/* ${DOCSDIR} X.else X @${ECHO_MSG} "---> Skipping documentation" X.endif X X.if ${HAVE_GNOME:Mgnomelibs}!="" X @${ECHO_MSG} "---> Installing GNOME application links" X ${INSTALL_DATA} ${DISTDIR}/jump.desktop ${X11BASE}/share/gnome/applications/ X ${INSTALL_DATA} ${DISTDIR}/jump.png ${X11BASE}/share/gnome/pixmaps/ X.endif X X.include <bsd.port.post.mk> END-of-jumpgis/Makefile echo x - jumpgis/distinfo sed 's/^X//' >jumpgis/distinfo << 'END-of-jumpgis/distinfo' XMD5 (jump-1.1.1.zip) = 0caa05e49036baedba8b61f06ced600c XSIZE (jump-1.1.1.zip) = 8524734 XMD5 (jump.png) = d9f137f2afd0c1a1c2e109a3360f9e06 XSIZE (jump.png) = 786 XMD5 (jump.desktop) = e9f066dca2aea1f809764a33c1d021fc XSIZE (jump.desktop) = 232 END-of-jumpgis/distinfo echo x - jumpgis/pkg-descr sed 's/^X//' >jumpgis/pkg-descr << 'END-of-jumpgis/pkg-descr' XThe JUMP Unified Mapping Platform (JUMP) is a GUI-based application for Xviewing and processing spatial data. It includes many functions common Xto other popular GIS products for the analysis and manipulation of Xgeospatial data. The JUMP also provides a highly extensible framework Xfor the development and execution of custom spatial data processing Xapplications. X XWWW: http://www.jump-project.org/ END-of-jumpgis/pkg-descr echo x - jumpgis/pkg-plist sed 's/^X//' >jumpgis/pkg-plist << 'END-of-jumpgis/pkg-plist' Xbin/jumpgis Xjumpgis/lib/Jama-1.0.1.jar Xjumpgis/lib/jdom.jar Xjumpgis/lib/jts-1.4.0.jar Xjumpgis/lib/jump-1.1.1.jar Xjumpgis/lib/junit.jar Xjumpgis/lib/xercesImpl.jar Xjumpgis/lib/xml-apis.jar X@dirrm jumpgis/lib/ext X@dirrm jumpgis/lib X@dirrm jumpgis X@cwd %%X11BASE%% X%%GNOMELINKS%%share/gnome/applications/jump.desktop X%%GNOMELINKS%%share/gnome/pixmaps/jump.png END-of-jumpgis/pkg-plist exit State Changed From-To: feedback->open Feedback received. State Changed From-To: open->closed New port added, thanks! |