summaryrefslogtreecommitdiff
path: root/sysutils/mtools
diff options
context:
space:
mode:
authortron <tron>1999-05-31 22:22:08 +0000
committertron <tron>1999-05-31 22:22:08 +0000
commitec85f9d7d4f9a17c9f81daca39c1ead2f584a937 (patch)
tree978e62cdf71149da37531deda38d9b081c11b7e1 /sysutils/mtools
parent5c9f0c78d7d0025ff309b6ef63e1e2b137b7ff04 (diff)
downloadpkgsrc-ec85f9d7d4f9a17c9f81daca39c1ead2f584a937.tar.gz
- Enhance "configure" target so that "floppyd" will be built on systems
with X11 installed. - Fix compliation problems in "floppyd.cpp" with the patch supplied by Antti Kantee in PR pkg/7670. - Remove "floppyd" manual page if the binary isn't built and installed.
Diffstat (limited to 'sysutils/mtools')
-rw-r--r--sysutils/mtools/Makefile15
-rw-r--r--sysutils/mtools/patches/patch-ac47
-rw-r--r--sysutils/mtools/pkg/PLIST3
3 files changed, 63 insertions, 2 deletions
diff --git a/sysutils/mtools/Makefile b/sysutils/mtools/Makefile
index 0c250c86987..9eb636578d0 100644
--- a/sysutils/mtools/Makefile
+++ b/sysutils/mtools/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 1998/08/20 15:17:27 tsarna Exp $
+# $NetBSD: Makefile,v 1.15 1999/05/31 22:22:08 tron Exp $
#
DISTNAME= mtools-3.9.1
@@ -13,13 +13,26 @@ HOMEPAGE= http://www.tux.org/pub/knaff/mtools/
GNU_CONFIGURE= yes
USE_GMAKE= yes
+CPPFLAGS+= -I${X11BASE}/include
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
INFO_FILES= mtools.info
+PLIST_SRC= ${WRKDIR}/PLIST
+
pre-patch:
@${LN} -s . ${WRKSRC}/mtools
post-patch:
@${RM} ${WRKSRC}/mtools
+post-install:
+ @if [ -e ${PREFIX}/bin/floppyd ]; then \
+ ${CP} ${PKGDIR}/PLIST ${PLIST_SRC}; \
+ else \
+ ${ECHO} ${RM} -f ${PREFIX}/man/man1/floppyd.1; \
+ ${RM} -f ${PREFIX}/man/man1/floppyd.1; \
+ ${GREP} -v /floppyd ${PKGDIR}/PLIST >${PLIST_SRC}; \
+ fi \
+
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/mtools/patches/patch-ac b/sysutils/mtools/patches/patch-ac
new file mode 100644
index 00000000000..68fb4c51995
--- /dev/null
+++ b/sysutils/mtools/patches/patch-ac
@@ -0,0 +1,47 @@
+$NetBSD: patch-ac,v 1.1 1999/05/31 22:22:09 tron Exp $
+
+--- floppyd.cpp.orig Sun May 30 18:05:46 1999
++++ floppyd.cpp Sun May 30 18:25:37 1999
+@@ -527,12 +527,12 @@
+ {
+ int new_sock;
+ struct sockaddr_in addr;
+- int len;
++ socklen_t len;
+
+ /*
+ * Ignore dead servers so no zombies should be left hanging.
+ */
+- signal(SIGCLD, SIG_IGN);
++ signal(SIGCHLD, SIG_IGN);
+
+ for (;;)
+ {
+@@ -615,6 +615,7 @@
+ short bind_port = FLOPPYD_DEFAULT_PORT;
+ uid_t run_uid = 65535;
+ gid_t run_gid = 65535;
++ pid_t run_pid;
+ int sock;
+ int port_is_supplied = 0;
+ int no_local = 0;
+@@ -665,7 +666,7 @@
+ }
+ if(!run_as_server) {
+ struct sockaddr_in addr;
+- int len = sizeof(addr);
++ socklen_t len = sizeof(addr);
+
+ /* try to find out port that we are connected to */
+ if(getsockname(0, (sockaddr*) &addr, &len) >= 0 &&
+@@ -836,8 +837,8 @@
+ /*
+ * Start a new session and group.
+ */
+- setsid();
+- setpgrp();
++ run_pid = setsid();
++ setpgrp(0, run_pid);
+
+ close(2);
+ open("/dev/null", O_WRONLY);
diff --git a/sysutils/mtools/pkg/PLIST b/sysutils/mtools/pkg/PLIST
index 7d98eced30f..25bfb608f13 100644
--- a/sysutils/mtools/pkg/PLIST
+++ b/sysutils/mtools/pkg/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 1999/02/11 19:17:34 tv Exp $
+@comment $NetBSD: PLIST,v 1.5 1999/05/31 22:22:09 tron Exp $
bin/mattrib
bin/mcd
bin/mcopy
@@ -29,6 +29,7 @@ bin/tgz
bin/mcomp
bin/lz
bin/mkmanifest
+bin/floppyd
@unexec install-info --delete %D/info/mtools.info %D/info/dir
info/mtools.info
@exec install-info %D/info/mtools.info %D/info/dir