aboutsummaryrefslogtreecommitdiff
path: root/math/gracetmpl
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-06-17 17:38:36 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-06-17 17:38:36 +0000
commitb6d3fccfffcf8fceeabf1db98e06f75fb4a9743d (patch)
tree1f8a61e0b2a411bcb85fe9ffba065d0f20dea809 /math/gracetmpl
parent1a3f9927f292aa31ef607a300a87ecff552cb7bc (diff)
downloadports-b6d3fccfffcf8fceeabf1db98e06f75fb4a9743d.tar.gz
ports-b6d3fccfffcf8fceeabf1db98e06f75fb4a9743d.zip
- Update to 0.3.2
PR: ports/82277 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Notes
Notes: svn path=/head/; revision=137643
Diffstat (limited to 'math/gracetmpl')
-rw-r--r--math/gracetmpl/Makefile46
-rw-r--r--math/gracetmpl/distinfo4
-rw-r--r--math/gracetmpl/files/patch-Makefile55
-rw-r--r--math/gracetmpl/files/patch-gracetmpl.cc20
-rw-r--r--math/gracetmpl/files/patch-pygracetmpl.cc57
-rw-r--r--math/gracetmpl/pkg-plist27
6 files changed, 151 insertions, 58 deletions
diff --git a/math/gracetmpl/Makefile b/math/gracetmpl/Makefile
index b895beb85a89..e18a98f10fce 100644
--- a/math/gracetmpl/Makefile
+++ b/math/gracetmpl/Makefile
@@ -7,46 +7,44 @@
#
PORTNAME= gracetmpl
-PORTVERSION= 0.3.1
-PORTREVISION= 3
+PORTVERSION= 0.3.2
CATEGORIES= math print
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
-BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/Numeric.pth:${PORTSDIR}/math/py-numeric
-RUN_DEPENDS= ${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
+BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/numarray/__init__.py:${PORTSDIR}/math/py-numarray
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/numarray/__init__.py:${PORTSDIR}/math/py-numarray
+
+USE_BZIP2= yes
USE_PYTHON= yes
+USE_GETOPT_LONG= yes
+USE_REINPLACE= yes
USE_GMAKE= yes
+MAKE_ARGS= PREFIX="${PREFIX}" \
+ BIN_PREFIX="${PREFIX}/bin" \
+ LIB_PREFIX="${PREFIX}/lib" \
+ INC_PREFIX="${PREFIX}/include" \
+ DOC_PREFIX="${DOCSDIR}" \
+ AR="${AR}" \
+ CPP="${CXX} ${LDFLAGS}" \
+ CPPFLAGS="${CXXFLAGS} ${CPPFLAGS}" \
+ CXX="${CXX}"
ALL_TARGET= all pythonwrap
-INSTALL_TARGET= install python_install
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 500041
-CFLAGS+= "${CPPFLAGS}"
-MAKE_ENV= LDFLAGS="${LDFLAGS}"
-.endif
+INSTALL_TARGET= install pythonwrap_install
post-extract:
- @${CP} -f ${WRKSRC}/Makefile.defs.tmpl ${WRKSRC}/Makefile.defs
+ @${ECHO_CMD} -n > ${WRKSRC}/Makefile.defs
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|" \
- -e "s|^CPPFLAGS =|CPPFALGS+=|" ${WRKSRC}/Makefile
- @${REINPLACE_CMD} -e "s|values\.h|float.h|" ${WRKSRC}/gracetmpl.cpp
+ @${REINPLACE_CMD} -e 's|/gracetmpl\.a|/libgracetmpl.a|g' ${WRKSRC}/gracetmpl-config.in
-.if !defined(NOPORTDOCS)
post-install:
+.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
- @${CP} ${WRKSRC}/doc/html/* ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/html/* ${DOCSDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/math/gracetmpl/distinfo b/math/gracetmpl/distinfo
index 482a1b156f10..ec2bdbfc558d 100644
--- a/math/gracetmpl/distinfo
+++ b/math/gracetmpl/distinfo
@@ -1,2 +1,2 @@
-MD5 (gracetmpl-0.3.1.tar.gz) = 862bb697a7b533bfed816dc3869745a1
-SIZE (gracetmpl-0.3.1.tar.gz) = 865491
+MD5 (gracetmpl-0.3.2.tar.bz2) = 889fb9c73f3cd85c1ab7b42ff06402b1
+SIZE (gracetmpl-0.3.2.tar.bz2) = 898445
diff --git a/math/gracetmpl/files/patch-Makefile b/math/gracetmpl/files/patch-Makefile
index d55b9c489fab..58534c7a0e81 100644
--- a/math/gracetmpl/files/patch-Makefile
+++ b/math/gracetmpl/files/patch-Makefile
@@ -1,11 +1,48 @@
---- 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
+--- Makefile.orig Mon Sep 27 16:59:48 2004
++++ Makefile Sun Jun 5 01:14:44 2005
+@@ -58,10 +58,10 @@
+ $(CPP) -o envtest envtest.o gracetmpl.o
- gracetmpldemo: gracetmpldemo.o gracetmpl.o
-- $(CPP) -o gracetmpldemo gracetmpldemo.o gracetmpl.o
-+ $(CPP) ${LDFLAGS} -o gracetmpldemo gracetmpldemo.o gracetmpl.o
+ install: all
+- install -D -m 644 gracetmpl.h $(INC_PREFIX)/gracetmpl.h
+- install -D -m 644 gracetmpl.a $(LIB_PREFIX)/gracetmpl.a
+- install -D -m 755 gracetmpldemo $(BIN_PREFIX)/gracetmpldemo
+- install -D -m 755 gracetmpl-config $(BIN_PREFIX)/gracetmpl-config
++ ${BSD_INSTALL_DATA} gracetmpl.h $(INC_PREFIX)/gracetmpl.h
++ ${BSD_INSTALL_DATA} gracetmpl.a $(LIB_PREFIX)/libgracetmpl.a
++ ${BSD_INSTALL_PROGRAM} gracetmpldemo $(BIN_PREFIX)/gracetmpldemo
++ ${BSD_INSTALL_SCRIPT} gracetmpl-config $(BIN_PREFIX)/gracetmpl-config
- envtest: envtest.o gracetmpl.o
- $(CPP) -o envtest envtest.o gracetmpl.o
+ gracetmpl-config: gracetmpl-config.in Makefile.defs
+ sed -e 's!__PREFIX__!$(PREFIX)!g' \
+@@ -79,7 +79,7 @@
+
+ pythonwrap:
+ @if python python/prereq.py 2>/dev/null; then \
+- (cd python; make); \
++ (cd python; $(MAKE)); \
+ else \
+ echo missing python numarray extension.; \
+ echo not building python stuff; \
+@@ -87,7 +87,7 @@
+
+ pythonwrap_install:
+ @if python python/prereq.py 2>/dev/null; then \
+- (cd python; make install); \
++ (cd python; $(MAKE) install); \
+ else \
+ echo not installing python stuff; \
+ fi
+@@ -121,10 +121,10 @@
+ rm -fr doc/html
+
+ test: gracetmpldemo pythonwrap
+- @cd tests; make
++ @cd tests; $(MAKE)
+
+ testpics: gracetmpldemo pythonwrap
+- @cd tests; make pics
++ @cd tests; $(MAKE) pics
+
+ web: doc
+ (cd doc/html; tar cvhzf ../../web-`date +%s`.tgz .)
diff --git a/math/gracetmpl/files/patch-gracetmpl.cc b/math/gracetmpl/files/patch-gracetmpl.cc
new file mode 100644
index 000000000000..920c4a7476be
--- /dev/null
+++ b/math/gracetmpl/files/patch-gracetmpl.cc
@@ -0,0 +1,20 @@
+--- gracetmpl.cpp.bak Fri Sep 24 21:56:02 2004
++++ gracetmpl.cpp Sat Jun 18 00:18:52 2005
+@@ -24,7 +24,7 @@
+
+ extern "C" {
+ #include <math.h>
+-#include <values.h>
++#include <float.h>
+ #include <ctype.h>
+ #include <time.h>
+ #include <sys/time.h>
+@@ -981,7 +981,7 @@
+ gettimeofday(&tv,0);
+
+ size= (tm==0) ?
+- strftime(buffer,999,format.c_str(),localtime(&tv.tv_sec)):
++ strftime(buffer,999,format.c_str(),localtime((const time_t *) &tv.tv_sec)):
+ strftime(buffer,999,format.c_str(),tm);
+ buffer[999]= 0;
+ return string(buffer);
diff --git a/math/gracetmpl/files/patch-pygracetmpl.cc b/math/gracetmpl/files/patch-pygracetmpl.cc
index 74dcc3abfd7c..a08a80be48bf 100644
--- a/math/gracetmpl/files/patch-pygracetmpl.cc
+++ b/math/gracetmpl/files/patch-pygracetmpl.cc
@@ -1,21 +1,43 @@
---- python/src/pygracetmpl.cc.orig Sat Oct 12 05:12:57 2002
-+++ python/src/pygracetmpl.cc Sun Dec 5 12:35:53 2004
-@@ -1,11 +1,10 @@
+--- python/src/pygracetmpl.cc.orig Mon Sep 27 16:59:49 2004
++++ python/src/pygracetmpl.cc Sat Jun 18 00:44:43 2005
+@@ -1,15 +1,15 @@
#include <gracetmpl.h>
--#include <Python.h>
--#include <Numeric/arrayobject.h> /* numerical python header */
--
- #include <string.h>
- #include <complex>
- #include <set>
-+#include <Python.h>
-+#include <Numeric/arrayobject.h> /* numerical python header */
++#include <string.h>
++#include <complex>
++#include <set>
++
+ /* python headers */
+ #include <Python.h>
+ /* numarray headers */
+ #include <numarray/numarray.h>
+ #include <numarray/arrayobject.h>
+-#include <string.h>
+-#include <complex>
+-#include <set>
+-
/********************************************************/
/******************* graceTMPL.data type ***************/
-@@ -179,7 +178,7 @@
- int rows = dataArray->dimensions[1];
+ /********************************************************/
+@@ -159,6 +159,7 @@
+ PyArrayObject *dataArray = 0;
+ GraceTMPL::Data *newData = 0;
+ graceTMPL_dataObject *dataObject = 0;
++ int cols, rows;
+
+ if (!PyArg_ParseTuple(args, "sO:graceTMPL.graph.addData(name, dataArray)",
+ &name, &oDataArray)){
+@@ -178,12 +179,12 @@
+ "data array has to have at least dimension 2 in first axis");
+ return NULL;
+ }
+- PyArray_INCREF(dataArray);
+- int cols = dataArray->dimensions[0];
+- int rows = dataArray->dimensions[1];
++ XXX_PyArray_INCREF(dataArray);
++ cols = dataArray->dimensions[0];
++ rows = dataArray->dimensions[1];
if(cols > 4)
cols = 4;
- double **data = new (double *)[cols];
@@ -23,3 +45,12 @@
for(int c = 0; c < cols; ++c){
data[c] = new double[rows];
for(int r = 0; r < rows; ++r)
+@@ -191,7 +192,7 @@
+ c * dataArray->strides[0] +
+ r * dataArray->strides[1]);
+ }
+- PyArray_XDECREF(dataArray);
++ XXX_PyArray_XDECREF(dataArray);
+ switch(cols){
+ case 2:
+ newData = new GraceTMPL::Data(std::string(name), rows,
diff --git a/math/gracetmpl/pkg-plist b/math/gracetmpl/pkg-plist
index 17646c9a5638..47e2b5b840eb 100644
--- a/math/gracetmpl/pkg-plist
+++ b/math/gracetmpl/pkg-plist
@@ -1,49 +1,53 @@
bin/gracetmpl-config
bin/gracetmpldemo
include/gracetmpl.h
-lib/libgracetmpl.a
%%PYTHON_INCLUDEDIR%%/graceTMPL/gracetmpl.h
-@dirrm %%PYTHON_INCLUDEDIR%%/graceTMPL
+lib/libgracetmpl.a
%%PYTHON_SITELIBDIR%%/graceTMPL/graceTMPL.so
%%PYTHON_SITELIBDIR%%/graceTMPL.pth
-@dirrm %%PYTHON_SITELIBDIR%%/graceTMPL
%%PORTDOCS%%%%DOCSDIR%%/annotated.html
%%PORTDOCS%%%%DOCSDIR%%/annotations.html
%%PORTDOCS%%%%DOCSDIR%%/changes.html
%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Data-members.html
-%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Data.gif
%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Data.html
+%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Data.png
%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Environment-members.html
%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Environment.html
%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1EnvironmentUser-members.html
-%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1EnvironmentUser.gif
%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1EnvironmentUser.html
+%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1EnvironmentUser.png
%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Graph-members.html
-%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Graph.gif
%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Graph.html
+%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Graph.png
%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Save-members.html
-%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Save.gif
%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Save.html
+%%PORTDOCS%%%%DOCSDIR%%/classGraceTMPL_1_1Save.png
%%PORTDOCS%%%%DOCSDIR%%/classes.html
%%PORTDOCS%%%%DOCSDIR%%/demo-annotated.jpg
%%PORTDOCS%%%%DOCSDIR%%/demo-output-big.jpg
-%%PORTDOCS%%%%DOCSDIR%%/demo-output-small.jpg
%%PORTDOCS%%%%DOCSDIR%%/demo-template-big.jpg
-%%PORTDOCS%%%%DOCSDIR%%/demo-template-small.jpg
%%PORTDOCS%%%%DOCSDIR%%/demo_outp_big.html
%%PORTDOCS%%%%DOCSDIR%%/demo_tmpl_big.html
%%PORTDOCS%%%%DOCSDIR%%/dictionary.html
%%PORTDOCS%%%%DOCSDIR%%/doxygen.css
-%%PORTDOCS%%%%DOCSDIR%%/doxygen.gif
+%%PORTDOCS%%%%DOCSDIR%%/doxygen.png
%%PORTDOCS%%%%DOCSDIR%%/examples.html
%%PORTDOCS%%%%DOCSDIR%%/files.html
%%PORTDOCS%%%%DOCSDIR%%/functions.html
+%%PORTDOCS%%%%DOCSDIR%%/functions_func.html
+%%PORTDOCS%%%%DOCSDIR%%/functions_type.html
+%%PORTDOCS%%%%DOCSDIR%%/functions_vars.html
%%PORTDOCS%%%%DOCSDIR%%/gracetmpl_8h-source.html
%%PORTDOCS%%%%DOCSDIR%%/hierarchy.html
%%PORTDOCS%%%%DOCSDIR%%/index.html
%%PORTDOCS%%%%DOCSDIR%%/installation.html
%%PORTDOCS%%%%DOCSDIR%%/namespaceGraceTMPL.html
%%PORTDOCS%%%%DOCSDIR%%/namespacemembers.html
+%%PORTDOCS%%%%DOCSDIR%%/namespacemembers_enum.html
+%%PORTDOCS%%%%DOCSDIR%%/namespacemembers_eval.html
+%%PORTDOCS%%%%DOCSDIR%%/namespacemembers_func.html
+%%PORTDOCS%%%%DOCSDIR%%/namespacemembers_type.html
+%%PORTDOCS%%%%DOCSDIR%%/namespacemembers_vars.html
%%PORTDOCS%%%%DOCSDIR%%/namespaces.html
%%PORTDOCS%%%%DOCSDIR%%/pages.html
%%PORTDOCS%%%%DOCSDIR%%/structGraceTMPL_1_1Save_1_1CopySrc-members.html
@@ -54,6 +58,9 @@ lib/libgracetmpl.a
%%PORTDOCS%%%%DOCSDIR%%/test02.jpg
%%PORTDOCS%%%%DOCSDIR%%/test03.jpg
%%PORTDOCS%%%%DOCSDIR%%/test04.jpg
+%%PORTDOCS%%%%DOCSDIR%%/test05.jpg
%%PORTDOCS%%%%DOCSDIR%%/tmpl_knowledge.html
%%PORTDOCS%%%%DOCSDIR%%/todo.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrm %%PYTHON_SITELIBDIR%%/graceTMPL
+@dirrm %%PYTHON_INCLUDEDIR%%/graceTMPL