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
Description: application/tar-gz
