maintainer update: www/hugo

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

maintainer update: www/hugo

Paco Esteban-2
Hi ports,

This is a simple update for www/hugo to 0.70.0.

You can see the changes here.

Comments and/or ok welcome.

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/www/hugo/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- Makefile 24 Apr 2020 13:21:03 -0000 1.19
+++ Makefile 14 May 2020 13:01:12 -0000
@@ -3,7 +3,7 @@ ONLY_FOR_ARCHS = ${GO_ARCHS}
 
 COMMENT = fast and flexible static site generator
 
-DISTNAME = hugo-0.69.2
+DISTNAME = hugo-0.70.0
 
 CATEGORIES = www
 
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/www/hugo/distinfo,v
retrieving revision 1.17
diff -u -p -r1.17 distinfo
--- distinfo 24 Apr 2020 13:21:03 -0000 1.17
+++ distinfo 14 May 2020 13:01:33 -0000
@@ -1,2 +1,2 @@
-SHA256 (hugo-0.69.2.tar.gz) = a7JrNY6TZkv7WTuPCnmMvmnaueDnCoHZ6DegySAWOec=
-SIZE (hugo-0.69.2.tar.gz) = 38207263
+SHA256 (hugo-0.70.0.tar.gz) = xaLWPQO77ChTXy8J1nG4O1EAlCa2sXtX4vR9QLIQkiw=
+SIZE (hugo-0.70.0.tar.gz) = 39510484

--
Paco Esteban.
0x5818130B8A6DBC03

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Paco Esteban-2
On Thu, 14 May 2020, Paco Esteban wrote:

> Hi ports,
>
> This is a simple update for www/hugo to 0.70.0.

Hi, upstream released 0.71.0

so here's the diff.
Comments/ok welcome (specially from hugo users)

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/www/hugo/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- Makefile 24 Apr 2020 13:21:03 -0000 1.19
+++ Makefile 20 May 2020 15:24:18 -0000
@@ -3,7 +3,7 @@ ONLY_FOR_ARCHS = ${GO_ARCHS}
 
 COMMENT = fast and flexible static site generator
 
-DISTNAME = hugo-0.69.2
+DISTNAME = hugo-0.71.0
 
 CATEGORIES = www
 
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/www/hugo/distinfo,v
retrieving revision 1.17
diff -u -p -r1.17 distinfo
--- distinfo 24 Apr 2020 13:21:03 -0000 1.17
+++ distinfo 20 May 2020 15:24:38 -0000
@@ -1,2 +1,2 @@
-SHA256 (hugo-0.69.2.tar.gz) = a7JrNY6TZkv7WTuPCnmMvmnaueDnCoHZ6DegySAWOec=
-SIZE (hugo-0.69.2.tar.gz) = 38207263
+SHA256 (hugo-0.71.0.tar.gz) = 3+b+DkCUJVGnVJI0CHATbJnlxRN7onQ1Ar6K/wJKW88=
+SIZE (hugo-0.71.0.tar.gz) = 38775151

--
Paco Esteban.
0x5818130B8A6DBC03

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Rafael Sadowski
On Wed May 20, 2020 at 05:31:49PM +0200, Paco Esteban wrote:

> On Thu, 14 May 2020, Paco Esteban wrote:
>
> > Hi ports,
> >
> > This is a simple update for www/hugo to 0.70.0.
>
> Hi, upstream released 0.71.0
>
> so here's the diff.
> Comments/ok welcome (specially from hugo users)

OK, no defects on sizeofvoid.org.

