[Midnightbsd-cvs] mports [17351] trunk/emulators/mtools: fix build of mtools

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Sep 15 23:24:38 EDT 2014


Revision: 17351
          http://svnweb.midnightbsd.org/mports/?rev=17351
Author:   laffer1
Date:     2014-09-15 23:24:37 -0400 (Mon, 15 Sep 2014)
Log Message:
-----------
fix build of mtools

Modified Paths:
--------------
    trunk/emulators/mtools/Makefile
    trunk/emulators/mtools/pkg-plist

Modified: trunk/emulators/mtools/Makefile
===================================================================
--- trunk/emulators/mtools/Makefile	2014-09-16 03:22:10 UTC (rev 17350)
+++ trunk/emulators/mtools/Makefile	2014-09-16 03:24:37 UTC (rev 17351)
@@ -7,6 +7,7 @@
 
 PORTNAME=	mtools
 PORTVERSION=	4.0.10
+PORTREVISION=	1
 CATEGORIES=	emulators
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	mtools
@@ -13,40 +14,40 @@
 
 MAINTAINER=	ports at MidnightBSD.org
 COMMENT=	A collection of tools for manipulating MSDOS files
-LICENSE=	gpl2
 
-USE_BZIP2=	yes
-USE_GMAKE=	yes
+LICENSE=	gpl3
+
+CONFLICTS_INSTALL=	multimarkdown-*
+
+USES=		gmake makeinfo tar:bzip2
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" \
-		ac_cv_header_malloc_h=no
+CONFIGURE_ENV=	ac_cv_header_malloc_h=no
 CONFIGURE_ARGS=	--enable-xdf
 
 SUB_FILES=	pkg-message
 
-MAN1=		mattrib.1 mbadblocks.1 mcat.1 mcd.1 mclasserase.1 mcopy.1 \
-		mdel.1 mdeltree.1 mdir.1 mdu.1 mformat.1 mkmanifest.1 \
-		minfo.1 mlabel.1 mmd.1 mmount.1 mmove.1 mpartition.1 \
-		mrd.1 mren.1 mshowfat.1 mtoolstest.1 mtools.1 mtype.1 \
-		mzip.1
-MAN5=		mtools.5
 INFO=		mtools
 
-.if defined(WITHOUT_ICONV)
+OPTIONS_DEFINE=	ICONV X11
+OPTIONS_DEFAULT=ICONV X11
+
+.include <bsd.mport.options.mk>
+
+.if ${PORT_OPTIONS:MICONV}
+USES+=		iconv
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
+.else
 CONFIGURE_ENV+=	ac_cv_header_iconv_h=no
-.else
-USE_ICONV=	yes
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib -liconv
 .endif
 
-.if defined(WITHOUT_X11)
+.if ${PORT_OPTIONS:MX11}
+USE_XORG=	x11 sm ice xau
+PLIST_SUB=	X11=""
+.else
 CONFIGURE_ARGS+=	--without-x
 PLIST_SUB=	X11="@comment "
-.else
-USE_XORG=	x11 sm ice xau
-PLIST_SUB=	X11=""
-MAN1+=		floppyd.1 floppyd_installtest.1
+MAKE_ENV+=	WITHOUT_X11=yes
 .endif
 
 post-patch:
@@ -53,19 +54,17 @@
 	@${REINPLACE_CMD} -e \
 		's|^#define MT_SIZE_T size_t|#define MT_SIZE_T off_t|g' \
 		${WRKSRC}/llong.h
-.for file in mformat.c
 	@${REINPLACE_CMD} -e 's|/etc/mtools.conf|${PREFIX}/etc/mtools.conf|g' \
-		${WRKSRC}/${file}
-.endfor
-.for file in mtools.5 mtools.texi
+		${WRKSRC}/mformat.c
+.for f in mtools.5 mtools.texi
 	@${REINPLACE_CMD} -e 's|/usr/local/etc/|${PREFIX}/etc/|g' \
-		${WRKSRC}/${file}
+		${WRKSRC}/${f}
 .endfor
 
 post-install:
-	${INSTALL_DATA} ${WRKSRC}/mtools.conf ${PREFIX}/etc/mtools.conf.sample
-.if !exists(${PREFIX}/etc/mtools.conf)
-	@cd ${PREFIX}/etc && ${CP} -f mtools.conf.sample mtools.conf
-.endif
+	${INSTALL_DATA} ${WRKSRC}/mtools.conf ${STAGEDIR}${PREFIX}/etc/mtools.conf.sample
+	@if [ ! -f ${STAGEDIR}${PREFIX}/etc/mtools.conf ]; then \
+		cd ${STAGEDIR}${PREFIX}/etc && ${CP} -p mtools.conf.sample mtools.conf; \
+	fi
 
 .include <bsd.port.mk>

Modified: trunk/emulators/mtools/pkg-plist
===================================================================
--- trunk/emulators/mtools/pkg-plist	2014-09-16 03:22:10 UTC (rev 17350)
+++ trunk/emulators/mtools/pkg-plist	2014-09-16 03:24:37 UTC (rev 17351)
@@ -29,6 +29,34 @@
 bin/mtype
 bin/mxtar
 bin/mzip
+%%X11%%man/man1/floppyd.1.gz
+%%X11%%man/man1/floppyd_installtest.1.gz
+man/man1/mattrib.1.gz
+man/man1/mbadblocks.1.gz
+man/man1/mcat.1.gz
+man/man1/mcd.1.gz
+man/man1/mclasserase.1.gz
+man/man1/mcopy.1.gz
+man/man1/mdel.1.gz
+man/man1/mdeltree.1.gz
+man/man1/mdir.1.gz
+man/man1/mdu.1.gz
+man/man1/mformat.1.gz
+man/man1/minfo.1.gz
+man/man1/mkmanifest.1.gz
+man/man1/mlabel.1.gz
+man/man1/mmd.1.gz
+man/man1/mmount.1.gz
+man/man1/mmove.1.gz
+man/man1/mpartition.1.gz
+man/man1/mrd.1.gz
+man/man1/mren.1.gz
+man/man1/mshowfat.1.gz
+man/man1/mtools.1.gz
+man/man1/mtoolstest.1.gz
+man/man1/mtype.1.gz
+man/man1/mzip.1.gz
+man/man5/mtools.5.gz
 @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



More information about the Midnightbsd-cvs mailing list