From 728843a0c141f7901c7ae3eb222b11a6d1954c67 Mon Sep 17 00:00:00 2001 From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 26 Feb 2020 22:25:12 +0000 Subject: [PATCH] Use patch files instead of REINPLACE_CMD REINPLACE_CMD should only be used for variables. While here: - Install manpages into the new standard directory. - Pet portfmt. - Add a not why LOCAL/0mp cannot be used at the moment. Reported by: mat --- www/quark/Makefile | 15 ++++++++------- www/quark/files/patch-Makefile | 11 +++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 www/quark/files/patch-Makefile diff --git a/www/quark/Makefile b/www/quark/Makefile index 5a665211b502..9176646cfb7b 100644 --- a/www/quark/Makefile +++ b/www/quark/Makefile @@ -2,10 +2,12 @@ PORTNAME= quark DISTVERSION= g20190923 +PORTREVISION= 1 CATEGORIES= www +# XXX: See PR 244457 for details why this is not LOCAL/0mp. MASTER_SITES= https://people.freebsd.org/~0mp/distfiles/ PKGNAMESUFFIX= -server -DISTNAME= ${PKGNAME} +DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${DISTVERSIONFULL} MAINTAINER= 0mp@FreeBSD.org COMMENT= Small and simple HTTP GET/HEAD-only web server for static content @@ -15,10 +17,10 @@ LICENSE_FILE= ${WRKSRC}/LICENSE CONFLICTS_INSTALL= quark -MAKE_ARGS= MANPREFIX=${PREFIX}/man +MAKE_ARGS= MANPREFIX=${PREFIX}/share/man PLIST_FILES= bin/quark \ - man/man1/quark.1.gz + share/man/man1/quark.1.gz .include @@ -27,14 +29,13 @@ PLIST_FILES= bin/quark \ CFLAGS+= -D_WITH_DPRINTF .endif -COMMIT_HASH= 3c7049e9063edebbd1934178f263f9f3c9b8ddf5 +_COMMIT_HASH= 3c7049e9063edebbd1934178f263f9f3c9b8ddf5 pre-everything:: @${ECHO_MSG} "You can build quark with your own config.h using the QUARK_CONF knob:" @${ECHO_MSG} "make QUARK_CONF=/path/to/quark/config.h install clean" post-patch: - ${REINPLACE_CMD} -e '/^include config.mk$$/d' ${WRKSRC}/Makefile .if defined(QUARK_CONF) @${ECHO_MSG} "Creating config.h from ${QUARK_CONF}" @${LN} -sf ${QUARK_CONF} ${WRKSRC}/config.h @@ -43,10 +44,10 @@ post-patch: post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/quark -regenerate-distfile: +_regenerate-distfile: ${RM} -r -- ${PKGNAME} git clone -n https://git.suckless.org/quark ${PKGNAME} - git -C ${PKGNAME} checkout ${COMMIT_HASH} + git -C ${PKGNAME} checkout ${_COMMIT_HASH} ${RM} -r -- ${PKGNAME}/.git ${TAR} -czf ${PKGNAME}.tar.gz ${PKGNAME} scp ${PKGNAME}.tar.gz 0mp@freefall.freebsd.org:~/public_html/distfiles diff --git a/www/quark/files/patch-Makefile b/www/quark/files/patch-Makefile new file mode 100644 index 000000000000..7ff5aeb0ae0c --- /dev/null +++ b/www/quark/files/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.orig 2020-02-26 22:07:21 UTC ++++ Makefile +@@ -2,7 +2,7 @@ + # quark - simple web server + .POSIX: + +-include config.mk ++#include config.mk + + COMPONENTS = util sock http resp +