>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/www/hugo/Makefile,v
> retrieving revision 1.19
> diff -u -p -r1.19 Makefile
> --- Makefile 24 Apr 2020 13:21:03 -0000 1.19
> +++ Makefile 20 May 2020 15:24:18 -0000
> @@ -3,7 +3,7 @@ ONLY_FOR_ARCHS = ${GO_ARCHS}
>  
>  COMMENT = fast and flexible static site generator
>  
> -DISTNAME = hugo-0.69.2
> +DISTNAME = hugo-0.71.0
>  
>  CATEGORIES = www
>  
> Index: distinfo
> ===================================================================
> RCS file: /home/cvs/ports/www/hugo/distinfo,v
> retrieving revision 1.17
> diff -u -p -r1.17 distinfo
> --- distinfo 24 Apr 2020 13:21:03 -0000 1.17
> +++ distinfo 20 May 2020 15:24:38 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (hugo-0.69.2.tar.gz) = a7JrNY6TZkv7WTuPCnmMvmnaueDnCoHZ6DegySAWOec=
> -SIZE (hugo-0.69.2.tar.gz) = 38207263
> +SHA256 (hugo-0.71.0.tar.gz) = 3+b+DkCUJVGnVJI0CHATbJnlxRN7onQ1Ar6K/wJKW88=
> +SIZE (hugo-0.71.0.tar.gz) = 38775151
>
> --
> Paco Esteban.
> 0x5818130B8A6DBC03
>

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Todd C. Miller-3
In reply to this post by Paco Esteban-2
Would it be worth adding an "extended" flavor that has, e.g., SCSS
support?  A number of hugo themes require this.

See: https://gohugo.io/troubleshooting/faq/#i-get-tocss--this-feature-is-not-available-in-your-current-hugo-version

Perhaps something like this?  Untested because my web server isn't
-current yet.

 - todd

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/hugo/Makefile,v
retrieving revision 1.20
diff -u -p -u -r1.20 Makefile
--- Makefile 21 May 2020 16:37:44 -0000 1.20
+++ Makefile 21 May 2020 17:47:22 -0000
@@ -26,6 +26,16 @@ ALL_TARGET = github.com/gohugoio/hugo
 
 SEPARATE_BUILD = Yes
 
+FLAVORS = extended
+FLAVOR ?=
+
+.if ${FLAVOR:Mextended}
+MODGO_FLAGS += --tags extended
+LIB_DEPENDS += www/libsass
+WANTLIB += sass
+MAKE_ENV += CGO_CPPFLAGS='-I${LOCALBASE}/include -DUSE_LIBSASS' CGO_LDFLAGS='-L${LOCALBASE}/lib -lsass'
+.endif
+
 post-build:
  cd ${MODGO_WORKSPACE}/bin/ && ./hugo gen man
 

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Paco Esteban-2
Hi Todd,

On Thu, 21 May 2020, Todd C. Miller wrote:

> Would it be worth adding an "extended" flavor that has, e.g., SCSS
> support?  A number of hugo themes require this.
>
> See: https://gohugo.io/troubleshooting/faq/#i-get-tocss--this-feature-is-not-available-in-your-current-hugo-version
>
> Perhaps something like this?  Untested because my web server isn't

I'm ok with this if hugo users find it useful.

For now it does not work for me with the patch you sent.  I get:

# github.com/gohugoio/hugo/vendor/github.com/bep/golibsass/internal/libsass
c99func.c:2:10: fatal error: '../../libsass_src/src/c99func.c' file not found

I'll take a deeper look tomorrow probably.

Cheers,

--
Paco Esteban.
0x5818130B8A6DBC03

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Todd C. Miller-3
On Thu, 21 May 2020 21:03:37 +0200, Paco Esteban wrote:

> For now it does not work for me with the patch you sent.  I get:
>
> # github.com/gohugoio/hugo/vendor/github.com/bep/golibsass/internal/libsass
> c99func.c:2:10: fatal error: '../../libsass_src/src/c99func.c' file not found
>
> I'll take a deeper look tomorrow probably.

Looks like they changed the name of the define in a newer version
of hugo.  The following works for me.

 - todd

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/hugo/Makefile,v
retrieving revision 1.20
diff -u -p -u -r1.20 Makefile
--- Makefile 21 May 2020 16:37:44 -0000 1.20
+++ Makefile 21 May 2020 20:48:23 -0000
@@ -26,6 +26,16 @@ ALL_TARGET = github.com/gohugoio/hugo
 
 SEPARATE_BUILD = Yes
 
