Diff vice-3.4_p38553 with a vice-3.5

/usr/portage/app-emulation/vice/vice-3.5.ebuild 2021-06-22 09:09:00.000000000 +0300
3 3

  
4 4
EAPI=7
5 5

  
6
inherit autotools multibuild xdg
7

  
8
MY_P="vice-emu-code-r${PV##*_p}-trunk-vice"
6
inherit multibuild toolchain-funcs xdg
9 7

  
10 8
DESCRIPTION="The Versatile Commodore Emulator"
11 9
HOMEPAGE="https://vice-emu.sourceforge.io/"
12
#SRC_URI="mirror://sourceforge/vice-emu/releases/${P}.tar.gz"
13
SRC_URI="https://sourceforge.net/code-snapshots/svn/v/vi/vice-emu/code/${MY_P}.zip"
10
SRC_URI="mirror://sourceforge/vice-emu/releases/${P}.tar.gz"
14 11

  
15 12
LICENSE="GPL-2+"
16 13
SLOT="0"
17
KEYWORDS="amd64 x86"
18
IUSE="alsa debug doc ethernet ffmpeg flac gif +gtk headless ipv6 jpeg lame mpg123 ogg oss +opengl parport pci png portaudio pulseaudio sdl zlib"
19
REQUIRED_USE="|| ( gtk headless sdl ) gtk? ( zlib )"
14
KEYWORDS="~amd64 ~x86"
15
IUSE="
16
	alsa cpuhistory debug doc ethernet ffmpeg flac gif +gtk headless
17
	ipv6 jpeg lame mpg123 ogg oss parport pci png portaudio pulseaudio
18
	sdl zlib"
19
REQUIRED_USE="
20
	|| ( gtk headless sdl )
21
	gtk? ( zlib )"
20 22

  
21 23
RDEPEND="
22 24
	sys-libs/readline:0=
23 25
	virtual/libintl
24 26
	alsa? ( media-libs/alsa-lib )
25 27
	ethernet? (
26
		>=net-libs/libpcap-0.9.8
27 28
		>=net-libs/libnet-1.1.2.1:1.1
29
		>=net-libs/libpcap-0.9.8
28 30
	)
29 31
	ffmpeg? ( media-video/ffmpeg:= )
30 32
	flac? ( media-libs/flac )
......
32 34
	gtk? (
33 35
		dev-libs/glib:2
34 36
		media-libs/fontconfig:1.0
37
		media-libs/glew:0=
38
		virtual/opengl
35 39
		x11-libs/cairo
36 40
		x11-libs/gtk+:3
37 41
		x11-libs/pango
38
		opengl? (
39
			media-libs/glew:0=
40
			virtual/opengl
41
		)
42 42
	)
43 43
	jpeg? ( virtual/jpeg )
44 44
	lame? ( media-sound/lame )
45 45
	mpg123? ( media-sound/mpg123 )
46 46
	ogg? (
47
		 media-libs/libogg
48
		 media-libs/libvorbis
47
		media-libs/libogg
48
		media-libs/libvorbis
49 49
	)
50 50
	parport? ( sys-libs/libieee1284 )
51 51
	pci? ( sys-apps/pciutils )
52 52
	png? ( media-libs/libpng:0= )
53 53
	portaudio? ( media-libs/portaudio )
54 54
	pulseaudio? ( media-sound/pulseaudio )
55
	sdl? ( media-libs/libsdl2[video] )
56
	zlib? ( sys-libs/zlib )
57
"
58

  
55
	sdl? (
56
		media-libs/libsdl2[video]
57
		media-libs/sdl2-image
58
	)
59
	zlib? ( sys-libs/zlib )"
59 60
DEPEND="
60 61
	${RDEPEND}
61
	x11-base/xorg-proto
62
"
63

  
62
	x11-base/xorg-proto"
64 63
BDEPEND="
65 64
	app-arch/unzip
66 65
	app-text/dos2unix
......
72 71
	virtual/pkgconfig
73 72
	virtual/yacc
74 73
	doc? ( virtual/texi2dvi )
75
	gtk? ( x11-misc/xdg-utils )
76
"
77

  
78
S="${WORKDIR}/${MY_P}"
79
ECONF_SOURCE="${S}"
80

  
81
PATCHES=(
82
	"${FILESDIR}"/vice-pkg-config-${PV}.patch
83
)
74
	gtk? ( x11-misc/xdg-utils )"
