Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Feb 2003 11:11:53 +0200
From:      Neil Blakey-Milner <nbm@mithrandr.moria.org>
To:        James Earl <mtntrip@telus.net>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Handling more than one build
Message-ID:  <20030211091153.GA74978@mithrandr.moria.org>
In-Reply-To: <20030210165138.0bdcd8db.mtntrip@telus.net>
References:  <20030210165138.0bdcd8db.mtntrip@telus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon 2003-02-10 (16:51), James Earl wrote:
> I'm working on a port which includes a php extension in the distribution.
> 
> Before the php extension can be built (in a sub-directory off of
> WRKSRC), gmake has to be run in the WRKSRC to create a library
> dependency.  Then to build the php extension, I run phpize, configure,
> and make.
> 
> Is there a way to do this in the port Makefile, or, should I be
> modifying the distributions Makefile to build the php extension as
> well?  I'm a bit of a novice at this, so I don't really want to go out
> on a limb and say the distributions Makefile is garbage... but, maybe
> it is?!
> 
> I haven't been able to find any information regarding this in the
> Porter's Handbook, or bsd.port.mk.

Ok, I have no idea if this is going to help or not, but here's what the
mod_php_pgsql and friend ports I've been using for a few months look
like:

(sorry about the tab loss)

--------------------------------------------------------------------------------

# New ports collection makefile for: mod_php_pgsql
# Date created:         01 Feb 2002
# Whom:                 Neil Blakey-Milner
#
# $FreeBSD$
#

PORTNAME=       mod_php_pgsql
CATEGORIES=     databases www

MAINTAINER=     nbm@FreeBSD.org

LIB_DEPENDS=    pq.2:${PORTSDIR}/databases/postgresql7

GNU_CONFIGURE=  yes

PHPEXTENSION=   pgsql

MASTERDIR=      ${.CURDIR}/../mod_php4

.include "${MASTERDIR}/Makefile.php"
.include <bsd.port.mk>

--------------------------------------------------------------------------------

And this is what my mod_php4/Makefile.php looks like:

--------------------------------------------------------------------------------

PORTVERSION=    4.2.3
PORTREVISION?=  0
CATEGORIES?=    www
MASTER_SITES=   http://us.php.net/${PHP_DISTDIR}/ \
        http://php.he.net/${PHP_DISTDIR}/ \
        http://www.php3.de/${PHP_DISTDIR}/ \
        http://au.php.net/${PHP_DISTDIR}/ \
        http://at.php.net/${PHP_DISTDIR}/ \
        http://br.php.net/${PHP_DISTDIR}/ \
        http://php.easydns.com/${PHP_DISTDIR}/ \
        http://www.php.cz/${PHP_DISTDIR}/ \
        http://php3.globe.de/${PHP_DISTDIR}/
DISTNAME=       php-${PORTVERSION}

BUILD_DEPENDS+=        ${PHPIZE}:${PORTSDIR}/www/mod_php4

PHPIZE=         ${LOCALBASE}/bin/phpize

PHPWRKSRC=      ${WRKDIR}/${DISTNAME}
WRKSRC=         ${PHPWRKSRC}/ext/${PHPEXTENSION}
PATCH_WRKSRC=   ${PHPWRKSRC}

COMMENT?=       ${.CURDIR}/pkg-comment
DESCR?=         ${.CURDIR}/pkg-descr
PLIST?=         ${.CURDIR}/pkg-plist

USE_BZIP2=      yes

PHPSOFILE?=    ${PHPEXTENSION}.so

pre-configure:
        @(cd ${WRKSRC} && ${PHPIZE})

do-install:
        @${INSTALL_DATA} ${WRKSRC}/modules/${PHPSOFILE} ${PREFIX}/lib/php/

--------------------------------------------------------------------------------

As I said, I have no idea if this actually helps you, but this got the built-in
modules working just fine for me.

Neil
-- 
Neil Blakey-Milner
nbm@mithrandr.moria.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030211091153.GA74978>