Diff clanlib-2.3.7-r1 with a clanlib-4.0.0

/usr/portage/dev-games/clanlib/clanlib-4.0.0.ebuild 2018-06-25 16:39:00.000000000 +0300
1
# Copyright 1999-2021 Gentoo Authors
1
# Copyright 1999-2018 Gentoo Foundation
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=6
5 5

  
6
inherit autotools flag-o-matic
6
inherit autotools
7 7

  
8
MY_P=ClanLib-${PV}
9
DESCRIPTION="multi-platform game development library"
10
HOMEPAGE="http://www.clanlib.org/"
11
SRC_URI="http://clanlib.org/download/releases-2.0/${MY_P}.tgz"
12
S="${WORKDIR}"/${MY_P}
8
MY_PN=ClanLib
9

  
10
DESCRIPTION="Multi-platform game development library"
11
HOMEPAGE="https://github.com/sphair/ClanLib"
12
SRC_URI="https://github.com/sphair/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13 13

  
14 14
LICENSE="ZLIB"
15
SLOT="2.3"
16
# Not big endian safe! #82779
17
KEYWORDS="amd64 x86"
18
IUSE="doc ipv6 mikmod opengl sound sqlite cpu_flags_x86_sse2 static-libs vorbis X"
15
SLOT="4.0"
16
KEYWORDS="~amd64 ~x86" #not big endian safe #82779
17
IUSE="cpu_flags_x86_sse2 doc examples ipv6 opengl sound static-libs X"
19 18
REQUIRED_USE="opengl? ( X )"
20 19

  
21
BDEPEND="
22
	virtual/pkgconfig
23
	doc? ( app-doc/doxygen dev-lang/perl )
24
"
25 20
RDEPEND="
26 21
	sys-libs/zlib
27 22
	X? (
28
		app-arch/bzip2
29
		media-libs/libpng:0
30
		media-libs/freetype
23
		media-libs/freetype:2
31 24
		media-libs/fontconfig
32
		virtual/jpeg:0
33 25
		x11-libs/libX11
34
		opengl? ( virtual/opengl )
35
	)
36
	mikmod? (
37
		media-libs/alsa-lib
38
		media-libs/libmikmod
39
	)
40
	sqlite? ( dev-db/sqlite:3 )
41
	sound? ( media-libs/alsa-lib )
42
	vorbis? (
43
		media-libs/alsa-lib
44
		media-libs/libogg
45
		media-libs/libvorbis
26
		opengl? (
27
			virtual/opengl
28
			x11-libs/libXrender
29
		)
46 30
	)
47
"
48
DEPEND="${RDEPEND}"
31
	sound? ( media-libs/alsa-lib )"
32
DEPEND="${RDEPEND}
33
	virtual/pkgconfig
34
	doc? (
35
		app-doc/doxygen
36
		dev-lang/perl
37
		media-gfx/graphviz
38
	)"
39

  
40
S="${WORKDIR}/${MY_PN}-${PV}"
49 41

  
50 42
PATCHES=(
51
	"${FILESDIR}"/${P}-autotools.patch
52
	"${FILESDIR}"/${P}-doc.patch
53
	"${FILESDIR}"/${P}-freetype_pkgconfig.patch #764902
43
	"${FILESDIR}"/${PN}-4.0.0-fix-build-system.patch
44
	"${FILESDIR}"/${PN}-4.0.0-freetype_pkgconfig.patch #658424
54 45
)
55 46

  
56
DOCS=( CODING_STYLE CREDITS PATCHES README )
57

  
58 47
src_prepare() {
59 48
	default
60

  
61 49
	eautoreconf
62

  
63
	ln -sf ../../../Sources/API Documentation/Utilities/ReferenceDocs/ClanLib || die
64 50
}
65 51

  
66 52
src_configure() {
67
	# Add -DPACKAGE_BUGREPORT?
68 53
	local myeconfargs=(
69 54
		$(use_enable doc docs)
70 55
		$(use_enable cpu_flags_x86_sse2 sse2)
71 56
		$(use_enable opengl clanGL)
72
		$(use_enable opengl clanGL1)
73
		$(use_enable opengl clanGUI)
57
		$(use_enable opengl clanUI)
74 58
		$(use_enable X clanDisplay)
75
		$(use_enable vorbis clanVorbis)
76
		$(use_enable mikmod clanMikMod)
77
		$(use_enable sqlite clanSqlite)
59
		$(use_enable sound clanSound)
78 60
		$(use_enable ipv6 getaddr)
61
		$(use_enable static-libs static)
79 62
	)
80

  
81
	use sound \
82
		|| use vorbis \
83
		|| use mikmod \
84
		|| myeconfargs+=( --disable-clanSound )
85

  
86 63
	econf "${myeconfargs[@]}"
87 64
}
88 65

  
89 66
src_compile() {
90
	emake
91

  
67
	default
92 68
	use doc && emake html
93 69
}
94 70

  
95
# html files are keeped in a directory that is dependent on the SLOT
96
# so to keep eventual bookmarks to the doc from version to version
97 71
src_install() {
98 72
	default
99 73

  
100
	if use doc ; then
101
		emake DESTDIR="${D}" install-html
102
		dodoc -r Examples Resources
103
	fi
74
	use doc && emake DESTDIR="${D}" install-html
75
	use examples && dodoc -r Examples Resources
76

  
77
	# package provides .pc files
78
	find "${ED}" -name '*.la' -delete || die
104 79
}
Thank you!