[109332] users/mojca/wxports
mojca at macports.org
mojca at macports.org
Tue Aug 13 07:55:34 PDT 2013
Revision: 109332
https://trac.macports.org/changeset/109332
Author: mojca at macports.org
Date: 2013-08-13 07:55:34 -0700 (Tue, 13 Aug 2013)
Log Message:
-----------
mojca/wxWidgets: improve the wxwidgets PortGroup
Modified Paths:
--------------
users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl
users/mojca/wxports/graphics/wxPython-3.0/Portfile
users/mojca/wxports/graphics/wxWidgets-2.8/Portfile
users/mojca/wxports/graphics/wxWidgets-3.0/Portfile
users/mojca/wxports/python/py-wxpython-2.8/Portfile
users/mojca/wxports/python/py-wxpython-3.0/Portfile
Modified: users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl
===================================================================
--- users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl 2013-08-13 12:20:00 UTC (rev 109331)
+++ users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl 2013-08-13 14:55:34 UTC (rev 109332)
@@ -1,18 +1,29 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
-options wxWidgets.confpath
-options wxWidgets.confscript
+options wxWidgets.name
+options wxWidgets.trueversion
+options wxWidgets.prefix
+options wxWidgets.wxdir
+options wxWidgets.wxconfig
+options wxWidgets.wxrc
+
+options wxWidgets.sdk
+options wxWidgets.macosx_version_min
+
# Poedit also needs
# build.env-append GETTEXT_PREFIX=${prefix} WX_ROOT=${prefix}
options wxWidgets.supported_versions
option_proc wxWidgets.supported_versions wxWidgets._set_supported_versions
-options wxWidgets.use_version
-option_proc wxWidgets.use_version wxWidgets._set_version
+options wxWidgets.use
+option_proc wxWidgets.use wxWidgets._set
+# options wxWidgets.use_version
+# option_proc wxWidgets.use_version wxWidgets._set_version
+
# TODO
# - parameters can be "2.8", "3.0" or "2.8 3.0"
#
@@ -26,46 +37,69 @@
proc wxWidgets._set_supported_versions {option action args} {
}
-proc wxWidgets._set_version {option action args} {
- global prefix frameworks_dir
+# parameters: "wxWidgets-2.8" "wxGTK-2.8" "wxWidgets-3.0" "wxPython-3.0"
+proc wxWidgets._set {option action args} {
+ global prefix frameworks_dir os.major
+ global wxWidgets.name wxWidgets.trueversion wxWidgets.prefix wxWidgets.wxdir
if {"set" != ${action}} {
return
}
- if {${args} == "2.8"} {
- wxWidgets.confpath ${frameworks_dir}/wxWidgets.framework/Versions/wxWidgets/2.8/bin
+ if {${args} == "wxWidgets-2.8"} {
+ wxWidgets.name "wxWidgets"
+ wxWidgets.trueversion "2.8"
+
# wxWidgets is not universal and is 32-bit only
- universal_variant no
- supported_archs i386 ppc
- # TODO
- # - doesn't build on 10.8 (darwin 12) or later
- # - probably doesn't built on 10.7 (darwin 11) with Xcode 4.4 or later
- # - needs to use 10.6 SDK on 10.7 with earlier versions of Xcode
- # wxWidgets itself uses
- # --with-macosx-version-min=10.6
- # --with-macosx-sdk=${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
- # --with-macosx-sdk=${developer_dir}/SDKs/MacOSX10.6.sdk
- # some ports use
- # configure.cxxflags-append -isysroot ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
- # configure.cxxflags-append -isysroot ${developer_dir}/SDKs/MacOSX10.6.sdk
- # example from a port (needs a review/patch):
- #
- # platform darwin 11 {
- # if {[vercmp $xcodeversion 4.4] >= 0} {
- # # doesn't work!!!
- # } elseif {[vercmp $xcodeversion 4.3] >= 0} {
- # configure.cxxflags-append -isysroot ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
- # } else {
- # configure.cxxflags-append -isysroot ${developer_dir}/SDKs/MacOSX10.6.sdk
- # }
- # }
- } elseif {${args} == "3.0"} {
- wxWidgets.confpath ${frameworks_dir}/wxWidgets.framework/Versions/wxWidgets/2.9/bin
+ universal_variant no
+ supported_archs i386 ppc
+ compiler.blacklist clang
+
+ puts "wxWidgets-2.8"
+ pre-fetch {
+ # 10.8 (or later) -or- 10.7 with Xcode 4.4 (or later)
+ if {${os.major} >= 12 || [vercmp $xcodeversion 4.4] >= 0} {
+ ui_error "wxWidgets-2.8 cannot be built on Moc OS X >= 10.7 with Xcode >= 4.4, please use port wxWidgets-3.0 or wxgtk-2.8 instead"
+ return -code return "wxWidgets-2.8 cannot be built on Moc OS X >= 10.7 with Xcode >= 4.4, please use port wxWidgets-3.0 or wxgtk-2.8 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"
+ }
+ wxWidgets.sdk "${sdks_dir}/MacOSX10.6.sdk"
+ wxWidgets.macosx_version_min "10.6"
+ }
+ }
+ }
+ } elseif {${args} == "wxGTK-2.8"} {
+ wxWidgets.name "wxGTK"
+ wxWidgets.trueversion "2.8"
+ } elseif {${args} == "wxWidgets-3.0"} {
+ wxWidgets.name "wxWidgets"
+ wxWidgets.trueversion "2.9"
+ if {${os.major} < 9} {
+ pre-fetch {
+ ui_error "wxWidgets-3.0 requires Mac OS X 10.5 or later."
+ return -code error "incompatible Mac OS X version"
+ }
+ }
+ } elseif {${args} == "wxPython-3.0"} {
+ wxWidgets.name "wxPython"
+ wxWidgets.trueversion "2.9"
+ if {${os.major} < 9} {
+ pre-fetch {
+ ui_error "wxPython-3.0 requires Mac OS X 10.5 or later."
+ return -code error "incompatible Mac OS X version"
+ }
+ }
} else {
# throw an error
}
- wxWidgets.confscript ${wxWidgets.confpath}/wx-config
+ wxWidgets.prefix ${frameworks_dir}/wxWidgets.framework/Versions/${wxWidgets.name}/${wxWidgets.trueversion}
+
+ wxWidgets.wxdir ${wxWidgets.prefix}/bin
+ wxWidgets.wxconfig ${wxWidgets.wxdir}/wx-config
+ wxWidgets.wxrc ${wxWidgets.wxdir}/wxrc
}
-
-# default that can be overridden
-wxWidgets.use_version 3.0
Modified: users/mojca/wxports/graphics/wxPython-3.0/Portfile
===================================================================
--- users/mojca/wxports/graphics/wxPython-3.0/Portfile 2013-08-13 12:20:00 UTC (rev 109331)
+++ users/mojca/wxports/graphics/wxPython-3.0/Portfile 2013-08-13 14:55:34 UTC (rev 109332)
@@ -2,11 +2,13 @@
# $Id$
PortSystem 1.0
-PortGroup select 1.0
+PortGroup select 1.0
+PortGroup wxwidgets 1.0
# temporary conflict to prevent wrong linking
PortGroup conflicts_build 1.0
name wxPython-3.0
+wxWidgets.use wxPython-3.0
# (temporary)
conflicts_build wxgtk wxWidgets wxWidgets-python wxWidgets30 wxWidgets-devel
version 2.9.4.0
@@ -38,8 +40,6 @@
checksums rmd160 35e823d9161dc99083f3025383567000680e012f \
sha256 78c35c19e85a17cb9c730b86b49d6a479198d76d19e0b13e86db0b55707004be
-set installdir ${frameworks_dir}/wxWidgets.framework/Versions/${distname}/${branch}
-
depends_lib port:jpeg \
port:tiff \
port:libpng \
@@ -52,20 +52,10 @@
select.group wxWidgets
select.file ${filespath}/${name}
-if {${os.major} < 9} {
- pre-fetch {
- ui_error "${name} requires Mac OS X 10.5 or later."
- return -code error "incompatible Mac OS X version"
- }
-}
-
-pre-fetch {
- puts "branch: ${branch}"
-}
worksrcdir ${distname}-src-${version}/build
configure.cmd ../configure
-configure.args --prefix=${installdir} \
+configure.args --prefix=${wxWidgets.prefix} \
--with-libjpeg \
--with-libtiff \
--with-libpng \
@@ -81,13 +71,12 @@
--with-macosx-sdk=no \
--with-macosx-version-min=no
-# build.target
-
variant universal {
set archs [join ${configure.universal_archs} ,]
configure.args-append --enable-universal_binary=${archs}
}
+# TODO: what is this?
configure.ccache no
# variant monolithic description {build only one library} {
@@ -115,7 +104,7 @@
# libwx_baseu_xml-2.9.4.0.0.dylib and libwx_baseu-2.9.4.0.0.dylib
foreach {lib} "libwx_baseu_xml-${version}.0.dylib and libwx_baseu-${version}.0.dylib" {
- system "install_name_tool -change ${build.dir}/lib/${lib} ${installdir}/lib/${lib} ${build.dir}/utils/wxrc/wxrc"
+ system "install_name_tool -change ${build.dir}/lib/${lib} ${wxWidgets.prefix}/lib/${lib} ${build.dir}/utils/wxrc/wxrc"
}
}
@@ -129,8 +118,8 @@
# changes.txt gpl.txt lgpl.txt licence.txt preamble.txt readme.txt \
# osx/install.txt osx/readme.txt
# ${destroot}${prefix}/share/doc/${name}
- set confscript ${installdir}/lib/wx/config/osx_cocoa-unicode-${branch}
- ln -sf ${confscript} ${destroot}${installdir}/bin/wx-config
+ set confscript ${wxWidgets.prefix}/lib/wx/config/osx_cocoa-unicode-${branch}
+ ln -sf ${confscript} ${destroot}${wxWidgets.prefix}/bin/wx-config
}
livecheck.type regex
Modified: users/mojca/wxports/graphics/wxWidgets-2.8/Portfile
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-2.8/Portfile 2013-08-13 12:20:00 UTC (rev 109331)
+++ users/mojca/wxports/graphics/wxWidgets-2.8/Portfile 2013-08-13 14:55:34 UTC (rev 109332)
@@ -3,8 +3,9 @@
PortSystem 1.0
PortGroup active_variants 1.1
-PortGroup archcheck 1.0
-PortGroup select 1.0
+PortGroup archcheck 1.0
+PortGroup select 1.0
+PortGroup wxwidgets 1.0
# temporary conflict to prevent wrong linking
PortGroup conflicts_build 1.0
@@ -40,17 +41,20 @@
checksums rmd160 928e221abe1a00cd2d72d2a4fd3640ba639b9915 \
sha256 3b0ac1d2d017683851841501c8e1b744b97242d684a1668ded61809b0504f707
-set installname ${distname}
-set wxtype mac
+subport wxgtk-2.8 {}
-subport wxgtk-2.8 {
+if {$subport == $name || $subport == ""} {
+ wxWidgets.use wxWidgets-2.8
+ set installname wxWidgets
+ set wxtype mac
+} else {
+ wxWidgets.use wxGTK-2.8
set installname wxGTK
set wxtype gtk2
}
+set installtype release
+set contrib "gizmos stc ogl"
-# TODO: put this into PortGroup
-set installdir ${frameworks_dir}/wxWidgets.framework/Versions/${installname}/${branch}
-
depends_lib port:jpeg \
port:tiff \
port:libpng \
@@ -82,16 +86,8 @@
reinplace "s|@@PREFIX@@|${prefix}|g" ${workpath}/${distname}-${version}/configure
}
-compiler.blacklist clang
-
-set contrib "gizmos stc ogl"
-set installtype release
-
-set conf_sdk "no"
-set conf_macosx_version_min "no"
-
configure.cmd ../configure
-configure.args --prefix=${installdir} \
+configure.args --prefix=${wxWidgets.prefix} \
--with-mac \
--with-libiconv-prefix=${prefix} \
--with-libjpeg \
@@ -104,10 +100,33 @@
--enable-unicode \
--enable-display \
--enable-graphics_ctx \
- --with-macosx-sdk=${conf_sdk} \
- --with-macosx-version-min=${conf_macosx_version_min} \
--enable-universal_binary
+if {${wxWidgets.sdk} == ""} {
+ configure.args-append --with-macosx-sdk=no \
+ --with-macosx-version-min=no
+} else {
+ configure.args-append --with-macosx-sdk=${wxWidgets.sdk} \
+ --with-macosx-version-min=${wxWidgets.macosx_version_min}
+}
+
+if {$subport != $name && $subport != ""} {
+ depends_lib-append port:cairo \
+ port:gtk2 \
+ port:mesa \
+ port:freeglut \
+ path:lib/pkgconfig/sdl.pc:libsdl \
+ port:libsdl_mixer
+
+ require_active_variants cairo x11
+ require_active_variants gtk2 x11
+
+ configure.args-delete --with-mac \
+ --without-sdl
+ configure.args-append --with-gtk \
+ --with-sdl
+}
+
post-build {
foreach c { ${contrib} } {
system "cd ${build.dir} && make -C contrib/src/${c}"
@@ -119,14 +138,14 @@
system "cd ${build.dir} && make -C contrib/src/${c} install ${destroot.destdir}"
}
- set destdocdir ${destroot}${installdir}/share/doc/${distname}
+ set destdocdir ${destroot}${wxWidgets.prefix}/share/doc/${distname}
xinstall -d -m 755 ${destdocdir}
xinstall -m 644 -W ${workpath}/${distname}-${version} \
install-mac.txt readme-mac.txt \
install-gtk.txt readme-gtk.txt ${destdocdir}
- set confscript ${installdir}/lib/wx/config/${wxtype}-unicode-${installtype}-2.8
- ln -sf ${confscript} ${destroot}${installdir}/bin/wx-config
+ set confscript ${wxWidgets.prefix}/lib/wx/config/${wxtype}-unicode-${installtype}-2.8
+ ln -sf ${confscript} ${destroot}${wxWidgets.prefix}/bin/wx-config
}
variant aui description {add support for AUI docking library} {
@@ -142,44 +161,6 @@
set installtype debug
}
-if {$subport == $name || $subport == ""} {
- supported_archs i386 ppc
- use_parallel_build no
- # SDK
- 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 wxWidgets-3.0 or wxgtk-2.8 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"
- }
- }
- }
-} else {
- depends_lib-append port:cairo \
- port:gtk2 \
- port:mesa \
- port:freeglut \
- path:lib/pkgconfig/sdl.pc:libsdl \
- port:libsdl_mixer
-
- require_active_variants cairo x11
- require_active_variants gtk2 x11
-
- configure.args-delete --with-mac \
- --without-sdl
- configure.args-append --with-gtk \
- --with-sdl
-}
-
livecheck.type regex
livecheck.url ${homepage}/downloads/
livecheck.regex Current Stable Release.*(2\\.\[0-9\]\\.\[0-9\]+)
Modified: users/mojca/wxports/graphics/wxWidgets-3.0/Portfile
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-3.0/Portfile 2013-08-13 12:20:00 UTC (rev 109331)
+++ users/mojca/wxports/graphics/wxWidgets-3.0/Portfile 2013-08-13 14:55:34 UTC (rev 109332)
@@ -2,11 +2,13 @@
# $Id$
PortSystem 1.0
-PortGroup select 1.0
+PortGroup select 1.0
+PortGroup wxwidgets 1.0
# temporary conflict to prevent wrong linking
PortGroup conflicts_build 1.0
name wxWidgets-3.0
+wxWidgets.use wxWidgets-3.0
# (temporary)
conflicts_build wxgtk wxWidgets wxWidgets-python wxWidgets30 wxWidgets-devel
version 2.9.5
@@ -38,9 +40,6 @@
checksums rmd160 f5c91099b2cf3e39eadbcf99df0dd9a97017d47f \
sha256 b74ba96ca537cc5d049d21ec9ab5eb2670406a4aa9f1ea4845ea84a9955a6e02
-# TODO: put this into PortGroup
-set installdir ${frameworks_dir}/wxWidgets.framework/Versions/${distname}/${branch}
-
depends_lib port:jpeg \
port:tiff \
port:libpng \
@@ -53,13 +52,6 @@
select.group wxWidgets
select.file ${filespath}/${name}
-if {${os.major} < 9} {
- pre-fetch {
- ui_error "${name} requires Mac OS X 10.5 or later."
- return -code error "incompatible Mac OS X version"
- }
-}
-
set worksrcdir ${distname}-${version}/build
extract.only ${distname}-${version}${extract.suffix}
@@ -68,7 +60,7 @@
patchfiles patch-configure-change_install_names.diff
configure.cmd ../configure
-configure.args --prefix=${installdir} \
+configure.args --prefix=${wxWidgets.prefix} \
--with-libiconv-prefix=${prefix} \
--with-libjpeg \
--with-libtiff \
@@ -85,8 +77,6 @@
--with-macosx-sdk=no \
--with-macosx-version-min=no
-# use_parallel_build no
-
variant universal {
set archs [join ${configure.universal_archs} ,]
configure.args-append --enable-universal_binary=${archs}
@@ -96,8 +86,8 @@
configure.ccache no
post-destroot {
- set confscript ${installdir}/lib/wx/config/osx_cocoa-unicode-${branch}
- ln -sf ${confscript} ${destroot}${installdir}/bin/wx-config
+ set confscript ${wxWidgets.prefix}/lib/wx/config/osx_cocoa-unicode-${branch}
+ ln -sf ${confscript} ${destroot}${wxWidgets.prefix}/bin/wx-config
}
variant monolithic description {build only one library} {
Modified: users/mojca/wxports/python/py-wxpython-2.8/Portfile
===================================================================
--- users/mojca/wxports/python/py-wxpython-2.8/Portfile 2013-08-13 12:20:00 UTC (rev 109331)
+++ users/mojca/wxports/python/py-wxpython-2.8/Portfile 2013-08-13 14:55:34 UTC (rev 109332)
@@ -2,7 +2,8 @@
# $Id$
PortSystem 1.0
-PortGroup python 1.0
+PortGroup python 1.0
+PortGroup wxwidgets 1.0
name py-wxpython-2.8
version 2.8.12.1
@@ -34,18 +35,6 @@
python.versions 24 25 26 27
python.default_version 27
-# TODO: copy these variables from wxPython port or wxWidgets PortGroup
-set installdir ${frameworks_dir}/wxWidgets.framework/Versions/wxWidgets/${branch}
-set confscript ${installdir}/bin/wx-config
-
-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"
- }
-}
-
-
distfiles ${distname}-src-${version}${extract.suffix}
dist_subdir ${distname}/${version}
worksrcdir ${distname}-src-${version}/wxPython
@@ -54,8 +43,9 @@
extract.post_args "| tar -xf - ${worksrcdir} ${distname}-src-${version}/docs"
if {$subport != $name} {
+ # TODO: a variant for wxgtk-2.8
+ wxWidgets.use wxWidgets-2.8
depends_lib-append port:wxWidgets-2.8
- supported_archs i386 ppc
patchfiles patch-config.py.diff
@@ -68,8 +58,8 @@
}
# TODO: is it possible to use build arguments instead of redefining the whole command?
- build.cmd ${python.bin} setup.py WX_CONFIG="${confscript}"
- destroot.cmd ${python.bin} setup.py WX_CONFIG="${confscript}"
+ build.cmd ${python.bin} setup.py WX_CONFIG="${wxWidgets.wxconfig}"
+ destroot.cmd ${python.bin} setup.py WX_CONFIG="${wxWidgets.wxconfig}"
livecheck.type none
} else {
Modified: users/mojca/wxports/python/py-wxpython-3.0/Portfile
===================================================================
--- users/mojca/wxports/python/py-wxpython-3.0/Portfile 2013-08-13 12:20:00 UTC (rev 109331)
+++ users/mojca/wxports/python/py-wxpython-3.0/Portfile 2013-08-13 14:55:34 UTC (rev 109332)
@@ -2,7 +2,8 @@
# $Id$
PortSystem 1.0
-PortGroup python 1.0
+PortGroup python 1.0
+PortGroup wxwidgets 1.0
name py-wxpython-3.0
version 2.9.4.0
@@ -34,17 +35,6 @@
python.versions 24 25 26 27
python.default_version 27
-# TODO: copy these variables from wxPython port or wxWidgets PortGroup
-set installdir ${frameworks_dir}/wxWidgets.framework/Versions/${distname}/${branch}
-set confscript ${installdir}/bin/wx-config
-
-if {${os.major} < 9} {
- pre-fetch {
- ui_error "${name} requires Mac OS X 10.5 or later."
- return -code error "incompatible Mac OS X version"
- }
-}
-
distfiles ${distname}-src-${version}${extract.suffix}
dist_subdir ${distname}/${version}
worksrcdir ${distname}-src-${version}/wxPython
@@ -53,13 +43,14 @@
extract.post_args "| tar -xf - ${worksrcdir} ${distname}-src-${version}/docs"
if {$subport != $name} {
+ wxWidgets.use wxPython-3.0
depends_lib-append port:wxPython-3.0
patchfiles patch-config.py.diff
# TODO: is it possible to use build arguments instead of redefining the whole command?
- build.cmd ${python.bin} setup.py WX_CONFIG="${confscript}"
- destroot.cmd ${python.bin} setup.py WX_CONFIG="${confscript}"
+ build.cmd ${python.bin} setup.py WX_CONFIG="${wxWidgets.wxconfig}"
+ destroot.cmd ${python.bin} setup.py WX_CONFIG="${wxWidgets.wxconfig}"
livecheck.type none
} else {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130813/34f3131a/attachment-0001.html>
More information about the macports-changes
mailing list