[NEW/WIP] Zola 0.8.0

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

[NEW/WIP] Zola 0.8.0

Peter Ezetta
Hi ports@,

Attached is my initial work on a port of Zola, a Rust Static Site
Generator. I have been working with upstream on getting the DESCR fleshed
out a bit more, and have send all patches back upstream as well.

There is currently no manpage formatted documentation available. Should I
write up a basic manpage for the Zola application and it's command-line
flags, or perhaps just reference the online documentation in the DESCR?

I have taken maintainer on this port as I have been working with upstream,
I am an active user of the project, and I am happy to handle updates and
support requests for the port.

Patches take care of warnings from unused mutability, as well as fix a
dependency's hard-coded compiler so that it can be built with clang instead
of gcc for C++11 support.

Comments? Anything else I should look at while I wait for upstream to get
back to me on a better blurb for DESCR?

zola.tar.gz (28K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [NEW/WIP] Zola 0.8.0

Sebastien Marie-3
On Tue, Sep 03, 2019 at 02:57:38PM -0700, Peter Ezetta wrote:
> Hi ports@,

Thanks for your submission.

Some notes below.
 
> Attached is my initial work on a port of Zola, a Rust Static Site
> Generator. I have been working with upstream on getting the DESCR fleshed
> out a bit more, and have send all patches back upstream as well.
>
> There is currently no manpage formatted documentation available. Should I
> write up a basic manpage for the Zola application and it's command-line
> flags, or perhaps just reference the online documentation in the DESCR?

if upstream doesn't provide man page, you don't have to write one. But
yes, you could add link to online documentation in DESCR.

> I have taken maintainer on this port as I have been working with upstream,
> I am an active user of the project, and I am happy to handle updates and
> support requests for the port.
>
> Patches take care of warnings from unused mutability,

if it is only warnings, it would be preferable to not patch them to
avoid maintenance on long term. but you are free to report them to
upstream :)

but feel free to keep them if you prefer.

> as well as fix a
> dependency's hard-coded compiler so that it can be built with clang instead
> of gcc for C++11 support.

several remarks here.

first, you shouldn't hardcode the compiler. if possible, port should
honor CC and CXX variables.

next, you should add a COMPILER line because of C++11.
        COMPILER = base-clang ports-gcc

it will make the port able to compile on architectures where clang++ isn't
the default compiler.

and finally, in libsaas-sys crate case, is it possible to configure it
to use www/libsass port, instead of building the library behind the
scene ? you could look at build.rs in libsaas-sys.


> Comments? Anything else I should look at while I wait for upstream to get
> back to me on a better blurb for DESCR?

and finally, could you set libc to 0.2.63 version, and add it to
MODCARGO_CRATES_UPDATE ? it will permit to build on sparc64.

Thanks.
--
Sebastien Marie

Reply | Threaded
Open this post in threaded view
|

Re: [NEW/WIP] Zola 0.8.0

Peter Ezetta
On Wed, Sep 4, 2019 at 12:13 AM Sebastien Marie <[hidden email]> wrote:

> On Tue, Sep 03, 2019 at 02:57:38PM -0700, Peter Ezetta wrote:
> > Hi ports@,
>
> Thanks for your submission.
>
> Some notes below.
>
> > Attached is my initial work on a port of Zola, a Rust Static Site
> > Generator. I have been working with upstream on getting the DESCR fleshed
> > out a bit more, and have send all patches back upstream as well.
> >
> > There is currently no manpage formatted documentation available. Should I
> > write up a basic manpage for the Zola application and it's command-line
> > flags, or perhaps just reference the online documentation in the DESCR?
>
> if upstream doesn't provide man page, you don't have to write one. But
> yes, you could add link to online documentation in DESCR.
>
Link to documentation added to pkg/DESCR.


>
> > I have taken maintainer on this port as I have been working with
> upstream,
> > I am an active user of the project, and I am happy to handle updates and
> > support requests for the port.
> >
> > Patches take care of warnings from unused mutability,
>
> if it is only warnings, it would be preferable to not patch them to
> avoid maintenance on long term. but you are free to report them to
> upstream :)
>
> but feel free to keep them if you prefer.
>
> > as well as fix a
> > dependency's hard-coded compiler so that it can be built with clang
> instead
> > of gcc for C++11 support.
>
> several remarks here.
>
> first, you shouldn't hardcode the compiler. if possible, port should
> honor CC and CXX variables.
>
> next, you should add a COMPILER line because of C++11.
>         COMPILER = base-clang ports-gcc
>
> it will make the port able to compile on architectures where clang++ isn't
> the default compiler.
>
> and finally, in libsaas-sys crate case, is it possible to configure it
> to use www/libsass port, instead of building the library behind the
> scene ? you could look at build.rs in libsaas-sys.
>

It turns out that build.rs is doing a check for the existance of libsass
before it goes building it's own. I have added www/libsass to
BUILD_DEPENDS and RUN_DEPENDS, as well as adding sass to WANTLIB. This
allows the build to complete without setting a COMPILER, or patching the
libsass Makefile.


>
> Comments? Anything else I should look at while I wait for upstream to get
> > back to me on a better blurb for DESCR?
>
> and finally, could you set libc to 0.2.63 version, and add it to
> MODCARGO_CRATES_UPDATE ? it will permit to build on sparc64.
>
>
Bumped libc version and added it to MODCARGO_CRATES_UPDATE. I do not
have access to a sparc64 machine to test the build though.

