aboutsummaryrefslogtreecommitdiffstats
path: root/editors/emacs
diff options
context:
space:
mode:
authorashish <ashish@FreeBSD.org>2014-08-05 17:09:26 +0800
committerashish <ashish@FreeBSD.org>2014-08-05 17:09:26 +0800
commitff6c176fb56974b387d3c703b31a55f922f26f58 (patch)
treea51fd6b453a48daf6ebf8e894be20cda01d67822 /editors/emacs
parenta4077ec13761093a8dee3d55f3b36df796c48582 (diff)
downloadfreebsd-ports-gnome-ff6c176fb56974b387d3c703b31a55f922f26f58.tar.gz
freebsd-ports-gnome-ff6c176fb56974b387d3c703b31a55f922f26f58.tar.zst
freebsd-ports-gnome-ff6c176fb56974b387d3c703b31a55f922f26f58.zip
- Move /var/games/emacs stuff from pkg-plist into pkg-{de,}install as it's
not installed in $PREFIX, which causes issues with `check-plist' target - Remove extraneous @dirrmtry entries - Bump PORTREVISION due to pkg-plist change Reported by: rpaulo
Diffstat (limited to 'editors/emacs')
-rw-r--r--editors/emacs/Makefile5
-rw-r--r--editors/emacs/pkg-deinstall16
-rw-r--r--editors/emacs/pkg-install16
-rw-r--r--editors/emacs/pkg-plist18
4 files changed, 35 insertions, 20 deletions
diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile
index 08c609230c11..937d9c59b5e4 100644
--- a/editors/emacs/Makefile
+++ b/editors/emacs/Makefile
@@ -3,7 +3,7 @@
PORTNAME= emacs
PORTVERSION= ${EMACS_VER}
-PORTREVISION?= 6
+PORTREVISION?= 7
PORTEPOCH= 3
CATEGORIES= editors ipv6
MASTER_SITES= ${MASTER_SITE_GNU}
@@ -230,8 +230,9 @@ add-plist-data:
.endfor
@${ECHO} "@unexec rmdir %D/${DATADIR_REL}/${EMACS_VER} 2>/dev/null || true" >>${TMPPLIST}
-.if ${PORT_OPTIONS:MSOURCES}
post-install:
+ @${RM} -rf ${STAGEDIR}/var/games/emacs
+.if ${PORT_OPTIONS:MSOURCES}
@${MKDIR} ${STAGEDIR}${DATADIR}/${EMACS_VER}/src
@${INSTALL_DATA} ${WRKSRC}/src/*.[ch] ${STAGEDIR}${DATADIR}/${EMACS_VER}/src
@${INSTALL_DATA} ${WRKSRC}/sources.el ${STAGEDIR}${DATADIR}/${EMACS_VER}/site-lisp/site-start.el
diff --git a/editors/emacs/pkg-deinstall b/editors/emacs/pkg-deinstall
new file mode 100644
index 000000000000..62e66bbdd487
--- /dev/null
+++ b/editors/emacs/pkg-deinstall
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+GAMESROOT=/var/games/emacs
+
+if [ "$2" = "DEINSTALL" ]; then
+ for s in snake tetris; do
+ if [ ! -s $GAMESROOT/$s-scores ]; then
+ rm -f $GAMESROOT/$s-scores
+ fi
+ done
+ rmdir $GAMESROOT 2>/dev/null
+fi
+
+exit 0
diff --git a/editors/emacs/pkg-install b/editors/emacs/pkg-install
new file mode 100644
index 000000000000..70280bfdbbd7
--- /dev/null
+++ b/editors/emacs/pkg-install
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+GAMESROOT=/var/games/emacs
+
+if [ "$2" = "POST-INSTALL" ]; then
+ umask 022
+ mkdir -p $GAMESROOT
+ touch $GAMESROOT/snake-scores
+ touch $GAMESROOT/tetris-scores
+ chown games $GAMESROOT
+ chmod 775 $GAMESROOT
+fi
+
+exit 0
diff --git a/editors/emacs/pkg-plist b/editors/emacs/pkg-plist
index 04c96940ca70..e6dc5ea4c41f 100644
--- a/editors/emacs/pkg-plist
+++ b/editors/emacs/pkg-plist
@@ -25,21 +25,3 @@ share/icons/hicolor/scalable/apps/emacs.svg
share/icons/hicolor/scalable/mimetypes/emacs-document.svg
@dirrmtry %%INFODIR%%
@dirrmtry %%DATADIR%%/%%EMACS_VER%%/site-lisp
-@dirrmtry share/icons/hicolor/scalable/mimetypes
-@dirrmtry share/icons/hicolor/scalable/apps
-@dirrmtry share/icons/hicolor/scalable
-@dirrmtry share/icons/hicolor/48x48/apps
-@dirrmtry share/icons/hicolor/48x48
-@dirrmtry share/icons/hicolor/32x32/apps
-@dirrmtry share/icons/hicolor/32x32
-@dirrmtry share/icons/hicolor/24x24/apps
-@dirrmtry share/icons/hicolor/24x24
-@dirrmtry share/icons/hicolor/16x16/apps
-@dirrmtry share/icons/hicolor/16x16
-@dirrmtry share/icons/hicolor/128x128/apps
-@dirrmtry share/icons/hicolor/128x128
-@dirrmtry share/icons/hicolor
-@dirrmtry share/icons
-@unexec if [ ! -s /var/games/emacs/snake-scores ]; then rm -f /var/games/emacs/snake-scores; fi
-@unexec if [ ! -s /var/games/emacs/tetris-scores ]; then rm -f /var/games/emacs/tetris-scores; fi
-@unexec rmdir /var/games/emacs 2>/dev/null || true