From 564fd351282a0da9b26d1eeb1f07ddef9f940fcd Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 31 Mar 2026 23:51:32 +0100 Subject: [PATCH] dev-util/mig: add 1.8_p20260123 Debian only make full snapshots every so often, but apply other commits as backports. This is a bit awkward for us to follow, so roll our own snapshots. It's easier to also then see precisely which commit we're on. Signed-off-by: Sam James --- dev-util/mig/Manifest | 1 + dev-util/mig/mig-1.8_p20260123.ebuild | 72 +++++++++++++++++++++++++++ dev-util/mig/mig-9999.ebuild | 17 +++++-- 3 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 dev-util/mig/mig-1.8_p20260123.ebuild diff --git a/dev-util/mig/Manifest b/dev-util/mig/Manifest index 9d5cb271e39e2..26d6c45c36fdc 100644 --- a/dev-util/mig/Manifest +++ b/dev-util/mig/Manifest @@ -1 +1,2 @@ +DIST mig-1.8_p20260123.tar.xz 63452 BLAKE2B 85cf9ee78ff92a3afde3ead33856e6a8d53cd4942f195cfab6d79488a91786cd89fbef4c7ef70824cd51db30e51b28b9845852fdd87cc0f340e226b3abc533d6 SHA512 7c34f704c4324fe1dbad80a55c2e429d801b4c857b0db5923d373423051f9ff3ab3159543686db2e0a8e87dd68b9ba028b3cf9a18f9b3bc142719d66be663243 DIST mig_1.8+git20231217.orig.tar.xz 197664 BLAKE2B 95a87684e1295bfcfb137ef2e7d9352c939daedd86cc95c4c4e06f4cd7caebc4fb02c8192ec9a9bd84ee49c5b15dd9d9ce6bcda584e50cf41c0d18fa99bbbcea SHA512 80cf8abae100231093507770c7de71f90c3dea656d06e676eab6670fbc7a743a1d85768783cbb7174ee06846d42ec4b079985c607cc87cd73de5a13742ba402c diff --git a/dev-util/mig/mig-1.8_p20260123.ebuild b/dev-util/mig/mig-1.8_p20260123.ebuild new file mode 100644 index 0000000000000..febe0665e13e4 --- /dev/null +++ b/dev-util/mig/mig-1.8_p20260123.ebuild @@ -0,0 +1,72 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools crossdev + +DESCRIPTION="GNU Mach 3.0 interface generator (IDL compiler)" +HOMEPAGE="https://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/hurd/mig.git" + inherit git-r3 +elif [[ ${PV} == *_p* ]] ; then + MY_PV=${PV%_p*}+git${PV#*_p} + MY_P=${PN}_${MY_PV} + + # savannah doesn't allow snapshot downloads from cgit as of 2026-03, + # but the Debian maintainer is also upstream, so just use theirs + # instead. + #SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}.orig.tar.xz" + #S="${WORKDIR}"/${MY_P/_/-} + + # Debian only make full snapshots every so often, but apply other + # commits as backports. This is a bit awkward for us to follow, so + # roll our own snapshots: + # $ git archive --format=tar --prefix=mig/ HEAD | xz > mig-1.8_p20260123.tar.xz + SRC_URI="https://distfiles.gentoo.org/pub/proj/hurd/snapshots/mig/${P}.tar.xz" + S="${WORKDIR}"/${PN} +else + SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" +fi + +LICENSE="GPL-2 BSD-2" +SLOT="0" +[[ ${PV} != 9999 ]] && KEYWORDS="~amd64 ~x86" + +BDEPEND=" + sys-devel/bison + sys-devel/flex +" + +if is_crosspkg ; then + DEPEND+=" cross-${CTARGET}/gnumach" +fi + +RDEPEND="dev-lang/perl" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # Needs bison and flex + unset YACC LEX + + local myeconfargs=( + --prefix="${EPREFIX}${sysroot}/usr" + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if target_is_not_host ; then + # Don't install docs when building a cross-mig + rm -rf "${ED}"/usr/share/{doc,man,info,locale} || die + fi +} diff --git a/dev-util/mig/mig-9999.ebuild b/dev-util/mig/mig-9999.ebuild index 39ef312f20cdc..febe0665e13e4 100644 --- a/dev-util/mig/mig-9999.ebuild +++ b/dev-util/mig/mig-9999.ebuild @@ -3,14 +3,14 @@ EAPI=8 -inherit crossdev +inherit autotools crossdev DESCRIPTION="GNU Mach 3.0 interface generator (IDL compiler)" HOMEPAGE="https://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html" if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.savannah.gnu.org/git/hurd/mig.git" - inherit autotools git-r3 + inherit git-r3 elif [[ ${PV} == *_p* ]] ; then MY_PV=${PV%_p*}+git${PV#*_p} MY_P=${PN}_${MY_PV} @@ -18,8 +18,15 @@ elif [[ ${PV} == *_p* ]] ; then # savannah doesn't allow snapshot downloads from cgit as of 2026-03, # but the Debian maintainer is also upstream, so just use theirs # instead. - SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}.orig.tar.xz" - S="${WORKDIR}"/${MY_P/_/-} + #SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}.orig.tar.xz" + #S="${WORKDIR}"/${MY_P/_/-} + + # Debian only make full snapshots every so often, but apply other + # commits as backports. This is a bit awkward for us to follow, so + # roll our own snapshots: + # $ git archive --format=tar --prefix=mig/ HEAD | xz > mig-1.8_p20260123.tar.xz + SRC_URI="https://distfiles.gentoo.org/pub/proj/hurd/snapshots/mig/${P}.tar.xz" + S="${WORKDIR}"/${PN} else SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" fi @@ -41,7 +48,7 @@ RDEPEND="dev-lang/perl" src_prepare() { default - [[ ${PV} == 9999 ]] && eautoreconf + eautoreconf } src_configure() {