I know there's magic that almost gets it right, because it was finding
my apache-2.2.3 dependency before (when I didn't specify APACHE_PORT),
but was trying to add an apache20 or apache13 dependency as well.

Speaking of APACHE_PORT...  Is it documented somewhere that that's the
variable needed for this stuff?  It's not in the hints in
/usr/ports/Mk/bsd.apache.mk, and what I do see implies that
setting APACHE_VERSION to 22 should DTRT.

The reason why Apache 2.0 port is appearing in your dependancy list is
because of the way the p5-Apache-DBI Makefile is written.  If you look
at bsd.apache.mk, and look at this section of code:

.elif ${USE_APACHE:C/\.//:C/\+//:M[12][3210]} != ""
AP_PORT_IS_MODULE=      YES

#### for backward compatibility
.elif ${USE_APACHE:L} == yes
.   if defined(WITH_APACHE2)
APACHE_PORT?=   www/apache20
.   else
APACHE_PORT?=   www/apache13
.   endif
APXS?=                  ${LOCALBASE}/sbin/apxs
.if !defined(APACHE_COMPAT)
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT}
RUN_DEPENDS+=   ${APXS}:${PORTSDIR}/${APACHE_PORT}
.endif
#### End of backward compatibility

When WITH_APACHE2 is defined, it sets the dependancy to the
www/apache20 port, because it has defined APACHE_PORT, even though the
APACHE_PORT variable gets overriden latter in bsd.apache.mk by the
check for the currently installed apache port.

To solve the problem in the p5-APACHE-DBI, you need to take a hint
from the mod_perl2 port to define USE_APACHE=2.0+.

If the current code in the p5-Apache-DBI port is changed to:

.if defined(WITH_MODPERL2)
USE_APACHE= 2.0+
RUN_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/mod_perl2.pm:${PORTSDIR}/www/mod_perl2
.else
USE_APACHE= yes
RUN_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/mod_perl.pm:${PORTSDIR}/www/mod_perl
.endif

.include <bsd.port.pre.mk>

Then to build the port for mod_perl2, you just build it as:

make -DWITH_MODPERL2

Also setting APACHE_VERSION=22 does nothing, as it gets overriden in
bsd.apache.mk.

Scot
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to