svn commit: r397390 - head/sysutils/dolly
Dmitry Marakasov
amdmi3 at FreeBSD.org
Sun Sep 20 19:23:56 UTC 2015
Author: amdmi3
Date: Sun Sep 20 19:23:55 2015
New Revision: 397390
URL: https://svnweb.freebsd.org/changeset/ports/397390
Log:
- Switch to options helpers
- Fix targets order
Modified:
head/sysutils/dolly/Makefile
Modified: head/sysutils/dolly/Makefile
==============================================================================
--- head/sysutils/dolly/Makefile Sun Sep 20 19:23:36 2015 (r397389)
+++ head/sysutils/dolly/Makefile Sun Sep 20 19:23:55 2015 (r397390)
@@ -15,37 +15,19 @@ OPTIONS_DEFAULT= BZIP2 HIGHEST_COMPRESSI
BZIP2_DESC= bzip2 instead of gzip for compressing
HIGHEST_COMPRESSION_DESC= Highest rather than fastest compression
-DOCS= README
-
-.include <bsd.port.options.mk>
-do-configure:
-# C{C,FLAGS} safeness
- @${REINPLACE_CMD} -E \
- -e 's|^(CC[[:space:]]*=).*$$|\1${CC}|' \
- -e 's|^(CFLAGS[[:space:]]*=.*)$$|\1 ${CFLAGS}|' \
- ${BUILD_WRKSRC}/${MAKEFILE}
-
-do-install:
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
-. for _file in ${DOCS}
- @${INSTALL_DATA} ${WRKSRC}/${_file} ${STAGEDIR}${DOCSDIR}/
-. endfor
-.endif
- @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
-
# Correctly depend upon bzip2 if necessary
-.if ${PORT_OPTIONS:MBZIP2}
-EXTRA_PATCHES+= ${FILESDIR}/extra-bzip2-patch-dolly.c
-.endif
+BZIP2_EXTRA_PATCHES= ${FILESDIR}/extra-bzip2-patch-dolly.c
+
+DOCS= README
post-patch:
# fix comment error
@${REINPLACE_CMD} -E \
-e 's|use gzip|use gunzip|' \
${WRKSRC}/dolly.c
+
+post-patch-BZIP2-on:
# Properly reference bzip2 instead of gzip
-.if ${PORT_OPTIONS:MBZIP2}
@${REINPLACE_CMD} -E \
-e 's|/usr/bin/gzip|${BZIP2_CMD}|' \
-e 's|gzip|bzip2|' \
@@ -64,12 +46,27 @@ post-patch:
-e 's|gunzip|bzcat|' \
-e 's|\.gz|\.bz2|g' \
${WRKSRC}/*
-.endif
+
+post-patch-HIGHEST_COMPRESSION-on:
# Highest compression possible
-.if ${PORT_OPTIONS:MHIGHEST_COMPRESSION}
@${REINPLACE_CMD} -E \
-e 's|-cf|-9cf|' \
${WRKSRC}/dolly.c
-.endif
+
+do-configure:
+# C{C,FLAGS} safeness
+ @${REINPLACE_CMD} -E \
+ -e 's|^(CC[[:space:]]*=).*$$|\1${CC}|' \
+ -e 's|^(CFLAGS[[:space:]]*=.*)$$|\1 ${CFLAGS}|' \
+ ${BUILD_WRKSRC}/${MAKEFILE}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
+
+do-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for _file in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${_file} ${STAGEDIR}${DOCSDIR}/
+.endfor
.include <bsd.port.mk>
More information about the svn-ports-all
mailing list