Thanks.
> --
> Sebastien Marie
>
>

zola.tar.gz (28K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [NEW/WIP] Zola 0.8.0

Sebastien Marie-3
On Thu, Sep 05, 2019 at 01:16:12PM -0700, Peter Ezetta wrote:
>
> It turns out that build.rs is doing a check for the existance of libsass
> before it goes building it's own. I have added www/libsass to
> BUILD_DEPENDS and RUN_DEPENDS, as well as adding sass to WANTLIB. This
> allows the build to complete without setting a COMPILER, or patching the
> libsass Makefile.
>

for reference, when a library is statically linked (like what
sass-sys crate do by default), WANTLIB addition is not need ("make
port-lib-depends-check" should complain), and the library is only need
at build time (so added in BUILD_DEPENDS) and not at runtime (not need
in RUN_DEPENDS).

here, we could do a bit better, and link to libsass.so dynamically (it
will be more simple when libsass.so would be updated in port tree: else
www/zola would need a REVISION bump to force an update with the new
libsass).

to do that, we need to pass PKG_CONFIG_ALL_DYNAMIC=1 to cargo
environment (it is a configuration knob for pkg_config crate).

and next, www/libsass should be in LIB_DEPENDS and sass in WANTLIB.

> Bumped libc version and added it to MODCARGO_CRATES_UPDATE. I do not
> have access to a sparc64 machine to test the build though.

the bulk build will test it, and I will take care of it if it fails. the
port doesn't have reverse-dependencies, so if it breaks on sparc64 it
isn't a big problem.


I attached a new tarball, which is ok semarie@ for importing if someone
else want to look at.

Diff from your previous version below.

Thanks.
--
Sebastien Marie

diff -ur a/zola/Makefile b/zola/Makefile
--- a/zola/Makefile     Thu Sep  5 20:58:43 2019
+++ b/zola/Makefile     Sun Sep  8 13:30:57 2019
@@ -19,10 +19,11 @@
 # MIT
 PERMIT_PACKAGE =       Yes

-BUILD_DEPENDS =                www/libsass
-RUN_DEPENDS =          www/libsass
+WANTLIB +=     c c++abi crypto m pthread ssl sass

-WANTLIB += c c++abi crypto m pthread ssl sass
+LIB_DEPENDS += www/libsass
+
+MAKE_ENV +=    PKG_CONFIG_ALL_DYNAMIC=1

 MODULES =      devel/cargo


zola.tgz (28K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [NEW/WIP] Zola 0.8.0

Peter Ezetta
Package builds fine on my amd64 machine with your changes in place. ldd
shows that libsass is being included dynamically now. Tests still pass,
and the application still seems to work fine.
Thanks for your help!

Peter

On Sun, Sep 8, 2019 at 4:46 AM Sebastien Marie <[hidden email]> wrote:

> On Thu, Sep 05, 2019 at 01:16:12PM -0700, Peter Ezetta wrote:
> >
> > It turns out that build.rs is doing a check for the existance of libsass
> > before it goes building it's own. I have added www/libsass to
> > BUILD_DEPENDS and RUN_DEPENDS, as well as adding sass to WANTLIB. This
> > allows the build to complete without setting a COMPILER, or patching the
> > libsass Makefile.
> >
>
> for reference, when a library is statically linked (like what
> sass-sys crate do by default), WANTLIB addition is not need ("make
> port-lib-depends-check" should complain), and the library is only need
> at build time (so added in BUILD_DEPENDS) and not at runtime (not need
> in RUN_DEPENDS).
>
> here, we could do a bit better, and link to libsass.so dynamically (it
> will be more simple when libsass.so would be updated in port tree: else
> www/zola would need a REVISION bump to force an update with the new
> libsass).
>
> to do that, we need to pass PKG_CONFIG_ALL_DYNAMIC=1 to cargo
> environment (it is a configuration knob for pkg_config crate).
>
> and next, www/libsass should be in LIB_DEPENDS and sass in WANTLIB.
>
> > Bumped libc version and added it to MODCARGO_CRATES_UPDATE. I do not
> > have access to a sparc64 machine to test the build though.
>
> the bulk build will test it, and I will take care of it if it fails. the
> port doesn't have reverse-dependencies, so if it breaks on sparc64 it
> isn't a big problem.
>
>
> I attached a new tarball, which is ok semarie@ for importing if someone
> else want to look at.
>
> Diff from your previous version below.
>
> Thanks.
> --
> Sebastien Marie
>
> diff -ur a/zola/Makefile b/zola/Makefile
> --- a/zola/Makefile     Thu Sep  5 20:58:43 2019
> +++ b/zola/Makefile     Sun Sep  8 13:30:57 2019
> @@ -19,10 +19,11 @@
>  # MIT
>  PERMIT_PACKAGE =       Yes
>
> -BUILD_DEPENDS =                www/libsass
> -RUN_DEPENDS =          www/libsass
> +WANTLIB +=     c c++abi crypto m pthread ssl sass
>
> -WANTLIB += c c++abi crypto m pthread ssl sass
> +LIB_DEPENDS += www/libsass
> +
> +MAKE_ENV +=    PKG_CONFIG_ALL_DYNAMIC=1
>
>  MODULES =      devel/cargo
>
>