Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] schilytools: fix cross
@ 2023-11-12  3:48 classabbyamp
  2023-11-12  3:49 ` classabbyamp
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: classabbyamp @ 2023-11-12  3:48 UTC (permalink / raw)
  To: ml

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

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

https://github.com/classabbyamp/void-packages schily-cross
https://github.com/void-linux/void-packages/pull/47169

schilytools: fix cross
also clean up template and move siconv tables back into cdrtools, as they are only used there

#### Testing the changes
- I tested the changes in this PR: **YES** (on aarch64-musl)


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-schily-cross-47169.patch --]
[-- Type: text/x-diff, Size: 6369 bytes --]

From dae72ac308d7b82aecc1a76b083726cab5b58204 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 11 Nov 2023 20:23:31 -0500
Subject: [PATCH] schilytools: fix cross

also clean up template and move siconv tables back into cdrtools, as
they are only used there
---
 srcpkgs/schilytools/template | 107 ++++++++++++++++++++---------------
 1 file changed, 62 insertions(+), 45 deletions(-)

diff --git a/srcpkgs/schilytools/template b/srcpkgs/schilytools/template
index 6daa18cf88d10..7ef74de3cea19 100644
--- a/srcpkgs/schilytools/template
+++ b/srcpkgs/schilytools/template
@@ -1,63 +1,97 @@
 # Template file for 'schilytools'
 pkgname=schilytools
 version=2023.09.28
-revision=2
+revision=3
+build_style=meta
+build_helper="qemu"
 makedepends="acl-devel attr-devel e2fsprogs-devel libcap-progs m4"
-depends="sccs sdd sfind smake star ved"
+depends="sccs sdd sfind smake star ved cdrtools"
 short_desc="Schily's portable tools"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CDDL-1.0"
 homepage="https://codeberg.org/schilytools/schilytools"
 distfiles="https://codeberg.org/schilytools/schilytools/archive/${version//./-}.tar.gz"
-checksum=564ea2365876a53eba02f184c565016399aee188c26d862589906cf3f92198e6
-nocross=yes  # configure + re-builds with itself
+checksum=c813cc19a320f8d3b5d82f5b1ca6a93ab1bb5f4c50f86fdac58101fe472d2143
+
+_common_flags=(ARCH="${XBPS_TARGET_MACHINE%-musl}" GMAKE_NOWARN=true INS_BASE=/usr)
+
+post_patch() {
+	vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
+}
 
 do_build() {
-	make ${makejobs} CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
-	make ${makejobs} -C ved CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
-	make -C sccs clean
-	make -C sccs CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr/libexec/sccs
+	local _flags=("${makejobs}" "${_common_flags[@]}" CC="$CC" CCC="$CXX" COPTX="$CFLAGS" LDOPTX="$LDFLAGS")
+	if [ "$CROSS_BUILD" ]; then
+		export CONFIG_RMTCALL="/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
+	fi
+
+	make "${_flags[@]}"
+
+	# sccs has a special INS_BASE
+	make -C sccs clean "${_flags[@]}"
+	make -C sccs "${_flags[@]}" INS_BASE=/usr/libexec/sccs
+
+	for d in ved sdd sfind smake star btcflash cdda2wav cdrecord mkisofs mkisofs/diag \
+	 readcd rscsi scgcheck scgskeleton; do
+		make -C "$d" clean "${_flags[@]}"
+		make -C "$d" "${_flags[@]}"
+	done
 }
 
-do_install() {
-	make install -C libsiconv/tables DESTDIR="$DESTDIR" INS_BASE=/usr
-	vlicense CDDL.Schily.txt
+cdrtools_package() {
+	depends="libcap-progs"
+	short_desc+=" - cdrtools"
+	conf_files="/etc/default/rscsi /etc/default/cdrecord"
+	pkg_install() {
+		for d in btcflash cdda2wav cdrecord libsiconv/tables mkisofs mkisofs/diag readcd rscsi \
+		 scgcheck scgskeleton; do
+			make install -C "$d" DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
+		done
+		rm -rf "${PKGDESTDIR}"/usr/lib/profiled
+		vmkdir usr/lib/modules-load.d
+		echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
+		vlicense CDDL.Schily.txt
+	}
 }
 
 sccs_package() {
 	short_desc+=" - SCCS"
 	pkg_install() {
-		make install -C sccs DESTDIR="$PKGDESTDIR" INS_BASE=/usr/libexec/sccs
+		make install -C sccs DESTDIR="$PKGDESTDIR" "${_common_flags[@]}" INS_BASE=/usr/libexec/sccs
 		vmkdir usr/bin
 		vmkdir usr/share
-		rm -f ${PKGDESTDIR}/usr/libexec/sccs/share/man/man?/[!s]*
-		mv ${PKGDESTDIR}/usr/libexec/sccs/share/man ${PKGDESTDIR}/usr/share
-		rm -rf ${PKGDESTDIR}/usr/libexec/sccs/bin
-		ln -sfr ${PKGDESTDIR}/usr/libexec/sccs/ccs/bin/sccs ${PKGDESTDIR}/usr/bin/sccs
+		rm -f "${PKGDESTDIR}"/usr/libexec/sccs/share/man/man?/[!s]*
+		mv "${PKGDESTDIR}"/usr/libexec/sccs/share/man "${PKGDESTDIR}"/usr/share
+		rm -rf "${PKGDESTDIR}"/usr/libexec/sccs/bin
+		ln -sfr "${PKGDESTDIR}"/usr/libexec/sccs/ccs/bin/sccs "${PKGDESTDIR}"/usr/bin/sccs
 		vlicense CDDL.Schily.txt
 	}
 }
+
 sdd_package() {
 	short_desc+=" - sdd"
 	pkg_install() {
-		make install -C sdd DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C sdd DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 sfind_package() {
 	short_desc+=" - sfind"
 	pkg_install() {
-		make install -C sfind DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C sfind DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 smake_package() {
 	short_desc+=" - smake"
 	pkg_install() {
-		make install -C smake DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C smake DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 star_package() {
 	short_desc+=" - star"
 	conf_files="/etc/default/star"
@@ -66,38 +100,21 @@ star_package() {
 	 pax:pax.1:/usr/share/man/man1/spax.1
 	"
 	pkg_install() {
-		make install -C star DESTDIR="$PKGDESTDIR" INS_BASE=/usr SYMLINKS='suntar scpio spax'
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/ustar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/*[!1]
-		rm -f ${PKGDESTDIR}/usr/share/man/man5/*[!5]
-		rm -rf ${PKGDESTDIR}/usr/share/doc/
+		make install -C star DESTDIR="$PKGDESTDIR" SYMLINKS='suntar scpio spax' "${_common_flags[@]}"
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/ustar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/*[!1]
+		rm -f "${PKGDESTDIR}"/usr/share/man/man5/*[!5]
+		rm -rf "${PKGDESTDIR}"/usr/share/doc/
 		vlicense CDDL.Schily.txt
 	}
 }
+
 ved_package() {
 	short_desc+=" - ved"
 	pkg_install() {
-		make install -C ved DESTDIR="$PKGDESTDIR" INS_BASE=/usr
-		vlicense CDDL.Schily.txt
-	}
-}
-
-cdrtools_package() {
-	depends="schilytools libcap-progs"
-	short_desc+=" - cdrtools"
-	conf_files="/etc/default/rscsi /etc/default/cdrecord"
-	pkg_install() {
-		vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
-		for d in btcflash cdda2wav cdrecord mkisofs mkisofs/diag readcd rscsi \
-			scgcheck scgskeleton; do
-			make install -C "$d" DESTDIR="$PKGDESTDIR" INS_BASE=/usr \
-				CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" LDPATH= RUNPATH=
-		done
-		rm -rf "${PKGDESTDIR}"/usr/lib/profiled
-		vmkdir usr/lib/modules-load.d
-		echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
+		make install -C ved DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }

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

* Re: schilytools: fix cross
  2023-11-12  3:48 [PR PATCH] schilytools: fix cross classabbyamp
@ 2023-11-12  3:49 ` classabbyamp
  2023-11-12  4:19 ` [PR PATCH] [Updated] " classabbyamp
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-11-12  3:49 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/47169#issuecomment-1806992260

Comment:
@leahneukirchen 

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

* Re: [PR PATCH] [Updated] schilytools: fix cross
  2023-11-12  3:48 [PR PATCH] schilytools: fix cross classabbyamp
  2023-11-12  3:49 ` classabbyamp
