[110274] trunk/dports/graphics/wxLua/Portfile

mojca at macports.org mojca at macports.org
Thu Aug 29 06:15:32 PDT 2013


Revision: 110274
          https://trac.macports.org/changeset/110274
Author:   mojca at macports.org
Date:     2013-08-29 06:15:32 -0700 (Thu, 29 Aug 2013)
Log Message:
-----------
wxLua: emergency upgrade to wxWidgets 2.9 compatible version from SVN (#38375); please FIXME

Modified Paths:
--------------
    trunk/dports/graphics/wxLua/Portfile

Modified: trunk/dports/graphics/wxLua/Portfile
===================================================================
--- trunk/dports/graphics/wxLua/Portfile	2013-08-29 12:31:50 UTC (rev 110273)
+++ trunk/dports/graphics/wxLua/Portfile	2013-08-29 13:15:32 UTC (rev 110274)
@@ -2,10 +2,12 @@
 # $Id$
 
 PortSystem          1.0
+PortGroup           cmake 1.0
+PortGroup           wxWidgets 1.0
 
 name                wxLua
-version             2.8.7.0
-revision            1
+svn.revision        193
+version             2.8.12.3_r${svn.revision}
 categories          graphics devel
 platforms           darwin freebsd
 maintainers         afb
@@ -16,84 +18,90 @@
                     library for extending C++ programs with a fast, small, \
                     fully embeddable scripting language.
 
+# fetching sources from SVN because no sources seem to have been released recently,
+# but they are needed in order to work with wxWidgets 2.9.
+# There were only windows binaries. As soon as some recent version gets released,
+# fetching from SVN should stop.
 homepage            http://wxlua.sourceforge.net/
-master_sites        sourceforge:wxlua
-distname            ${name}-${version}-src
 
-checksums           md5 d342db617eb63e69232ef13ba96c678a \
-                    sha1 94b9b80d6a08cd358093d7ae117a151e7167dc6b \
-                    rmd160 0f699cf4e462d8ed934b29795a684dc593a57691
+## this could work if the project would release any files recently, but the files are too old
+#master_sites       sourceforge:wxlua
+#distname           ${name}-${version}-src
+#
+## SVN repository (apparently not desirable to use)
+fetch.type          svn
+svn.url             svn://svn.code.sf.net/p/wxlua/svn/trunk/${name}
+worksrcdir          ${name}
 
-depends_lib         port:wxstedit port:lua
+## temporary URL from SourceForge
+## (one needs to initiate the transfer manually first and it gets wiped out after a while;
+##  to make it worse checksums change after manually downloading the files again after a while)
+## https://sourceforge.net/p/wxlua/svn/${svn.revision}/tree/
+# master_sites        http://sourceforge.net/code-snapshots/svn/w/wx/wxlua/svn/
+# distname            wxlua-svn-${svn.revision}-trunk
+# use_zip             yes
+# worksrcdir          ${distname}/wxLua
 
-worksrcdir          wxLua
+wxWidgets.use       wxWidgets-3.0
 
-configure.args      --mandir=${prefix}/share/man \
-                    --with-wx-prefix=${prefix} \
-                    --enable-wxbindstc --enable-luamodule \
-                    --with-lua-prefix=${prefix} \
-                    --enable-wxluafreeze-app
+depends_lib         port:lua \
+                    port:readline \
+                    port:${wxWidgets.port}
 
-configure.ccache    no
+# port:wxstedit seems to be built in now, but the exact relationship is not clear
 
-post-destroot {
-    # these includes conflict with the "lua" port:
-    delete "${destroot}${prefix}/include/lauxlib.h"
-    delete "${destroot}${prefix}/include/lua.h"
-    delete "${destroot}${prefix}/include/luaconf.h"
-    delete "${destroot}${prefix}/include/lualib.h"
-}
+# TODO: not sure how to translate these options from the previous version of the port
+#
+# configure.args      --mandir=${prefix}/share/man \
+#                     --with-wx-prefix=${prefix} \
+#                     --enable-wxbindstc --enable-luamodule \
+#                     --with-lua-prefix=${prefix} \
+#                     --enable-wxluafreeze-app
 
-platform macosx {}
-if { ([variant_isset macosx] || ([info exists os.subplatform] && ${os.subplatform} == "macosx")) && ![variant_isset x11] } {
-    default_variants +aqua
-} else {
-    default_variants +x11
-}
+configure.args-append \
+                    -DwxWidgets_CONFIG_EXECUTABLE=${wxWidgets.wxconfig} \
+                    -DwxLua_LUA_LIBRARY_BUILD_SHARED=OFF \
+                    -DwxLua_LUA_LIBRARY_USE_BUILTIN=ON \
+                    -DwxLua_LUA_LIBRARY_VERSION=5.2
 
-if { ([variant_isset macosx] || ([info exists os.subplatform] && ${os.subplatform} == "macosx")) } {
-    variant aqua conflicts x11 description "Use the wxMac port of wxWidgets" {
+# TODO: there is no FindLua52.cmake, but FindLua51 finds the right includes & libraries,
+#       except that it then fails to compile; when using the builtin lua,
+#       we need to delete lua afterwards
 
-        depends_lib-append  port:wxWidgets
-        # wxWidgets does not build 64-bit
-        supported_archs i386 ppc
+#                   -DwxLua_LUA_INCLUDE_DIR=${prefix}/include \
+#                   -DwxLua_LUA_LIBRARY=${prefix}/lib/liblua.dylib \
+#                   -DLUA_INCLUDE_DIR=${prefix}/include \
+#                   -DLUA_LIBRARIES=${prefix}/lib/liblua.dylib \
+#                   -DLUA_LIBRARY=${prefix}/lib/liblua.dylib
 
-        post-destroot {
-            set appPath ${applications_dir}/wxLua
-            xinstall -d -m 0755 ${destroot}${appPath}
+post-destroot {
+    xinstall -d -m 0755 ${destroot}${applications_dir}
+    # TODO: - wxLuaFreeze isn't really working as an app
+    foreach {app} {wxLua wxLuaCan wxLuaEdit wxLuaFreeze} {
+        move "${destroot}${prefix}/bin/${app}.app" ${destroot}${applications_dir}
+    }
 
-            # for wxMac, we delete the programs and use bundles
-            delete "${destroot}${prefix}/bin/wxlua"
-            delete "${destroot}${prefix}/bin/wxluacan"
-            delete "${destroot}${prefix}/bin/wxluaedit"
-            delete "${destroot}${prefix}/bin/wxluafreeze"
-            copy "${worksrcpath}/apps/wxLua.app" "${destroot}${appPath}"
-            copy "${worksrcpath}/apps/wxLuaCan.app" "${destroot}${appPath}"
-            copy "${worksrcpath}/apps/wxLuaEdit.app" "${destroot}${appPath}"
-            copy "${worksrcpath}/apps/wxLuaFreeze.app" "${destroot}${appPath}"
+    # these files need to be deleted if wxstedit remains a separate port
+    xinstall -d -m 0755 ${destroot}${prefix}/share/wxstedit
+    move ${destroot}${prefix}/doc/wxStEdit ${destroot}${prefix}/share/wxstedit/doc
+    delete ${destroot}${prefix}/doc
 
-            # provide a symbolic link to the wxLua sample programs
-            ln -sf "${prefix}/share/wxlua/samples" "${destroot}${appPath}/Samples"
-
-            # set up a wrapper so that you can call "wxlua *.wx.lua"
-            xinstall -m 0755 "${filespath}/wxlua.sh" "${destroot}${prefix}/bin/wxlua"
-            # set up a wrapper so that you can call "wxluaedit" too
-            xinstall -m 0755 "${filespath}/wxluaedit.sh" "${destroot}${prefix}/bin/wxluaedit"
-
-            # remove some stuff that is unused with wxMac port
-            delete "${destroot}${prefix}/share/applications/wxlua.desktop"
-            delete "${destroot}${prefix}/share/mime/packages/wxlua.xml"
-            delete "${destroot}${prefix}/share/pixmaps/wxlualogo.xpm"
-        }
-    }
+    # make sure that there is no bin/lua & bin/luac distributed
+    delete ${destroot}${prefix}/bin/lua
+    delete ${destroot}${prefix}/bin/luac
 }
 
-variant x11 description "Use the wxGTK port of wxWidgets" {
-    # wxgtk is not universal
-    universal_variant   no
+# TODO: if still needed ...
+#
+# post-destroot {
+#     # provide a symbolic link to the wxLua sample programs
+#     ln -sf "${prefix}/share/wxlua/samples" "${destroot}${appPath}/Samples"
+# 
+#     # set up a wrapper so that you can call "wxlua *.wx.lua"
+#     xinstall -m 0755 "${filespath}/wxlua.sh" "${destroot}${prefix}/bin/wxlua"
+#     # set up a wrapper so that you can call "wxluaedit" too
+#     xinstall -m 0755 "${filespath}/wxluaedit.sh" "${destroot}${prefix}/bin/wxluaedit"
+# }
 
-    depends_lib-append  port:wxgtk
-}
-
 livecheck.type      sourceforge
 livecheck.name      wxlua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130829/f1e38540/attachment.html>


More information about the macports-changes mailing list