Сравнение libsdl-1.2.15_p20221201 с libsdl-1.2.64

/usr/portage/media-libs/libsdl/libsdl-1.2.64.ebuild 2023-10-09 14:52:31.692368406 +0300
3 3

  
4 4
EAPI=8
5 5

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

  
8
MY_COMMIT="ca3acd25348edc9b6e984fc1712fd4d365931dc1"
9
DESCRIPTION="Simple Direct Media Layer"
10
HOMEPAGE="https://libsdl.org/"
11
SRC_URI="https://github.com/libsdl-org/SDL-1.2/archive/${MY_COMMIT}.tar.gz -> SDL-${PV}.tar.gz"
12
S="${WORKDIR}"/SDL-1.2-${MY_COMMIT}
8
DESCRIPTION="Simple Direct Media Layer 1.2 compatibility wrapper around SDL2"
9
HOMEPAGE="https://github.com/libsdl-org/sdl12-compat"
10
SRC_URI="https://github.com/libsdl-org/sdl12-compat/archive/refs/tags/release-${PV}.tar.gz -> ${P}.tar.gz"
13 11

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

  
16
# IUSE dropped from real SDL1: aalib custom-cflags dga fbcon libcaca nas oss pulseaudio static-libs tslib xinerama xv
17
IUSE="alsa +joystick opengl +sound test +video X"
18
REQUIRED_USE="test? ( joystick opengl sound video )"
19

  
20
# The tests are more like example programs.
21
RESTRICT="test"
21 22

  
22 23
RDEPEND="
23
	aalib? ( >=media-libs/aalib-1.4_rc5-r6[${MULTILIB_USEDEP}] )
24
	alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
25
	libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
26
	nas? (
27
		>=media-libs/nas-1.9.4[${MULTILIB_USEDEP}]
28
		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
29
		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
30
		>=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
31
	)
32
	opengl? (
33
		>=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
34
		>=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
35
	)
36
	tslib? ( >=x11-libs/tslib-1.0-r3[${MULTILIB_USEDEP}] )
37
	pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
38
	sound? ( >=media-libs/audiofile-0.3.5[${MULTILIB_USEDEP}] )
39
	X? (
40
		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
41
		>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
42
		>=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
43
	)
24
	media-libs/libsdl2[${MULTILIB_USEDEP},alsa=,joystick=,opengl=,sound=,video=,X=]
44 25
"
26

  
45 27
DEPEND="
46 28
	${RDEPEND}
47
	nas? ( x11-base/xorg-proto )
48
	X? ( x11-base/xorg-proto )
29
	test? ( virtual/opengl[${MULTILIB_USEDEP}] )
49 30
"
50
BDEPEND="
51
	pulseaudio? ( virtual/pkgconfig )
52
	x86? (
53
		|| (
54
			>=dev-lang/yasm-0.6.0
55
			>=dev-lang/nasm-0.98.39-r3
56
		)
57
	)"
58

  
59
pkg_setup() {
60
	if use custom-cflags ; then
61
		ewarn "Since you've chosen to use possibly unsafe CFLAGS,"
62
		ewarn "don't bother filing libsdl-related bugs until trying to remerge"
63
		ewarn "libsdl without the custom-cflags use flag in USE."
64
	fi
65
}
66 31

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

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

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

  
76
src_prepare() {
77
	default
78

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

  
90
	AT_M4DIR="${EPREFIX}/usr/share/aclocal acinclude" eautoreconf
91
}
92

  
93
multilib_src_configure() {
94
	local myconf=
95

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

  
106
	if use !x86 && use !x86-linux ; then
107
		myconf="${myconf} --disable-nasm"
108
	else
109
		myconf="${myconf} --enable-nasm"
110
	fi
111
	use custom-cflags || strip-flags
112
	use sound || myconf="${myconf} --disable-audio"
113
	use video \
114
		&& myconf="${myconf} --enable-video-dummy" \
115
		|| myconf="${myconf} --disable-video"
116
	use joystick || myconf="${myconf} --disable-joystick"
117

  
118
	ECONF_SOURCE="${S}" econf \
119
		$(use_enable prefix rpath) \
120
		--disable-arts \
121
		--disable-esd \
122
		--enable-events \
123
		--enable-threads \
124
		--enable-timers \
125
		--enable-file \
126
		--enable-cpuinfo \
127
		--disable-alsa-shared \
128
		--disable-esd-shared \
129
		--disable-sndio \
130
		--disable-pulseaudio-shared \
131
		--disable-arts-shared \
132
		--disable-nas-shared \
133
		--disable-osmesa-shared \
134
		$(use_enable oss) \
135
		$(use_enable alsa) \
136
		$(use_enable pulseaudio) \
137
		$(use_enable nas) \
138
		$(use_enable X video-x11) \
139
		$(use_enable dga) \
140
		$(use_enable xv video-x11-xv) \
141
		$(use_enable xinerama video-x11-xinerama) \
142
		$(use_enable X video-x11-xrandr) \
143
		$(use_enable dga video-dga) \
144
		$(use_enable fbcon video-fbcon) \
145
		--disable-video-ggi \
146
		--disable-video-svga \
147
		$(use_enable aalib video-aalib) \
148
		$(use_enable libcaca video-caca) \
149
		$(use_enable opengl video-opengl) \
150
		--disable-video-ps3 \
151
		$(use_enable tslib input-tslib) \
152
		$(use_with X x) \
153
		$(use_enable static-libs static) \
154
		--disable-video-x11-xme \
155
		--disable-video-directfb \
156
		${myconf}
157
}
158

  
159
multilib_src_install() {
160
	emake DESTDIR="${D}" install
161
}
34
src_configure() {
35
	local mycmakeargs=(
36
		-DSDL12TESTS=$(usex test)
37
	)
162 38

  
163
multilib_src_install_all() {
164
	use static-libs || find "${ED}" -type f -name "*.la" -delete || die
165
	einstalldocs
39
	cmake-multilib_src_configure
166 40
}
Спасибо!