@ 2023-11-12  4:19 ` classabbyamp
  2023-11-12  4:35 ` classabbyamp
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-11-12  4:19 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages schily-cross
https://github.com/void-linux/void-packages/pull/47169

schilytools: fix cross
also clean up template and move siconv tables back into cdrtools, as they are only used there

#### Testing the changes
- I tested the changes in this PR: **YES** (on aarch64-musl)


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-schily-cross-47169.patch --]
[-- Type: text/x-diff, Size: 7141 bytes --]

From dae72ac308d7b82aecc1a76b083726cab5b58204 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 11 Nov 2023 20:23:31 -0500
Subject: [PATCH 1/2] schilytools: fix cross

also clean up template and move siconv tables back into cdrtools, as
they are only used there
---
 srcpkgs/schilytools/template | 107 ++++++++++++++++++++---------------
 1 file changed, 62 insertions(+), 45 deletions(-)

diff --git a/srcpkgs/schilytools/template b/srcpkgs/schilytools/template
index 6daa18cf88d10..7ef74de3cea19 100644
--- a/srcpkgs/schilytools/template
+++ b/srcpkgs/schilytools/template
@@ -1,63 +1,97 @@
 # Template file for 'schilytools'
 pkgname=schilytools
 version=2023.09.28
-revision=2
+revision=3
+build_style=meta
+build_helper="qemu"
 makedepends="acl-devel attr-devel e2fsprogs-devel libcap-progs m4"
-depends="sccs sdd sfind smake star ved"
+depends="sccs sdd sfind smake star ved cdrtools"
 short_desc="Schily's portable tools"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CDDL-1.0"
 homepage="https://codeberg.org/schilytools/schilytools"
 distfiles="https://codeberg.org/schilytools/schilytools/archive/${version//./-}.tar.gz"
-checksum=564ea2365876a53eba02f184c565016399aee188c26d862589906cf3f92198e6
-nocross=yes  # configure + re-builds with itself
+checksum=c813cc19a320f8d3b5d82f5b1ca6a93ab1bb5f4c50f86fdac58101fe472d2143
+
+_common_flags=(ARCH="${XBPS_TARGET_MACHINE%-musl}" GMAKE_NOWARN=true INS_BASE=/usr)
+
+post_patch() {
+	vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
+}
 
 do_build() {
-	make ${makejobs} CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
-	make ${makejobs} -C ved CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
-	make -C sccs clean
-	make -C sccs CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr/libexec/sccs
+	local _flags=("${makejobs}" "${_common_flags[@]}" CC="$CC" CCC="$CXX" COPTX="$CFLAGS" LDOPTX="$LDFLAGS")
+	if [ "$CROSS_BUILD" ]; then
+		export CONFIG_RMTCALL="/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
+	fi
+
+	make "${_flags[@]}"
+
+	# sccs has a special INS_BASE
+	make -C sccs clean "${_flags[@]}"
+	make -C sccs "${_flags[@]}" INS_BASE=/usr/libexec/sccs
+
+	for d in ved sdd sfind smake star btcflash cdda2wav cdrecord mkisofs mkisofs/diag \
+	 readcd rscsi scgcheck scgskeleton; do
+		make -C "$d" clean "${_flags[@]}"
+		make -C "$d" "${_flags[@]}"
+	done
 }
 
