OK with those changes, though I would prefer to skip the empty WANTLIB= line.

It could use PKG_ARCH=* though we don't (can't really) do anything useful with
that in bulk builds anyway so it doesn't make much difference :)


On 2020/05/27 12:09, Jeremie Courreges-Anglas wrote:
> On Wed, May 27 2020, Stefan Sperling <s...@stsp.name> wrote:
> > py3c is a header-only C library which provides a python 2/3 compat layer.
> >
> > This is required to compile the Python bindings of Subversion 1.14,
> > regardless of whether python2 or python3 bindings are built.
> >
> > I will need this as a BUILD_DEP of devel/subversion soon.
> >
> > ok?
> 
> port Makefile:
> --8<--
> # Upstream's default make target just prints a list of available targets.
> # All we need upstream's Makefile to do is produce a pkg-config .pc file
> # which we can ship in our package. The Makefile's "prefix" variable ends
> # up in the generated .pc file. So use LOCALBASE instead of use PREFIX:
> MAKE_FLAGS =          prefix=${LOCALBASE}
> ALL_TARGET =          py3c.pc
> 
> USE_GMAKE =           Yes
> 
> # Upstream Makefile 'make install' doesn't respect DESTDIR.
> # We replicate the entire install target here:
> -->8--
> 
> ALL_TARGET is fine, the first line of the comment isn't needed IMO.
> 
> prefix=${TRUEPREFIX} looks more correct than prefix=${LOCALBASE}.
> 
> Maybe you already tried this, we could set
> 
>   FAKE_FLAGS =        prefix=${DESTDIR}${PREFIX}
> 
> to inject DESTDIR in the install step, but the Makefile dependencies
> would then trigger a rebuild of py3c.pc with a wrong value for
> $(includedir).
> 
> I think the cleanest approach is to patch the Makefile so that it honors
> DESTDIR.  This way you only need
> 
>   MAKE_FLAGS =  prefix=${PREFIX}
> 
> The patch could easily be pushed upstream since supporting DESTDIR is
> a common feature.
> 
> python2 and python3 are needed for the tests so use the python module
> to register those deps.  The tests fail, maybe because of a difference
> between OpenBSD and other libcs.
> 
> Updated tarball, ok jca@ if you like the changes I introduced.
> 


> 
> 
> -- 
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to