summaryrefslogtreecommitdiff
blob: 242c5e00de58d3bf9079f347ea4e44b68ccb52d1 (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools

MY_PV=$(ver_cut 1-3)
DESCRIPTION="Development Library for making games for X"
HOMEPAGE="http://kxl.orz.hm/"
# http://kxl.hn.org/download/${P}.tar.gz
SRC_URI="mirror://debian/pool/main/k/kxl/kxl_${MY_PV}.orig.tar.gz -> ${PN}-${MY_PV}.tar.gz"
SRC_URI+=" mirror://debian/pool/main/k/kxl/kxl_${MY_PV}-$(ver_cut 5).debian.tar.xz"
S="${WORKDIR}"/${PN}-${MY_PV}

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"

DEPEND="x11-libs/libX11"
RDEPEND="${DEPEND}"

PATCHES=(
	"${FILESDIR}"/${PN}-${MY_PV}-as-needed.patch
	"${FILESDIR}"/${PN}-${MY_PV}-ldflags.patch
	"${FILESDIR}"/${PN}-${MY_PV}-implicit-function-declarations.patch
)

src_prepare() {
	drop_debian_patch() {
		rm "${WORKDIR}"/debian/patches/$1 || die
		sed -i -e "/^${1}/d" "${WORKDIR}"/debian/patches/series || die
	}

	drop_debian_patch 000_soname_xlibs.diff

	eapply $(awk '{print $1}' "${WORKDIR}"/debian/patches/series | sed -e "s:^:${WORKDIR}/debian/patches/:")

	default

	eautoreconf
}

src_install() {
	default

	find "${ED}" -name '*.la' -delete || die
}