svn commit: r332477 - in head/x11/xnodecor: . files
Alexey Dokuchaev
danfe at FreeBSD.org
Wed Nov 6 05:41:16 UTC 2013
On Sat, Nov 02, 2013 at 12:58:37PM +0000, Danilo Egea Gondolfo wrote:
> New Revision: 332477
> URL: http://svnweb.freebsd.org/changeset/ports/332477
>
> Log:
> - Add stage support
>
> @@ -14,8 +14,8 @@ COMMENT= Utility to set override_redirec
> NO_WRKSUBDIR= yes
> USE_XORG= x11
> PLIST_FILES= bin/xnodecor
> +MAKE_ARGS= PREFIX=${STAGEDIR}${PREFIX}
This approach, while seemingly works (here), is wrong by design. PREFIX
should never contain STAGEDIR (or however it is spelled). PREFIX assumed
be a real path during software runtime, e.g. open("$prefix/foo/bar", ...)
must work after package was installed (and staging directory long gone).
Moreover, once you remove NO_STAGE, you'll get correct DESTDIR *already*
set via MAKE_ARGS, easy to check:
% make -V MAKE_ARGS
DESTDIR=/usr/ports/x11/xnodecor/work/stage
Ergo you do not need that line in Makefile at all.
> -NO_STAGE= yes
>
> @@ -9,7 +9,7 @@ xnodecor:
> $(CC) -o xnodecor xnodecor.c $(CFLAGS) $(LDFLAGS) $(LIBS)
>
> install:
> - ${BSD_INSTALL_PROGRAM} xnodecor ${LOCALBASE}/bin
> + ${BSD_INSTALL_PROGRAM} xnodecor ${PREFIX}/bin
Now this is the place of the real bug: it should be ${DESTDIR}${PREFIX}.
./danfe
More information about the svn-ports-head
mailing list