mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
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 <sam@gentoo.org>
73 lines
1.7 KiB
Bash
73 lines
1.7 KiB
Bash
# 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
|
|
}
|