Subject: [PATCH] Provide symlinks for lua's .pc files

From: Wolf <[email-masked]>
Date: Wed, 19 Feb 2020 01:04:43 +0100

Debian provides multiple aliases for lua's pkg-config package. In
interest of compatibility, we should do the same. This commit introduces
symlinks for lua53, lua-5.3, lua52 and lua-5.2 to match what debian
provides.
---
 main/lua5.2/APKBUILD | 6 +++++-
 main/lua5.3/APKBUILD | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/main/lua5.2/APKBUILD b/main/lua5.2/APKBUILD
index e5df917276..9f1464b354 100644
--- a/main/lua5.2/APKBUILD
+++ b/main/lua5.2/APKBUILD
@@ -119,7 +119,11 @@ Cflags: -I\${includedir}
 
 # (end of lua$_luaver.pc)
 EOF
-
+	# lua52.pc   -> lua5.2.pc
+	ln -s lua$_luaver.pc \
+		"$pkgdir"/usr/lib/pkgconfig/lua$(echo $_luaver | tr -d . ).pc
+	# lua-5.2.pc -> lua5.2.pc
+	ln -s lua$_luaver.pc "$pkgdir"/usr/lib/pkgconfig/lua-$_luaver.pc
 }
 
 dev() {
diff --git a/main/lua5.3/APKBUILD b/main/lua5.3/APKBUILD
index b1baf7b75a..6825dc68a6 100644
--- a/main/lua5.3/APKBUILD
+++ b/main/lua5.3/APKBUILD
@@ -120,7 +120,11 @@ package() {
 
 		# (end of lua$_luaver.pc)
 	EOF
-
+	# lua53.pc   -> lua5.3.pc
+	ln -s lua$_luaver.pc \
+		"$pkgdir"/usr/lib/pkgconfig/lua$(echo $_luaver | tr -d . ).pc
+	# lua-5.3.pc -> lua5.3.pc
+	ln -s lua$_luaver.pc "$pkgdir"/usr/lib/pkgconfig/lua-$_luaver.pc
 }
 
 dev() {
-- 
2.25.0