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

EAPI=7

COMMIT="c300160d0a8292bc04e79dd59e6cc178aa648dec"

inherit autotools multilib-minimal

DESCRIPTION="Glide to OpenGL wrapper"
HOMEPAGE="http://openglide.sourceforge.net/"
SRC_URI="https://github.com/voyageur/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+sdl static-libs"

RDEPEND="virtual/glu[${MULTILIB_USEDEP}]
	virtual/opengl[${MULTILIB_USEDEP}]
	sdl? (
		media-libs/libsdl[${MULTILIB_USEDEP}]
	)
	!sdl? (
		x11-libs/libICE[${MULTILIB_USEDEP}]
		x11-libs/libSM[${MULTILIB_USEDEP}]
		x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
	)"

DEPEND="${RDEPEND}"

S="${WORKDIR}/${PN}-${COMMIT}"
ECONF_SOURCE="${S}"

MULTILIB_WRAPPED_HEADERS=(
	/usr/include/openglide/sdk2_unix.h
)

src_prepare() {
	default
	eautoreconf
}

multilib_src_configure() {
	econf \
		--enable-shared \
		--disable-sdltest \
		$(use_enable sdl) \
		$(use_enable static-libs static)
}

multilib_src_install_all() {
	insinto /etc
	doins "${FILESDIR}"/OpenGLid.ini

	exeinto /usr/share/${PN}
	newexe platform/dosbox/glide2x.ovl glide2x-dosbox.ovl
	newexe platform/dosemu/glide2x.ovl glide2x-dosemu.ovl

	# Drop the libtool file *if* it exists
	# bug #778266
	find "${ED}" -name '*.la' -delete || die

	einstalldocs
}