| 1 |
|
# Copyright 1999-2024 Gentoo Authors
|
|
1 |
# Copyright 1999-2022 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=7
|
| 5 |
5 |
|
| 6 |
6 |
inherit toolchain-funcs
|
| 7 |
7 |
|
| 8 |
|
KERN_VER="2.6.22"
|
|
8 |
if [[ ${PV} = 9999* ]]; then
|
|
9 |
EGIT_REPO_URI="https://github.com/mattst88/${PN}.git"
|
|
10 |
inherit git-r3
|
|
11 |
else
|
|
12 |
COMMIT_ID="dde7f7b85f7631668f1da7c0b0ecf7ddbbde004e"
|
|
13 |
SRC_URI="https://github.com/mattst88/${PN}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
|
|
14 |
S="${WORKDIR}/${PN}-${COMMIT_ID}"
|
|
15 |
KEYWORDS="-* ~alpha"
|
|
16 |
fi
|
| 9 |
17 |
|
| 10 |
18 |
DESCRIPTION="Alpha Linux boot loader for SRM"
|
| 11 |
|
HOMEPAGE="http://aboot.sourceforge.net/"
|
| 12 |
|
SRC_URI="http://aboot.sourceforge.net/tarballs/${P}.tar.bz2
|
| 13 |
|
mirror://gentoo/gentoo-headers-base-${KERN_VER}.tar.bz2
|
| 14 |
|
mirror://gentoo/${PN}_gentoo.diff.bz2
|
| 15 |
|
https://dev.gentoo.org/~armin76/dist/${PN}_gentoo.diff.bz2"
|
|
19 |
HOMEPAGE="https://github.com/mattst88/aboot https://sourceforge.net/projects/aboot/"
|
| 16 |
20 |
|
| 17 |
21 |
LICENSE="GPL-2"
|
| 18 |
22 |
SLOT="0"
|
| 19 |
|
KEYWORDS="-* ~alpha"
|
| 20 |
23 |
|
| 21 |
|
src_unpack() {
|
| 22 |
|
unpack ${A}
|
| 23 |
|
# setup local copies of kernel headers since we rely so
|
| 24 |
|
# heavily on linux internals.
|
| 25 |
|
mv gentoo-headers-base-${KERN_VER}/include/{linux,asm-generic,asm-alpha} "${S}"/include/ || die
|
| 26 |
|
cd "${S}"/include
|
| 27 |
|
ln -s asm-alpha asm || die
|
| 28 |
|
touch linux/config.h || die
|
| 29 |
|
}
|
| 30 |
|
|
| 31 |
|
src_prepare() {
|
| 32 |
|
eapply "${FILESDIR}/aboot-gcc-3.4.patch"
|
| 33 |
|
eapply "${FILESDIR}/aboot-pt_note.patch"
|
| 34 |
|
# Bug 364697
|
| 35 |
|
eapply "${FILESDIR}/aboot-define_stat_only_in_userspace.patch"
|
| 36 |
|
eapply "${FILESDIR}"/aboot-respect-AR.patch
|
| 37 |
|
eapply "${FILESDIR}"/aboot-gnu90.patch
|
| 38 |
|
|
| 39 |
|
# Modified patch from Debian to add netboot support
|
| 40 |
|
eapply "${WORKDIR}"/aboot_gentoo.diff
|
| 41 |
|
|
| 42 |
|
eapply_user
|
| 43 |
|
}
|
|
24 |
BDEPEND="app-text/docbook-sgml-utils"
|
| 44 |
25 |
|
| 45 |
26 |
src_compile() {
|
| 46 |
|
# too many problems with parallel building
|
| 47 |
|
emake -j1 AR="$(tc-getAR)" CC="$(tc-getCC)" LD="$(tc-getLD)"
|
|
27 |
emake AR="$(tc-getAR)" CC="$(tc-getCC)" LD="$(tc-getLD)" \
|
|
28 |
all netabootwrap
|
|
29 |
|
|
30 |
einfo "Building man pages"
|
|
31 |
emake -C doc/man
|
| 48 |
32 |
}
|
| 49 |
33 |
|
| 50 |
34 |
src_install() {
|
| 51 |
35 |
dodir /boot /sbin /usr/share/man/man{1,5,8}
|
| 52 |
|
make \
|
| 53 |
|
root="${D}" \
|
| 54 |
|
bindir="${D}"/sbin \
|
| 55 |
|
bootdir="${D}"/boot \
|
| 56 |
|
mandir="${D}"/usr/share/man \
|
| 57 |
|
install
|
|
36 |
emake root="${D}" install
|
| 58 |
37 |
|
| 59 |
38 |
insinto /boot
|
| 60 |
39 |
doins net_aboot.nh
|