[109145] users/mojca/wxports
mojca at macports.org
mojca at macports.org
Thu Aug 8 10:29:59 PDT 2013
Revision: 109145
https://trac.macports.org/changeset/109145
Author: mojca at macports.org
Date: 2013-08-08 10:29:59 -0700 (Thu, 08 Aug 2013)
Log Message:
-----------
mojca/wxPython: first attempt
Added Paths:
-----------
users/mojca/wxports/graphics/wxPython-3.0/
users/mojca/wxports/graphics/wxPython-3.0/Portfile
users/mojca/wxports/graphics/wxPython-3.0/files/
users/mojca/wxports/graphics/wxPython-3.0/files/wxPython-3.0
users/mojca/wxports/python/
users/mojca/wxports/python/py-wxpython-3.0/
users/mojca/wxports/python/py-wxpython-3.0/Portfile
users/mojca/wxports/python/py-wxpython-3.0/files/
users/mojca/wxports/python/py-wxpython-3.0/files/patch-config.py.diff
Added: users/mojca/wxports/graphics/wxPython-3.0/Portfile
===================================================================
--- users/mojca/wxports/graphics/wxPython-3.0/Portfile (rev 0)
+++ users/mojca/wxports/graphics/wxPython-3.0/Portfile 2013-08-08 17:29:59 UTC (rev 109145)
@@ -0,0 +1,129 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2
+# $Id: $
+
+PortSystem 1.0
+PortGroup select 1.0
+
+name wxPython-3.0
+version 2.9.4.0
+categories graphics devel
+license wxwidgets-3.1
+platforms darwin
+maintainers jwa mojca
+
+description Python interface to the wxWindows cross platform GUI
+long_description wxPython is a GUI toolkit for the Python programming \
+ language. It allows Python programmers to create \
+ programs with a robust, highly functional graphical \
+ user interface, simply and easily. It is implemented \
+ as a Python extension module (native code) that wraps \
+ the popular wxWindows cross platform GUI library, \
+ which is written in C++.
+
+homepage http://www.wxpython.org/
+master_sites sourceforge:wxpython
+
+distname wxPython
+use_bzip2 yes
+
+distfiles ${distname}-src-${version}${extract.suffix}
+dist_subdir ${distname}/${version}
+
+checksums rmd160 35e823d9161dc99083f3025383567000680e012f \
+ sha256 78c35c19e85a17cb9c730b86b49d6a479198d76d19e0b13e86db0b55707004be
+
+set installdir ${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9
+set confscript_orig ${installdir}/lib/wx/config/osx_cocoa-unicode-2.9
+set confscript ${installdir}/bin/wx-config
+
+depends_lib port:jpeg \
+ port:tiff \
+ port:libpng \
+ port:zlib \
+ port:libiconv \
+ port:expat
+
+depends_run port:wxWidgets_select
+
+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"
+ }
+}
+
+worksrcdir ${distname}-src-${version}/build
+configure.cmd ../configure
+
+configure.args --prefix=${installdir} \
+ --with-libjpeg \
+ --with-libtiff \
+ --with-libpng \
+ --with-zlib \
+ --with-opengl \
+ --with-cocoa \
+ --without-sdl \
+ --disable-sdltest \
+ --enable-unicode \
+ --enable-display \
+ --enable-xrc \
+ --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}
+}
+
+configure.ccache no
+
+# variant monolithic description {build only one library} {
+# configure.args-append --enable-monolithic
+# }
+
+variant debug description {add debug info to libraries} {
+ configure.args-append --enable-debug
+}
+
+# variant stdlib description {add support for various standard library features} {
+# configure.args-append --enable-stl \
+# --enable-std_containers \
+# --enable-std_iostreams \
+# --enable-std_string \
+# --enable-std_string_conv_in_wxstring
+# }
+#
+# variant aui description {add support for AUI docking library} {
+# configure.args-append --enable-aui
+# }
+
+post-build {
+ # TODO: bug; try to figure out why this linking problem happens instead of just fixing it
+ # 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"
+ }
+}
+
+post-destroot {
+ # foreach c { ${contrib} } {
+ # system "cd ${build.dir} && make -C contrib/src/${c} install ${destroot.destdir}"
+ # }
+ ## TODO
+ # xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
+ # xinstall -m 644 -W ${workpath}/${distname}-${version} \
+ # changes.txt gpl.txt lgpl.txt licence.txt preamble.txt readme.txt \
+ # osx/install.txt osx/readme.txt
+ # ${destroot}${prefix}/share/doc/${name}
+ ln -sf ${confscript_orig} ${destroot}${confscript}
+}
+
+livecheck.type regex
+livecheck.url ${homepage}
+livecheck.regex wxPython(?: | \\(classic\\) )(2\\.\[0-9\]+\\.\[0-9\]+\\.\[0-9\]+)
Added: users/mojca/wxports/graphics/wxPython-3.0/files/wxPython-3.0
===================================================================
--- users/mojca/wxports/graphics/wxPython-3.0/files/wxPython-3.0 (rev 0)
+++ users/mojca/wxports/graphics/wxPython-3.0/files/wxPython-3.0 2013-08-08 17:29:59 UTC (rev 109145)
@@ -0,0 +1,8 @@
+${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9/bin/wx-config
+${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9/bin/wxrc-2.9
+${frameworks_dir}/share/aclocal/wxwin.m4
+${frameworks_dir}/share/bakefile/presets/wx.bkl
+${frameworks_dir}/share/bakefile/presets/wx_presets.py
+${frameworks_dir}/share/bakefile/presets/wx_unix.bkl
+${frameworks_dir}/share/bakefile/presets/wx_win32.bkl
+${frameworks_dir}/share/bakefile/presets/wx_xrc.bkl
Added: users/mojca/wxports/python/py-wxpython-3.0/Portfile
===================================================================
--- users/mojca/wxports/python/py-wxpython-3.0/Portfile (rev 0)
+++ users/mojca/wxports/python/py-wxpython-3.0/Portfile 2013-08-08 17:29:59 UTC (rev 109145)
@@ -0,0 +1,83 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2
+# $Id: $
+
+PortSystem 1.0
+PortGroup python 1.0
+
+name py-wxpython-3.0
+version 2.9.4.0
+categories graphics devel
+license wxwidgets-3.1
+platforms darwin
+maintainers jwa mojca
+
+description Python interface to the wxWindows cross platform GUI
+long_description wxPython is a GUI toolkit for the Python programming \
+ language. It allows Python programmers to create \
+ programs with a robust, highly functional graphical \
+ user interface, simply and easily. It is implemented \
+ as a Python extension module (native code) that wraps \
+ the popular wxWindows cross platform GUI library, \
+ which is written in C++.
+
+homepage http://www.wxpython.org/
+master_sites sourceforge:wxpython
+
+distname wxPython
+use_bzip2 yes
+
+checksums rmd160 35e823d9161dc99083f3025383567000680e012f \
+ sha256 78c35c19e85a17cb9c730b86b49d6a479198d76d19e0b13e86db0b55707004be
+
+# TODO: there is no need to provide all of these; at the moment this is just for testing
+python.versions 24 25 26 27
+#python.default_version 27
+
+# TODO: number 2.9 should be automatic based on version
+# copy these variables from wxPython port or wxWidgets PortGroup
+set installdir ${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9
+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
+
+# extract just the docs and wxPython subdir
+extract.post_args "| tar -xf - ${worksrcdir} ${distname}-src-${version}/docs"
+
+# TODO: please check why
+# universal_variant no
+
+# from the old port, doesn't work for me
+# build.env UNICODE="1" WXPORT="osx_cocoa" PATH="${installdir}/lib/wx/config:$env(PATH)"
+# destroot.env UNICODE="1" WXPORT="osx_cocoa" PATH="${installdir}/lib/wx/config:$env(PATH)"
+
+
+if {$subport != $name} {
+ 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}"
+
+ livecheck.type none
+} else {
+ post-destroot {
+ xinstall -d -m 755 ${destroot}${prefix}/share/doc/
+ file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name}
+ file copy ${worksrcpath}/samples ${destroot}${prefix}/share/doc/${name}/examples
+ }
+
+ livecheck.type regex
+ livecheck.url ${homepage}
+ livecheck.regex wxPython(?: | \\(classic\\) )(2\\.\[0-9\]+\\.\[0-9\]+\\.\[0-9\]+)
+}
Added: users/mojca/wxports/python/py-wxpython-3.0/files/patch-config.py.diff
===================================================================
--- users/mojca/wxports/python/py-wxpython-3.0/files/patch-config.py.diff (rev 0)
+++ users/mojca/wxports/python/py-wxpython-3.0/files/patch-config.py.diff 2013-08-08 17:29:59 UTC (rev 109145)
@@ -0,0 +1,11 @@
+--- config.py.orig
++++ config.py
+@@ -248,7 +248,7 @@ cleaning = 'clean' in sys.argv
+
+ # change the PORT default for wxMac
+ if sys.platform[:6] == "darwin":
+- WXPORT = 'osx_carbon'
++ WXPORT = 'osx_cocoa'
+
+ # and do the same for wxMSW, just for consistency
+ if os.name == 'nt':
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130808/8791e5f0/attachment.html>
More information about the macports-changes
mailing list