aboutsummaryrefslogtreecommitdiffstats
path: root/astro/xplanet
diff options
context:
space:
mode:
authornovel <novel@FreeBSD.org>2005-04-16 18:55:22 +0800
committernovel <novel@FreeBSD.org>2005-04-16 18:55:22 +0800
commit878ffaef80517222615954d69b7f83dfda954d87 (patch)
treedd723f63b7270e7abe6bf9ddd67dcf4ba26124d0 /astro/xplanet
parentcc60e59c06e6ccbf3902dc2405b4545b7c6426a0 (diff)
downloadfreebsd-ports-gnome-878ffaef80517222615954d69b7f83dfda954d87.tar.gz
freebsd-ports-gnome-878ffaef80517222615954d69b7f83dfda954d87.tar.zst
freebsd-ports-gnome-878ffaef80517222615954d69b7f83dfda954d87.zip
Do not overwrite config file on upgrade.
Requested by: Dan Langille <dan@langille.org>
Diffstat (limited to 'astro/xplanet')
-rw-r--r--astro/xplanet/Makefile12
-rw-r--r--astro/xplanet/pkg-plist2
2 files changed, 11 insertions, 3 deletions
diff --git a/astro/xplanet/Makefile b/astro/xplanet/Makefile
index fa962265c912..f8d80cfa82a3 100644
--- a/astro/xplanet/Makefile
+++ b/astro/xplanet/Makefile
@@ -7,7 +7,7 @@
PORTNAME= xplanet
PORTVERSION= 1.1.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= astro
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -15,6 +15,7 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= novel@FreeBSD.org
COMMENT= Draw pictures of the earth textured by an image
+USE_REINPLACE= yes
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
USE_GNOME= #
@@ -22,8 +23,6 @@ CONFIGURE_ARGS= --with-map-extension=jpg
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
LIBS="-L${LOCALBASE}/lib -L${X11BASE}/lib -lm"
-PLIST_FILES= bin/xplanet
-
OPTIONS= FREETYPE "Enable Freetype support" on \
PANGO "Enable PANGO support" on \
GIF "Enable GIF support" on \
@@ -85,6 +84,10 @@ LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff
CONFIGURE_ARGS+= --without-tiff
.endif
+post-extract:
+ @${REINPLACE_CMD} -e "s/default/default.sample/g" ${WRKSRC}/Makefile.in
+ @${MV} ${WRKSRC}/xplanet/config/default ${WRKSRC}/xplanet/config/default.sample
+
post-install:
.for file in freebsd.committers.markers freebsd.ftp.markers
@${INSTALL_DATA} ${PORTSDIR}/astro/xearth/files/${file} \
@@ -94,5 +97,8 @@ post-install:
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
@${FIND} ${DATADIR} -type d | ${SORT} -r | \
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
+ @if test ! -f ${DATADIR}/config/default; then \
+ ${CP} ${DATADIR}/config/default.sample ${DATADIR}/config/default; \
+ fi
.include <bsd.port.post.mk>
diff --git a/astro/xplanet/pkg-plist b/astro/xplanet/pkg-plist
new file mode 100644
index 000000000000..3e9d39883a13
--- /dev/null
+++ b/astro/xplanet/pkg-plist
@@ -0,0 +1,2 @@
+bin/xplanet
+@unexec if cmp -s %D/share/xplanet/config/defult %D/share/xplanet/config/defult.sample; then rm -f %D/share/xplanet/config/defult; fi