From 9ff49b6cae5ca738d5eef46fc368db4ada8c72fd Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Mon, 30 Sep 2024 20:33:51 +0200 Subject: [PATCH] lua: fix .pc file and rename importlib to just liblua The pc target in the make file is bogus, use the template from Arch (or parts of it). And don't include the version in the import lib to keep things simple. --- lua/PKGBUILD | 22 ++++++++++++---------- lua/lua.pc | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 lua/lua.pc diff --git a/lua/PKGBUILD b/lua/PKGBUILD index d9f446780ef..52d487c24c7 100644 --- a/lua/PKGBUILD +++ b/lua/PKGBUILD @@ -3,21 +3,27 @@ pkgname=lua pkgver=5.4.7 _majorver=${pkgver%.*} -pkgrel=1 +pkgrel=2 pkgdesc='Powerful lightweight programming language designed for extending applications' arch=('x86_64') url='https://www.lua.org/' makedepends=('make' 'gcc') license=('spdx:MIT') -source=(https://www.lua.org/ftp/lua-$pkgver.tar.gz) -sha256sums=('9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30') +source=(https://www.lua.org/ftp/lua-$pkgver.tar.gz + lua.pc) +sha256sums=('9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30' + '925fd82adde7e6a83a6f63531b7c21f5c5133436e8947aeaab0c707ef3972858') + +prepare() { + sed "s/%VER%/$_majorver/g;s/%REL%/$pkgver/g" lua.pc > lua-$pkgver/lua.pc +} build() { cd "lua-$pkgver" make \ CFLAGS="${CFLAGS}" \ - AR="${CC} -shared -Wl,--out-implib,liblua${_majorver}.dll.a -o" \ + AR="${CC} -shared -Wl,--out-implib,liblua.dll.a -o" \ RANLIB=: \ LUA_A="msys-lua-${_majorver}.dll" \ linux @@ -28,16 +34,12 @@ package() { make \ TO_BIN="msys-lua-${_majorver}.dll lua.exe luac.exe" \ - TO_LIB="liblua${_majorver}.dll.a" \ + TO_LIB="liblua.dll.a" \ INSTALL_TOP="$pkgdir"/usr \ INSTALL_INC="$pkgdir"/usr/include \ INSTALL_LIB="$pkgdir"/usr/lib \ INSTALL_MAN="$pkgdir"/usr/share/man/man1 \ install - mkdir -p "$pkgdir/usr/lib/pkgconfig" - make pc \ - INSTALL_TOP=/usr \ - INSTALL_INC=/usr/include \ - INSTALL_LIB=/usr/lib > "$pkgdir"/usr/lib/pkgconfig/lua.pc + install -Dm644 lua.pc "$pkgdir"/usr/lib/pkgconfig/lua.pc } diff --git a/lua/lua.pc b/lua/lua.pc new file mode 100644 index 00000000000..ca9cc551263 --- /dev/null +++ b/lua/lua.pc @@ -0,0 +1,14 @@ +V=%VER% +R=%REL% + +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Lua +Description: An Extensible Extension Language +Version: ${R} +Requires: +Libs: -L${libdir} -llua +Cflags: -I${includedir}