84 75

  
85 76
src_prepare() {
86 77
	default
......
88 79
	# Delete some bundled libraries.
89 80
	rm -r src/lib/lib{ffmpeg,lame,x264} || die
90 81

  
91
	local DIR
92
	for DIR in src/resid src/resid-dtv .; do
93
		pushd "${DIR}" || die
94
		AT_NO_RECURSIVE=1 eautoreconf
95
		popd || die
96
	done
97

  
98 82
	# Strip the predefined C(XX)FLAGS.
99 83
	sed -i -r 's:(VICE_C(XX)?FLAGS=)"[^$]+":\1:' configure || die
100
}
101 84

  
102
src_configure() {
103 85
	MULTIBUILD_VARIANTS=(
104 86
		$(usev gtk)
105 87
		$(usev headless)
106 88
		$(usev sdl)
107 89
	)
108 90

  
91
	# Debug build currently broken without copy sources.
92
	multibuild_copy_sources
93
}
94

  
95
src_configure() {
96
	tc-export AR
97

  
109 98
	multibuild_foreach_variant run_in_build_dir multibuild_src_configure
110 99
}
111 100

  
112 101
multibuild_enable() {
113
	if [[ ${MULTIBUILD_VARIANT} == $1 ]]; then
114
		printf -- "--enable-%s\n" "$2"
102
	if [[ ${MULTIBUILD_VARIANT} == ${1} ]]; then
103
		echo --enable-${2}
115 104
	else
116
		printf -- "--disable-%s\n" "$2"
105
		echo --disable-${2}
117 106
	fi
118 107
}
119 108

  
120 109
multibuild_src_configure() {
121
	# Some dependencies lack configure options so prevent them becoming
122
	# automagic by using configure cache variables.
123
	use pci || export ac_cv_header_pci_pci_h=no
124

  
125
	# Ensure we use giflib, not ungif.
126
	export ac_cv_lib_ungif_EGifPutLine=no
127

  
128 110
	# Append ".variant" to x* programs if building multiple variants.
111
	local xform
129 112
	if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
130 113
		xform="/^x/s/\$/.${MULTIBUILD_VARIANT}/"
131
	else
132
		unset xform
133 114
	fi
134 115

  
135
	econf \
136
		--program-transform-name="${xform}" \
137
		--disable-arch \
138
		$(use_enable debug) \
139
		$(use_enable debug debug-gtk3ui) \
140
		$(use_enable ffmpeg external-ffmpeg) \
141
		$(multibuild_enable headless headlessui) \
142
		--enable-html-docs \
143
		$(use_enable ethernet) \
144
		$(use_enable opengl hwscale) \
145
		$(use_enable ipv6) \
146
		$(use_enable lame) \
147
		$(use_enable parport libieee1284) \
148
		$(multibuild_enable gtk native-gtk3ui) \
149
		$(use_enable doc pdf-docs) \
150
		$(use_enable portaudio) \
151
		--disable-sdlui \
152
		$(multibuild_enable sdl sdlui2) \
153
		--disable-shared-ffmpeg \
154
		--disable-static-ffmpeg \
155
		$(multibuild_enable gtk desktop-files) \
156
		$(use_with alsa) \
157
		$(use_with gif) \
158
		$(use_with jpeg) \
159
		$(use_with oss) \
160
		$(use_with png) \
161
		$(use_with pulseaudio pulse) \
162
		$(use_with zlib) \
163
		$(use_with mpg123) \
164
		$(use_with ogg vorbis) \
116
	local econfargs=(
117
		--program-transform-name="${xform}"
118
		$(multibuild_enable gtk desktop-files)
119
		$(multibuild_enable gtk native-gtk3ui)
120
		$(multibuild_enable headless headlessui)
121
		$(multibuild_enable sdl sdlui2)
122

  
123
		$(use_enable cpuhistory)
124
		$(use_enable debug debug-gtk3ui)
125
		$(use_enable debug)
126
		$(use_enable doc pdf-docs)
127
		$(use_enable ethernet)
128
		$(use_enable ffmpeg external-ffmpeg)
129
		$(use_enable ipv6)
130
		$(use_enable lame)
131
		$(use_enable parport libieee1284)
132
		$(use_enable portaudio)
133
		$(use_with alsa)
165 134
		$(use_with flac)
135
		$(use_with gif)
136
		$(use_with jpeg)
137
		$(use_with mpg123)
138
		$(use_with ogg vorbis)
139
		$(use_with oss)
140
		$(use_with png)
141
		$(use_with pulseaudio pulse)
142
		$(use_with zlib)
143
		--disable-arch
144
		--disable-sdlui
145
		--disable-shared-ffmpeg
146
		--disable-static-ffmpeg
147
		--enable-html-docs
148

  
149
		# Some dependencies lack configure options so prevent them becoming
150
		# automagic by using configure cache variables.
151
		$(usex pci '' ac_cv_header_pci_pci_h=no)
152

  
153
		# Ensure we use giflib, not ungif.
154
		ac_cv_lib_ungif_EGifPutLine=no
155
	)
156

  
157
	econf "${econfargs[@]}"
166 158
}
167 159

  
168 160
src_compile() {
......
172 164
src_install() {
173 165
	# Get xdg-desktop-menu to play nicely while doing the install.
174 166
	dodir /etc/xdg/menus /usr/share/{applications,desktop-directories}
167

  
175 168
	XDG_UTILS_INSTALL_MODE=system \
176 169
	XDG_DATA_DIRS="${ED}"/usr/share \
177 170
	XDG_CONFIG_DIRS="${ED}"/etc/xdg \
178 171
		multibuild_foreach_variant run_in_build_dir default
172

  
179 173
	rm -f "${ED}"/usr/share/applications/*.cache || die
180
	dodoc FEEDBACK
181 174

  
182 175
	# Delete the bundled fonts. These could be packaged separately but
183 176
	# they're only for the HTML documentation.
184
	rm -r "${ED}"/usr/share/doc/${PF}/html/fonts/ || die
177
	rm -r "${ED}"/usr/share/doc/${PF}/html/fonts || die
185 178
}
Thank you!