DISTFILE is a .c, gets patched in /usr/ports/distfiles
paul+fbsd at it.ca
Fri Apr 23 04:40:41 PDT 2004
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.
Paul Chvostek <paul at it.ca>
Operations / Abuse / Whatever
it.canada, hosting and development http://www.it.ca/
More information about the freebsd-ports