blob: febe0665e13e47ccc5cb927a09e67b616f4cc12d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
}
|