+FLAVORS = extended
+FLAVOR ?=
+
+.if ${FLAVOR:Mextended}
+MODGO_FLAGS += --tags extended
+LIB_DEPENDS += www/libsass
+WANTLIB += sass
+MAKE_ENV += CGO_CPPFLAGS='-I${LOCALBASE}/include -DUSE_LIBSASS_SRC' CGO_LDFLAGS='-L${LOCALBASE}/lib -lsass'
+.endif
+
 post-build:
  cd ${MODGO_WORKSPACE}/bin/ && ./hugo gen man
 

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Rafael Sadowski
On Thu May 21, 2020 at 02:52:24PM -0600, Todd C. Miller wrote:
> On Thu, 21 May 2020 21:03:37 +0200, Paco Esteban wrote:
>
> > For now it does not work for me with the patch you sent.  I get:
> >
> > # github.com/gohugoio/hugo/vendor/github.com/bep/golibsass/internal/libsass
> > c99func.c:2:10: fatal error: '../../libsass_src/src/c99func.c' file not found
> >
> > I'll take a deeper look tomorrow probably.

That could be useful for SASS themes users. FLAVOR note is missing in
pkg/DESCR. The diff below builds fine.

Rafael

>
> Looks like they changed the name of the define in a newer version
> of hugo.  The following works for me.
>
>  - todd
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/www/hugo/Makefile,v
> retrieving revision 1.20
> diff -u -p -u -r1.20 Makefile
> --- Makefile 21 May 2020 16:37:44 -0000 1.20
> +++ Makefile 21 May 2020 20:48:23 -0000
> @@ -26,6 +26,16 @@ ALL_TARGET = github.com/gohugoio/hugo
>  
>  SEPARATE_BUILD = Yes
>  
> +FLAVORS = extended
> +FLAVOR ?=
> +
> +.if ${FLAVOR:Mextended}
> +MODGO_FLAGS += --tags extended
> +LIB_DEPENDS += www/libsass
> +WANTLIB += sass
> +MAKE_ENV += CGO_CPPFLAGS='-I${LOCALBASE}/include -DUSE_LIBSASS_SRC' CGO_LDFLAGS='-L${LOCALBASE}/lib -lsass'
> +.endif
> +
>  post-build:
>   cd ${MODGO_WORKSPACE}/bin/ && ./hugo gen man
>  
>

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Paco Esteban-2
On Fri, 22 May 2020, Rafael Sadowski wrote:

> On Thu May 21, 2020 at 02:52:24PM -0600, Todd C. Miller wrote:
> > On Thu, 21 May 2020 21:03:37 +0200, Paco Esteban wrote:
> >
> > > For now it does not work for me with the patch you sent.  I get:
> > >
> > > # github.com/gohugoio/hugo/vendor/github.com/bep/golibsass/internal/libsass
> > > c99func.c:2:10: fatal error: '../../libsass_src/src/c99func.c' file not found
> > >
> > > I'll take a deeper look tomorrow probably.
>
> That could be useful for SASS themes users. FLAVOR note is missing in
> pkg/DESCR. The diff below builds fine.

It builds now and works with one of the SASS themes I've found.
I added the flavor description, diff at the end.

Thank you Todd and Rafael.

Comments ? ok ?

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/www/hugo/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile 21 May 2020 16:37:44 -0000 1.20
+++ Makefile 22 May 2020 07:51:18 -0000
@@ -26,6 +26,16 @@ ALL_TARGET = github.com/gohugoio/hugo
 
 SEPARATE_BUILD = Yes
 
+FLAVORS = extended
+FLAVOR ?=
+
+.if ${FLAVOR:Mextended}
+MODGO_FLAGS += --tags extended
+LIB_DEPENDS += www/libsass
+WANTLIB += sass
+MAKE_ENV += CGO_CPPFLAGS='-I${LOCALBASE}/include -DUSE_LIBSASS_SRC' CGO_LDFLAGS='-L${LOCALBASE}/lib -lsass'
+.endif
+
 post-build:
  cd ${MODGO_WORKSPACE}/bin/ && ./hugo gen man
 
Index: pkg/DESCR
===================================================================
RCS file: /home/cvs/ports/www/hugo/pkg/DESCR,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 DESCR
--- pkg/DESCR 11 Jun 2018 21:17:14 -0000 1.1.1.1
+++ pkg/DESCR 22 May 2020 07:56:30 -0000
@@ -4,3 +4,7 @@ Hugo takes a directory with content and
 them into a full HTML website.
 
 Hugo relies on Markdown files with front matter for metadata.
