aboutsummaryrefslogtreecommitdiff
path: root/devel/py-gyp-devel
diff options
context:
space:
mode:
authorDaichi GOTO <daichi@FreeBSD.org>2010-09-04 02:44:13 +0000
committerDaichi GOTO <daichi@FreeBSD.org>2010-09-04 02:44:13 +0000
commit83ac3caa910db581f08ee80e88ca9bb636bab10b (patch)
treece5fc5ff2dfbebba6f8767a106a26c6af0d1a399 /devel/py-gyp-devel
parentf22045cc5223567f88227b0a1f20874b4ba2df38 (diff)
Notes
Diffstat (limited to 'devel/py-gyp-devel')
-rw-r--r--devel/py-gyp-devel/Makefile13
-rw-r--r--devel/py-gyp-devel/files/patch-pylib_gyp_generator_make.py21
2 files changed, 34 insertions, 0 deletions
diff --git a/devel/py-gyp-devel/Makefile b/devel/py-gyp-devel/Makefile
index 1ec5644ad576..3a21ff7e916f 100644
--- a/devel/py-gyp-devel/Makefile
+++ b/devel/py-gyp-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gyp
PORTVERSION= r832
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= http://people.freebsd.org/~daichi/distfiles/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -15,8 +16,20 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= daichi@FreeBSD.org
COMMENT= Generate Your Projects
+RUN_DEPENDS= gsed:${PORTSDIR}/textproc/gsed \
+ ${LOCALBASE}/bin/grep:${PORTSDIR}/textproc/gnugrep
+
USE_PYTHON= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_PKGVERSION= 0.1
+REPLACE_FILES= ${WRKSRC}/pylib/gyp/generator/make.py
+
+post-patch:
+ @for FILE in ${REPLACE_FILES}; \
+ do \
+ ${SED} -i .bak -e "s/@@LOCALBASE@@/${LOCALBASE:S/\//\\\//g}/g" \
+ $${FILE}; \
+ done;
+
.include <bsd.port.mk>
diff --git a/devel/py-gyp-devel/files/patch-pylib_gyp_generator_make.py b/devel/py-gyp-devel/files/patch-pylib_gyp_generator_make.py
new file mode 100644
index 000000000000..8a5503db2b7a
--- /dev/null
+++ b/devel/py-gyp-devel/files/patch-pylib_gyp_generator_make.py
@@ -0,0 +1,21 @@
+--- pylib/gyp/generator/make.py.org 2010-09-03 18:36:39.151835296 +0900
++++ pylib/gyp/generator/make.py 2010-09-03 18:55:43.973773838 +0900
+@@ -177,14 +177,14 @@
+ r"""
+ define fixup_dep
+ # Fixup path as in (1).
+-sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
++gsed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
+ # Add extra rules as in (2).
+ # We remove slashes and replace spaces with new lines;
+ # remove blank lines;
+ # delete the first line and append a colon to the remaining lines.
+-sed -e 's|\\||' -e 's| |\n|g' $(depfile).raw |\
+- grep -v '^$$' |\
+- sed -e 1d -e 's|$$|:|' \
++gsed -e 's|\\||' -e 's| |\n|g' $(depfile).raw |\
++ @@LOCALBASE@@/bin/grep -E -v '^$$' |\
++ gsed -e 1d -e 's|$$|:|' \
+ >> $(depfile)
+ rm $(depfile).raw
+ endef