On Wed, 06 Nov 2024 20:33:45 +0100,
Nick Owens <mischief@offblast.org> wrote:
>
> On Tue, Nov 5, 2024 at 3:16 PM Kirill A. Korinsky <kirill@korins.ky> wrote:
> >
> > On Tue, 05 Nov 2024 00:58:37 +0100,
> > Nick Owens <mischief@offblast.org> wrote:
> > >
> > > diff --git a/archivers/zstd/Makefile b/archivers/zstd/Makefile
> > > index 3b6d18883ae..22dca58e7dd 100644
> > > --- a/archivers/zstd/Makefile
> > > +++ b/archivers/zstd/Makefile
> > > @@ -44,6 +44,14 @@ TEST_TARGET = check
> > > TESTTMP = ${WRKDIR}/tmp
> > > TEST_ENV = TMPDIR=${TESTTMP}
> > >
> > > +do-build:
> > > + ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -C ${WRKSRC}
> > > + ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -C ${WRKSRC}/contrib/pzstd
> > > +
> > > +do-install:
> > > + ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -C ${WRKSRC} install
> > > + ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -C ${WRKSRC}/contrib/pzstd install
> > > +
> >
> > I think you need ${_PBUILD} here as well.
>
> i see do-build is invoked as
>
> bsd.port.mk:3065: @${_PMAKE} do-build
>
> and _PMAKE is ${_PBUILD} ${MAKE} if ${PORTS_PRIVSEP}
>
> pkgpath.mk:138:_PMAKE = cd ${.CURDIR} && PKGPATH=${PKGPATH} exec
> ${_PBUILD} ${MAKE}
>
> so won't ${_PBUILD} be added automatically as needed? if i
> misunderstood, i can still send a new patch to add it.
>
You absolutley right, no need of ${_PBUILD} here. Sorry to misslead you.
Your original patch ignores value ALL_TARGET and if I understand zstd
Makefile right, you build all target that builds all contrib. Am I wrong?
Here a bit different approach which builds only contrib/pzstd:
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/archivers/zstd/Makefile,v
diff -u -p -r1.47 Makefile
--- Makefile 16 Apr 2024 17:29:50 -0000 1.47
+++ Makefile 6 Nov 2024 20:26:19 -0000
@@ -47,6 +47,12 @@ TEST_ENV = TMPDIR=${TESTTMP}
pre-build:
ln -fs ${LOCALBASE}/bin/ggrep ${WRKDIR}/bin/grep
+post-build:
+ cd ${WRKSRC}/contrib/pzstd && exec ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS}
+
+post-install:
+ cd ${WRKSRC}/contrib/pzstd && exec ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} install
+
pre-test:
mkdir -p ${TESTTMP}
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/archivers/zstd/pkg/PLIST,v
diff -u -p -r1.9 PLIST
--- pkg/PLIST 8 Mar 2022 08:53:49 -0000 1.9
+++ pkg/PLIST 6 Nov 2024 20:21:55 -0000
@@ -1,3 +1,4 @@
+@bin bin/pzstd
bin/unzstd
@bin bin/zstd
bin/zstdcat
--
wbr, Kirill
No comments:
Post a Comment