summaryrefslogtreecommitdiff
path: root/x11-toolkits/py-wxPython28
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2003-06-05 00:02:41 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2003-06-05 00:02:41 +0000
commitde7b597c43afed0036921df356313f3a13f68268 (patch)
tree2025bde5d0d21140e57079e164e878419a7cf92c /x11-toolkits/py-wxPython28
parent1. Place gnuplot.gih in ${DATADIR} rather than ${PREFIX}/share (the (diff)
Add a layer that enable this port to build with a wxgtk port built
against either gtk12 AND gtk20. Support for wxgtk to build against gtk20 is being reviewed. Reviewed by: marcus (the idea)
Notes
Notes: svn path=/head/; revision=82304
Diffstat (limited to 'x11-toolkits/py-wxPython28')
-rw-r--r--x11-toolkits/py-wxPython28/Makefile23
1 files changed, 20 insertions, 3 deletions
diff --git a/x11-toolkits/py-wxPython28/Makefile b/x11-toolkits/py-wxPython28/Makefile
index 8099b69b1670..c719a2f90346 100644
--- a/x11-toolkits/py-wxPython28/Makefile
+++ b/x11-toolkits/py-wxPython28/Makefile
@@ -26,8 +26,7 @@ WX_CONFIG= ${X11BASE}/bin/wx-config
USE_GMAKE= yes
USE_PYTHON= yes
USE_PYDISTUTILS=yes
-USE_GNOME= gtk12
-MAKE_ENV= WX_CONFIG="${WX_CONFIG}"
+PYDISTUTILS_BUILDARGS= WX_CONFIG="${WX_CONFIG}"
DEMO_DIR= ${PYTHONPREFIX_SITELIBDIR}/wxPython/demo
post-build:
@@ -48,4 +47,22 @@ post-install:
.endfor
.endfor
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if exists(${WX_CONFIG})
+# detect if wxgtk was linked against gtk1 or gtk2
+DECISION_GTK_1_OR_2!= ${WX_CONFIG} --static --libs | ${GREP} glib-2.0
+.else
+DECISION_GTK_1_OR_2= ""
+.endif
+
+.if (${DECISION_GTK_1_OR_2} != "")
+USE_GNOME+= gtk20
+CONFIGURE_ARGS+= --enable-gtk2
+PYDISTUTILS_BUILDARGS+= WXPORT=gtk2
+PYDISTUTILS_INSTALLARGS:= ${PYDISTUTILS_INSTALLARGS} ${PYDISTUTILS_BUILDARGS}
+.else
+USE_GNOME+= gtk12
+.endif
+
+.include <bsd.port.post.mk>