From 41baefc8a01528031ba9777aa8cc0c80f47b315c Mon Sep 17 00:00:00 2001 From: Marcus von Appen Date: Sat, 16 Aug 2014 17:27:02 +0000 Subject: [PATCH] - Enable stagedir support - Convert USE_PYTHON -> USES=python --- math/gracetmpl/Makefile | 18 +++++++----------- math/gracetmpl/files/patch-Makefile | 8 ++++---- math/gracetmpl/pkg-plist | 1 + 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/math/gracetmpl/Makefile b/math/gracetmpl/Makefile index eb944a2339f6..0156a12c0037 100644 --- a/math/gracetmpl/Makefile +++ b/math/gracetmpl/Makefile @@ -12,8 +12,7 @@ COMMENT= Provide an easy way to use existing grace-files as a template BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/numarray/__init__.py:${PORTSDIR}/math/py-numarray RUN_DEPENDS= ${PYTHON_SITELIBDIR}/numarray/__init__.py:${PORTSDIR}/math/py-numarray -USE_PYTHON= yes -USES= gmake tar:bzip2 +USES= gmake python tar:bzip2 MAKE_ARGS= PREFIX="${PREFIX}" \ BIN_PREFIX="${PREFIX}/bin" \ LIB_PREFIX="${PREFIX}/lib" \ @@ -24,13 +23,10 @@ MAKE_ARGS= PREFIX="${PREFIX}" \ CPPFLAGS="${CXXFLAGS} ${CPPFLAGS}" \ CXX="${CXX}" ALL_TARGET= all pythonwrap -INSTALL_TARGET= install pythonwrap_install +INSTALL_TARGET= install -INSTALLS_EGGINFO= yes -PYDISTUTILS_PKGNAME= graceTMPL -PYDISTUTILS_EGGINFODIR= ${PYTHON_SITELIBDIR}/graceTMPL +PLIST_SUB+= PYTHON_VER=${PYTHON_VER} -NO_STAGE= yes post-extract: @${ECHO_CMD} -n > ${WRKSRC}/Makefile.defs @@ -38,9 +34,9 @@ post-patch: @${REINPLACE_CMD} -e 's|/gracetmpl\.a|/libgracetmpl.a|g' ${WRKSRC}/gracetmpl-config.in post-install: -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/doc/html/* ${DOCSDIR} -.endif + @(cd ${INSTALL_WRKSRC}/python; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py \ + install --root=${STAGEDIR} --prefix=${LOCALBASE} -c -O1) + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/html/* ${STAGEDIR}${DOCSDIR} .include diff --git a/math/gracetmpl/files/patch-Makefile b/math/gracetmpl/files/patch-Makefile index 58534c7a0e81..0063cfcf7742 100644 --- a/math/gracetmpl/files/patch-Makefile +++ b/math/gracetmpl/files/patch-Makefile @@ -8,10 +8,10 @@ - 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 ++ ${BSD_INSTALL_DATA} gracetmpl.h $(DESTDIR)$(INC_PREFIX)/gracetmpl.h ++ ${BSD_INSTALL_DATA} gracetmpl.a $(DESTDIR)$(LIB_PREFIX)/libgracetmpl.a ++ ${BSD_INSTALL_PROGRAM} gracetmpldemo $(DESTDIR)$(BIN_PREFIX)/gracetmpldemo ++ ${BSD_INSTALL_SCRIPT} gracetmpl-config $(DESTDIR)$(BIN_PREFIX)/gracetmpl-config gracetmpl-config: gracetmpl-config.in Makefile.defs sed -e 's!__PREFIX__!$(PREFIX)!g' \ diff --git a/math/gracetmpl/pkg-plist b/math/gracetmpl/pkg-plist index 47e2b5b840eb..d4c0e33f04b7 100644 --- a/math/gracetmpl/pkg-plist +++ b/math/gracetmpl/pkg-plist @@ -5,6 +5,7 @@ include/gracetmpl.h lib/libgracetmpl.a %%PYTHON_SITELIBDIR%%/graceTMPL/graceTMPL.so %%PYTHON_SITELIBDIR%%/graceTMPL.pth +%%PYTHON_SITELIBDIR%%/graceTMPL/graceTMPL-0.3.2-py%%PYTHON_VER%%.egg-info %%PORTDOCS%%%%DOCSDIR%%/annotated.html %%PORTDOCS%%%%DOCSDIR%%/annotations.html %%PORTDOCS%%%%DOCSDIR%%/changes.html