diff options
author | grant <grant> | 2003-10-26 06:50:10 +0000 |
---|---|---|
committer | grant <grant> | 2003-10-26 06:50:10 +0000 |
commit | 6a66a8cff7d32481de30f380354d09990c0bcec8 (patch) | |
tree | f5507fd4a4568cdf66692fc7fdc845acb0d3fdc9 /graphics | |
parent | a672846ae0537c5d55c5ccb48f2d0fb22b17dd2c (diff) | |
download | pkgsrc-6a66a8cff7d32481de30f380354d09990c0bcec8.tar.gz |
replace <malloc.h> with <stdlib.h>, allowing this to build on systems
without a working <malloc.h>, eg. FreeBSD 5.x.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/aalib-x11/Makefile | 6 | ||||
-rw-r--r-- | graphics/aalib/Makefile.common | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/graphics/aalib-x11/Makefile b/graphics/aalib-x11/Makefile index 82dca068693..854a9e3bae5 100644 --- a/graphics/aalib-x11/Makefile +++ b/graphics/aalib-x11/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2002/10/31 08:17:43 jlam Exp $ +# $NetBSD: Makefile,v 1.5 2003/10/26 06:50:10 grant Exp $ PKGNAME= aalib-x11-${BASE_VERS} CATEGORIES+= x11 @@ -24,6 +24,10 @@ post-patch: $${file} > $${file}.fixed; \ ${MV} -f $${file}.fixed $${file}; \ done + @for f in `${FIND} ${WRKSRC} -name '*.[ch]'`; do \ + ${SED} -e "s|<malloc.h>|<stdlib.h>|g" $$f > $$f.patch \ + && ${MV} $$f.patch $$f; \ + done do-build: cd ${WRKSRC}/src; ${SETENV} ${MAKE_ENV} \ diff --git a/graphics/aalib/Makefile.common b/graphics/aalib/Makefile.common index 5e9cb77f43c..e04e3306b64 100644 --- a/graphics/aalib/Makefile.common +++ b/graphics/aalib/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.9 2003/09/17 19:40:26 grant Exp $ +# $NetBSD: Makefile.common,v 1.10 2003/10/26 06:50:10 grant Exp $ DISTNAME= aalib-${DIST_VERS} WRKSRC= ${WRKDIR}/aalib-1.4.0 @@ -22,4 +22,12 @@ LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig USE_PKGSRC_GCC= # defined .endif +.if !target(post-patch) +post-patch: + @for f in `${FIND} ${WRKSRC} -name '*.[ch]'`; do \ + ${SED} -e "s|<malloc.h>|<stdlib.h>|g" $$f > $$f.patch \ + && ${MV} $$f.patch $$f; \ + done +.endif + .include "../../mk/bsd.pkg.mk" |