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

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