PREFIX-safe installation of apache modules [Was: FreeBSD ports
which are currently scheduled for deletion]
Oliver Eikemeier
eikemeier at fillmore-labs.com
Sat Aug 21 06:18:50 PDT 2004
ports/c0decafe.net wrote:
> I can see that now, in the sense that i assumed a user's point of view
> while the real/actual concern/problem was much more elaborated.
Jup. I mostly see the packages as something that I want to test and
build, and someone else would use. Supporting this is important when you
want to do QA work on the ports tree.
>> Which reminds me that we should honor this scenario in the apxs patch.
>
> instead of patching apxs, maybe using it's -S switch (overwriting a
> given variable) would help here?
The problem is that the modules Makefiles use apxs, and not necessarily
use the do-install from Makefile.modules.3rd. I have no problem with
tailoring build tools to FreeBSD specific needs, we all run modified gcc
versions, libtool, perl and many other things. When we decide this is
the right behaviour on FreeBSD, it's fine.
[...]
> + @${ECHO} "@cwd ${PREFIX}" > ${PLIST}
No, you already are in ${PREFIX}. Every @cwd breaks pkg_add -p and
should only used when absolutely necessary (or better not at all).
> do-install:
> - @${APXS} -i -A -n ${SHORTMODNAME}
> ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT}
> + APXS_LIBEXEC!= ${APXS} -q LIBEXECDIR
You shouldn't do this in a target, and please avoid the use of !=
wherever possible. You'll spawn a process for every tool that does a
make(1) in the directory, even when the information is totally irrelevat
(INDEX builds, FreshPorts, chkversion, ...). Besides it breaks the INDEX
when APXS is not installed. Rule of thumb: don't use !=.
> + @${APXS} -S LIBEXEC=${PREFIX}${APXS_LIBEXEC:S/${APXS_PREFIX}//} -i
> -A -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT}
As said above: this won't help when the module port uses apxs directly.
-Oliver
More information about the freebsd-ports
mailing list