SHA256
10
0
forked from pool/lua-lua-ev

Accepting request 825743 from devel:languages:lua

- Currently tests fail, and they are temporarily ignored.

- Add lua54.patch to make package building with Lua 5.4
  (gh#brimworks/lua-ev#24).

- Add lua54 as new build target

OBS-URL: https://build.opensuse.org/request/show/825743
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lua-lua-ev?expand=0&rev=2
This commit is contained in:
2020-08-12 08:23:09 +00:00
committed by Git OBS Bridge
4 changed files with 48 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
<multibuild>
<package>lua51</package>
<package>lua53</package>
<package>lua54</package>
</multibuild>

View File

@@ -1,3 +1,19 @@
-------------------------------------------------------------------
Tue Aug 11 09:08:51 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Currently tests fail, and they are temporarily ignored.
-------------------------------------------------------------------
Thu Jul 9 14:17:16 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add lua54.patch to make package building with Lua 5.4
(gh#brimworks/lua-ev#24).
-------------------------------------------------------------------
Mon Jul 6 19:05:03 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add lua54 as new build target
-------------------------------------------------------------------
Sat Nov 2 18:01:04 CET 2019 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package lua-lua-ev
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2012 Togan Muftuoglu toganm@opensuse.org
#
# All modifications and additions to the file contributed by third parties
@@ -27,12 +27,16 @@ Version: 1.5
Release: 0
Summary: Lua integration with libev
License: MIT
Group: Development/Languages/Other
URL: https://github.com/brimworks/lua-ev
Source: https://github.com/brimworks/%{mod_name}/archive/v%{upversion}.tar.gz#/%{mod_name}-%{upversion}.tar.gz
# PATCH-FIX-UPSTREAM lua54.patch gh#brimworks/lua-ev#24 mcepl@suse.com
# Resolve FTBFS with Lua 5.4.
Patch0: lua54.patch
BuildRequires: %{flavor}-devel
BuildRequires: cmake
BuildRequires: libev-devel
BuildRequires: lua-macros
BuildRequires: %{flavor}-devel
# BuildRequires: %%{flavor}-luafilesystem
Requires: %{flavor}
%if "%{flavor}" == ""
@@ -73,6 +77,7 @@ project.
%prep
%setup -q -n %{mod_name}-%{upversion}
%autopatch -p1
# Remove bundled dependencies
rm -rf deps
@@ -83,7 +88,7 @@ rm -fv tests/test-dns.lua
%build
%if %{with public_lib}
# Build libev.so shared library
cmake -H. -Bbuild -DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \
cmake -H. -Bbuild -DCMAKE_C_FLAGS="%{optflags}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=OFF \
-DBUILD_SHARED_LIBS=ON
@@ -92,13 +97,12 @@ mv build/ev.so build/libev.so.%{libev_sover}
%endif
# Build ev.so module
cmake -H. -Bbuild -DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \
cmake -H. -Bbuild -DCMAKE_C_FLAGS="%{optflags}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=OFF \
-DBUILD_SHARED_LIBS=ON
-DBUILD_SHARED_LIBS=ON
( cd build ; make )
%install
install -v -D -m 0755 -p -t %{buildroot}%{lua_archdir} build/ev.so
%if %{with public_lib}
@@ -107,10 +111,9 @@ ln -sf libev.so.* %{buildroot}%{lua_archdir}/libev.so
%endif
install -v -D -m 0644 -p -t %{buildroot}%{lua_incdir}/%{mod_name} *.h
%check
cd build
make test
# %%make_build test
%files
%doc README example.lua

20
lua54.patch Normal file
View File

@@ -0,0 +1,20 @@
--- a/cmake/Modules/FindLua5X.cmake
+++ b/cmake/Modules/FindLua5X.cmake
@@ -2,7 +2,7 @@
find_path(LUA_INCLUDE_DIR lua.h
HINTS
$ENV{LUA_DIR}
- PATH_SUFFIXES include include/lua include/lua53 include/lua5.3 include/lua52 include/lua5.2 include/lua51 include/lua5.1
+ PATH_SUFFIXES include include/lua include/lua54 include/lua5.4 include/lua53 include/lua5.3 include/lua52 include/lua5.2 include/lua51 include/lua5.1
PATHS
~/Library/Frameworks
/Library/Frameworks
@@ -15,7 +15,7 @@ find_path(LUA_INCLUDE_DIR lua.h
)
find_library(LUA_LIBRARY
- NAMES lua lua53 lua5.3 lua52 lua5.2 lua-5.2 lua51 lua5.1 luajit-5.1 luajit51 luajit5.1
+ NAMES lua lua54 lua5.4 lua53 lua5.3 lua52 lua5.2 lua-5.2 lua51 lua5.1 luajit-5.1 luajit51 luajit5.1
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES lib64 lib