Hello community,
here is the log from the commit of package ghc-hslua for openSUSE:Factory checked in at 2015-04-10 09:52:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-hslua (Old)
and /work/SRC/openSUSE:Factory/.ghc-hslua.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-hslua"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-hslua/ghc-hslua.changes 2014-04-02 17:19:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-hslua.new/ghc-hslua.changes 2015-04-10 09:52:03.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Apr 7 16:55:39 UTC 2015 - peter.trommler@ohm-hochschule.de
+
+- update to 0.3.9
+- drop include-lua_neutralize_longjmp.patch
+* fixed upstream
+
+-------------------------------------------------------------------
Old:
----
hslua-0.3.7.tar.gz
include-lua_neutralize_longjmp.patch
New:
----
hslua-0.3.9.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-hslua.spec ++++++
--- /var/tmp/diff_new_pack.YjPHDh/_old 2015-04-10 09:52:03.000000000 +0200
+++ /var/tmp/diff_new_pack.YjPHDh/_new 2015-04-10 09:52:03.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-hslua
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,19 +15,17 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-
%global pkg_name hslua
Name: ghc-hslua
-Version: 0.3.7
+Version: 0.3.9
Release: 0
Summary: A Lua language interpreter embedding in Haskell
-License: MIT
Group: System/Libraries
+License: MIT
Url: http://hackage.haskell.org/package/%{pkg_name}
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
-Patch1: include-lua_neutralize_longjmp.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ghc-Cabal-devel
@@ -35,7 +33,6 @@
# Begin cabal-rpm deps:
BuildRequires: ghc-mtl-devel
# End cabal-rpm deps
-
%if 0%{?sles_version}
BuildRequires: lua-devel
%else
@@ -52,8 +49,10 @@
Summary: Haskell %{pkg_name} library development files
Group: Development/Libraries/Other
Provides: %{name}-static = %{version}-%{release}
-Requires: %{name} = %{version}-%{release}
Requires: ghc-compiler = %{ghc_version}
+Requires(post): ghc-compiler = %{ghc_version}
+Requires(postun): ghc-compiler = %{ghc_version}
+Requires: %{name} = %{version}-%{release}
%if 0%{?sles_version}
Requires: lua-devel
%else
@@ -66,26 +65,32 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-%patch1 -p1
+
%build
%define cabal_configure_options -f system-lua
%ghc_lib_build
+
%install
%ghc_lib_install
+
%post devel
%ghc_pkg_recache
+
%postun devel
%ghc_pkg_recache
+
%files -f %{name}.files
%defattr(-,root,root,-)
%doc COPYRIGHT
+
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+
%changelog
++++++ hslua-0.3.7.tar.gz -> hslua-0.3.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-0.3.7/cbits/ntrljmp.c new/hslua-0.3.9/cbits/ntrljmp.c
--- old/hslua-0.3.7/cbits/ntrljmp.c 1970-01-01 01:00:00.000000000 +0100
+++ new/hslua-0.3.9/cbits/ntrljmp.c 2013-11-25 22:39:30.000000000 +0100
@@ -0,0 +1,22 @@
+/*
+** See Copyright Notice in lua.h
+*/
+
+#include
+#include
+
+#define luac_c
+#define LUA_CORE
+
+#include "lua.h"
+
+extern int hsmethod__call( lua_State *state );
+
+LUAI_FUNC int lua_neutralize_longjmp( lua_State *state )
+{
+ int result;
+ result = hsmethod__call(state);
+ if( result <0 )
+ return lua_error(state);
+ return result;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-0.3.7/hslua.cabal new/hslua-0.3.9/hslua.cabal
--- old/hslua-0.3.7/hslua.cabal 2013-10-05 13:24:23.000000000 +0200
+++ new/hslua-0.3.9/hslua.cabal 2013-11-25 22:39:30.000000000 +0100
@@ -1,8 +1,8 @@
Name: hslua
-Version: 0.3.7
+Version: 0.3.9
Stability: beta
-Cabal-version: >= 1.6
-License: BSD3
+Cabal-version: >= 1.8
+License: MIT
Build-type: Simple
License-File: COPYRIGHT
Copyright: 2007-2012, Gracjan Polak
@@ -22,15 +22,17 @@
location: https://github.com/osa1/hslua.git
flag system-lua
- description: Use the system-wide lua instead of the bundled copy
- default: False
+ description: Use the system-wide lua instead of the bundled copy
+ default: False
Library
Build-depends: base==4.*, mtl >= 2.1
Exposed-modules: Scripting.Lua, Scripting.Lua.ConfigFile
Hs-source-dirs: src
if flag(system-lua)
- Pkgconfig-depends: lua
+ Pkgconfig-depends: lua
+ C-sources: cbits/ntrljmp.c
+ Include-dirs: cbits
else
C-sources: src/lapi.c, src/lauxlib.c, src/lbaselib.c, src/lcode.c,
src/ldblib.c, src/ldebug.c, src/ldo.c, src/ldump.c, src/lfunc.c,
@@ -38,8 +40,8 @@
src/lmem.c, src/loadlib.c, src/lobject.c, src/lopcodes.c,
src/loslib.c, src/lparser.c, src/lstate.c, src/lstring.c,
src/lstrlib.c, src/ltable.c, src/ltablib.c, src/ltm.c,
- src/lundump.c, src/lvm.c, src/lzio.c, src/ntrljmp.c
- Include-dirs: src
+ src/lundump.c, src/lvm.c, src/lzio.c, cbits/ntrljmp.c
+ Include-dirs: src, cbits
if os(linux)
CC-Options: "-DLUA_USE_LINUX"
@@ -49,3 +51,9 @@
if os(freebsd)
CC-Options: "-DLUA_USE_POSIX"
+
+Test-Suite simple-test
+ type: exitcode-stdio-1.0
+ Hs-source-dirs: test
+ main-is: simple-test.hs
+ Build-depends: base, hslua
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-0.3.7/src/Scripting/Lua/ConfigFile.hs new/hslua-0.3.9/src/Scripting/Lua/ConfigFile.hs
--- old/hslua-0.3.7/src/Scripting/Lua/ConfigFile.hs 2013-10-05 13:24:23.000000000 +0200
+++ new/hslua-0.3.9/src/Scripting/Lua/ConfigFile.hs 2013-11-25 22:39:30.000000000 +0100
@@ -55,7 +55,7 @@
openConfig path = do
l <- Lua.newstate
loadResult <- Lua.loadfile l path
- callResult <- Lua.call l 0 0
+ callResult <- Lua.pcall l 0 0 0
if loadResult /= 0 || callResult /= 0 then
do
errMsg <- Lua.tostring l (-1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-0.3.7/src/Scripting/Lua.hs new/hslua-0.3.9/src/Scripting/Lua.hs
--- old/hslua-0.3.7/src/Scripting/Lua.hs 2013-10-05 13:24:23.000000000 +0200
+++ new/hslua-0.3.9/src/Scripting/Lua.hs 2013-11-25 22:39:30.000000000 +0100
@@ -530,8 +530,8 @@
-- | See @lua_call@ and @lua_call@ in Lua Reference Manual. This is
-- a wrapper over @lua_pcall@, as @lua_call@ is unsafe in controlled environment
-- like Haskell VM.
-call :: LuaState -> Int -> Int -> IO Int
-call l a b = liftM fromIntegral (c_lua_pcall l (fromIntegral a) (fromIntegral b) 0)
+call :: LuaState -> Int -> Int -> IO ()
+call l a b = c_lua_call l (fromIntegral a) (fromIntegral b)
-- | See @lua_pcall@ in Lua Reference Manual.
pcall :: LuaState -> Int -> Int -> Int -> IO Int
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-0.3.7/src/ntrljmp.c new/hslua-0.3.9/src/ntrljmp.c
--- old/hslua-0.3.7/src/ntrljmp.c 2013-10-05 13:24:23.000000000 +0200
+++ new/hslua-0.3.9/src/ntrljmp.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-/*
-** See Copyright Notice in lua.h
-*/
-
-#include
-#include
-
-#define luac_c
-#define LUA_CORE
-
-#include "ldebug.h"
-#include "lobject.h"
-#include "lopcodes.h"
-#include "lundump.h"
-
-extern int hsmethod__call( lua_State *state );
-
-LUAI_FUNC int lua_neutralize_longjmp( lua_State *state )
-{
- int result;
- result = hsmethod__call(state);
- if( result <0 )
- return lua_error(state);
- return result;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-0.3.7/src/ntrljmp.h new/hslua-0.3.9/src/ntrljmp.h
--- old/hslua-0.3.7/src/ntrljmp.h 2013-10-05 13:24:23.000000000 +0200
+++ new/hslua-0.3.9/src/ntrljmp.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-/*
-** Lua virtual machine
-** See Copyright Notice in lua.h
-*/
-
-#ifndef lvm_h
-#define lvm_h
-
-
-#define luac_c
-#define LUA_CORE
-
-#include "lua.h"
-#include "lobject.h"
-#include "ltm.h"
-
-LUAI_FUNC int lua_neutralize_longjmp(lua_State *state);
-
-#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-0.3.7/test/simple-test.hs new/hslua-0.3.9/test/simple-test.hs
--- old/hslua-0.3.7/test/simple-test.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/hslua-0.3.9/test/simple-test.hs 2013-11-25 22:39:30.000000000 +0100
@@ -0,0 +1,8 @@
+import qualified Scripting.Lua as Lua
+
+main :: IO ()
+main = do
+ l <- Lua.newstate
+ Lua.openlibs l
+ Lua.callproc l "print" "Hello from Lua"
+ Lua.close l