aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits
diff options
context:
space:
mode:
authordbn <dbn@FreeBSD.org>2013-11-19 03:02:22 +0800
committerdbn <dbn@FreeBSD.org>2013-11-19 03:02:22 +0800
commit6a1453c33395ee5f41f77e562780bd2b7ccdbc6e (patch)
tree344d6979015e7b97fc131f4681ff8573d9943ab8 /x11-toolkits
parenta9d0af8fb89ffef82c0fd4dc69a6c2636e2046e2 (diff)
downloadfreebsd-ports-gnome-6a1453c33395ee5f41f77e562780bd2b7ccdbc6e.tar.gz
freebsd-ports-gnome-6a1453c33395ee5f41f77e562780bd2b7ccdbc6e.tar.zst
freebsd-ports-gnome-6a1453c33395ee5f41f77e562780bd2b7ccdbc6e.zip
Add stage support to x11-toolkits/py-kivy.
Changes: - Add shebangfix for one file (OSC.py) - Migrate USE_GMAKE to USES=gmake - Strip libraries installed - Prevent non-FreeBSD packaging files from being installed - Change build logic to use the default do-build target
Diffstat (limited to 'x11-toolkits')
-rw-r--r--x11-toolkits/py-kivy/Makefile34
-rw-r--r--x11-toolkits/py-kivy/files/patch-setup.py17
2 files changed, 38 insertions, 13 deletions
diff --git a/x11-toolkits/py-kivy/Makefile b/x11-toolkits/py-kivy/Makefile
index aa2ff1aed947..e054fd9f62f6 100644
--- a/x11-toolkits/py-kivy/Makefile
+++ b/x11-toolkits/py-kivy/Makefile
@@ -20,12 +20,14 @@ MAKE_JOBS_UNSAFE= yes # does not (really) use make
USE_GITHUB= yes
GH_ACCOUNT= ${PORTNAME}
GH_COMMIT= ee1985a
+USES= shebangfix
USE_GL= gl
USE_PYDISTUTILS= yes
PYDISTUTILS_BUILD_TARGET= build_ext
PYDISTUTILS_BUILDARGS= --inplace
PYDISTUTILS_EGGINFO= Kivy-${PORTVERSION}-py${PYTHON_VER}.egg-info
USE_PYTHON= 2.7
+SHEBANG_FILES= kivy/lib/osc/OSC.py
OPTIONS_DEFINE= DOCS PDF TEST
OPTIONS_SET= ENCHANT OPENCV PYGAME # FFMPEG
@@ -65,6 +67,7 @@ GSTREAMER_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pygst.py:${PORTSDIR}/multimedia/py-g
OPENCV_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/cv.py:${PORTSDIR}/graphics/py-opencv
PDF_DESC= Build PDF documentation (required TeXLive, DOCS)
PDF_BUILD_DEPENDS= sphinx-build:${PORTSDIR}/textproc/py-sphinx
+PDF_USES= gmake
PIL_DESC= Text and window rendering support via PIL
PIL_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/PIL:${PORTSDIR}/graphics/py-imaging
PYGAME_DESC= Window, text and image rendering support via PyGame
@@ -80,11 +83,9 @@ X11_MAKE_ENV+= USE_X11=1
FFMPEG_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/ffmpeg:${PORTSDIR}/multimedia/py-ffmpeg
.endif
-NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPDF}
-USE_GMAKE= yes
USE_TEX= texlive pdftex:build dvipsk:build
.if empty(PORT_OPTIONS:MDOCS)
IGNORE= option PDF requires DOCS
@@ -103,18 +104,22 @@ USE_SDL= sdl2 ttf2 mixer2
USE_XORG= x11
.endif
-do-build:
- @(cd ${WRKSRC}; \
- ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} \
- ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS})
.if ${PORT_OPTIONS:MTEST}
+
+post-build: do-test-build
+
+do-test-build:
@${RM} -rf kivy/tests/build
@(cd ${WRKSRC}; \
${SETENV} ${MAKE_ENV} nosetests ${NOSE_ARGS} ${WRKSRC}/kivy/tests)
+
.endif
.if ${PORT_OPTIONS:MDOCS}
-post-build-script:
+
+post-build: do-build-docs
+
+do-build-docs:
${MKDIR} ${WRKSRC}/doc/build/doctrees ${WRKSRC}/doc/build/html \
${WRKSRC}/doc/build/latex-a4 ${WRKSRC}/doc/build/latex-letter
(cd ${WRKSRC}; \
@@ -138,15 +143,20 @@ post-build-script:
all-pdf > /dev/null
.endif
-post-install:
- ${MKDIR} ${DOCSDIR}
- (cd ${WRKSRC}/doc/build/html; ${COPYTREE_SHARE} . ${DOCSDIR})
+post-install: do-install-docs
+
+do-install-docs:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ (cd ${WRKSRC}/doc/build/html; ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
.if ${PORT_OPTIONS:MPDF}
${INSTALL_DATA} ${WRKSRC}/doc/build/latex-a4/Kivy.pdf \
- ${DOCSDIR}/Kivy-a4.pdf
+ ${STAGEDIR}${DOCSDIR}/Kivy-a4.pdf
${INSTALL_DATA} ${WRKSRC}/doc/build/latex-letter/Kivy.pdf \
- ${DOCSDIR}/Kivy-letter.pdf
+ ${STAGEDIR}${DOCSDIR}/Kivy-letter.pdf
.endif
.endif
+post-install:
+ ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/kivy -name '*.so' | ${XARGS} ${STRIP_CMD}
+
.include <bsd.port.mk>
diff --git a/x11-toolkits/py-kivy/files/patch-setup.py b/x11-toolkits/py-kivy/files/patch-setup.py
index 57bde50cfaf6..71729299da14 100644
--- a/x11-toolkits/py-kivy/files/patch-setup.py
+++ b/x11-toolkits/py-kivy/files/patch-setup.py
@@ -1,5 +1,5 @@
--- setup.py.orig 2013-05-28 15:08:56.000000000 +0200
-+++ setup.py 2013-06-11 19:33:06.000000000 +0200
++++ setup.py 2013-11-18 20:41:50.000000000 +0200
@@ -6,9 +6,10 @@
import sys
from copy import deepcopy
@@ -52,3 +52,18 @@
return flags
def determine_graphics_pxd():
+@@ -491,13 +498,7 @@
+ 'data/glsl/*.fs',
+ 'tools/highlight/*.vim',
+ 'tools/highlight/*.el',
+- 'tools/packaging/README.txt',
+- 'tools/packaging/win32/kivy.bat',
+- 'tools/packaging/win32/kivyenv.sh',
+- 'tools/packaging/win32/README.txt',
+- 'tools/packaging/osx/Info.plist',
+- 'tools/packaging/osx/InfoPlist.strings',
+- 'tools/packaging/osx/kivy.sh']},
++ 'tools/packaging/README.txt']},
+ data_files=examples.items(),
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',