summaryrefslogtreecommitdiff
blob: 6349d6817e3e390c0f77b5683e543b65c8cc0391 (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
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

DESCRIPTION="Allegro support for DUMB (an IT, XM, S3M, and MOD player library)"
HOMEPAGE="http://dumb.sourceforge.net/"
SRC_URI="mirror://sourceforge/dumb/dumb-${PV}.tar.gz"

LICENSE="DUMB-0.9.3"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="debug"

DEPEND="
	>=media-libs/dumb-0.9.3
	media-libs/allegro:0
"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${P/aldumb/dumb}"

PATCHES=(
	"${FILESDIR}"/${P}-PIC-as-needed.patch
	"${FILESDIR}"/${P}_CVE-2006-3668.patch
)

src_prepare() {
	default

	cat << EOF > make/config.txt
include make/unix.inc
ALL_TARGETS := allegro allegro-examples allegro-headers
PREFIX := /usr
EOF
	sed -i '/= -s/d' Makefile || die "sed failed"
	cp -f Makefile Makefile.rdy || die
}

src_compile() {
	emake OFLAGS="${CFLAGS}" all
}

src_install() {
	dobin examples/dumbplay
	dolib.so lib/unix/libaldmb.so

	use debug && lib/unix/libaldmd.so

	insinto /usr/include
	doins include/aldumb.h
}