From 14cf641de28e101228ea9c398ce7d1d49ad26d6cf22cc1de33aa88a304b173f0 Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Sun, 24 Jul 2016 07:46:57 +0000 Subject: [PATCH] Accepting request 412755 from home:Mailaender:branches:devel:languages:lua Required for ZeroBraneStudio and a Lua IDE itself. You may need to osc linkpac X11:wxWidgets/wxstedit OBS-URL: https://build.opensuse.org/request/show/412755 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/wxlua?expand=0&rev=1 --- .gitattributes | 23 ++++++ .gitignore | 1 + _disabled_service | 15 ++++ wxlstate.patch | 14 ++++ wxlua-2.8.12.3.r252.tar.bz2 | 3 + wxlua.changes | 10 +++ wxlua.spec | 145 ++++++++++++++++++++++++++++++++++++ 7 files changed, 211 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _disabled_service create mode 100644 wxlstate.patch create mode 100644 wxlua-2.8.12.3.r252.tar.bz2 create mode 100644 wxlua.changes create mode 100644 wxlua.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_disabled_service b/_disabled_service new file mode 100644 index 0000000..fed8c9b --- /dev/null +++ b/_disabled_service @@ -0,0 +1,15 @@ + + + + svn://svn.code.sf.net/p/wxlua/svn/trunk/wxLua + svn + 2.8.12.3 + r%r + wxlua + + + + *.tar + bz2 + + diff --git a/wxlstate.patch b/wxlstate.patch new file mode 100644 index 0000000..5542a58 --- /dev/null +++ b/wxlstate.patch @@ -0,0 +1,14 @@ +Index: modules/wxlua/wxlstate.cpp +=================================================================== +--- modules/wxlua/wxlstate.cpp (revision 251) ++++ modules/wxlua/wxlstate.cpp (working copy) +@@ -404,6 +404,9 @@ + if ((m_lua_State == NULL) || m_wxlStateData->m_is_closing || m_lua_State_coroutine) + return true; + ++ if (lua_status(m_lua_State) != 0) ++ return true; ++ + m_wxlStateData->m_is_closing = true; + + //wxCHECK_MSG(m_lua_State, false, wxT("Interpreter not created")); diff --git a/wxlua-2.8.12.3.r252.tar.bz2 b/wxlua-2.8.12.3.r252.tar.bz2 new file mode 100644 index 0000000..031797a --- /dev/null +++ b/wxlua-2.8.12.3.r252.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf4e29dc28b0364b706b6e998921845db97f99c8e5104c0f505aa6dc2443aa2e +size 2968167 diff --git a/wxlua.changes b/wxlua.changes new file mode 100644 index 0000000..6814c29 --- /dev/null +++ b/wxlua.changes @@ -0,0 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 21 21:45:14 UTC 2016 - mailaender@opensuse.org + +- install shared library and MIME files + +------------------------------------------------------------------- +Thu Jul 21 07:56:21 UTC 2016 - mailaender@opensuse.org + +- initial packaging for openSUSE + diff --git a/wxlua.spec b/wxlua.spec new file mode 100644 index 0000000..910cbb6 --- /dev/null +++ b/wxlua.spec @@ -0,0 +1,145 @@ +# +# spec file for package wxlua +# +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: wxlua +Version: 2.8.12.3.r252 +Release: 0 +Summary: Lua IDE with a GUI debugger and binding generator +License: SUSE-wxWidgets-3.1 +Group: Development/Languages/Other +Url: http://wxlua.sourceforge.net/ +Source: %{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM https://sourceforge.net/p/wxlua/bugs/36/ +Patch0: wxlstate.patch +BuildRequires: cmake >= 2.8.3 +BuildRequires: desktop-file-utils +BuildRequires: hicolor-icon-theme +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(glu) +BuildRequires: lua51-devel +BuildRequires: wxWidgets-devel >= 3 +BuildRequires: ncurses-devel +BuildRequires: readline-devel +BuildRequires: doxygen +%if 0%{?suse_version} > 1320 +BuildRequires: cppcheck +%endif + +%description +This package contains Integrated Development Environments (IDE, written in +wxLua) with a GUI debugger, a binding generator and wxWidgets bindings usable +as a module. + +%package -n lib%{name} +Summary: Set of Lua bindings to the C++ wxWidgets cross-platform GUI library +Group: System/Libraries + +%description -n lib%{name} +wxLua is a set of bindings to the C++ wxWidgets cross-platform GUI library for +the Lua programming language. Nearly all of the functionality of wxWidgets is +exposed to Lua, meaning that your programs can have windows, dialogs, menus, +toolbars, controls, image loading and saving, drawing, sockets, streams, +printing, clipboard access... and much more. + +%package devel +Summary: Development files of lib%{name} +Group: Development/Languages/C and C++ +Requires: lib%{name} = %{version} + +%description devel +This package contains files to be used in your C++ programs to embed a Lua +interpreter with the wxWidgets API. + +%prep +%setup -q +%patch0 -p0 +sed -r -i 's|LIBRARY DESTINATION .*$|LIBRARY DESTINATION %{_lib}|' CMakeLists.txt + +%build +%cmake \ + -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-config \ + -DwxLua_LUA_LIBRARY_BUILD_SHARED=TRUE \ + -DwxLua_LUA_LIBRARY_USE_BUILTIN=FALSE \ + -DwxLua_LUA_LIBRARY_VERSION=5.1 \ + -DwxLua_LUA_INCLUDE_DIR=%{_includedir} \ + -DwxLua_LUA_LIBRARY=%{_libdir}/liblua.so.5.1 \ + -DBUILD_SHARED_LIBS=TRUE \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo +make %{?_smp_mflags} + +%install +%{cmake_install} + +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ +install -p art/wxlualogo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ +chmod -x %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/wxlualogo.svg + +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/ +install -p art/wxlualogo.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/ + +mkdir -p %{buildroot}%{_datadir}/applications/ +install -p distrib/autopackage/%{name}.desktop %{buildroot}%{_datadir}/applications/ +sed -r -i "s|wxluaedit|wxLuaEdit|" %{buildroot}%{_datadir}/applications/%{name}.desktop +sed -r -i "s|wxlualogo.xpm|wxlualogo|" %{buildroot}%{_datadir}/applications/%{name}.desktop +desktop-file-install --dir %{buildroot}%{_datadir}/applications \ + --remove-category=Application \ + --add-category=IDE \ + %{buildroot}%{_datadir}/applications/%{name}.desktop + +install -Dm644 distrib/autopackage/wxlua.xml %{buildroot}%{_datadir}/mime/packages/wxlua.xml + +# packaged in separate package wxstedit +rm -rf %{buildroot}%{_datadir}/wxstedit +rm -rf %{buildroot}%{_datadir}/wxStEdit +rm -rf %{buildroot}%{_includedir}/wx/stedit/ +rm -rf %{buildroot}%{_prefix}/lib/libwxstedit*.so + +mkdir -p %{buildroot}%{_libdir}/lua/5.1/ +mv %{buildroot}%{_libdir}/libwx.so %{buildroot}%{_libdir}/lua/5.1/wx.so + +%post +%desktop_database_post +%icon_theme_cache_post +%mime_database_post + +%postun +%desktop_database_postun +%icon_theme_cache_postun +%mime_database_postun + +%post -n lib%{name} -p /sbin/ldconfig +%postun -n lib%{name} -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/* +%{_datadir}/applications/*.desktop +%{_datadir}/icons/hicolor/*/apps/* +%{_datadir}/mime/packages/wxlua.xml + +%files -n lib%{name} +%defattr(-,root,root) +%{_libdir}/lua/5.1/wx.so +%{_libdir}/libwxlua*.so + +%files devel +%defattr(-,root,root) +%{_includedir}/%{name} +%{_datadir}/wxlua/ + +%changelog