From b90670448cfd2b2212a078d762a02dfbe0d3316b Mon Sep 17 00:00:00 2001
From: Ying-Chieh Liao <ijliao@FreeBSD.org>
Date: Fri, 31 Oct 2003 01:40:53 +0000
Subject: fix build on -stable (by utilize USE_GETOPT_LONG) add missing
 dependency respect CFLAGS/CPPFLAGS

---
 math/gracetmpl/Makefile             | 11 +++++++++--
 math/gracetmpl/files/patch-Makefile | 11 +++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)
 create mode 100644 math/gracetmpl/files/patch-Makefile

(limited to 'math/gracetmpl')

diff --git a/math/gracetmpl/Makefile b/math/gracetmpl/Makefile
index 2a9afcc4a8ed..f51ab8eebce9 100644
--- a/math/gracetmpl/Makefile
+++ b/math/gracetmpl/Makefile
@@ -8,16 +8,23 @@
 
 PORTNAME=	gracetmpl
 PORTVERSION=	0.3.1
+PORTREVISION=	1
 CATEGORIES=	math print
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
 
+BUILD_DEPNEDS=	${PYTHON_SITELIBDIR}/Numeric.pth:${PORTSDIR}/math/py-numeric
+RUN_DEPNEDS=	${PYTHON_SITELIBDIR}/Numeric.pth:${PORTSDIR}/math/py-numeric
+
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Provide an easy way to use existing grace-files as a template
 
 USE_REINPLACE=	yes
+USE_GETOPT_LONG=	yes
 USE_PYTHON=	yes
 USE_GMAKE=	yes
+CFLAGS+=	"${CPPFLAGS}"
+MAKE_ENV=	LDFLAGS="${LDFLAGS}"
 ALL_TARGET=	all pythonwrap
 INSTALL_TARGET=	install python_install
 
@@ -27,8 +34,8 @@ post-extract:
 post-patch:
 	@${REINPLACE_CMD} -e "s|^PREFIX|#PREFIX|" ${WRKSRC}/Makefile.defs
 	@${REINPLACE_CMD} -e "s@\(gracetmpl\.a\)@lib\1@g" \
-		-e "s|make|${GMAKE}|" \
-		-e "s|install -D|install|" ${WRKSRC}/Makefile
+		-e "s|make|${GMAKE}|" -e "s|install -D|install|" \
+		-e "s|^CPPFLAGS =|CPPFALGS+=|" ${WRKSRC}/Makefile
 	@${REINPLACE_CMD} -e "s|values\.h|float.h|" ${WRKSRC}/gracetmpl.cpp
 
 .if !defined(NOPORTDOCS)
diff --git a/math/gracetmpl/files/patch-Makefile b/math/gracetmpl/files/patch-Makefile
new file mode 100644
index 000000000000..d55b9c489fab
--- /dev/null
+++ b/math/gracetmpl/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig	Fri Oct 31 09:21:12 2003
++++ Makefile	Fri Oct 31 09:22:23 2003
+@@ -52,7 +52,7 @@
+ 	$(AR) -r gracetmpl.a gracetmpl.o
+ 
+ gracetmpldemo: gracetmpldemo.o gracetmpl.o
+-	$(CPP) -o gracetmpldemo gracetmpldemo.o gracetmpl.o
++	$(CPP) ${LDFLAGS} -o gracetmpldemo gracetmpldemo.o gracetmpl.o
+ 
+ envtest: envtest.o gracetmpl.o
+ 	$(CPP) -o envtest envtest.o gracetmpl.o
-- 
cgit v1.2.3