Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jul 2005 13:22:34 +0200
From:      Simon Barner <barner@FreeBSD.org>
To:        Steve Friedrich <freeBSD@InsightBB.com>
Cc:        Michael Nottebrock <lofi@freebsd.org>, "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   Re: Anybody else have an xscreensaver build break?
Message-ID:  <20050703112234.GE913@zi025.glhnet.mhn.de>
In-Reply-To: <20050703055803.6D2B143D49@mx1.FreeBSD.org>
References:  <200507030412.11449.lofi@freebsd.org> <20050703055803.6D2B143D49@mx1.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--qxfKREH7IwbezJ+T
Content-Type: multipart/mixed; boundary="KJY2Ze80yH5MUxol"
Content-Disposition: inline


--KJY2Ze80yH5MUxol
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Steve Friedrich wrote:
> Actually, I found several errors that mostly had to do with declaring
> variables after code.  In C++, this is legal, in C it's not.
>=20
> I could send you the antmaze.c I patched.  I have no idea how to create
> the diff you guys usually use...

man diff :-)

More seriously:

1. Make a copy of the file to edit: cp file.c file.c.orig
2. Make changes to file.c
3. cd ${WRKSRC}, i.e. work/xscreensaver-x.y in your case
4. patch -u path/to/file.c.orig path/to/file.c > patch-path_to_file.c

/usr/ports/Tools/update-patches seems to do similar things, although I
use my own script (to be executed in ${WRKSRC} (see attachment).

Simon

--KJY2Ze80yH5MUxol
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="genpatch.pl"

#!/usr/bin/perl -w

use strict;

my $origfile;
my $file;
my $patch;
my @files = `find . -name "*.orig"`;

foreach $origfile (@files) {
	chomp ($origfile);
	$origfile =~ s/^\.\///;
	$file = $origfile;
	$file =~ s/\.orig$//;
	$patch = $file;
	$patch =~ s/\//_/g;
	$patch = "patch-" . $patch;
	system ("diff -u $origfile $file > $patch\n");
}

--KJY2Ze80yH5MUxol--

--qxfKREH7IwbezJ+T
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCx8p6Ckn+/eutqCoRAumUAKDFPo6EVRSzoV554HlscrxR4vKI0wCfd0G0
Fejw+h6irWLO9A8hpfKoDf8=
=RVjR
-----END PGP SIGNATURE-----

--qxfKREH7IwbezJ+T--



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