Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Mar 2024 10:47:07 +0000
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Alexey Dokuchaev <danfe@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org,  dev-commits-ports-main@freebsd.org
Subject:   Re: git: 021fcd36af22 - main - games/coffeebreak: Move man pages to share/man
Message-ID:  <CAFDf7UKQ9ibp=46YuZRVpK-HDkeU92HKMkjWst1-t7oSMOBggw@mail.gmail.com>
In-Reply-To: <CAFDf7UJnP66UooFnRLxnhJS_B0j3hDfc%2Bc7uwh%2BGkNXNB_xukA@mail.gmail.com>
References:  <202403090831.4298VJo6024021@gitrepo.freebsd.org> <Ze16dMKKJxs9IN3t@FreeBSD.org> <CAFDf7UKq-onz-dbR=pm03Ji1FHb-u81Cidohi-be-EnVvYsGUQ@mail.gmail.com> <CAFDf7UJnP66UooFnRLxnhJS_B0j3hDfc%2Bc7uwh%2BGkNXNB_xukA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
(...)

Works fine:

=3D=3D=3D
+MAKE_ARGS=3D     PREFIX=3D${PREFIX} MANDIR=3D${STAGEDIR}${PREFIX}/share/ma=
n

 PLIST_FILES=3D   bin/coffeebreak \
                share/man/man6/coffeebreak.6.gz

-post-patch:
-       ${REINPLACE_CMD} 's|/usr/local|${PREFIX}|g' ${WRKSRC}/Makefile
-
--- a/games/coffeebreak/files/patch-Makefile
+++ /dev/null
=3D=3D=3D


What do you think? This way it is nicely simplified without patch or sed.

Nuno Teixeira <eduardo@freebsd.org> escreveu (domingo, 10/03/2024 =C3=A0(s)=
 10:05):
>
> (...)
>
> One possibility is:
>
> MAKE_ARGS=3D PREFIX=3D${PREFIX} MANDIR=3D${STAGEDIR}${PREFIX}/share/man
> but maybe I need to patch 'VAR =3D' to 'VAR ?=3D'
>
> Makefile:
> PREFIX =3D /usr/local
> BINDIR =3D $(DESTDIR)$(PREFIX)/bin
> MANDIR =3D $(DESTDIR)$(PREFIX)/man
> MAN6DIR =3D $(MANDIR)/man6
>
> Nuno Teixeira <eduardo@freebsd.org> escreveu (domingo, 10/03/2024 =C3=A0(=
s) 09:43):
> >
> > Hello danfe!
> >
> > Good point.
> >
> > The problem here is that I can't use MANDIR in MAKE_ARGS because
> > Makefile have $(DESTDIR) defined in MANDIR var.
> > MANDIR =3D $(DESTDIR)$(PREFIX)/man
> >
> > Also, SED is needed anyway to fix hardcoded "/usr/local" to PREFIX.
> >
> > Any sugestions to simplify this?
> >
> > Thanks,
> >
> > Alexey Dokuchaev <danfe@freebsd.org> escreveu (domingo, 10/03/2024 =C3=
=A0(s) 09:16):
> > >
> > > On Sat, Mar 09, 2024 at 08:31:19AM +0000, Nuno Teixeira wrote:
> > > > commit 021fcd36af22585a4bcf6e71ccb9a7d0f6ed204a
> > > >
> > > >   games/coffeebreak: Move man pages to share/man
> > > > ...
> > > > +
> > > > +post-patch:
> > > > +     ${REINPLACE_CMD} 's|/usr/local|${PREFIX}|g' ${WRKSRC}/Makefil=
e
> > > >
> > > >  .include <bsd.port.mk>
> > > > ...
> > > > +--- Makefile.orig    2024-03-09 06:57:33 UTC
> > > > ++++ Makefile
> > > > +@@ -27,7 +27,7 @@ BINDIR =3D $(DESTDIR)$(PREFIX)/bin
> > > > +
> > > > + PREFIX =3D /usr/local
> > > > + BINDIR =3D $(DESTDIR)$(PREFIX)/bin
> > > > +-MANDIR =3D $(DESTDIR)$(PREFIX)/man
> > > > ++MANDIR =3D $(DESTDIR)$(PREFIX)/share/man
> > >
> > > We typically don't patch makefiles, esp. twice (sed+patch) when we ha=
ve
> > > MAKE_ARGS for that matter.  Grepping "git log" output for MAKE_ARGS c=
an
> > > yield plenty of examples.
> > >
> > > ./danfe
> >
> >
> >
> > --
> > Nuno Teixeira
> > FreeBSD Committer (ports)
>
>
>
> --
> Nuno Teixeira
> FreeBSD Committer (ports)



--=20
Nuno Teixeira
FreeBSD Committer (ports)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UKQ9ibp=46YuZRVpK-HDkeU92HKMkjWst1-t7oSMOBggw>