Github messages for voidlinux
 help / color / mirror / Atom feed
From: AnInternetTroll <AnInternetTroll@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] lua54-luarepl: fix cross compiled binary
Date: Thu, 02 Jan 2025 15:46:51 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-53811@inbox.vuxu.org> (raw)

[-- 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
 	}
 }

             reply	other threads:[~2025-01-02 14:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 14:46 AnInternetTroll [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-53811@inbox.vuxu.org \
    --to=aninternettroll@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).