-do_install() {
-	make install -C libsiconv/tables DESTDIR="$DESTDIR" INS_BASE=/usr
-	vlicense CDDL.Schily.txt
+cdrtools_package() {
+	depends="libcap-progs"
+	short_desc+=" - cdrtools"
+	conf_files="/etc/default/rscsi /etc/default/cdrecord"
+	pkg_install() {
+		for d in btcflash cdda2wav cdrecord libsiconv/tables mkisofs mkisofs/diag readcd rscsi \
+		 scgcheck scgskeleton; do
+			make install -C "$d" DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
+		done
+		rm -rf "${PKGDESTDIR}"/usr/lib/profiled
+		vmkdir usr/lib/modules-load.d
+		echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
+		vlicense CDDL.Schily.txt
+	}
 }
 
 sccs_package() {
 	short_desc+=" - SCCS"
 	pkg_install() {
-		make install -C sccs DESTDIR="$PKGDESTDIR" INS_BASE=/usr/libexec/sccs
+		make install -C sccs DESTDIR="$PKGDESTDIR" "${_common_flags[@]}" INS_BASE=/usr/libexec/sccs
 		vmkdir usr/bin
 		vmkdir usr/share
-		rm -f ${PKGDESTDIR}/usr/libexec/sccs/share/man/man?/[!s]*
-		mv ${PKGDESTDIR}/usr/libexec/sccs/share/man ${PKGDESTDIR}/usr/share
-		rm -rf ${PKGDESTDIR}/usr/libexec/sccs/bin
-		ln -sfr ${PKGDESTDIR}/usr/libexec/sccs/ccs/bin/sccs ${PKGDESTDIR}/usr/bin/sccs
+		rm -f "${PKGDESTDIR}"/usr/libexec/sccs/share/man/man?/[!s]*
+		mv "${PKGDESTDIR}"/usr/libexec/sccs/share/man "${PKGDESTDIR}"/usr/share
+		rm -rf "${PKGDESTDIR}"/usr/libexec/sccs/bin
+		ln -sfr "${PKGDESTDIR}"/usr/libexec/sccs/ccs/bin/sccs "${PKGDESTDIR}"/usr/bin/sccs
 		vlicense CDDL.Schily.txt
 	}
 }
+
 sdd_package() {
 	short_desc+=" - sdd"
 	pkg_install() {
-		make install -C sdd DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C sdd DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 sfind_package() {
 	short_desc+=" - sfind"
 	pkg_install() {
-		make install -C sfind DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C sfind DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 smake_package() {
 	short_desc+=" - smake"
 	pkg_install() {
-		make install -C smake DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C smake DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 star_package() {
 	short_desc+=" - star"
 	conf_files="/etc/default/star"
@@ -66,38 +100,21 @@ star_package() {
 	 pax:pax.1:/usr/share/man/man1/spax.1
 	"
 	pkg_install() {
-		make install -C star DESTDIR="$PKGDESTDIR" INS_BASE=/usr SYMLINKS='suntar scpio spax'
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/ustar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/*[!1]
-		rm -f ${PKGDESTDIR}/usr/share/man/man5/*[!5]
-		rm -rf ${PKGDESTDIR}/usr/share/doc/
+		make install -C star DESTDIR="$PKGDESTDIR" SYMLINKS='suntar scpio spax' "${_common_flags[@]}"
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/ustar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/*[!1]
+		rm -f "${PKGDESTDIR}"/usr/share/man/man5/*[!5]
+		rm -rf "${PKGDESTDIR}"/usr/share/doc/
 		vlicense CDDL.Schily.txt
 	}
 }
+
 ved_package() {
 	short_desc+=" - ved"
 	pkg_install() {
-		make install -C ved DESTDIR="$PKGDESTDIR" INS_BASE=/usr
-		vlicense CDDL.Schily.txt
-	}
-}
-
-cdrtools_package() {
-	depends="schilytools libcap-progs"
-	short_desc+=" - cdrtools"
-	conf_files="/etc/default/rscsi /etc/default/cdrecord"
-	pkg_install() {
-		vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
-		for d in btcflash cdda2wav cdrecord mkisofs mkisofs/diag readcd rscsi \
-			scgcheck scgskeleton; do
-			make install -C "$d" DESTDIR="$PKGDESTDIR" INS_BASE=/usr \
-				CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" LDPATH= RUNPATH=
-		done
-		rm -rf "${PKGDESTDIR}"/usr/lib/profiled
-		vmkdir usr/lib/modules-load.d
-		echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
+		make install -C ved DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }

From 531ae5bdc316a62b35c55f30175d0498019899bd Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 11 Nov 2023 23:19:45 -0500
Subject: [PATCH 2/2] fixup! schilytools: fix cross

---
 srcpkgs/schilytools/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/schilytools/template b/srcpkgs/schilytools/template
index 7ef74de3cea19..b3bb5efb2406f 100644
--- a/srcpkgs/schilytools/template
+++ b/srcpkgs/schilytools/template
@@ -23,6 +23,7 @@ do_build() {
 	local _flags=("${makejobs}" "${_common_flags[@]}" CC="$CC" CCC="$CXX" COPTX="$CFLAGS" LDOPTX="$LDFLAGS")
 	if [ "$CROSS_BUILD" ]; then
 		export CONFIG_RMTCALL="/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
+		export CONFIG_RMTHOST=dummy
 	fi
 
 	make "${_flags[@]}"

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

* Re: [PR PATCH] [Updated] schilytools: fix cross
  2023-11-12  3:48 [PR PATCH] schilytools: fix cross classabbyamp
  2023-11-12  3:49 ` classabbyamp
  2023-11-12  4:19 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-11-12  4:35 ` classabbyamp
  2023-11-12  4:39 ` classabbyamp
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-11-12  4:35 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages schily-cross
https://github.com/void-linux/void-packages/pull/47169

schilytools: fix cross
also clean up template and move siconv tables back into cdrtools, as they are only used there

#### Testing the changes
- I tested the changes in this PR: **YES** (on aarch64-musl)


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-schily-cross-47169.patch --]
[-- Type: text/x-diff, Size: 7805 bytes --]

From dae72ac308d7b82aecc1a76b083726cab5b58204 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 11 Nov 2023 20:23:31 -0500
Subject: [PATCH 1/3] schilytools: fix cross

also clean up template and move siconv tables back into cdrtools, as
they are only used there
---
 srcpkgs/schilytools/template | 107 ++++++++++++++++++++---------------
 1 file changed, 62 insertions(+), 45 deletions(-)

diff --git a/srcpkgs/schilytools/template b/srcpkgs/schilytools/template
index 6daa18cf88d10..7ef74de3cea19 100644
--- a/srcpkgs/schilytools/template
+++ b/srcpkgs/schilytools/template
@@ -1,63 +1,97 @@
 # Template file for 'schilytools'
 pkgname=schilytools
 version=2023.09.28
-revision=2
+revision=3
+build_style=meta
+build_helper="qemu"
 makedepends="acl-devel attr-devel e2fsprogs-devel libcap-progs m4"
-depends="sccs sdd sfind smake star ved"
+depends="sccs sdd sfind smake star ved cdrtools"
 short_desc="Schily's portable tools"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CDDL-1.0"
 homepage="https://codeberg.org/schilytools/schilytools"
 distfiles="https://codeberg.org/schilytools/schilytools/archive/${version//./-}.tar.gz"
-checksum=564ea2365876a53eba02f184c565016399aee188c26d862589906cf3f92198e6
-nocross=yes  # configure + re-builds with itself
+checksum=c813cc19a320f8d3b5d82f5b1ca6a93ab1bb5f4c50f86fdac58101fe472d2143
+
+_common_flags=(ARCH="${XBPS_TARGET_MACHINE%-musl}" GMAKE_NOWARN=true INS_BASE=/usr)
+
+post_patch() {
+	vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
+}
 
 do_build() {
-	make ${makejobs} CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
-	make ${makejobs} -C ved CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
-	make -C sccs clean
-	make -C sccs CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr/libexec/sccs
+	local _flags=("${makejobs}" "${_common_flags[@]}" CC="$CC" CCC="$CXX" COPTX="$CFLAGS" LDOPTX="$LDFLAGS")
+	if [ "$CROSS_BUILD" ]; then
+		export CONFIG_RMTCALL="/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
+	fi
+
+	make "${_flags[@]}"
+
+	# sccs has a special INS_BASE
+	make -C sccs clean "${_flags[@]}"
+	make -C sccs "${_flags[@]}" INS_BASE=/usr/libexec/sccs
+
+	for d in ved sdd sfind smake star btcflash cdda2wav cdrecord mkisofs mkisofs/diag \
+	 readcd rscsi scgcheck scgskeleton; do
+		make -C "$d" clean "${_flags[@]}"
+		make -C "$d" "${_flags[@]}"
+	done
 }
 
-do_install() {
-	make install -C libsiconv/tables DESTDIR="$DESTDIR" INS_BASE=/usr
-	vlicense CDDL.Schily.txt
+cdrtools_package() {
+	depends="libcap-progs"
+	short_desc+=" - cdrtools"
+	conf_files="/etc/default/rscsi /etc/default/cdrecord"
+	pkg_install() {
+		for d in btcflash cdda2wav cdrecord libsiconv/tables mkisofs mkisofs/diag readcd rscsi \
+		 scgcheck scgskeleton; do
+			make install -C "$d" DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
+		done
+		rm -rf "${PKGDESTDIR}"/usr/lib/profiled
+		vmkdir usr/lib/modules-load.d
+		echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
+		vlicense CDDL.Schily.txt
+	}
 }
 
 sccs_package() {
 	short_desc+=" - SCCS"
 	pkg_install() {
-		make install -C sccs DESTDIR="$PKGDESTDIR" INS_BASE=/usr/libexec/sccs
+		make install -C sccs DESTDIR="$PKGDESTDIR" "${_common_flags[@]}" INS_BASE=/usr/libexec/sccs
 		vmkdir usr/bin
 		vmkdir usr/share
-		rm -f ${PKGDESTDIR}/usr/libexec/sccs/share/man/man?/[!s]*
-		mv ${PKGDESTDIR}/usr/libexec/sccs/share/man ${PKGDESTDIR}/usr/share
-		rm -rf ${PKGDESTDIR}/usr/libexec/sccs/bin
-		ln -sfr ${PKGDESTDIR}/usr/libexec/sccs/ccs/bin/sccs ${PKGDESTDIR}/usr/bin/sccs
+		rm -f "${PKGDESTDIR}"/usr/libexec/sccs/share/man/man?/[!s]*
+		mv "${PKGDESTDIR}"/usr/libexec/sccs/share/man "${PKGDESTDIR}"/usr/share
+		rm -rf "${PKGDESTDIR}"/usr/libexec/sccs/bin
+		ln -sfr "${PKGDESTDIR}"/usr/libexec/sccs/ccs/bin/sccs "${PKGDESTDIR}"/usr/bin/sccs
 		vlicense CDDL.Schily.txt
 	}
 }
+
 sdd_package() {
 	short_desc+=" - sdd"
 	pkg_install() {
-		make install -C sdd DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C sdd DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 sfind_package() {
 	short_desc+=" - sfind"
 	pkg_install() {
-		make install -C sfind DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C sfind DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 smake_package() {
 	short_desc+=" - smake"
 	pkg_install() {
-		make install -C smake DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C smake DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 star_package() {
 	short_desc+=" - star"
 	conf_files="/etc/default/star"
@@ -66,38 +100,21 @@ star_package() {
 	 pax:pax.1:/usr/share/man/man1/spax.1
 	"
 	pkg_install() {
-		make install -C star DESTDIR="$PKGDESTDIR" INS_BASE=/usr SYMLINKS='suntar scpio spax'
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/ustar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/*[!1]
-		rm -f ${PKGDESTDIR}/usr/share/man/man5/*[!5]
-		rm -rf ${PKGDESTDIR}/usr/share/doc/
+		make install -C star DESTDIR="$PKGDESTDIR" SYMLINKS='suntar scpio spax' "${_common_flags[@]}"
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/ustar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/*[!1]
+		rm -f "${PKGDESTDIR}"/usr/share/man/man5/*[!5]
+		rm -rf "${PKGDESTDIR}"/usr/share/doc/
 		vlicense CDDL.Schily.txt
 	}
 }
+
 ved_package() {
 	short_desc+=" - ved"
 	pkg_install() {
-		make install -C ved DESTDIR="$PKGDESTDIR" INS_BASE=/usr
-		vlicense CDDL.Schily.txt
-	}
-}
-
-cdrtools_package() {
-	depends="schilytools libcap-progs"
-	short_desc+=" - cdrtools"
-	conf_files="/etc/default/rscsi /etc/default/cdrecord"
-	pkg_install() {
-		vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
-		for d in btcflash cdda2wav cdrecord mkisofs mkisofs/diag readcd rscsi \
-			scgcheck scgskeleton; do
-			make install -C "$d" DESTDIR="$PKGDESTDIR" INS_BASE=/usr \
-				CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" LDPATH= RUNPATH=
-		done
-		rm -rf "${PKGDESTDIR}"/usr/lib/profiled
-		vmkdir usr/lib/modules-load.d
-		echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
+		make install -C ved DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }

From 531ae5bdc316a62b35c55f30175d0498019899bd Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 11 Nov 2023 23:19:45 -0500
Subject: [PATCH 2/3] fixup! schilytools: fix cross

---
 srcpkgs/schilytools/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/schilytools/template b/srcpkgs/schilytools/template
index 7ef74de3cea19..b3bb5efb2406f 100644
--- a/srcpkgs/schilytools/template
+++ b/srcpkgs/schilytools/template
@@ -23,6 +23,7 @@ do_build() {
 	local _flags=("${makejobs}" "${_common_flags[@]}" CC="$CC" CCC="$CXX" COPTX="$CFLAGS" LDOPTX="$LDFLAGS")
 	if [ "$CROSS_BUILD" ]; then
 		export CONFIG_RMTCALL="/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
+		export CONFIG_RMTHOST=dummy
 	fi
 
 	make "${_flags[@]}"

From d88a648e8e8e26eef0846632283f8cef216b2a0b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 11 Nov 2023 23:34:55 -0500
Subject: [PATCH 3/3] fixup! fixup! schilytools: fix cross

---
 srcpkgs/schilytools/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/schilytools/template b/srcpkgs/schilytools/template
index b3bb5efb2406f..93908fbf9d764 100644
--- a/srcpkgs/schilytools/template
+++ b/srcpkgs/schilytools/template
@@ -25,6 +25,7 @@ do_build() {
 		export CONFIG_RMTCALL="/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
 		export CONFIG_RMTHOST=dummy
 	fi
+	export MAKEPROG=gmake
 
 	make "${_flags[@]}"
 

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

* Re: schilytools: fix cross
  2023-11-12  3:48 [PR PATCH] schilytools: fix cross classabbyamp
                   ` (2 preceding siblings ...)
  2023-11-12  4:35 ` classabbyamp
@ 2023-11-12  4:39 ` classabbyamp
  2023-11-12 17:54 ` [PR PATCH] [Updated] " classabbyamp
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-11-12  4:39 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/47169#issuecomment-1807000683

Comment:
i guess it works locally because i have qemu binfmts. will try to fix it later

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

* Re: [PR PATCH] [Updated] schilytools: fix cross
  2023-11-12  3:48 [PR PATCH] schilytools: fix cross classabbyamp
                   ` (3 preceding siblings ...)
  2023-11-12  4:39 ` classabbyamp
@ 2023-11-12 17:54 ` classabbyamp
  2023-11-12 18:08 ` classabbyamp
  2023-11-12 22:00 ` [PR PATCH] [Merged]: " classabbyamp
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-11-12 17:54 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages schily-cross
https://github.com/void-linux/void-packages/pull/47169

schilytools: fix cross
also clean up template and move siconv tables back into cdrtools, as they are only used there

#### Testing the changes
- I tested the changes in this PR: **YES** (on aarch64-musl)


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-schily-cross-47169.patch --]
[-- Type: text/x-diff, Size: 6525 bytes --]

From eb5b92d783c76c71ecc51875dc8c7e2c07c2a99f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 11 Nov 2023 20:23:31 -0500
Subject: [PATCH] schilytools: fix cross

also clean up template and move siconv tables back into cdrtools, as
they are only used there
---
 srcpkgs/schilytools/template | 111 +++++++++++++++++++++--------------
 1 file changed, 66 insertions(+), 45 deletions(-)

diff --git a/srcpkgs/schilytools/template b/srcpkgs/schilytools/template
index 6daa18cf88d10..4d72b66926436 100644
--- a/srcpkgs/schilytools/template
+++ b/srcpkgs/schilytools/template
@@ -1,63 +1,101 @@
 # Template file for 'schilytools'
 pkgname=schilytools
 version=2023.09.28
-revision=2
+revision=3
+build_style=meta
+build_helper="qemu"
 makedepends="acl-devel attr-devel e2fsprogs-devel libcap-progs m4"
-depends="sccs sdd sfind smake star ved"
+depends="sccs sdd sfind smake star ved cdrtools"
 short_desc="Schily's portable tools"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CDDL-1.0"
 homepage="https://codeberg.org/schilytools/schilytools"
 distfiles="https://codeberg.org/schilytools/schilytools/archive/${version//./-}.tar.gz"
-checksum=564ea2365876a53eba02f184c565016399aee188c26d862589906cf3f92198e6
-nocross=yes  # configure + re-builds with itself
+checksum=c813cc19a320f8d3b5d82f5b1ca6a93ab1bb5f4c50f86fdac58101fe472d2143
+
+_common_flags=(ARCH="${XBPS_TARGET_MACHINE%-musl}" GMAKE_NOWARN=true INS_BASE=/usr)
+
+post_patch() {
+	vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
+}
 
 do_build() {
-	make ${makejobs} CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
-	make ${makejobs} -C ved CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
-	make -C sccs clean
-	make -C sccs CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr/libexec/sccs
+	local _flags=("${makejobs}" "${_common_flags[@]}" CC="$CC" CCC="$CXX" COPTX="$CFLAGS" LDOPTX="$LDFLAGS")
+	if [ "$CROSS_BUILD" ]; then
+		export CONFIG_RMTCALL="/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
+		export CONFIG_RMTHOST=dummy
+	fi
+
+	# build the bootstrap smake for host always
+	( cd psmake && CC="gcc" CC_OPT="-O2" CFLAGS="" LDFLAGS="" sh ./MAKE-all )
+
+	make "${_flags[@]}"
+
+	# sccs has a special INS_BASE
+	make -C sccs clean "${_flags[@]}"
+	make -C sccs "${_flags[@]}" INS_BASE=/usr/libexec/sccs
+
+	for d in ved sdd sfind smake star btcflash cdda2wav cdrecord mkisofs mkisofs/diag \
+	 readcd rscsi scgcheck scgskeleton; do
+		make -C "$d" clean "${_flags[@]}"
+		make -C "$d" "${_flags[@]}"
+	done
 }
 
-do_install() {
-	make install -C libsiconv/tables DESTDIR="$DESTDIR" INS_BASE=/usr
-	vlicense CDDL.Schily.txt
+cdrtools_package() {
+	depends="libcap-progs"
+	short_desc+=" - cdrtools"
+	conf_files="/etc/default/rscsi /etc/default/cdrecord"
+	pkg_install() {
+		for d in btcflash cdda2wav cdrecord libsiconv/tables mkisofs mkisofs/diag readcd rscsi \
+		 scgcheck scgskeleton; do
+			make install -C "$d" DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
+		done
+		rm -rf "${PKGDESTDIR}"/usr/lib/profiled
+		vmkdir usr/lib/modules-load.d
+		echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
+		vlicense CDDL.Schily.txt
+	}
 }
 
 sccs_package() {
 	short_desc+=" - SCCS"
 	pkg_install() {
-		make install -C sccs DESTDIR="$PKGDESTDIR" INS_BASE=/usr/libexec/sccs
+		make install -C sccs DESTDIR="$PKGDESTDIR" "${_common_flags[@]}" INS_BASE=/usr/libexec/sccs
 		vmkdir usr/bin
 		vmkdir usr/share
-		rm -f ${PKGDESTDIR}/usr/libexec/sccs/share/man/man?/[!s]*
-		mv ${PKGDESTDIR}/usr/libexec/sccs/share/man ${PKGDESTDIR}/usr/share
-		rm -rf ${PKGDESTDIR}/usr/libexec/sccs/bin
-		ln -sfr ${PKGDESTDIR}/usr/libexec/sccs/ccs/bin/sccs ${PKGDESTDIR}/usr/bin/sccs
+		rm -f "${PKGDESTDIR}"/usr/libexec/sccs/share/man/man?/[!s]*
+		mv "${PKGDESTDIR}"/usr/libexec/sccs/share/man "${PKGDESTDIR}"/usr/share
+		rm -rf "${PKGDESTDIR}"/usr/libexec/sccs/bin
+		ln -sfr "${PKGDESTDIR}"/usr/libexec/sccs/ccs/bin/sccs "${PKGDESTDIR}"/usr/bin/sccs
 		vlicense CDDL.Schily.txt
 	}
 }
+
 sdd_package() {
 	short_desc+=" - sdd"
 	pkg_install() {
-		make install -C sdd DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C sdd DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 sfind_package() {
 	short_desc+=" - sfind"
 	pkg_install() {
-		make install -C sfind DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C sfind DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 smake_package() {
 	short_desc+=" - smake"
 	pkg_install() {
-		make install -C smake DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C smake DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 star_package() {
 	short_desc+=" - star"
 	conf_files="/etc/default/star"
@@ -66,38 +104,21 @@ star_package() {
 	 pax:pax.1:/usr/share/man/man1/spax.1
 	"
 	pkg_install() {
-		make install -C star DESTDIR="$PKGDESTDIR" INS_BASE=/usr SYMLINKS='suntar scpio spax'
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/ustar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/*[!1]
-		rm -f ${PKGDESTDIR}/usr/share/man/man5/*[!5]
-		rm -rf ${PKGDESTDIR}/usr/share/doc/
+		make install -C star DESTDIR="$PKGDESTDIR" SYMLINKS='suntar scpio spax' "${_common_flags[@]}"
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/ustar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/*[!1]
+		rm -f "${PKGDESTDIR}"/usr/share/man/man5/*[!5]
+		rm -rf "${PKGDESTDIR}"/usr/share/doc/
 		vlicense CDDL.Schily.txt
 	}
 }
+
 ved_package() {
 	short_desc+=" - ved"
 	pkg_install() {
-		make install -C ved DESTDIR="$PKGDESTDIR" INS_BASE=/usr
-		vlicense CDDL.Schily.txt
-	}
-}
-
-cdrtools_package() {
-	depends="schilytools libcap-progs"
-	short_desc+=" - cdrtools"
-	conf_files="/etc/default/rscsi /etc/default/cdrecord"
-	pkg_install() {
-		vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
-		for d in btcflash cdda2wav cdrecord mkisofs mkisofs/diag readcd rscsi \
-			scgcheck scgskeleton; do
-			make install -C "$d" DESTDIR="$PKGDESTDIR" INS_BASE=/usr \
-				CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" LDPATH= RUNPATH=
-		done
-		rm -rf "${PKGDESTDIR}"/usr/lib/profiled
-		vmkdir usr/lib/modules-load.d
-		echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
+		make install -C ved DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }

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

* Re: [PR PATCH] [Updated] schilytools: fix cross
  2023-11-12  3:48 [PR PATCH] schilytools: fix cross classabbyamp
                   ` (4 preceding siblings ...)
  2023-11-12 17:54 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-11-12 18:08 ` classabbyamp
  2023-11-12 22:00 ` [PR PATCH] [Merged]: " classabbyamp
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-11-12 18:08 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages schily-cross
https://github.com/void-linux/void-packages/pull/47169

schilytools: fix cross
also clean up template and move siconv tables back into cdrtools, as they are only used there

#### Testing the changes
- I tested the changes in this PR: **YES** (on aarch64-musl)


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-schily-cross-47169.patch --]
[-- Type: text/x-diff, Size: 6527 bytes --]

From 9bff523463e87c9e86816b841faf4397d7b7e482 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 11 Nov 2023 20:23:31 -0500
Subject: [PATCH] schilytools: fix cross

also clean up template and move siconv tables back into cdrtools, as
they are only used there
---
 srcpkgs/schilytools/template | 112 +++++++++++++++++++++--------------
 1 file changed, 67 insertions(+), 45 deletions(-)

diff --git a/srcpkgs/schilytools/template b/srcpkgs/schilytools/template
index 6daa18cf88d10..c802feabf2aee 100644
--- a/srcpkgs/schilytools/template
+++ b/srcpkgs/schilytools/template
@@ -1,63 +1,102 @@
 # Template file for 'schilytools'
 pkgname=schilytools
 version=2023.09.28
-revision=2
+revision=3
+build_style=meta
+build_helper="qemu"
 makedepends="acl-devel attr-devel e2fsprogs-devel libcap-progs m4"
-depends="sccs sdd sfind smake star ved"
+depends="sccs sdd sfind smake star ved cdrtools"
 short_desc="Schily's portable tools"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CDDL-1.0"
 homepage="https://codeberg.org/schilytools/schilytools"
 distfiles="https://codeberg.org/schilytools/schilytools/archive/${version//./-}.tar.gz"
-checksum=564ea2365876a53eba02f184c565016399aee188c26d862589906cf3f92198e6
-nocross=yes  # configure + re-builds with itself
+checksum=c813cc19a320f8d3b5d82f5b1ca6a93ab1bb5f4c50f86fdac58101fe472d2143
+
+_common_flags=(ARCH="${XBPS_TARGET_MACHINE%-musl}" GMAKE_NOWARN=true INS_BASE=/usr)
+
+post_patch() {
+	vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
+}
 
 do_build() {
-	make ${makejobs} CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
-	make ${makejobs} -C ved CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr
-	make -C sccs clean
-	make -C sccs CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" INS_BASE=/usr/libexec/sccs
+	local _flags=("${makejobs}" "${_common_flags[@]}" CC="$CC" CCC="$CXX" COPTX="$CFLAGS" LDOPTX="$LDFLAGS")
+
+	# build the bootstrap smake for host always
+	( cd psmake && CC="gcc" CC_OPT="-O2" CFLAGS="" LDFLAGS="" sh ./MAKE-all )
+
+	if [ "$CROSS_BUILD" ]; then
+		export CONFIG_RMTCALL="/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
+		export CONFIG_RMTHOST=dummy
+	fi
+
+	make "${_flags[@]}"
+
+	# sccs has a special INS_BASE
+	make -C sccs clean "${_flags[@]}"
+	make -C sccs "${_flags[@]}" INS_BASE=/usr/libexec/sccs
+
+	for d in ved sdd sfind smake star btcflash cdda2wav cdrecord mkisofs mkisofs/diag \
+	 readcd rscsi scgcheck scgskeleton; do
+		make -C "$d" clean "${_flags[@]}"
+		make -C "$d" "${_flags[@]}"
+	done
 }
 
-do_install() {
-	make install -C libsiconv/tables DESTDIR="$DESTDIR" INS_BASE=/usr
-	vlicense CDDL.Schily.txt
+cdrtools_package() {
+	depends="libcap-progs"
+	short_desc+=" - cdrtools"
+	conf_files="/etc/default/rscsi /etc/default/cdrecord"
+	pkg_install() {
+		for d in btcflash cdda2wav cdrecord libsiconv/tables mkisofs mkisofs/diag readcd rscsi \
+		 scgcheck scgskeleton; do
+			make install -C "$d" DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
+		done
+		rm -rf "${PKGDESTDIR}"/usr/lib/profiled
+		vmkdir usr/lib/modules-load.d
+		echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
+		vlicense CDDL.Schily.txt
+	}
 }
 
 sccs_package() {
 	short_desc+=" - SCCS"
 	pkg_install() {
-		make install -C sccs DESTDIR="$PKGDESTDIR" INS_BASE=/usr/libexec/sccs
+		make install -C sccs DESTDIR="$PKGDESTDIR" "${_common_flags[@]}" INS_BASE=/usr/libexec/sccs
 		vmkdir usr/bin
 		vmkdir usr/share
-		rm -f ${PKGDESTDIR}/usr/libexec/sccs/share/man/man?/[!s]*
-		mv ${PKGDESTDIR}/usr/libexec/sccs/share/man ${PKGDESTDIR}/usr/share
-		rm -rf ${PKGDESTDIR}/usr/libexec/sccs/bin
-		ln -sfr ${PKGDESTDIR}/usr/libexec/sccs/ccs/bin/sccs ${PKGDESTDIR}/usr/bin/sccs
+		rm -f "${PKGDESTDIR}"/usr/libexec/sccs/share/man/man?/[!s]*
+		mv "${PKGDESTDIR}"/usr/libexec/sccs/share/man "${PKGDESTDIR}"/usr/share
+		rm -rf "${PKGDESTDIR}"/usr/libexec/sccs/bin
+		ln -sfr "${PKGDESTDIR}"/usr/libexec/sccs/ccs/bin/sccs "${PKGDESTDIR}"/usr/bin/sccs
 		vlicense CDDL.Schily.txt
 	}
 }
+
 sdd_package() {
 	short_desc+=" - sdd"
 	pkg_install() {
-		make install -C sdd DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C sdd DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 sfind_package() {
 	short_desc+=" - sfind"
 	pkg_install() {
-		make install -C sfind DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C sfind DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 smake_package() {
 	short_desc+=" - smake"
 	pkg_install() {
-		make install -C smake DESTDIR="$PKGDESTDIR" INS_BASE=/usr
+		make install -C smake DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }
+
 star_package() {
 	short_desc+=" - star"
 	conf_files="/etc/default/star"
@@ -66,38 +105,21 @@ star_package() {
 	 pax:pax.1:/usr/share/man/man1/spax.1
 	"
 	pkg_install() {
-		make install -C star DESTDIR="$PKGDESTDIR" INS_BASE=/usr SYMLINKS='suntar scpio spax'
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/ustar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/gnutar.1
-		rm -f ${PKGDESTDIR}/usr/share/man/man1/*[!1]
-		rm -f ${PKGDESTDIR}/usr/share/man/man5/*[!5]
-		rm -rf ${PKGDESTDIR}/usr/share/doc/
+		make install -C star DESTDIR="$PKGDESTDIR" SYMLINKS='suntar scpio spax' "${_common_flags[@]}"
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/ustar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/gnutar.1
+		rm -f "${PKGDESTDIR}"/usr/share/man/man1/*[!1]
+		rm -f "${PKGDESTDIR}"/usr/share/man/man5/*[!5]
+		rm -rf "${PKGDESTDIR}"/usr/share/doc/
 		vlicense CDDL.Schily.txt
 	}
 }
+
 ved_package() {
 	short_desc+=" - ved"
 	pkg_install() {
-		make install -C ved DESTDIR="$PKGDESTDIR" INS_BASE=/usr
-		vlicense CDDL.Schily.txt
-	}
-}
-
-cdrtools_package() {
-	depends="schilytools libcap-progs"
-	short_desc+=" - cdrtools"
-	conf_files="/etc/default/rscsi /etc/default/cdrecord"
-	pkg_install() {
-		vsed -i 's|INSDIR=.*|INSDIR=bin|' rscsi/Makefile
-		for d in btcflash cdda2wav cdrecord mkisofs mkisofs/diag readcd rscsi \
-			scgcheck scgskeleton; do
-			make install -C "$d" DESTDIR="$PKGDESTDIR" INS_BASE=/usr \
-				CC="$CC" COPTX="$CFLAGS" LDOPTX="$LDFLAGS" LDPATH= RUNPATH=
-		done
-		rm -rf "${PKGDESTDIR}"/usr/lib/profiled
-		vmkdir usr/lib/modules-load.d
-		echo sg > "${PKGDESTDIR}"/usr/lib/modules-load.d/cdrtools.conf
+		make install -C ved DESTDIR="$PKGDESTDIR" "${_common_flags[@]}"
 		vlicense CDDL.Schily.txt
 	}
 }

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

* Re: [PR PATCH] [Merged]: schilytools: fix cross
  2023-11-12  3:48 [PR PATCH] schilytools: fix cross classabbyamp
                   ` (5 preceding siblings ...)
  2023-11-12 18:08 ` classabbyamp
@ 2023-11-12 22:00 ` classabbyamp
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-11-12 22:00 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

schilytools: fix cross
https://github.com/void-linux/void-packages/pull/47169

Description:
also clean up template and move siconv tables back into cdrtools, as they are only used there

#### Testing the changes
- I tested the changes in this PR: **YES** (on aarch64-musl)


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

end of thread, other threads:[~2023-11-12 22:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-12  3:48 [PR PATCH] schilytools: fix cross classabbyamp
2023-11-12  3:49 ` classabbyamp
2023-11-12  4:19 ` [PR PATCH] [Updated] " classabbyamp
2023-11-12  4:35 ` classabbyamp
2023-11-12  4:39 ` classabbyamp
2023-11-12 17:54 ` [PR PATCH] [Updated] " classabbyamp
2023-11-12 18:08 ` classabbyamp
2023-11-12 22:00 ` [PR PATCH] [Merged]: " classabbyamp

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).