Diff allegro-4.4.3.1-r1 with a allegro-5.2.7.0-r2

/usr/portage/media-libs/allegro/allegro-5.2.7.0-r2.ebuild 2023-10-09 14:52:31.656368405 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
inherit cmake-multilib desktop
6
inherit cmake-multilib
7 7

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

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

  
17
# TODO: For tests, we need some extra deps.
18
# -- Could NOT find OPENSL (missing: OPENSL_INCLUDE_DIR OPENSL_LIBRARY)
19
# -- Could NOT find MiniMP3 (missing: MINIMP3_INCLUDE_DIRS)
20
# TODO: Tweak REQUIRED_USE for tests?
21
# WARNING: allegro_video wanted but no supported backend found
22

  
23
REQUIRED_USE="X? ( opengl )
24
	xinerama? ( X )
25
	|| ( alsa openal oss pulseaudio )"
26
RESTRICT="!test? ( test )"
16 27

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

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

  
52
src_prepare() {
53
	cmake_src_prepare
54

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

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

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

  
91 90
	cmake-multilib_src_configure
92 91
}
93 92

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

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

  
97
	dodoc CHANGES-5.0.txt CHANGES-5.1.txt CHANGES-5.2.txt
98
	doman docs/man/*.3
114 99
}
Thank you!