Date: Wed, 1 Oct 2008 13:14:03 +0100 From: "Tamar Lea" <tamarlea@gmail.com> To: "Jeremy Chadwick" <koitsu@freebsd.org> Cc: freebsd-questions@freebsd.org Subject: Re: Patching php port Message-ID: <1ab57dc80810010514h69f6e773l3449f87894b4c065@mail.gmail.com> In-Reply-To: <20081001110656.GA18892@icarus.home.lan> References: <1ab57dc80810010337i646141e2hfabf00cf2aae186c@mail.gmail.com> <20081001110656.GA18892@icarus.home.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for your reply, Jeremy. I now understand why it didn't work, but I have absolutely no idea how to edit configure.in. I have only just figured out what my patch is doing today. I think it would be easier to tell the makefile to modify configure after the autoconf, but I don't know how to do that either. This is the patch I wish to apply: diff -pruN php-5.2.6/configure php-5.2.6-thttpd225b/configure --- php-5.2.6/configure 2007-11-08 23:36:28.000000000 +0800 +++ php-5.2.6-thttpd225b/configure 2007-12-06 13:10:13.000000000 +0800 @@ -11525,10 +11525,14 @@ if test "$PHP_THTTPD" != "no"; then patch="test -f $THTTPD/php_patched || \ (cd $THTTPD && patch -p1 < $abs_srcdir/sapi/thttpd/thttpd_patch && touch php_patched)" + elif grep thttpd.2.25b $PHP_THTTPD/version.h >/dev/null; then + patch="test -f $THTTPD/php_patched || \ + (cd $THTTPD && patch -p1 < $abs_srcdir/sapi/thttpd/thttpd-2.25b_patch && touch php_patched)" + elif grep Premium $PHP_THTTPD/version.h >/dev/null; then patch= else - { echo "configure: error: This version only supports thttpd-2.21b and Premium thttpd" 1>&2; exit 1; } + { echo "configure: error: This version only supports thttpd-2.21b, thttpd-2.25b and Premium thttpd" 1>&2; exit 1; } fi Ideally I would like to do this myself but I think the learning curve is too steep right now. Any suggestions appreciated. Tamar On Wed, Oct 1, 2008 at 12:06 PM, Jeremy Chadwick <koitsu@freebsd.org> wrote: > On Wed, Oct 01, 2008 at 11:37:29AM +0100, Tamar Lea wrote: > > Hello all > > > > I am trying to install the php 5.2.6 port with thttpd. I have a patch > file > > to make it compile with version 2.25b, because the standard version only > > works with 2.21. The patch works but the files always get overwritten > when I > > run the build again. How do I do this? > > > > These are the commands I used > > > > cd /usr/ports/lang/php5 > > make extract > > make patch > > cd work > > patch -p0 < ~/ports/thttpd.diff > > vi php-5.2.6/configure # and other checks to see if the patch worked > > cd .. > > make install > > > > This results in an error in the configure file, which has reverted to the > > original. What am I doing wrong? > > Never modify "configure" scripts. You need to modify the autoconf > template the configure script is built off of. > > In the case of lang/php5, autoconf is run to build the configure script > during the "make configure" stage (which is being executed during part > of "make install"). Note the USE_AUTOTOOLS line in the Makefile. > > Make your changes to configure.in. > > -- > | Jeremy Chadwick jdc at parodius.com | > | Parodius Networking http://www.parodius.com/ | > | UNIX Systems Administrator Mountain View, CA, USA | > | Making life hard for others since 1977. PGP: 4BD6C0CB | > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1ab57dc80810010514h69f6e773l3449f87894b4c065>