Subject: Re: idiots guide to making a port?
To: Carl Brewer <email@example.com>
From: Jeremy C. Reed <firstname.lastname@example.org>
Date: 07/21/2004 19:44:41
On Thu, 22 Jul 2004, Carl Brewer wrote:
> I've read the ports doco on netbsd.org as a prelim to
> trying to make a port for fastcgi to work with apache2 (so I
> can use RT with apache2 on NetBSD with ports). I'm a bit stumped
> by the dependancy process, ie: where are the bits that
> a port depends on defined? In readme.html?! Also,
> I saw how to run configure arguments, but mod_fastcgi
> doesn't have an autoconf script, it has a makefile that
> needs to be moved and edited. Is there any doco on how
> to do that, or should I make a patch and get the patch to
> edit the makefile, and move it?
Dependencies are done a few ways: using BUILD_DEPENDS, DEPENDS, and using
USE_BUILDLINK3 with buildlink3.mk files. Have a look in Packages.txt and
in mk/buildlink3/BUILDLINK3_DG for documentation.
The most common way is to define:
And then include the buildlink3.mk file that helps define the dependencies
I haven't done much with packaging Apache 2 modules, but have a look at
www/ap2-auth-pgsql/Makefile. See how it defines USE_BUILDLINK3,
APACHE_MODULE, uses APXS in the do-build step, and includes
www/apache2/buildlink3.mk utilizes the APACHE_MODULE to make sure that the
package will depend on apache and it also defines APXS.
As for your makefile, maybe patch it and then MV it in a pre-build or some
configure target step. Or maybe the makefile is not needed at all.
Have a look at www/apache/module.mk to see some predefined targets that
make make it easier for you.
Feel free to post what you have tried and we can help.
Jeremy C. Reed
BSD News, BSD tutorials, BSD links