+
+Flavors:
+ extended - build hugo extended version with Sass/SCSS
+  support amongst others

--
Paco Esteban.
0x5818130B8A6DBC03

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Todd C. Miller-3
On Fri, 22 May 2020 10:04:03 +0200, Paco Esteban wrote:

> It builds now and works with one of the SASS themes I've found.
> I added the flavor description, diff at the end.

Looks good to me.  Thanks!

 - todd

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Aham Brahmasmi
In reply to this post by Paco Esteban-2
> Sent: Friday, May 22, 2020 at 10:04 AM
> From: "Paco Esteban" <[hidden email]>
> To: "Rafael Sadowski" <[hidden email]>
> Cc: "Todd C. Miller" <[hidden email]>, [hidden email]
> Subject: Re: maintainer update: www/hugo
>
> On Fri, 22 May 2020, Rafael Sadowski wrote:
>
> > On Thu May 21, 2020 at 02:52:24PM -0600, Todd C. Miller wrote:
> > > On Thu, 21 May 2020 21:03:37 +0200, Paco Esteban wrote:
> > >
> > > > For now it does not work for me with the patch you sent.  I get:
> > > >
> > > > # github.com/gohugoio/hugo/vendor/github.com/bep/golibsass/internal/libsass
> > > > c99func.c:2:10: fatal error: '../../libsass_src/src/c99func.c' file not found
> > > >
> > > > I'll take a deeper look tomorrow probably.
> >
> > That could be useful for SASS themes users. FLAVOR note is missing in
> > pkg/DESCR. The diff below builds fine.
>
> It builds now and works with one of the SASS themes I've found.
> I added the flavor description, diff at the end.
>
> Thank you Todd and Rafael.
>
> Comments ? ok ?
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/www/hugo/Makefile,v
> retrieving revision 1.20
> diff -u -p -r1.20 Makefile
> --- Makefile 21 May 2020 16:37:44 -0000 1.20
> +++ Makefile 22 May 2020 07:51:18 -0000
> @@ -26,6 +26,16 @@ ALL_TARGET = github.com/gohugoio/hugo
>
>  SEPARATE_BUILD = Yes
>
> +FLAVORS = extended
> +FLAVOR ?=
> +
> +.if ${FLAVOR:Mextended}
> +MODGO_FLAGS += --tags extended
> +LIB_DEPENDS += www/libsass
> +WANTLIB += sass
> +MAKE_ENV += CGO_CPPFLAGS='-I${LOCALBASE}/include -DUSE_LIBSASS_SRC' CGO_LDFLAGS='-L${LOCALBASE}/lib -lsass'
> +.endif
> +
>  post-build:
>   cd ${MODGO_WORKSPACE}/bin/ && ./hugo gen man
>
> Index: pkg/DESCR
> ===================================================================
> RCS file: /home/cvs/ports/www/hugo/pkg/DESCR,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 DESCR
> --- pkg/DESCR 11 Jun 2018 21:17:14 -0000 1.1.1.1
> +++ pkg/DESCR 22 May 2020 07:56:30 -0000
> @@ -4,3 +4,7 @@ Hugo takes a directory with content and
>  them into a full HTML website.
>
>  Hugo relies on Markdown files with front matter for metadata.
> +
> +Flavors:
> + extended - build hugo extended version with Sass/SCSS
> +  support amongst others
>
> --
> Paco Esteban.
> 0x5818130B8A6DBC03

Namaste Paco,

Would it be possible for us to fetch and build hugo directly from the
authoritative Github source, replacing https://e1e0.net/dist/?

I ask this because, if I am not wrong, @abieber has recently updated [1]
the portgen code with the following message:

...
With this a port can be easily generated for Go applications that
support Go modules (there will be a go.mod file in the root of the
project).
...

Namaste Aaron,

Thank you for your patience [2].

If I am not wrong, you specifically tested building hugo with the patch
while working on it. Unfortunately, I could not determine whether the
committed patch can build hugo or not.

