From e346b667728244c0e06f27c3a498be11d99570a7 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Jun 30 2020 19:53:24 +0000 Subject: fix build with lua 5.4 --- diff --git a/prosody-0.11.5-lua-5.4.patch b/prosody-0.11.5-lua-5.4.patch new file mode 100644 index 0000000..09c0804 --- /dev/null +++ b/prosody-0.11.5-lua-5.4.patch @@ -0,0 +1,43 @@ +diff -up prosody-0.11.5/configure.lua54 prosody-0.11.5/configure +--- prosody-0.11.5/configure.lua54 2020-06-30 15:47:57.575906862 -0400 ++++ prosody-0.11.5/configure 2020-06-30 15:50:52.970509696 -0400 +@@ -44,7 +44,7 @@ Configure $APP_NAME prior to building. + Default is \$PREFIX/lib + --datadir=DIR Location where the server data should be stored. + Default is \$PREFIX/var/lib/$APP_DIRNAME +---lua-version=VERSION Use specific Lua version: 5.1, 5.2, or 5.3 ++--lua-version=VERSION Use specific Lua version: 5.1, 5.2, 5.3, or 5.4 + Default is auto-detected. + --lua-suffix=SUFFIX Versioning suffix to use in Lua filenames. + Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...) +@@ -237,7 +237,7 @@ do + --lua-version|--with-lua-version) + [ -n "$value" ] || die "Missing value in flag $key." + LUA_VERSION="$value" +- [ "$LUA_VERSION" = "5.1" ] || [ "$LUA_VERSION" = "5.2" ] || [ "$LUA_VERSION" = "5.3" ] || die "Invalid Lua version in flag $key." ++ [ "$LUA_VERSION" = "5.1" ] || [ "$LUA_VERSION" = "5.2" ] || [ "$LUA_VERSION" = "5.3" ] || [ "$LUA_VERSION" = "5.4" ] || die "Invalid Lua version in flag $key." + LUA_VERSION_SET=yes + ;; + --with-lua) +@@ -340,7 +340,7 @@ then + fi + + detect_lua_version() { +- detected_lua=$("$1" -e 'print(_VERSION:match(" (5%.[123])$"))' 2> /dev/null) ++ detected_lua=$("$1" -e 'print(_VERSION:match(" (5%.[1234])$"))' 2> /dev/null) + if [ "$detected_lua" != "nil" ] + then + if [ "$LUA_VERSION_SET" != "yes" ] +@@ -403,8 +403,11 @@ then + elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.3" ] + then + suffixes="5.3 53 -5.3 -53" ++ elif [ "$LUA_VERSION_SET" = "yes" ] && [ "$LUA_VERSION" = "5.4" ] ++ then ++ suffixes="5.4 54 -5.4 -54" + else +- suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53" ++ suffixes="5.1 51 -5.1 -51 5.2 52 -5.2 -52 5.3 53 -5.3 -53 5.4 54 -5.4 -54" + fi + for suffix in "" $suffixes + do diff --git a/prosody.spec b/prosody.spec index cb32dca..f5f00b3 100644 --- a/prosody.spec +++ b/prosody.spec @@ -10,7 +10,7 @@ Summary: Flexible communications server for Jabber/XMPP Name: prosody Version: 0.11.5 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT URL: https://prosody.im/ Source0: https://prosody.im/downloads/source/%{name}-%{version}.tar.gz @@ -25,6 +25,7 @@ Source8: prosody-localhost.cfg.lua Source9: prosody-example.com.cfg.lua Patch0: prosody-0.11.0-config.patch Patch1: prosody-0.11.4-lua53.patch +Patch2: prosody-0.11.5-lua-5.4.patch BuildRequires: gcc, libidn-devel, openssl-devel BuildRequires: gnupg2 Requires: %{_bindir}/openssl @@ -67,6 +68,7 @@ gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} %setup -q %patch0 -p1 -b .config %patch1 -p1 -b .lua53 +%patch2 -p1 -b .lua54 %build ./configure \ @@ -214,6 +216,9 @@ fi %{_mandir}/man1/%{name}*.1* %changelog +* Tue Jun 30 2020 Tom Callaway - 0.11.5-3 +- fix build with lua 5.4 + * Tue Jun 30 2020 Björn Esser - 0.11.5-2 - Rebuilt for Lua 5.4