Date: Fri, 23 Apr 2004 07:40:39 -0400 From: Paul Chvostek <paul+fbsd@it.ca> To: ports@freebsd.org Subject: DISTFILE is a .c, gets patched in /usr/ports/distfiles Message-ID: <20040423114039.GA16265@mail.it.ca>
next in thread | raw e-mail | index | archive | help
I'm trying to make a port for an old (1998) piece of software that is currently available as a C program downloadable from a variety of places that archived it when it was originally posted to a mailing list. There is no .tar.gz, no autoconf -- just a .c that needs mail headers stripped off and a couple of changes to the source. So... DISTNAME is example.c (for example), and EXTRACT_SUFX and EXTRACT_ONLY are both nulled. I've set NO_WRKSUBDIR=yes, and built a patch that does everything needed to the .c file. The problem is ... when the "patch" make target runs, it modifies the .c file (/usr/ports/distfiles/example.c) IN PLACE, leaving the original as /usr/ports/distfiles/example.c.orig. This is fine for a build (I have a "pre-build" target that copies the patched file to $WRKSRC), but if you then clean and try to rebuild, you'll fail because the copy of example.c in /usr/ports/distfiles/ has a mismatched checksum and is more recent than the original. I suppose I could get around this by replacing the "patch" target with a manual one that copies example.c to $WRKSRC and does the patch there, but this seems unnecessarily grotty. I must be missing something. But what? Thanks. :) -- Paul Chvostek <paul@it.ca> Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040423114039.GA16265>