summaryrefslogtreecommitdiff
path: root/sys-fs/arm-fdisk/arm-fdisk-3.0.6-r1.ebuild
blob: b7a537409048775b448f8d6707d597378762b1d8 (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit toolchain-funcs

DEB_VER=6.2
DESCRIPTION="edit disk partitions on Acorn machines"
HOMEPAGE="http://www.arm.linux.org.uk/"
SRC_URI="ftp://ftp.arm.linux.org.uk/pub/armlinux/source/other/${P}.tar.gz
	mirror://debian/pool/main/a/acorn-fdisk/acorn-fdisk_${PV}-${DEB_VER}.diff.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~hppa ~m68k ~mips ppc ~s390 sparc x86"
IUSE=""

src_prepare() {
	default
	eapply "${WORKDIR}"/acorn-fdisk_${PV}-${DEB_VER}.diff

	find . -name Makefile -exec sed -i \
		-e "s:-O2 -Wall\( -g\)\?::" \
		-e "/^CFLAGS/s:=:+=:" \
		-e "/^LDFLAGS/s:=:+=:" \
		-e '/^STRIP/s:strip:true:' {} + || die
}

src_compile() {
	emake \
		CC="$(tc-getCC)" \
		AR="$(tc-getAR)"
}

src_install() {
	into /
	newsbin fdisk ${PN}
	dosym ${PN} /sbin/acorn-fdisk
	dodoc ChangeLog README debian/changelog
}