- Update to 0.3.2
PR: ports/82277 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
This commit is contained in:
parent
1a3f9927f2
commit
b6d3fccfff
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=137643
6 changed files with 152 additions and 59 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
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
|
||||
--- 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
|
||||
|
||||
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
|
||||
|
||||
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 .)
|
||||
|
|
20
math/gracetmpl/files/patch-gracetmpl.cc
Normal file
20
math/gracetmpl/files/patch-gracetmpl.cc
Normal file
|
@ -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);
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue