WANT_PHP_WEB=yes and make fetch

Ion-Mihai Tetcu itetcu at apropo.ro
Mon Feb 2 10:39:27 PST 2004


Hi,


There are some ports that set WANT_PHP_WEB=yes and includes
lang/php4/bsd.php.mk. One example is www/smarty which has in its
Makefile:

[..]
NO_BUILD=       yes
WANT_PHP_WEB=   yes

PKGMESSAGE=     ${WRKDIR}/pkg-message
MSG_SRC=        ${FILESDIR}/pkg-message

MSG_SUB=        DATADIR=${DATADIR} LOCALBASE=${LOCALBASE}

.include <bsd.port.pre.mk>
.include "${PORTSDIR}/lang/php4/bsd.php.mk"
do-install:
[..]

As a result, bsd.php.mk checks for mod_php and returns false on fetch
target if the machine doesn't have PHP_MOD/PHP_CLI (and outputs an
explanation message).

The way I see it, fetch should mean only fetch (e.g. downloading the
distfile(s)) and not checking anything else. The checking should be done
after fetching.

Moving the inclusion of bsd.php.mk, e.g.:

[..]
NO_BUILD=       yes
WANT_PHP_WEB=   yes

PKGMESSAGE=     ${WRKDIR}/pkg-message
MSG_SRC=        ${FILESDIR}/pkg-message

MSG_SUB=        DATADIR=${DATADIR} LOCALBASE=${LOCALBASE}

.include <bsd.port.pre.mk>
.post-fetch:
        .include "${PORTSDIR}/lang/php4/bsd.php.mk"
do-install:
[..]

unbreaks fetching (at least for some of them on which I've tested). Am I
missing anything here or could I prepare a patch ?

The above could be extended to a lot of other ports that check for
various things on the fetch target, but fetching "per se" doesn't need
those {depends, OS_VERSION, etc.}.

The goal would be to help people like myself, that need to have the
distfiles fetched and on-hand in some "local" repository, because of
bandwidth problems on some machines, etc.




-- 
IOnut
Unregistered ;) FreeBSD user


More information about the freebsd-ports mailing list