Patching php port

2008-10-01 Thread Tamar Lea
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?

Thanks for help

Tamar
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Patching php port

2008-10-01 Thread Jeremy Chadwick
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 Chadwickjdc 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 |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Patching php port

2008-10-01 Thread Tamar Lea
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.0 +0800
+++ php-5.2.6-thttpd225b/configure 2007-12-06 13:10:13.0 +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 12; exit 1; }
+ { echo configure: error: This version only supports thttpd-2.21b,
thttpd-2.25b and Premium thttpd 12; 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 [EMAIL PROTECTED] 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 Chadwickjdc 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 |


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Patching php port

2008-10-01 Thread Jeremy Chadwick
On Wed, Oct 01, 2008 at 01:14:03PM +0100, Tamar Lea wrote:
 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:

Welcome to the pains of the GNU autotools!  Here's what you'll need:

http://www.gnu.org/software/autoconf/manual/html_node/index.html

You should be able to examine the configure.in file and reverse
engineer how to accomplish what you need.  Remember: it's just a mix of
sh, m4, and macros.  Don't let it diminish your morale.  :-)

-- 
| Jeremy Chadwickjdc 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 |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Patching a port

2005-12-16 Thread Ian Moore
On Friday 16 December 2005 18:18, Markus Trippelsdorf wrote:
 On 2005-12-16, Ian Moore [EMAIL PROTECTED] wrote:
  I'm having some trouble with the www/sarg port. The writer has sent me
  a=20 couple of .patch files to apply and I'm wondering if there's some
  way to=20 apply those patches and still use the ports system to build 
  install the=20 port.
  I know the source code installs stuff in places that aren't the standard
  FB= SD=20
  locations - I assume they are the norm for Linux. The port fixes that
  and=20 puts stuff where we expect it to be.
  It would make life easier if I could apply the patches and then build the
  p= ort=20

 make patch
 -apply your patches-
 make install clean

Thanks, I'll knew it would be something really easy.

Cheers,
-- 
Ian
gpg key: http://home.swiftdsl.com.au/~imoore/no-spam.asc


pgpRFLxdNOSXw.pgp
Description: PGP signature


Patching a port

2005-12-15 Thread Ian Moore
Hi,
I'm having some trouble with the www/sarg port. The writer has sent me a 
couple of .patch files to apply and I'm wondering if there's some way to 
apply those patches and still use the ports system to build  install the 
port.
I know the source code installs stuff in places that aren't the standard FBSD 
locations - I assume they are the norm for Linux. The port fixes that and 
puts stuff where we expect it to be.
It would make life easier if I could apply the patches and then build the port 
in the normal way so everything ends up in the same place  I won't have 
stuff left over when I update next time.

Cheers,
-- 
Ian
gpg key: http://home.swiftdsl.com.au/~imoore/no-spam.asc


pgp8CpQJD0RqW.pgp
Description: PGP signature


Re: Patching a port

2005-12-15 Thread Markus Trippelsdorf
On 2005-12-16, Ian Moore [EMAIL PROTECTED] wrote:
 I'm having some trouble with the www/sarg port. The writer has sent me a=20
 couple of .patch files to apply and I'm wondering if there's some way to=20
 apply those patches and still use the ports system to build  install the=20
 port.
 I know the source code installs stuff in places that aren't the standard FB=
 SD=20
 locations - I assume they are the norm for Linux. The port fixes that and=20
 puts stuff where we expect it to be.
 It would make life easier if I could apply the patches and then build the p=
 ort=20
make patch 
-apply your patches-
make install clean
-- 
Markus

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Problems patching kdevelop port

2003-05-28 Thread Paul Hamilton
Hi All,

I am trying to build kdevelop via ports on FreeBSD 4.8
When I try and run 'make', it asks for 'File to patch'
I have tried typing in kdevelop-2.1.5, kdevelop, patch-af (see below).
I thought this was meant to be automatic?

The same happens when I try and build 'gimp' (in that it asks for 'File to
patch).
I am logged in as root.

Sample build run:-
-
pluto[9:20am]/usr/ports/devel/kdevelop-105# make
===  Patching for kdevelop-2.1.5
===  Applying FreeBSD patches for kdevelop-2.1.5
File to patch: patch-af
1 out of 1 hunks failed--saving rejects to patch-af.rej
 Patch patch-af failed to apply cleanly.
*** Error code 1

Stop in /usr/ports/devel/kdevelop.
pluto[9:20am]/usr/ports/devel/kdevelop-106# ls files/
patch-afpatch-af.rejpatch-processesend.pl
patch-af.orig   patch-az
-


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]