Diff allegro-4.4.3.1 with a allegro-5.2.6.0

/usr/portage/media-libs/allegro/allegro-5.2.6.0.ebuild 2021-02-14 23:39:00.000000000 +0300
3 3

  
4 4
EAPI=7
5 5

  
6
CMAKE_ECLASS=cmake
7
inherit cmake-multilib desktop
6
CMAKE_ECLASS="cmake"
7
inherit cmake-multilib
8 8

  
9
DESCRIPTION="cross-platform multimedia library"
9
DESCRIPTION="Cross-platform library aimed at video game and multimedia programming"
10 10
HOMEPAGE="https://liballeg.org/"
11 11
SRC_URI="https://github.com/liballeg/allegro5/releases/download/${PV}/${P}.tar.gz"
12 12

  
13
LICENSE="Allegro MIT GPL-2+ ZLIB"
14
SLOT="0"
15
KEYWORDS="amd64 ~arm64 ~mips ppc ppc64 ~riscv x86"
16
IUSE="alsa doc fbcon jack jpeg opengl oss png svga vga vorbis X"
13
LICENSE="BSD ZLIB"
14
SLOT="5"
15
KEYWORDS="amd64 ~arm64 ppc ppc64 x86"
16
IUSE="alsa dumb flac gtk jpeg openal opengl opus oss physfs png pulseaudio test truetype vorbis webp X xinerama"
17
RESTRICT="!test? ( test )"
18

  
19
REQUIRED_USE="X? ( opengl )
20
	xinerama? ( X )
21
	|| ( alsa openal oss pulseaudio )"
17 22

  
23
BDEPEND="virtual/pkgconfig"
18 24
RDEPEND="
19
	alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
20
	jack? ( virtual/jack[${MULTILIB_USEDEP}] )
21
	jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] )
22
	png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
23
	svga? ( media-libs/svgalib[${MULTILIB_USEDEP}] )
24
	vorbis? ( media-libs/libvorbis[${MULTILIB_USEDEP}] )
25
	alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
26
	dumb? ( >=media-libs/dumb-0.9.3-r2:=[${MULTILIB_USEDEP}] )
27
	flac? ( >=media-libs/flac-1.2.1-r5[${MULTILIB_USEDEP}] )
28
	gtk? ( >=x11-libs/gtk+-2.24.23:2[${MULTILIB_USEDEP}] )
29
	jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
30
	openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
31
	opengl? (
32
		>=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
33
		>=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
34
	)
35
	opus? ( media-libs/opus[${MULTILIB_USEDEP}] )
36
	physfs? ( >=dev-games/physfs-2.0.3-r1[${MULTILIB_USEDEP}] )
37
	png? ( >=media-libs/libpng-1.5.18:0=[${MULTILIB_USEDEP}] )
38
	pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
39
	truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
40
	vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] )
41
	webp? ( media-libs/libwebp:0=[${MULTILIB_USEDEP}] )
25 42
	X? (
26
		x11-libs/libX11[${MULTILIB_USEDEP}]
27
		x11-libs/libXcursor[${MULTILIB_USEDEP}]
28
		x11-libs/libXext[${MULTILIB_USEDEP}]
29
		x11-libs/libXpm[${MULTILIB_USEDEP}]
30
		x11-libs/libXt[${MULTILIB_USEDEP}]
31
		x11-libs/libXxf86dga[${MULTILIB_USEDEP}]
32
		x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
33
		opengl? (
34
			virtual/glu[${MULTILIB_USEDEP}]
35
			virtual/opengl[${MULTILIB_USEDEP}]
36
		)
37
	)"
38
DEPEND="${RDEPEND}
39
	X? ( x11-base/xorg-proto )"
40
BDEPEND="
41
	virtual/pkgconfig
42
	doc? ( sys-apps/texinfo )
43
		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
44
		>=x11-libs/libXcursor-1.1.14[${MULTILIB_USEDEP}]
45
		>=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
46
		>=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
47
	)
48
	xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )
43 49
"
50
DEPEND="${RDEPEND}
51
	x11-base/xorg-proto"
