UPDATE: www/stagit 0.8->0.9.1

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

UPDATE: www/stagit 0.8->0.9.1

Hiltjo Posthuma
Hi,

This updates stagit from 0.8 to 0.9.1.

Port changes:

- 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).


stagit project changes:

- Fix compile for API change in new libgit2 0.28+ (libgit changed giterr_last()
  to git_error_last()).
- Change order of commits in log from most recent to old to applied order.
- Improve indication of changes, prefix with letters similar to CVS.
- Improve heuristic of file rename changes.
- Detect more filenames for README and LICENSE files: .md and COPYING.
- Improve stylesheet (CSS).
- Minor documentation improvements.


Patch below:


diff --git a/www/stagit/Makefile b/www/stagit/Makefile
index 55f23797597..dc73aad1198 100644
--- a/www/stagit/Makefile
+++ b/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,13 +16,12 @@ 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
 
diff --git a/www/stagit/distinfo b/www/stagit/distinfo
index 83181d38808..00a44d5cc0b 100644
--- a/www/stagit/distinfo
+++ b/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 a/www/stagit/patches/patch-config_mk b/www/stagit/patches/patch-config_mk
deleted file mode 100644
index 34fae97ad5a..00000000000
--- a/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 a/www/stagit/pkg/PLIST b/www/stagit/pkg/PLIST
index a92f071a033..6ecd7bc1368 100644
--- 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
+share/doc/stagit/example_create.sh
+share/doc/stagit/example_post-receive.sh
+share/doc/stagit/favicon.png
+share/doc/stagit/logo.png
+share/doc/stagit/style.css

--
Kind regards,
Hiltjo

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: www/stagit 0.8->0.9.1

Hiltjo Posthuma
On Fri, Mar 01, 2019 at 11:17:48AM +0100, Hiltjo Posthuma wrote:

> Hi,
>
> This updates stagit from 0.8 to 0.9.1.
>
> Port changes:
>
> - 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).
>
>
> stagit project changes:
>
> - Fix compile for API change in new libgit2 0.28+ (libgit changed giterr_last()
>   to git_error_last()).
> - Change order of commits in log from most recent to old to applied order.
> - Improve indication of changes, prefix with letters similar to CVS.
> - Improve heuristic of file rename changes.
> - Detect more filenames for README and LICENSE files: .md and COPYING.
> - Improve stylesheet (CSS).
> - Minor documentation improvements.
>
>
> Patch below:
>
>
> diff --git a/www/stagit/Makefile b/www/stagit/Makefile
> index 55f23797597..dc73aad1198 100644
> --- a/www/stagit/Makefile
> +++ b/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,13 +16,12 @@ 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
>  
> diff --git a/www/stagit/distinfo b/www/stagit/distinfo
> index 83181d38808..00a44d5cc0b 100644
> --- a/www/stagit/distinfo
> +++ b/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 a/www/stagit/patches/patch-config_mk b/www/stagit/patches/patch-config_mk
> deleted file mode 100644
> index 34fae97ad5a..00000000000
> --- a/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 a/www/stagit/pkg/PLIST b/www/stagit/pkg/PLIST
> index a92f071a033..6ecd7bc1368 100644
> --- 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
> +share/doc/stagit/example_create.sh
> +share/doc/stagit/example_post-receive.sh
> +share/doc/stagit/favicon.png
> +share/doc/stagit/logo.png
> +share/doc/stagit/style.css
>

Bump, any thoughts on this port update?

--
Kind regards,
Hiltjo

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: www/stagit 0.8->0.9.1

Klemens Nanni-2
In reply to this post by Hiltjo Posthuma
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>

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: www/stagit 0.8->0.9.1

Hiltjo Posthuma
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

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: www/stagit 0.8->0.9.1

Klemens Nanni-2
On Sun, Mar 10, 2019 at 04:17:32PM +0100, Hiltjo Posthuma wrote:
> Thanks for the feedback. I changed the quotes and added a post-install target to move
> the example files in the proper directory.
When moving all files, why not simply adjusting the port's DOCPREFIX?

> At the moment the port does not install the LICENSE file. I wonder if this is
> neccesary?
If the port does not already install it, I usually wouldn't bother.

Other ports such editors/vis for example install a LICENSE containing
detailed information about various pieces used in the port - this makes
sense and does provide meaningful information.

> +post-install:
> + # put examples in the proper directory.
> + mkdir -p ${PREFIX}/share/examples/stagit
> + mv \
That's what INSTALL_DATA_DIR and INSTALL_DATA is for, see bsd.port.mk(5).

Here's a stab at just moving the example scripts into place.  README as
well as the assets seem fine where they are and go in line with what
most other ports do.

OK?

PS: Looking at it yet again, I think it would help to document what to
with the logo and CSS sheet you're shipping.  It's obviously goes along
with serving the generated HTML document root, but from a user
perspective these files are just laying around, not mentioned or picked
up anywhere else.

I'm thinking of a ports README that maybe ships an httpd.conf(5) example
using your assets, so the steps from installing the package to serving
repos is even more straight forward.

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/stagit/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile 10 Apr 2018 23:27:51 -0000 1.7
+++ Makefile 10 Mar 2019 17:03:23 -0000
@@ -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,19 @@ 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
+MAKE_FLAGS = CC='${CC}' \
+ CFLAGS='${CFLAGS} -I${LOCALBASE}/include' \
+ LDFLAGS='${LDFLAGS} -L${LOCALBASE}/lib -lgit2' \
+ COMPATOBJ=''
 
 NO_TEST = Yes
+
+EXAMPLESDIR = ${PREFIX}/share/examples/stagit
+
+post-install:
+ ${INSTALL_DATA_DIR} ${EXAMPLESDIR}/
+ mv ${PREFIX}/share/doc/stagit/example_*.sh ${EXAMPLESDIR}/
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/stagit/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo 10 Apr 2018 23:27:51 -0000 1.6
+++ distinfo 10 Mar 2019 12:09:08 -0000
@@ -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
Index: patches/patch-config_mk
===================================================================
RCS file: patches/patch-config_mk
diff -N patches/patch-config_mk
--- patches/patch-config_mk 10 Apr 2018 23:27:51 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -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
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/stagit/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 13 Aug 2017 18:51:53 -0000 1.2
+++ pkg/PLIST 10 Mar 2019 17:03:44 -0000
@@ -3,10 +3,11 @@
 @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/doc/stagit/favicon.png
+share/doc/stagit/logo.png
+share/doc/stagit/style.css
+share/examples/stagit/
+share/examples/stagit/example_create.sh
+share/examples/stagit/example_post-receive.sh