On Sun, Mar 10, 2019 at 01:55:47PM +0100, Klemens Nanni wrote: > On Fri, Mar 01, 2019 at 11:17:48AM +0100, Hiltjo Posthuma wrote: > > - Respect system LDFLAGS. > > - Use the main releases location (2f30 is a mirror). > > - Remove now unneeded config.mk patch: stagit now checks #ifdef __OpenBSD__ > > for pledge(2). > Thanks, I'll commit soon. Two things, though: > > > MAKE_FLAGS= CC='${CC}' \ > > - CFLAGS='${CFLAGS}' \ > > - COMPATOBJ='' \ > > - GITINC=${LOCALBASE}/include \ > > - GITLIB=${LOCALBASE}/lib > > + CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ > > + LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -lgit2" \ > > + COMPATOBJ='' > I'd go with all single quotes here for consistency (with CC='${CC}'). > > > --- a/www/stagit/pkg/PLIST > > +++ b/www/stagit/pkg/PLIST > > @@ -3,10 +3,10 @@ > > @bin bin/stagit-index > > @man man/man1/stagit-index.1 > > @man man/man1/stagit.1 > > -share/stagit/ > > -share/stagit/README > > -share/stagit/example_create.sh > > -share/stagit/example_post-receive.sh > > -share/stagit/favicon.png > > -share/stagit/logo.png > > -share/stagit/style.css > > +share/doc/stagit/ > > +share/doc/stagit/README > This is documentation, > > > +share/doc/stagit/example_create.sh > > +share/doc/stagit/example_post-receive.sh > these are examples, > > > +share/doc/stagit/favicon.png > > +share/doc/stagit/logo.png > > +share/doc/stagit/style.css > those as well, but I'd count them as static files, too. > > Not sure how much I'm nitpicking here, but what about using the > appropiate directories as per our porters guide? > > read-only architecture-independent: /usr/local/share/<name> > misc documentation: /usr/local/share/doc/<name> > examples files: /usr/local/share/examples/<name>
Thanks for the feedback. I changed the quotes and added a post-install target to move the example files in the proper directory. At the moment the port does not install the LICENSE file. I wonder if this is neccesary? Updated patch below: diff --git www/stagit/Makefile www/stagit/Makefile index 55f23797597..395fab45b95 100644 --- www/stagit/Makefile +++ www/stagit/Makefile @@ -2,11 +2,11 @@ COMMENT = static git page generator -DISTNAME = stagit-0.8 +DISTNAME = stagit-0.9.1 CATEGORIES = www -HOMEPAGE = https://git.2f30.org/stagit/ +HOMEPAGE = https://codemadness.org/ # MIT/X Consortium License PERMIT_PACKAGE_CDROM = Yes @@ -16,14 +16,24 @@ WANTLIB = c git2 LIB_DEPENDS = devel/libgit2/libgit2>=0.22 -MASTER_SITES = https://dl.2f30.org/releases/ +MASTER_SITES = https://codemadness.org/releases/stagit/ MAKE_FLAGS= CC='${CC}' \ - CFLAGS='${CFLAGS}' \ - COMPATOBJ='' \ - GITINC=${LOCALBASE}/include \ - GITLIB=${LOCALBASE}/lib + CFLAGS='${CFLAGS} -I${LOCALBASE}/include' \ + LDFLAGS='${LDFLAGS} -L${LOCALBASE}/lib -lgit2' \ + COMPATOBJ='' NO_TEST = Yes +post-install: + # put examples in the proper directory. + mkdir -p ${PREFIX}/share/examples/stagit + mv \ + ${PREFIX}/share/doc/stagit/example_create.sh \ + ${PREFIX}/share/doc/stagit/example_post-receive.sh \ + ${PREFIX}/share/doc/stagit/favicon.png \ + ${PREFIX}/share/doc/stagit/logo.png \ + ${PREFIX}/share/doc/stagit/style.css \ + ${PREFIX}/share/examples/stagit + .include <bsd.port.mk> diff --git www/stagit/distinfo www/stagit/distinfo index 83181d38808..00a44d5cc0b 100644 --- www/stagit/distinfo +++ www/stagit/distinfo @@ -1,2 +1,2 @@ -SHA256 (stagit-0.8.tar.gz) = 3w0+/hopdY5BUh1Ku8cSvPv+++uDeUXylRIf9oC8KKY= -SIZE (stagit-0.8.tar.gz) = 17378 +SHA256 (stagit-0.9.1.tar.gz) = hRDMfq5rusctjMYQkuYi0fpxkvGevJrH/lkZIwC/55A= +SIZE (stagit-0.9.1.tar.gz) = 18426 diff --git www/stagit/patches/patch-config_mk www/stagit/patches/patch-config_mk deleted file mode 100644 index 34fae97ad5a..00000000000 --- www/stagit/patches/patch-config_mk +++ /dev/null @@ -1,9 +0,0 @@ -Index: config.mk ---- config.mk.orig -+++ config.mk -@@ -29,4 +29,4 @@ LDFLAGS = -s ${LIBS} - CPPFLAGS = -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_BSD_SOURCE ${INCS} - - # OpenBSD 5.9+: use pledge(2) --#CPPFLAGS = -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_BSD_SOURCE -DUSE_PLEDGE ${INCS} -+CPPFLAGS += -DUSE_PLEDGE diff --git www/stagit/pkg/PLIST www/stagit/pkg/PLIST index a92f071a033..3e3dbfdc94e 100644 --- www/stagit/pkg/PLIST +++ www/stagit/pkg/PLIST @@ -1,12 +1,13 @@ -@comment $OpenBSD: PLIST,v 1.2 2017/08/13 18:51:53 juanfra Exp $ +@comment $OpenBSD: PLIST,v$ @bin bin/stagit @bin bin/stagit-index @man man/man1/stagit-index.1 @man man/man1/stagit.1 -share/stagit/ -share/stagit/README -share/stagit/example_create.sh -share/stagit/example_post-receive.sh -share/stagit/favicon.png -share/stagit/logo.png -share/stagit/style.css +share/doc/stagit/ +share/doc/stagit/README +share/examples/stagit/ +share/examples/stagit/example_create.sh +share/examples/stagit/example_post-receive.sh +share/examples/stagit/favicon.png +share/examples/stagit/logo.png +share/examples/stagit/style.css -- Kind regards, Hiltjo