Diff libsdl-1.2.15-r9 with a libsdl-1.2.15_p20210224

/usr/portage/media-libs/libsdl/libsdl-1.2.15_p20210224.ebuild 2021-04-06 21:39:00.000000000 +0300
1 1
# Copyright 1999-2021 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=5
4
EAPI=7
5 5

  
6
inherit autotools flag-o-matic ltprune multilib toolchain-funcs epatch multilib-minimal
6
inherit autotools flag-o-matic multilib-minimal
7 7

  
8
MY_COMMIT="99d7f1d1c5492f0fb3c799255042ca7a3f4a5de4"
8 9
DESCRIPTION="Simple Direct Media Layer"
9 10
HOMEPAGE="https://libsdl.org/"
10
SRC_URI="https://libsdl.org/release/SDL-${PV}.tar.gz"
11
SRC_URI="https://github.com/libsdl-org/SDL-1.2/archive/${MY_COMMIT}.tar.gz -> SDL-${PV}.tar.gz"
11 12

  
12 13
LICENSE="LGPL-2.1"
13 14
SLOT="0"
14
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
15
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
15 16
# WARNING:
16 17
# If you turn on the custom-cflags use flag in USE and something breaks,
17 18
# you pick up the pieces.  Be prepared for bug reports to be marked INVALID.
18
IUSE="oss alsa nas X dga xv xinerama fbcon tslib aalib opengl libcaca +sound +video +joystick custom-cflags pulseaudio static-libs"
19
IUSE="aalib alsa custom-cflags dga fbcon +joystick libcaca nas opengl oss pulseaudio +sound static-libs tslib +video X xinerama xv"
19 20

  
20 21
RDEPEND="
21
	sound? ( >=media-libs/audiofile-0.3.5[${MULTILIB_USEDEP}] )
22
	aalib? ( >=media-libs/aalib-1.4_rc5-r6[${MULTILIB_USEDEP}] )
22 23
	alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
24
	libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
23 25
	nas? (
24 26
		>=media-libs/nas-1.9.4[${MULTILIB_USEDEP}]
25
		>=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
26
		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
27 27
		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
28
	)
29
	X? (
30 28
		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
31
		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
32
		>=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
29
		>=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
33 30
	)
34
	aalib? ( >=media-libs/aalib-1.4_rc5-r6[${MULTILIB_USEDEP}] )
35
	libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
36 31
	opengl? (
37
		>=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
38 32
		>=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
33
		>=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
39 34
	)
40 35
	tslib? ( >=x11-libs/tslib-1.0-r3[${MULTILIB_USEDEP}] )
41
	pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )"
36
	pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
37
	sound? ( >=media-libs/audiofile-0.3.5[${MULTILIB_USEDEP}] )
38
	X? (
39
		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
40
		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
41
		>=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
42
	)"
42 43
DEPEND="${RDEPEND}
43 44
	nas? ( x11-base/xorg-proto )
44
	X? ( x11-base/xorg-proto )
45
	x86? ( || ( >=dev-lang/yasm-0.6.0 >=dev-lang/nasm-0.98.39-r3 ) )"
45
	X? ( x11-base/xorg-proto )"
46
BDEPEND="
47
	pulseaudio? ( virtual/pkgconfig )
48
	x86? (
49
		|| (
50
			>=dev-lang/yasm-0.6.0
51
			>=dev-lang/nasm-0.98.39-r3
52
		)
53
	)"
46 54

  
47
S=${WORKDIR}/SDL-${PV}
55
S=${WORKDIR}/SDL-1.2-${MY_COMMIT}
48 56

  
49 57
pkg_setup() {
50 58
	if use custom-cflags ; then
......
54 62
	fi
55 63
}
56 64

  
65
PATCHES=(
66
	"${FILESDIR}"/${PN}-$(ver_cut 1-3)-sdl-config.patch
67
	"${FILESDIR}"/${PN}-$(ver_cut 1-3)-gamma.patch
68
	"${FILESDIR}"/${PN}-$(ver_cut 1-3)-slibtool.patch
69
)
70

  
71
DOCS=( BUGS CREDITS README-SDL.txt TODO WhatsNew )
72

  
73
HTML_DOCS=( {docs,VisualC}.html docs/{html,images,index.html} )
74

  
57 75
src_prepare() {
58
	epatch \
59
		"${FILESDIR}"/${P}-sdl-config.patch \
60
		"${FILESDIR}"/${P}-resizing.patch \
61
		"${FILESDIR}"/${P}-joystick.patch \
62
		"${FILESDIR}"/${P}-bsd-joystick.patch \
63
		"${FILESDIR}"/${P}-gamma.patch \
64
		"${FILESDIR}"/${P}-const-xdata32.patch \
65
		"${FILESDIR}"/${P}-caca.patch \
66
		"${FILESDIR}"/${P}-SDL_EnableUNICODE.patch
76
	default
77

  
78
	if $(tc-is-gcc) && [[ ${CHOST} == *-darwin* ]] ; then
79
		# GCC at least has no idea what -fpascal-strings is
80
		sed -i -e '/EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"/d' configure.ac || die
81
		# We have trouble building against Frameworks with GCC for now (no Blocks support, etc)
82
		# error: unknown type name ‘CGImageSourceAnimationBlock’
83
		sed -i \
84
			-e '/EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_CARBON"/d' \
85
			-e '/EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"/d' \
86
			configure.ac || die
87
	fi
88

  
67 89
	AT_M4DIR="${EPREFIX}/usr/share/aclocal acinclude" eautoreconf
68 90
}
69 91

  
70 92
multilib_src_configure() {
71 93
	local myconf=
94

  
95
	if $(tc-is-gcc) && [[ ${CHOST} == *-darwin* ]] ; then
96
		# We can't build against Cocoa because we lack Blocks + Objective C++ support in
97
		# GCC (for now)
98
		use video && myconf="${myconf} --disable-video-cocoa"
99
		# CD support drags in audio
100
		myconf="${myconf} --disable-cdrom"
101
	else
102
		myconf="${myconf} --enable-cdrom"
103
	fi
104

  
72 105
	if use !x86 && use !x86-linux ; then
73 106
		myconf="${myconf} --disable-nasm"
74 107
	else
......
86 119
		--disable-arts \
87 120
		--disable-esd \
88 121
		--enable-events \
89
		--enable-cdrom \
90 122
		--enable-threads \
91 123
		--enable-timers \
92 124
		--enable-file \
......
127 159
}
128 160

  
129 161
multilib_src_install_all() {
130
	use static-libs || prune_libtool_files --all
131
	dodoc BUGS CREDITS README README-SDL.txt README.HG TODO WhatsNew
132
	dohtml -r ./
162
	use static-libs || find "${ED}" -type f -name "*.la" -delete || die
163
	einstalldocs
133 164
}
Thank you!