FreeBSD ports which are currently scheduled for deletion

Oliver Eikemeier eikemeier at fillmore-labs.com
Fri Aug 20 10:31:31 PDT 2004


Clement Laforet wrote:

> Can you please point me where I made a mistake?
> IMHO, Makefile.modules.3rd is more than PREFIX-safe, since a apache
> module (installed via apxs) will never use ${PREFIX} to install its
> module, it use apxs -q prefix which is a kind of "APACHEBASE".
> On a classic port, make install PREFIX=/var/tmp/ports/${PORTNAME}
> will blows up your plist, with my hacks you can avoid that.

Ok, first you determine APXS_PREFIX. Since apache is installed in 
${LOCALBASE} (and APXS is therefore ${LOCALBASE}/sbin/apxs), this is 
${LOCALBASE} too.

Ah, I see. You try to cope with the fact that apxs erroneously installes 
files in LOCALBASE instead of PREFIX:

@cwd ${APXS_PREFIX}
@unexec %D/sbin/apxs -e -A -n %%AP_NAME%% 
%D/%%APACHEMODDIR%%/%%AP_MODULE%%
%%APACHEMODDIR%%/%%AP_MODULE%%
@exec %D/sbin/apxs -e -A -n %%AP_NAME%% %D/%F
@cwd ${PREFIX}

The problem with that is that you call ${APXS_PREFIX}/sbin/apxs, which 
doesn't matter here, since LOCALBASE = APXS_PREFIX, but won't work 
otherwise. Besides, packages will ignore every -p given to pkg_add(1).

So, as far as I understand the situation, it's apxs that should be fixed 
to honor PREFIX, and everything should be fine without the need for the 
hacks in the packing list.

Which means something like:

--- apxs.orig	Fri Aug 20 19:22:50 2004
+++ apxs	Fri Aug 20 19:20:08 2004
@@ -37,7 +37,7 @@
  my $CFG_PREFIX        = q(/usr/local);            # substituted via 
APACI install
  my $CFG_SBINDIR       = q(/usr/local/sbin);           # substituted via 
APACI install
  my $CFG_INCLUDEDIR    = q(/usr/local/include/apache);        # 
substituted via APACI install
-my $CFG_LIBEXECDIR    = q(/usr/local/libexec/apache);        # 
substituted via APACI install
+my $CFG_LIBEXECDIR    = ($ENV{PREFIX} ? $ENV{PREFIX} : q(/usr/local)) . 
q(/libexec/apache);        # substituted via APACI install
  my $CFG_SYSCONFDIR    = q(/usr/local/etc/apache);        # substituted 
via APACI install

  ##

might do the trick. Sorry for the premature reaction, I should have done 
more research.
-Oliver



More information about the freebsd-ports mailing list