Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] lua54-luarepl: fix cross compiled binary
@ 2025-01-02 14:46 AnInternetTroll
  2025-01-04 14:03 ` [PR REVIEW] " sgn
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: AnInternetTroll @ 2025-01-02 14:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 945 bytes --]

There is a new pull request by AnInternetTroll against master on the void-packages repository

https://github.com/AnInternetTroll/void-packages user/luca/lua-repl
https://github.com/void-linux/void-packages/pull/53811

lua54-luarepl: fix cross compiled binary
When cross compiling the path in /usr/bin/repl.lua contains the target
arch in the destdir path, which must be replaced differently than the
others.

Aside from that, added lua version to the package and sub packages
descriptions, as well as switched to vsed to catch this next time. And
move vlicense in _package.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl (crossbuilt)


A patch file from https://github.com/void-linux/void-packages/pull/53811.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-user/luca/lua-repl-53811.patch --]
[-- Type: text/x-diff, Size: 2589 bytes --]

From 2a4a3d8be6d8b02fe186e78887c0bbd71927c8c6 Mon Sep 17 00:00:00 2001
From: Luca Matei Pintilie <luca@lucamatei.com>
Date: Thu, 2 Jan 2025 15:41:55 +0100
Subject: [PATCH] lua54-luarepl: fix cross compiled binary

When cross compiling the path in /usr/bin/repl.lua contains the target
arch in the destdir path, which must be replaced differently than the
others.

Aside from that, added lua version to the package and sub packages
descriptions, as well as switched to vsed to catch this next time. And
move vlicense in _package.
---
 srcpkgs/lua54-luarepl/template | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/lua54-luarepl/template b/srcpkgs/lua54-luarepl/template
index 643516e90e62e6..072de6fa2469b9 100644
--- a/srcpkgs/lua54-luarepl/template
+++ b/srcpkgs/lua54-luarepl/template
@@ -1,11 +1,12 @@
 # Template file for 'lua54-luarepl'
 pkgname=lua54-luarepl
 version=0.10
-revision=1
+revision=2
 build_style=meta
 hostmakedepends="lua51 lua52 lua53 lua54 luarocks-lua54"
 depends="lua54"
-short_desc="Reusable REPL component for Lua, written in Lua"
+_desc="Reusable REPL component for Lua, written in Lua"
+short_desc="${_desc} (5.4.x)"
 maintainer="Luciogi <githubvoidlinux.supremacy429@passinbox.com>"
 license="MIT"
 homepage="https://github.com/hoelzro/lua-repl"
@@ -17,37 +18,40 @@ _rocksrel=1
 _package() {
 	luarocks --lua-version="$1" --tree="${PKGDESTDIR}/usr/" \
 		make --deps-mode=none --no-manifest "${_rockname}-${version}-${_rocksrel}.rockspec"
-		echo /destdir/${pkgname}-${version}
-		sed -i -e "s|/destdir/${pkgname}-${version}||" "${PKGDESTDIR}/usr/bin/rep.lua"
+		if [ "$CROSS_BUILD" ]; then
+			vsed -i "${PKGDESTDIR}/usr/bin/rep.lua" -e "s|/destdir/${XBPS_CROSS_TRIPLET}/${pkgname}-${version}||g"
+		else
+			vsed -i "${PKGDESTDIR}/usr/bin/rep.lua" -e "s|/destdir/${pkgname}-${version}||g"
+		fi
 		mv "${PKGDESTDIR}/usr/bin/rep.lua" "${PKGDESTDIR}/usr/bin/rep.lua${1/./}"
+		vlicense COPYING
 }
 
 do_install() {
 	_package 5.4
-	sed -i -e "s|lua5\.3|lua5\.4|" "${PKGDESTDIR}/usr/bin/rep.lua54"
-	vlicense COPYING
+	vsed -i "${PKGDESTDIR}/usr/bin/rep.lua54" -e "s|lua5\.3|lua5\.4|"
 }
 
 lua53-luarepl_package() {
 	depends="lua53"
+	short_desc="${_desc} (5.3.x)"
 	pkg_install() {
 		_package 5.3
-		vlicense COPYING
 	}
 }
 
 lua52-luarepl_package() {
 	depends="lua52"
+	short_desc="${_desc} (5.2.x)"
 	pkg_install() {
 		_package 5.2
-		vlicense COPYING
 	}
 }
 
 lua51-luarepl_package() {
 	depends="lua51"
+	short_desc="${_desc} (5.1.x)"
 	pkg_install() {
 		_package 5.1
-		vlicense COPYING
 	}
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-05 15:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-02 14:46 [PR PATCH] lua54-luarepl: fix cross compiled binary AnInternetTroll
2025-01-04 14:03 ` [PR REVIEW] " sgn
2025-01-04 14:04 ` [PR PATCH] [Updated] " sgn
2025-01-04 15:01 ` AnInternetTroll
2025-01-04 15:02 ` [PR REVIEW] " AnInternetTroll
2025-01-05 15:44 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).