44 52

  
45
PATCHES=(
46
	"${FILESDIR}"/${PN}-4.4.2-shared.patch
47
	"${FILESDIR}"/${PN}-4.4.2-underlink.patch
48
	"${FILESDIR}"/${PN}-4.4.2-gentoo.patch
49
	"${FILESDIR}"/${PN}-4.4.2-rpath.patch
50
	"${FILESDIR}"/${PN}-4.4.3.1-texinfo-encoding.patch
51
)
52

  
53
src_prepare() {
54
	cmake_src_prepare
55

  
56
	sed -i \
57
		-e "s:allegro-\${ALLEGRO_VERSION}:${PF}:" \
58
		docs/CMakeLists.txt || die
59
}
53
MULTILIB_WRAPPED_HEADERS=( /usr/include/allegro5/allegro_native_dialog.h )
60 54

  
61 55
src_configure() {
62
	# WANT_LINUX_CONSOLE is by default OFF
63
	# WANT_EXAMPLES doesn't install anything
64
	# WANT_TEST doesn't do anything regarding unittests
56
	# We forego freeimage for now because ebuild is not multilib
57
	# No known consumers yet anyway
65 58
	local mycmakeargs=(
66
		-DDOCDIR=share/doc
67
		-DINFODIR=share/info
68
		-DMANDIR=share/man
69 59
		-DWANT_ALSA=$(usex alsa)
70
		-DWANT_DOCS_INFO=$(usex doc)
60
		-DWANT_DEMO=OFF
71 61
		-DWANT_EXAMPLES=OFF
72
		-DWANT_JACK=$(usex jack)
73
		-DWANT_JPGALLEG=$(usex jpeg)
74
		-DWANT_LINUX_CONSOLE=OFF
75
		-DWANT_LINUX_FBCON=$(usex fbcon)
76
		-DWANT_LINUX_SVGALIB=$(usex svga)
77
		-DWANT_LINUX_VGA=$(usex vga)
78
		-DWANT_LOADPNG=$(usex png)
79
		-DWANT_LOGG=$(usex vorbis)
62
		-DWANT_FLAC=$(usex flac)
63
		-DWANT_IMAGE_FREEIMAGE=OFF
64
		-DWANT_IMAGE_JPG=$(usex jpeg)
65
		-DWANT_IMAGE_PNG=$(usex png)
66
		-DWANT_IMAGE_WEBP=$(usex webp)
67
		-DWANT_MODAUDIO=$(usex dumb)
68
		-DWANT_NATIVE_DIALOG=$(usex gtk)
69
		-DWANT_OGG_VIDEO=$(usex vorbis)
70
		-DWANT_OPENAL=$(usex openal)
71
		-DWANT_OPENGL=$(usex opengl)
72
		-DWANT_OPUS=$(usex opus)
80 73
		-DWANT_OSS=$(usex oss)
81
		-DWANT_TESTS=OFF
82
		-DWANT_TOOLS=$(usex X)
74
		-DWANT_PHYSFS=$(usex physfs)
75
		-DWANT_PRIMITIVES=$(usex opengl)
76
		-DWANT_PULSEAUDIO=$(usex pulseaudio)
77
		-DWANT_TESTS=$(usex test)
78
		-DWANT_TTF=$(usex truetype)
79
		-DWANT_VORBIS=$(usex vorbis)
83 80
		-DWANT_X11=$(usex X)
81
		-DWANT_X11_XINERAMA=$(usex xinerama)
84 82
	)
85 83

  
86
	if use X; then
87
		mycmakeargs+=( -DWANT_ALLEGROGL=$(usex opengl) )
88
	else
89
		mycmakeargs+=( -DWANT_ALLEGROGL=OFF )
90
	fi
91

  
92 84
	cmake-multilib_src_configure
93 85
}
94 86

  
95
multilib_src_install() {
96
	if multilib_is_native_abi ; then
97
		dodoc -r docs/html
98
		#176020 (init_dialog.3), #409305 (key.3)
99
		pushd docs/man >/dev/null
100
		local manpage
101
		for manpage in $(ls -d *.3); do
102
			newman ${manpage} ${PN}-${manpage}
103
		done
104
		popd >/dev/null
105

  
106
		if use X; then
107
			newbin setup/setup ${PN}-setup
108
			insinto /usr/share/${PN}
109
			doins "${S}"/{keyboard,language,setup/setup}.dat
110
			newicon "${S}"/misc/icon.png ${PN}.png
111
			make_desktop_entry ${PN}-setup "Allegro Setup" ${PN} "Settings"
112
		fi
113
	fi
114
	cmake_src_install
87
src_install() {
88
	local HTML_DOCS=( docs/html/refman/. )
89
	cmake-multilib_src_install
90

  
91
	dodoc CHANGES-5.0.txt CHANGES-5.1.txt CHANGES-5.2.txt
92
	doman docs/man/*.3
115 93
}
Thank you!