Dhanyavaad,
ab
[1] - https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/infrastructure/bin/portgen?rev=1.2&content-type=text/x-cvsweb-markup
[2] - https://marc.info/?t=157583068400003&r=1&w=2
---------|---------|---------|---------|---------|---------|---------|--

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Rafael Sadowski
On Fri May 22, 2020 at 08:17:47PM +0200, Aham Brahmasmi wrote:
> Would it be possible for us to fetch and build hugo directly from the
> authoritative Github source, replacing https://e1e0.net/dist/?
>

I would love to test a diff.

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Paco Esteban-2
In reply to this post by Aham Brahmasmi
Hello Aham,

On Fri, 22 May 2020, Aham Brahmasmi wrote:

> Namaste Paco,
>
> Would it be possible for us to fetch and build hugo directly from the
> authoritative Github source, replacing https://e1e0.net/dist/?

That's definitely on my list, but I did not try portgen for go ports
yet.  I will, eventually.  But, if you want this to happen sooner, send
a diff and I'll be happy to test it :-)

> I ask this because, if I am not wrong, @abieber has recently updated
> [1] the portgen code with the following message:
>
> ......................................................................
> With this a port can be easily generated for Go applications that
> support Go modules (there will be a go.mod file in the root of the
> project).
> ......................................................................
>
> Namaste Aaron,
>
> Thank you for your patience [2].
>
> If I am not wrong, you specifically tested building hugo with the
> patch while working on it. Unfortunately, I could not determine
> whether the committed patch can build hugo or not.

Cheers,

--
Paco Esteban.
0x5818130B8A6DBC03

Reply | Threaded
Open this post in threaded view
|

Re: maintainer update: www/hugo

Raymond E. Pasco
In reply to this post by Paco Esteban-2
I was looking at the same thing recently, and this was the approach that
worked for me (using cgo's pkg-config support).

---
 www/hugo/Makefile                             |  8 ++++++++
 ...m_bep_golibsass_internal_libsass_a__cgo_go | 19 +++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 www/hugo/patches/patch-vendor_github_com_bep_golibsass_internal_libsass_a__cgo_go

diff --git a/www/hugo/Makefile b/www/hugo/Makefile
index 03f1bd13440..2da917b5f4a 100644
--- a/www/hugo/Makefile
+++ b/www/hugo/Makefile
@@ -4,6 +4,8 @@ ONLY_FOR_ARCHS = ${GO_ARCHS}
 COMMENT = fast and flexible static site generator
 
 DISTNAME = hugo-0.71.0
+FLAVORS = extended
+FLAVOR ?=
 
 CATEGORIES = www
 
@@ -26,6 +28,12 @@ ALL_TARGET = github.com/gohugoio/hugo
 
 SEPARATE_BUILD = Yes
 
+.if ${FLAVOR} == "extended"
+MODGO_FLAGS += --tags extended
+LIB_DEPENDS += www/libsass
+WANTLIB += ${COMPILER_LIBCXX} m sass
+.endif
+
 post-build:
  cd ${MODGO_WORKSPACE}/bin/ && ./hugo gen man
 
diff --git a/www/hugo/patches/patch-vendor_github_com_bep_golibsass_internal_libsass_a__cgo_go b/www/hugo/patches/patch-vendor_github_com_bep_golibsass_internal_libsass_a__cgo_go
new file mode 100644
index 00000000000..f47b04f19b9
--- /dev/null
+++ b/www/hugo/patches/patch-vendor_github_com_bep_golibsass_internal_libsass_a__cgo_go
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Link against libsass from ports.
+
+Index: vendor/github.com/bep/golibsass/internal/libsass/a__cgo.go
+--- vendor/github.com/bep/golibsass/internal/libsass/a__cgo.go.orig
++++ vendor/github.com/bep/golibsass/internal/libsass/a__cgo.go
+@@ -5,9 +5,6 @@
+ //
+ package libsass
+
+-// #cgo CFLAGS: -O2 -fPIC
+-// #cgo CPPFLAGS: -I../../libsass_src/include
+-// #cgo CXXFLAGS: -g -std=c++0x -O2 -fPIC
+-// #cgo LDFLAGS: -lstdc++ -lm
+-// #cgo darwin linux LDFLAGS: -ldl
++// #cgo pkg-config: libsass
++// #cgo CPPFLAGS: -DUSE_LIBSASS_SRC
+ import "C"
--
2.26.2