[109243] users/mojca/wxports/graphics/wxWidgets-2.8
mojca at macports.org
mojca at macports.org
Sun Aug 11 04:49:49 PDT 2013
Revision: 109243
https://trac.macports.org/changeset/109243
Author: mojca at macports.org
Date: 2013-08-11 04:49:49 -0700 (Sun, 11 Aug 2013)
Log Message:
-----------
mojca/wxWidgets-2.8: make +gtk and --enable-graphics_ctx work
Modified Paths:
--------------
users/mojca/wxports/graphics/wxWidgets-2.8/Portfile
users/mojca/wxports/graphics/wxWidgets-2.8/files/patch-configure.diff
Modified: users/mojca/wxports/graphics/wxWidgets-2.8/Portfile
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-2.8/Portfile 2013-08-11 11:18:03 UTC (rev 109242)
+++ users/mojca/wxports/graphics/wxWidgets-2.8/Portfile 2013-08-11 11:49:49 UTC (rev 109243)
@@ -2,10 +2,13 @@
# $Id$
PortSystem 1.0
+PortGroup active_variants 1.1
PortGroup archcheck 1.0
PortGroup select 1.0
name wxWidgets-2.8
+# temporary conflict to prevent wrong linking
+conflicts wxgtk wxWidgets wxWidgets-python wxWidgets30 wxWidgets-devel
version 2.8.12
set branch [join [lrange [split ${version} .] 0 1] .]
@@ -36,6 +39,8 @@
sha256 3b0ac1d2d017683851841501c8e1b744b97242d684a1668ded61809b0504f707
# TODO: put this into PortGroup
+# TODO: create a subport wxGTK-2.8 in addition to wxWidgets-2.8 and put it under
+# ${frameworks_dir}/wxWidgets.framework/Versions/wxGTK/${branch}
set installdir ${frameworks_dir}/wxWidgets.framework/Versions/${distname}/${branch}
depends_lib port:jpeg \
@@ -59,11 +64,13 @@
set worksrcdir ${distname}-${version}/build
-patchfiles patch-chkconf.diff patch-configure.diff
+patchfiles patch-chkconf.diff \
+ patch-configure.diff
patch.dir ${workpath}/${distname}-${version}
post-patch {
reinplace "s|@@ARCHS@@|[get_canonical_archflags]|g" ${workpath}/${distname}-${version}/configure
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${workpath}/${distname}-${version}/configure
}
compiler.blacklist clang
@@ -71,25 +78,25 @@
set contrib "gizmos stc ogl"
set installtype release
-# build.target
-
# SDK
set conf_sdk "no"
set conf_macosx_version_min "no"
pre-fetch {
- # 10.8 (or later) -or- 10.7 with Xcode 4.4 (or later)
- if {${os.major} >= 12 || [vercmp $xcodeversion 4.4] >= 0} {
- return -code return "${name} cannot be built on Moc OS X >= 10.7 with Xcode >= 4.4, please use port ${distname}-3.0 instead"
- } else {
- # 10.7
- if {${os.major} == 11} {
- if {[vercmp $xcodeversion 4.3] < 0} {
- set sdks_dir "${developer_dir}/SDKs"
- } else {
- set sdks_dir "${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs"
+ if {[variant_isset carbon]} {
+ # 10.8 (or later) -or- 10.7 with Xcode 4.4 (or later)
+ if {${os.major} >= 12 || [vercmp $xcodeversion 4.4] >= 0} {
+ return -code return "${name} cannot be built on Moc OS X >= 10.7 with Xcode >= 4.4, please use port ${distname}-3.0 instead"
+ } else {
+ # 10.7
+ if {${os.major} == 11} {
+ if {[vercmp $xcodeversion 4.3] < 0} {
+ set sdks_dir "${developer_dir}/SDKs"
+ } else {
+ set sdks_dir "${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs"
+ }
+ set conf_sdk "${sdks_dir}/MacOSX10.6.sdk"
+ set conf_macosx_version_min "10.6"
}
- set conf_sdk "${sdks_dir}/MacOSX10.6.sdk"
- set conf_macosx_version_min "10.6"
}
}
}
@@ -102,7 +109,6 @@
--with-libpng \
--with-zlib \
--with-opengl \
- --with-mac \
--without-sdl \
--disable-sdltest \
--enable-unicode \
@@ -112,9 +118,6 @@
--with-macosx-version-min=${conf_macosx_version_min} \
--enable-universal_binary
-supported_archs i386 ppc
-use_parallel_build no
-
post-build {
foreach c { ${contrib} } {
system "cd ${build.dir} && make -C contrib/src/${c}"
@@ -138,6 +141,34 @@
ln -sf ${confscript} ${destroot}${installdir}/bin/wx-config
}
+variant carbon conflicts gtk x11 quartz description {} {
+ supported_archs i386 ppc
+ use_parallel_build no
+ configure.args-append --with-mac
+}
+variant gtk conflicts carbon description {} {
+ depends_lib-append port:cairo \
+ port:gtk2
+ # TODO: try to make sdl work
+ # path:lib/pkgconfig/sdl.pc:libsdl \
+ # port:libsdl_mixer
+ #configure.args-delete --without-sdl
+ configure.args-append --with-gtk
+}
+variant x11 requires gtk conflicts carbon quartz description {} {
+ # TODO: not sure about freeglut
+ depends_lib-append port:mesa \
+ port:freeglut
+
+ require_active_variants cairo x11
+ require_active_variants gtk2 x11
+}
+variant quartz requires gtk conflicts carbon x11 description {} {
+ # TODO: doesn't work
+ require_active_variants cairo quartz
+ require_active_variants gtk2 quartz
+}
+
variant aui description {add support for AUI docking library} {
configure.args-append --enable-aui
}
@@ -151,6 +182,10 @@
set installtype debug
}
+if {![variant_isset carbon] && ![variant_isset gtk] && ![variant_isset x11] && ![variant_isset quartz]} {
+ default_variants +carbon
+}
+
livecheck.type regex
livecheck.url ${homepage}/downloads/
livecheck.regex Current Stable Release.*(2\\.\[0-9\]\\.\[0-9\]+)
Modified: users/mojca/wxports/graphics/wxWidgets-2.8/files/patch-configure.diff
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-2.8/files/patch-configure.diff 2013-08-11 11:18:03 UTC (rev 109242)
+++ users/mojca/wxports/graphics/wxWidgets-2.8/files/patch-configure.diff 2013-08-11 11:49:49 UTC (rev 109243)
@@ -9,3 +9,93 @@
CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
OBJCXXFLAGS="$OSX_UNIV_OPTS $OBJCXXFLAGS"
+@@ -24932,44 +24932,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+-SEARCH_INCLUDE="\
+- /usr/local/include \
+- /usr/local/X11/include \
+- /usr/local/include/X11 \
+- /usr/local/X11R6/include \
+- /usr/local/include/X11R6 \
+- \
+- /usr/Motif-2.1/include \
+- /usr/Motif-1.2/include \
+- /usr/include/Motif1.2 \
+- \
+- /usr/dt/include \
+- /usr/openwin/include \
+- \
+- /usr/include/Xm \
+- \
+- /usr/X11R6/include \
+- /usr/X11R6.4/include \
+- \
+- /usr/include/X11R6 \
+- \
+- /usr/X11/include \
+- /usr/include/X11 \
+- \
+- /usr/XFree86/include/X11 \
+- /usr/pkg/include \
+- \
+- /usr/local/X1R5/include \
+- /usr/local/include/X11R5 \
+- /usr/X11R5/include \
+- /usr/include/X11R5 \
+- \
+- /usr/local/X11R4/include \
+- /usr/local/include/X11R4 \
+- /usr/X11R4/include \
+- /usr/include/X11R4 \
+- \
+- /usr/openwin/share/include"
++SEARCH_INCLUDE="@@PREFIX@@/include"
+
+ echo "$as_me:$LINENO: checking for libraries directory" >&5
+ echo $ECHO_N "checking for libraries directory... $ECHO_C" >&6
+@@ -28916,7 +28879,7 @@ rm -f conftest.err conftest.$ac_objext \
+ wx_cv_lib_gtk=none
+ else
+ wx_cv_cflags_gtk=$GTK_CFLAGS
+- wx_cv_libs_gtk=`echo $GTK_LIBS | sed -e 's/ -l[^ ]*cairo[^ ]*//g'`
++ wx_cv_libs_gtk="$GTK_LIBS"
+ fi
+
+
+@@ -33190,7 +33153,7 @@ echo "$as_me: WARNING: wxGLCanvas not implemented for this port, library will be
+ OPENGL_LIBS="-framework OpenGL -framework AGL"
+ elif test "$wxUSE_MSW" = 1; then
+ OPENGL_LIBS="-lopengl32 -lglu32"
+- elif test "$USE_DARWIN" = 1; then
++ elif test "$wxUSE_MAC" = 1; then
+ OPENGL_LIBS=""
+ else
+ echo "$as_me:$LINENO: checking for OpenGL headers" >&5
+--- setup.h.in.orig
++++ setup.h.in
+@@ -552,7 +552,7 @@
+ #define wxUSE_RICHEDIT2 0
+ #endif
+
+-#if !defined(__WIN32__) && !defined(__APPLE__)
++#if !defined(__WIN32__) && !defined(__WXMAC__)
+ #define wxUSE_CAIRO 1
+ #else
+ #define wxUSE_CAIRO 0
+--- src/generic/graphicc.cpp.orig
++++ src/generic/graphicc.cpp
+@@ -1474,10 +1474,10 @@ wxGraphicsContext * wxCairoRenderer::CreateContext( const wxMemoryDC& dc)
+
+ wxGraphicsContext * wxCairoRenderer::CreateContextFromNativeContext( void * context )
+ {
+-#if __WXMSW__
++#ifdef __WXMSW__
+ return new wxCairoContext(this,(HDC)context);
+ #endif
+-#if __WXGTK__
++#ifdef __WXGTK__
+ return new wxCairoContext(this,(cairo_t*)context);
+ #endif
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130811/8eac35dc/attachment-0001.html>
More information about the macports-changes
mailing list