pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics replace <malloc.h> with <stdlib.h>, allowing ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5e206025d8d0
branches:  trunk
changeset: 463038:5e206025d8d0
user:      grant <grant%pkgsrc.org@localhost>
date:      Sun Oct 26 06:50:10 2003 +0000

description:
replace <malloc.h> with <stdlib.h>, allowing this to build on systems
without a working <malloc.h>, eg. FreeBSD 5.x.

diffstat:

 graphics/aalib-x11/Makefile    |   6 +++++-
 graphics/aalib/Makefile.common |  10 +++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r f0834b8d216f -r 5e206025d8d0 graphics/aalib-x11/Makefile
--- a/graphics/aalib-x11/Makefile       Sun Oct 26 05:02:04 2003 +0000
+++ b/graphics/aalib-x11/Makefile       Sun Oct 26 06:50:10 2003 +0000
@@ -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 @@
                        $${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 -r f0834b8d216f -r 5e206025d8d0 graphics/aalib/Makefile.common
--- a/graphics/aalib/Makefile.common    Sun Oct 26 05:02:04 2003 +0000
+++ b/graphics/aalib/Makefile.common    Sun Oct 26 06:50:10 2003 +0000
@@ -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 @@
 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"



Home | Main Index | Thread Index | Old Index