From owner-freebsd-questions@FreeBSD.ORG Wed Oct 1 12:14:04 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 052441065689 for ; Wed, 1 Oct 2008 12:14:04 +0000 (UTC) (envelope-from tamarlea@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.174]) by mx1.freebsd.org (Postfix) with ESMTP id C92058FC19 for ; Wed, 1 Oct 2008 12:14:03 +0000 (UTC) (envelope-from tamarlea@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so498360wfg.7 for ; Wed, 01 Oct 2008 05:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=Alxu/AnHN5IfHYifd+8NKoaSnkBnk2LTjSPa71epYss=; b=wFTpwVY8uFiCccunnOz8ZXq2YYcdMLVucmTOuxN41dLkmC/XQ5sEneV/WkKRHsTvuF ETvhpskI9NJp0vJ1f9rZVPMAAzHeZ/BF1SiuE2AIH2rPHWPsCG/JW97bu2RTQ8Exw/8c 9AxkiBTpDNccpF3Hr7Ie6hKHLmQTJ78STRExY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=tC2aU0es0J5vlmeGxBODk11M9lOyXeo31vBtPWkogrInzlctvERZ/4yD/PFXtSDBOE 7W8T4GLc6CQYLYNisa7Kx4b+E8oi+C6sJrMxDY1ZsimUnMd8dKrYmF6J+k6AawY2s3bX FTrqL4wTzDPWoZZTX6Ef+v8hMyRuSksNv/jtU= Received: by 10.142.231.7 with SMTP id d7mr3345583wfh.264.1222863243486; Wed, 01 Oct 2008 05:14:03 -0700 (PDT) Received: by 10.142.14.12 with HTTP; Wed, 1 Oct 2008 05:14:03 -0700 (PDT) Message-ID: <1ab57dc80810010514h69f6e773l3449f87894b4c065@mail.gmail.com> Date: Wed, 1 Oct 2008 13:14:03 +0100 From: "Tamar Lea" To: "Jeremy Chadwick" In-Reply-To: <20081001110656.GA18892@icarus.home.lan> MIME-Version: 1.0 References: <1ab57dc80810010337i646141e2hfabf00cf2aae186c@mail.gmail.com> <20081001110656.GA18892@icarus.home.lan> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Patching php port X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2008 12:14:04 -0000 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 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 | > >