1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 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 autotools toolchain-funcs
|
7 |
7 |
|
8 |
|
MY_P=ClanLib-${PV}
|
|
8 |
MY_PN=ClanLib
|
|
9 |
|
9 |
10 |
DESCRIPTION="Multi-platform game development library"
|
10 |
11 |
HOMEPAGE="https://github.com/sphair/ClanLib"
|
11 |
|
SRC_URI="mirror://gentoo/${MY_P}.tgz"
|
12 |
|
S="${WORKDIR}"/${MY_P}
|
|
12 |
SRC_URI="https://github.com/sphair/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
13 |
S="${WORKDIR}/${MY_PN}-${PV}"
|
13 |
14 |
|
14 |
15 |
LICENSE="ZLIB"
|
15 |
|
SLOT="2.3"
|
16 |
|
KEYWORDS="amd64 x86"
|
17 |
|
IUSE="doc ipv6 mikmod opengl +sound sqlite cpu_flags_x86_sse2 static-libs vorbis X"
|
|
16 |
SLOT="4.1"
|
|
17 |
KEYWORDS="amd64 x86" #not big endian safe #82779
|
|
18 |
IUSE="cpu_flags_x86_sse2 doc examples ipv6 opengl +sound static-libs X"
|
18 |
19 |
REQUIRED_USE="opengl? ( X )"
|
19 |
20 |
|
20 |
|
BDEPEND="
|
21 |
|
virtual/pkgconfig
|
22 |
|
doc? (
|
23 |
|
app-doc/doxygen
|
24 |
|
dev-lang/perl
|
25 |
|
media-gfx/graphviz
|
26 |
|
)
|
27 |
|
"
|
28 |
21 |
RDEPEND="
|
29 |
22 |
sys-libs/zlib
|
30 |
23 |
X? (
|
31 |
|
app-arch/bzip2
|
32 |
|
media-libs/libpng:0
|
33 |
|
media-libs/freetype
|
|
24 |
media-libs/freetype:2
|
34 |
25 |
media-libs/fontconfig
|
35 |
|
media-libs/libjpeg-turbo:0=
|
36 |
26 |
x11-libs/libX11
|
37 |
|
opengl? ( virtual/opengl )
|
38 |
|
)
|
39 |
|
mikmod? (
|
40 |
|
media-libs/alsa-lib
|
41 |
|
media-libs/libmikmod
|
|
27 |
opengl? (
|
|
28 |
virtual/opengl
|
|
29 |
x11-libs/libXrender
|
|
30 |
)
|
42 |
31 |
)
|
43 |
|
sqlite? ( dev-db/sqlite:3 )
|
44 |
|
sound? ( media-libs/alsa-lib )
|
45 |
|
vorbis? (
|
46 |
|
media-libs/alsa-lib
|
47 |
|
media-libs/libogg
|
48 |
|
media-libs/libvorbis
|
49 |
|
)
|
50 |
|
"
|
|
32 |
sound? ( media-libs/alsa-lib )"
|
51 |
33 |
DEPEND="${RDEPEND}"
|
52 |
|
|
53 |
|
PATCHES=(
|
54 |
|
"${FILESDIR}"/${P}-autotools.patch
|
55 |
|
"${FILESDIR}"/${P}-doc.patch
|
56 |
|
"${FILESDIR}"/${P}-freetype_pkgconfig.patch #764902
|
57 |
|
"${FILESDIR}"/${P}-glibc2.34.patch
|
58 |
|
"${FILESDIR}"/${P}-32bit-opengl.patch
|
59 |
|
# From Fedora
|
60 |
|
"${FILESDIR}"/${P}-gcc47.patch
|
61 |
|
"${FILESDIR}"/${P}-gcc7.patch
|
62 |
|
"${FILESDIR}"/${P}-non-x86.patch
|
63 |
|
"${FILESDIR}"/${P}-no-ldflags-for-conftest.patch
|
64 |
|
"${FILESDIR}"/${P}-no-wm_type-in-fs.patch
|
65 |
|
)
|
66 |
|
|
67 |
|
DOCS=( CODING_STYLE CREDITS PATCHES README )
|
|
34 |
BDEPEND="
|
|
35 |
virtual/pkgconfig
|
|
36 |
doc? (
|
|
37 |
app-doc/doxygen
|
|
38 |
dev-lang/perl
|
|
39 |
media-gfx/graphviz
|
|
40 |
)"
|
68 |
41 |
|
69 |
42 |
src_prepare() {
|
70 |
43 |
default
|
71 |
|
|
72 |
44 |
eautoreconf
|
73 |
|
|
74 |
|
ln -sf ../../../Sources/API Documentation/Utilities/ReferenceDocs/ClanLib || die
|
75 |
45 |
}
|
76 |
46 |
|
77 |
47 |
src_configure() {
|
78 |
|
# Add -DPACKAGE_BUGREPORT?
|
79 |
48 |
local myeconfargs=(
|
80 |
49 |
$(use_enable doc docs)
|
81 |
50 |
$(use_enable cpu_flags_x86_sse2 sse2)
|
82 |
51 |
$(use_enable opengl clanGL)
|
83 |
|
$(use_enable opengl clanGL1)
|
84 |
|
$(use_enable opengl clanGUI)
|
|
52 |
$(use_enable opengl clanUI)
|
85 |
53 |
$(use_enable X clanDisplay)
|
86 |
|
$(use_enable vorbis clanVorbis)
|
87 |
|
$(use_enable mikmod clanMikMod)
|
88 |
|
$(use_enable sqlite clanSqlite)
|
|
54 |
$(use_enable sound clanSound)
|
89 |
55 |
$(use_enable ipv6 getaddr)
|
|
56 |
$(use_enable static-libs static)
|
90 |
57 |
)
|
91 |
58 |
|
92 |
|
use sound \
|
93 |
|
|| use vorbis \
|
94 |
|
|| use mikmod \
|
95 |
|
|| myeconfargs+=( --disable-clanSound )
|
96 |
|
|
97 |
59 |
tc-export PKG_CONFIG
|
98 |
60 |
|
99 |
61 |
econf "${myeconfargs[@]}"
|
100 |
62 |
}
|
101 |
63 |
|
102 |
64 |
src_compile() {
|
103 |
|
emake
|
104 |
|
|
|
65 |
default
|
105 |
66 |
use doc && emake html
|
106 |
67 |
}
|
107 |
68 |
|
108 |
|
# html files are keeped in a directory that is dependent on the SLOT
|
109 |
|
# so to keep eventual bookmarks to the doc from version to version
|
110 |
69 |
src_install() {
|
111 |
70 |
default
|
112 |
71 |
|
113 |
|
find "${ED}" -type f -name '*.la' -delete || die
|
|
72 |
use doc && emake DESTDIR="${D}" install-html
|
|
73 |
use examples && dodoc -r Examples Resources
|
114 |
74 |
|
115 |
|
if use doc ; then
|
116 |
|
emake DESTDIR="${D}" install-html
|
117 |
|
dodoc -r Examples Resources
|
118 |
|
fi
|
|
75 |
# package provides .pc files
|
|
76 |
find "${ED}" -name '*.la' -delete || die
|
119 |
77 |
}
|