aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2014-07-06 13:46:20 +0800
committersunpoet <sunpoet@FreeBSD.org>2014-07-06 13:46:20 +0800
commitafbabf60bb1716aaf19c8894fac2ec161bc3104e (patch)
treee2cecde84bb165aa9e04bd60f4770a3095cc4a67
parent8f070b654d75f16a09f3a2a030c083130fd58e35 (diff)
downloadfreebsd-ports-gnome-afbabf60bb1716aaf19c8894fac2ec161bc3104e.tar.gz
freebsd-ports-gnome-afbabf60bb1716aaf19c8894fac2ec161bc3104e.tar.zst
freebsd-ports-gnome-afbabf60bb1716aaf19c8894fac2ec161bc3104e.zip
- Convert to new options helper
- Respect PORTEXAMPLES - Remove LATEST_LINK - Use COPYTREE_SHARE - Merge file/dir manipulation into post-patch: - Bump PORTREVISION for package change
-rw-r--r--x11-toolkits/py-gui/Makefile41
-rw-r--r--x11-toolkits/py-gui/files/patch-GUI-Gtk-GL.py4
-rw-r--r--x11-toolkits/py-gui/pkg-plist24
3 files changed, 23 insertions, 46 deletions
diff --git a/x11-toolkits/py-gui/Makefile b/x11-toolkits/py-gui/Makefile
index 55d7013cf709..b2d8ae022d11 100644
--- a/x11-toolkits/py-gui/Makefile
+++ b/x11-toolkits/py-gui/Makefile
@@ -3,7 +3,7 @@
PORTNAME= gui
PORTVERSION= 1.7.2
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= x11-toolkits python
MASTER_SITES= http://www.cosc.canterbury.ac.nz/~greg/python_gui/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -14,46 +14,29 @@ COMMENT= Cross-platform pythonic GUI API
BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/Pyrex/Distutils/__init__.py:${PORTSDIR}/devel/pyrex
+OPTIONS_DEFINE= DOCS EXAMPLES OPENGL
+OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
+
+USE_GNOME= pygtk2
USE_PYTHON= yes
-USE_PYDISTUTILS= yes
+USE_PYDISTUTILS=yes
PYDISTUTILS_AUTOPLIST= yes
-USE_GNOME= pygtk2
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
-
-# A workaround for the problem that "make config" doesn't work
-# because _OPTIONSFILE is defined before bsd.python.mk is included.
-LATEST_LINK= py-${PORTNAME}
-
WRKSRC= ${WRKDIR}/PyGUI-${PORTVERSION}
-OPTIONS_DEFINE= OPENGL DOCS
-OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MOPENGL}
-RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/gdkgl/__init__.py:${PORTSDIR}/x11-toolkits/py-gtkglext
-.endif
-
-post-extract:
- ${RM} -rf ${WRKSRC}/GUI/Cocoa
- ${TOUCH} ${WRKSRC}/GUI/Gtk/__init__.py \
- ${WRKSRC}/GUI/Generic/__init__.py
+OPENGL_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/gdkgl/__init__.py:${PORTSDIR}/x11-toolkits/py-gtkglext
post-patch:
- ${REINPLACE_CMD} -e 's/"GUI.Cocoa",//g' ${WRKSRC}/setup.py
+ @${REINPLACE_CMD} -e 's|"GUI.Cocoa",||g' ${WRKSRC}/setup.py
+ @${TOUCH} ${WRKSRC}/GUI/Generic/__init__.py ${WRKSRC}/GUI/Gtk/__init__.py
+ @${RM} -fr ${WRKSRC}/Demos/BlobEdit/.gdb_history ${WRKSRC}/Demos/BlobEdit/Makefile ${WRKSRC}/GUI/Cocoa
post-install:
-.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${TAR} -C ${WRKSRC}/Doc -cf - . | ${TAR} -C ${STAGEDIR}${DOCSDIR} -xf -
+ cd ${WRKSRC}/Doc/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- ${RM} -f ${WRKSRC}/Demos/BlobEdit/.gdb_history \
- ${WRKSRC}/Demos/BlobEdit/Makefile
- ${TAR} -C ${WRKSRC}/Demos -cf - . | \
- ${TAR} -C ${STAGEDIR}${EXAMPLESDIR} -xf -
-.endif
+ cd ${WRKSRC}/Demos/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>
diff --git a/x11-toolkits/py-gui/files/patch-GUI-Gtk-GL.py b/x11-toolkits/py-gui/files/patch-GUI-Gtk-GL.py
index 26dbb379a3cb..a8d7da202fb8 100644
--- a/x11-toolkits/py-gui/files/patch-GUI-Gtk-GL.py
+++ b/x11-toolkits/py-gui/files/patch-GUI-Gtk-GL.py
@@ -28,7 +28,3 @@
@@ -223,4 +223,4 @@
print "GLPixmap: Set viewport to", width, height ###
self.init_context()
-
--
-\ No newline at end of file
-+
diff --git a/x11-toolkits/py-gui/pkg-plist b/x11-toolkits/py-gui/pkg-plist
index 9ed848bf2823..f52450f2219a 100644
--- a/x11-toolkits/py-gui/pkg-plist
+++ b/x11-toolkits/py-gui/pkg-plist
@@ -71,18 +71,16 @@
%%PORTDOCS%%%%DOCSDIR%%/using_the_view_class.html
%%PORTDOCS%%%%DOCSDIR%%/view-model.cwk
%%PORTDOCS%%%%DOCSDIR%%/view-model.jpg
-%%PORTDOCS%%%%EXAMPLESDIR%%/BlobEdit/blobedit.py
-%%PORTDOCS%%%%EXAMPLESDIR%%/BlobEdit/Resources/blob.tiff
-%%PORTDOCS%%%%EXAMPLESDIR%%/BlobEdit/Resources/blob_app.icns
-%%PORTDOCS%%%%EXAMPLESDIR%%/BlobEdit/Resources/blob_file.icns
-%%PORTDOCS%%%%EXAMPLESDIR%%/BlobEdit/Samples/asdf.blob
-%%PORTDOCS%%%%EXAMPLESDIR%%/BlobEdit/Samples/frown.blob
-%%PORTDOCS%%%%EXAMPLESDIR%%/BlobEdit/Samples/line.blob
-%%PORTDOCS%%%%EXAMPLESDIR%%/BlobEdit/Samples/smile.blob
-%%PORTDOCS%%%%EXAMPLESDIR%%/BlobEdit/setup.py
-%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/BlobEdit/Resources
-%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/BlobEdit/Samples
-%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/BlobEdit
-%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/BlobEdit/Resources/blob.tiff
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/BlobEdit/Resources/blob_app.icns
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/BlobEdit/Resources/blob_file.icns
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/BlobEdit/Samples/asdf.blob
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/BlobEdit/Samples/frown.blob
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/BlobEdit/Samples/line.blob
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/BlobEdit/Samples/smile.blob
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/BlobEdit/blobedit.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/BlobEdit/setup.py
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/BlobEdit
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%/ToDo
%%PORTDOCS%%@dirrm %%DOCSDIR%%