aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authorjmz <jmz@FreeBSD.org>2001-04-29 08:01:00 +0800
committerjmz <jmz@FreeBSD.org>2001-04-29 08:01:00 +0800
commit69cfe236f22e5756de065adced9042a62e248391 (patch)
tree44492b049dddf7d4fb393842ed61ec1c21d24b76 /emulators
parentb4f0bccf2723272abaf1652f4285057f5767453c (diff)
downloadfreebsd-ports-gnome-69cfe236f22e5756de065adced9042a62e248391.tar.gz
freebsd-ports-gnome-69cfe236f22e5756de065adced9042a62e248391.tar.zst
freebsd-ports-gnome-69cfe236f22e5756de065adced9042a62e248391.zip
- Remove pkg-plist.x11 and use PLIST_SUB to manage NO_X files in pkg-plist
- PLIST now manages installation/removal of mtools.conf (pkg-install no longer required). mtools.conf will be removed only if it is equal to mtools.conf.sample. Submitted by: olgeni
Diffstat (limited to 'emulators')
-rw-r--r--emulators/mtools/Makefile5
-rw-r--r--emulators/mtools/pkg-install9
-rw-r--r--emulators/mtools/pkg-plist4
-rw-r--r--emulators/mtools/pkg-plist.x1137
4 files changed, 7 insertions, 48 deletions
diff --git a/emulators/mtools/Makefile b/emulators/mtools/Makefile
index 022552593206..0e4e47b13b36 100644
--- a/emulators/mtools/Makefile
+++ b/emulators/mtools/Makefile
@@ -22,9 +22,10 @@ GNU_CONFIGURE= yes
.if !defined(NO_X)
USE_XLIB= yes
CONFIGURE_ARGS= --enable-xdf --enable-floppyd
-PLIST= pkg-plist.x11
+PLIST_SUB= WITH_X11=""
.else
CONFIGURE_ARGS= --enable-xdf
+PLIST_SUB= WITH_X11="@comment "
.endif
USE_GMAKE= yes
@@ -49,7 +50,7 @@ post-patch:
done
post-install:
- @# mwrite has been removed by author, but we'll keep it just a bit longer
+# mwrite has been removed by author, but we'll keep it just a bit longer
@${LN} -sf ${PREFIX}/bin/mtools ${PREFIX}/bin/mwrite
@${LN} -sf ${PREFIX}/man/man1/mcopy.1.gz ${PREFIX}/man/man1/mwrite.1.gz
@${INSTALL_DATA} ${WRKSRC}/mtools.conf ${PREFIX}/etc/mtools.conf.sample
diff --git a/emulators/mtools/pkg-install b/emulators/mtools/pkg-install
deleted file mode 100644
index 2837d17e01ac..000000000000
--- a/emulators/mtools/pkg-install
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-if [ $2 != "POST-INSTALL" ]; then
- exit 0
-fi
-if [ -e ${PKG_PREFIX}/etc/mtools.conf ]; then
- echo "Will not overwrite existing ${PKG_PREFIX}/etc/mtools.conf file."
-else
- cp -p ${PKG_PREFIX}/etc/mtools.conf.sample ${PKG_PREFIX}/etc/mtools.conf
-fi
diff --git a/emulators/mtools/pkg-plist b/emulators/mtools/pkg-plist
index df85e547b4fd..685e131783fd 100644
--- a/emulators/mtools/pkg-plist
+++ b/emulators/mtools/pkg-plist
@@ -1,3 +1,5 @@
+%%WITH_X11%%bin/floppyd
+%%WITH_X11%%bin/floppyd_installtest
bin/mattrib
bin/mbadblocks
bin/mcat
@@ -30,6 +32,8 @@ bin/mzip
@unexec install-info --delete %D/info/mtools.info %D/info/dir
info/mtools.info
@exec install-info %D/info/mtools.info %D/info/dir
+@unexec if cmp -s %D/etc/mtools.conf %D/etc/mtools.conf.sample; then rm -f %D/etc/mtools.conf; fi
etc/mtools.conf.sample
+@exec if [ ! -f %D/etc/mtools.conf ]; then cp %B/%f %D/etc/mtools.conf; fi
@exec ln -fs %D/man/man1/mcopy.1.gz %D/man/man1/mwrite.1.gz
@unexec rm %D/man/man1/mwrite.1.gz
diff --git a/emulators/mtools/pkg-plist.x11 b/emulators/mtools/pkg-plist.x11
deleted file mode 100644
index 095bc13e664a..000000000000
--- a/emulators/mtools/pkg-plist.x11
+++ /dev/null
@@ -1,37 +0,0 @@
-bin/floppyd
-bin/floppyd_installtest
-bin/mattrib
-bin/mbadblocks
-bin/mcat
-bin/mcd
-bin/mcheck
-bin/mcomp
-bin/mcopy
-bin/mdel
-bin/mdeltree
-bin/mdir
-bin/mdu
-bin/mformat
-bin/minfo
-bin/mkmanifest
-bin/mlabel
-bin/mmd
-bin/mmount
-bin/mmove
-bin/mpartition
-bin/mrd
-bin/mread
-bin/mren
-bin/mshowfat
-bin/mtools
-bin/mtoolstest
-bin/mtype
-bin/mwrite
-bin/mxtar
-bin/mzip
-@unexec install-info --delete %D/info/mtools.info %D/info/dir
-info/mtools.info
-@exec install-info %D/info/mtools.info %D/info/dir
-etc/mtools.conf.sample
-@exec ln -fs %D/man/man1/mcopy.1.gz %D/man/man1/mwrite.1.gz
-@unexec rm %D/man/man1/mwrite.1.gz