aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorriggs <riggs@FreeBSD.org>2014-10-03 21:12:39 +0800
committerriggs <riggs@FreeBSD.org>2014-10-03 21:12:39 +0800
commita6a919da4974e809d52036f59c3a1d063f09b725 (patch)
tree212026a73e7065b2cd27716ffb3eb33dd9f9c2ca
parent44ba86408bdf035eaa1bd5e3812eab7549b4d5a6 (diff)
downloadfreebsd-ports-gnome-a6a919da4974e809d52036f59c3a1d063f09b725.tar.gz
freebsd-ports-gnome-a6a919da4974e809d52036f59c3a1d063f09b725.tar.zst
freebsd-ports-gnome-a6a919da4974e809d52036f59c3a1d063f09b725.zip
- Modernise pkg-plist
- Update handling of DATADIR - Bump PORTREVISION PR: 193968 Submitted by: tatsuki_makino@hotmail.com (maintainer)
-rw-r--r--astro/geographiclib/Makefile64
-rw-r--r--astro/geographiclib/pkg-plist17
2 files changed, 49 insertions, 32 deletions
diff --git a/astro/geographiclib/Makefile b/astro/geographiclib/Makefile
index a73f015647ee..5c899fd71afd 100644
--- a/astro/geographiclib/Makefile
+++ b/astro/geographiclib/Makefile
@@ -3,6 +3,7 @@
PORTNAME= geographiclib
PORTVERSION= 1.37
+PORTREVISION= 1
CATEGORIES= astro
MASTER_SITES= SF/geographiclib/distrib \
SF/geographiclib:geoids,gravity,magnetic
@@ -18,13 +19,14 @@ LICENSE= MIT
USES= gmake libtool python
USE_GCC= any
USE_AUTOTOOLS= autoconf
-GNU_CONFIGURE= yes
-USE_LDCONFIG= yes
-NO_WRKSUBDIR= yes
-INSTALL_TARGET= install-strip
WRKSRC= ${WRKDIR}/${DISTNAME}
-MAKE_ARGS= pythondir=${PYTHON_SITELIBDIR}/geographiclib
+NO_WRKSUBDIR= yes
PORTDOCS= *
+GNU_CONFIGURE= yes
+MAKE_ARGS+= geographiclib_data=${DATADIR:Q}
+MAKE_ARGS+= pythondir=${PYTHON_SITELIBDIR}/geographiclib
+INSTALL_TARGET= install-strip
+USE_LDCONFIG= yes
OPTIONS_SUB= yes
OPTIONS_DEFAULT= GEOID_EGM96_5 GRAVITY_EGM96 GRAVITY_WGS84 \
@@ -68,24 +70,50 @@ post-patch:
${REINPLACE_CMD} -e '/wget/s/wget -O/fetch -o /' \
${WRKSRC}/tools/geographiclib-get-*.sh
-post-install:
- ${MKDIR} ${STAGEDIR}${DATADIR}/geoids \
- ${STAGEDIR}${DATADIR}/gravity \
- ${STAGEDIR}${DATADIR}/magnetic
- ${TOUCH} ${STAGEDIR}${DATADIR}/geoids/.keep \
- ${STAGEDIR}${DATADIR}/gravity/.keep \
- ${STAGEDIR}${DATADIR}/magnetic/.keep
+install-datasets-mkdir: .NOTMAIN
+ for d in geoids gravity magnetic ;\
+ do ${MKDIR} ${STAGEDIR}${DATADIR}/$${d} &&\
+ ${TOUCH} ${STAGEDIR}${DATADIR}/$${d}/.keep ;\
+ done
+.PHONY: install-datasets-mkdir
+
+.for n in geoids gravity magnetic
+install-datasets-${n}: install-datasets-mkdir .NOTMAIN
+ (cd ${WRKDIR}/${n} && \
+ ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/${n})
+.PHONY: install-datasets-${n}
+.endfor
+
+post-install: install-datasets-mkdir
.if ${PORT_OPTIONS:MGEOID_*}
- (cd ${WRKDIR}/geoids && \
- ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/geoids)
+post-install: install-datasets-geoids
.endif
.if ${PORT_OPTIONS:MGRAVITY_*}
- (cd ${WRKDIR}/gravity && \
- ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/gravity)
+post-install: install-datasets-gravity
.endif
.if ${PORT_OPTIONS:MMAGNETIC_*}
- (cd ${WRKDIR}/magnetic && \
- ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/magnetic)
+post-install: install-datasets-magnetic
.endif
+.PHONY: x-tool-plist
+x-tool-plist: ${PLIST} .NOTMAIN
+ ${REINPLACE_CMD}\
+ -e '/^%%PORTDOCS%%/d'\
+ -e '/^%%DATADIR%%\/geoids\/[^.]/{\
+ h;s|^%%DATADIR%%/geoids/\([^.]\{1,\}\).*|GEOID_\1|;\
+ s/[^0-9A-Za-z]/_/g;\
+ y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/;\
+ s/^/%%/;s/$$/%%/;G;s/\n//;}'\
+ -e '/^%%DATADIR%%\/gravity\/[^.]/{\
+ h;s|^%%DATADIR%%/gravity/\([^.]\{1,\}\).*|GRAVITY_\1|;\
+ s/[^0-9A-Za-z]/_/g;\
+ y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/;\
+ s/^/%%/;s/$$/%%/;G;s/\n//;}'\
+ -e '/^%%DATADIR%%\/magnetic\/[^.]/{\
+ h;s|^%%DATADIR%%/magnetic/\([^.]\{1,\}\).*|MAGNETIC_\1|;\
+ s/[^0-9A-Za-z]/_/g;\
+ y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/;\
+ s/^/%%/;s/$$/%%/;G;s/\n//;}'\
+ ${PLIST}
+
.include <bsd.port.mk>
diff --git a/astro/geographiclib/pkg-plist b/astro/geographiclib/pkg-plist
index 32dc14e5986d..758c535dd959 100644
--- a/astro/geographiclib/pkg-plist
+++ b/astro/geographiclib/pkg-plist
@@ -142,9 +142,8 @@ man/man1/TransverseMercatorProj.1.gz
sbin/geographiclib-get-geoids
sbin/geographiclib-get-gravity
sbin/geographiclib-get-magnetic
+share/cmake/GeographicLib/FindGeographicLib.cmake
%%DATADIR%%/geoids/.keep
-%%DATADIR%%/gravity/.keep
-%%DATADIR%%/magnetic/.keep
%%GEOID_EGM2008_1%%%%DATADIR%%/geoids/egm2008-1.pgm
%%GEOID_EGM2008_1%%%%DATADIR%%/geoids/egm2008-1.pgm.aux.xml
%%GEOID_EGM2008_1%%%%DATADIR%%/geoids/egm2008-1.wld
@@ -166,6 +165,7 @@ sbin/geographiclib-get-magnetic
%%GEOID_EGM96_5%%%%DATADIR%%/geoids/egm96-5.pgm
%%GEOID_EGM96_5%%%%DATADIR%%/geoids/egm96-5.pgm.aux.xml
%%GEOID_EGM96_5%%%%DATADIR%%/geoids/egm96-5.wld
+%%DATADIR%%/gravity/.keep
%%GRAVITY_EGM2008%%%%DATADIR%%/gravity/egm2008.egm
%%GRAVITY_EGM2008%%%%DATADIR%%/gravity/egm2008.egm.cof
%%GRAVITY_EGM84%%%%DATADIR%%/gravity/egm84.egm
@@ -174,21 +174,10 @@ sbin/geographiclib-get-magnetic
%%GRAVITY_EGM96%%%%DATADIR%%/gravity/egm96.egm.cof
%%GRAVITY_WGS84%%%%DATADIR%%/gravity/wgs84.egm
%%GRAVITY_WGS84%%%%DATADIR%%/gravity/wgs84.egm.cof
+%%DATADIR%%/magnetic/.keep
%%MAGNETIC_EMM2010%%%%DATADIR%%/magnetic/emm2010.wmm
%%MAGNETIC_EMM2010%%%%DATADIR%%/magnetic/emm2010.wmm.cof
%%MAGNETIC_IGRF11%%%%DATADIR%%/magnetic/igrf11.wmm
%%MAGNETIC_IGRF11%%%%DATADIR%%/magnetic/igrf11.wmm.cof
%%MAGNETIC_WMM2010%%%%DATADIR%%/magnetic/wmm2010.wmm
%%MAGNETIC_WMM2010%%%%DATADIR%%/magnetic/wmm2010.wmm.cof
-share/cmake/GeographicLib/FindGeographicLib.cmake
-@dirrm include/GeographicLib
-@dirrm %%PYTHON_SITELIBDIR%%/geographiclib
-@dirrm libexec/GeographicLib/matlab/private
-@dirrm libexec/GeographicLib/matlab
-@dirrm libexec/GeographicLib
-@dirrm %%DATADIR%%/geoids
-@dirrm %%DATADIR%%/gravity
-@dirrm %%DATADIR%%/magnetic
-@dirrm %%DATADIR%%
-@dirrm share/cmake/GeographicLib
-@dirrmtry share/cmake