summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-06-21 21:58:56 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-06-22 01:41:47 -0400
commit1da3c10cc574473121a60893967c541c01f7cf2e (patch)
tree5283c9ecbc91c61b96a2789982fb8feb5bbbc900 /app-emulation/vice
parentdev-ruby/webmock: amd64 stable (diff)
downloadgentoo-1da3c10cc574473121a60893967c541c01f7cf2e.tar.gz
gentoo-1da3c10cc574473121a60893967c541c01f7cf2e.tar.bz2
gentoo-1da3c10cc574473121a60893967c541c01f7cf2e.zip
app-emulation/vice: add cpuhistory flag, tidy ebuild
Also fixed USE=debug and a configure-stage direct AR call. Thanks-to: Vedran Vrbanc Closes: https://bugs.gentoo.org/782571 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'app-emulation/vice')
-rw-r--r--app-emulation/vice/metadata.xml1
-rw-r--r--app-emulation/vice/vice-3.5.ebuild131
2 files changed, 71 insertions, 61 deletions
diff --git a/app-emulation/vice/metadata.xml b/app-emulation/vice/metadata.xml
index 2294b11c8d08..331360dc2169 100644
--- a/app-emulation/vice/metadata.xml
+++ b/app-emulation/vice/metadata.xml
@@ -6,6 +6,7 @@
<name>Gentoo Games Project</name>
</maintainer>
<use>
+ <flag name="cpuhistory">Enable 65xx CPU history support (may decrease performance)</flag>
<flag name="ethernet">Enable ethernet emulation</flag>
<flag name="headless">Include the headless variant of the emulator</flag>
<flag name="mpg123">Enable mp3@64 cartridge support</flag>
diff --git a/app-emulation/vice/vice-3.5.ebuild b/app-emulation/vice/vice-3.5.ebuild
index a24aa9633576..4518b5ff92ff 100644
--- a/app-emulation/vice/vice-3.5.ebuild
+++ b/app-emulation/vice/vice-3.5.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit multibuild xdg
+inherit multibuild toolchain-funcs xdg
DESCRIPTION="The Versatile Commodore Emulator"
HOMEPAGE="https://vice-emu.sourceforge.io/"
@@ -12,16 +12,21 @@ SRC_URI="mirror://sourceforge/vice-emu/releases/${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="alsa debug doc ethernet ffmpeg flac gif +gtk headless ipv6 jpeg lame mpg123 ogg oss parport pci png portaudio pulseaudio sdl zlib"
-REQUIRED_USE="|| ( gtk headless sdl ) gtk? ( zlib )"
+IUSE="
+ alsa cpuhistory debug doc ethernet ffmpeg flac gif +gtk headless
+ ipv6 jpeg lame mpg123 ogg oss parport pci png portaudio pulseaudio
+ sdl zlib"
+REQUIRED_USE="
+ || ( gtk headless sdl )
+ gtk? ( zlib )"
RDEPEND="
sys-libs/readline:0=
virtual/libintl
alsa? ( media-libs/alsa-lib )
ethernet? (
- >=net-libs/libpcap-0.9.8
>=net-libs/libnet-1.1.2.1:1.1
+ >=net-libs/libpcap-0.9.8
)
ffmpeg? ( media-video/ffmpeg:= )
flac? ( media-libs/flac )
@@ -30,17 +35,17 @@ RDEPEND="
dev-libs/glib:2
media-libs/fontconfig:1.0
media-libs/glew:0=
+ virtual/opengl
x11-libs/cairo
x11-libs/gtk+:3
x11-libs/pango
- virtual/opengl
)
jpeg? ( virtual/jpeg )
lame? ( media-sound/lame )
mpg123? ( media-sound/mpg123 )
ogg? (
- media-libs/libogg
- media-libs/libvorbis
+ media-libs/libogg
+ media-libs/libvorbis
)
parport? ( sys-libs/libieee1284 )
pci? ( sys-apps/pciutils )
@@ -51,14 +56,10 @@ RDEPEND="
media-libs/libsdl2[video]
media-libs/sdl2-image
)
- zlib? ( sys-libs/zlib )
-"
-
+ zlib? ( sys-libs/zlib )"
DEPEND="
${RDEPEND}
- x11-base/xorg-proto
-"
-
+ x11-base/xorg-proto"
BDEPEND="
app-arch/unzip
app-text/dos2unix
@@ -70,10 +71,7 @@ BDEPEND="
virtual/pkgconfig
virtual/yacc
doc? ( virtual/texi2dvi )
- gtk? ( x11-misc/xdg-utils )
-"
-
-ECONF_SOURCE="${S}"
+ gtk? ( x11-misc/xdg-utils )"
src_prepare() {
default
@@ -83,71 +81,80 @@ src_prepare() {
# Strip the predefined C(XX)FLAGS.
sed -i -r 's:(VICE_C(XX)?FLAGS=)"[^$]+":\1:' configure || die
-}
-src_configure() {
MULTIBUILD_VARIANTS=(
$(usev gtk)
$(usev headless)
$(usev sdl)
)
+ # Debug build currently broken without copy sources.
+ multibuild_copy_sources
+}
+
+src_configure() {
+ tc-export AR
+
multibuild_foreach_variant run_in_build_dir multibuild_src_configure
}
multibuild_enable() {
- if [[ ${MULTIBUILD_VARIANT} == $1 ]]; then
- printf -- "--enable-%s\n" "$2"
+ if [[ ${MULTIBUILD_VARIANT} == ${1} ]]; then
+ echo --enable-${2}
else
- printf -- "--disable-%s\n" "$2"
+ echo --disable-${2}
fi
}
multibuild_src_configure() {
- # Some dependencies lack configure options so prevent them becoming
- # automagic by using configure cache variables.
- use pci || export ac_cv_header_pci_pci_h=no
-
- # Ensure we use giflib, not ungif.
- export ac_cv_lib_ungif_EGifPutLine=no
-
# Append ".variant" to x* programs if building multiple variants.
+ local xform
if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
xform="/^x/s/\$/.${MULTIBUILD_VARIANT}/"
- else
- unset xform
fi
- econf \
- --program-transform-name="${xform}" \
- --disable-arch \
- $(use_enable debug) \
- $(use_enable debug debug-gtk3ui) \
- $(use_enable ffmpeg external-ffmpeg) \
- $(multibuild_enable headless headlessui) \
- --enable-html-docs \
- $(use_enable ethernet) \
- $(use_enable ipv6) \
- $(use_enable lame) \
- $(use_enable parport libieee1284) \
- $(multibuild_enable gtk native-gtk3ui) \
- $(use_enable doc pdf-docs) \
- $(use_enable portaudio) \
- --disable-sdlui \
- $(multibuild_enable sdl sdlui2) \
- --disable-shared-ffmpeg \
- --disable-static-ffmpeg \
- $(multibuild_enable gtk desktop-files) \
- $(use_with alsa) \
- $(use_with gif) \
- $(use_with jpeg) \
- $(use_with oss) \
- $(use_with png) \
- $(use_with pulseaudio pulse) \
- $(use_with zlib) \
- $(use_with mpg123) \
- $(use_with ogg vorbis) \
+ local econfargs=(
+ --program-transform-name="${xform}"
+ $(multibuild_enable gtk desktop-files)
+ $(multibuild_enable gtk native-gtk3ui)
+ $(multibuild_enable headless headlessui)
+ $(multibuild_enable sdl sdlui2)
+
+ $(use_enable cpuhistory)
+ $(use_enable debug debug-gtk3ui)
+ $(use_enable debug)
+ $(use_enable doc pdf-docs)
+ $(use_enable ethernet)
+ $(use_enable ffmpeg external-ffmpeg)
+ $(use_enable ipv6)
+ $(use_enable lame)
+ $(use_enable parport libieee1284)
+ $(use_enable portaudio)
+ $(use_with alsa)
$(use_with flac)
+ $(use_with gif)
+ $(use_with jpeg)
+ $(use_with mpg123)
+ $(use_with ogg vorbis)
+ $(use_with oss)
+ $(use_with png)
+ $(use_with pulseaudio pulse)
+ $(use_with zlib)
+ --disable-arch
+ --disable-sdlui
+ --disable-shared-ffmpeg
+ --disable-static-ffmpeg
+ --enable-html-docs
+
+ # Some dependencies lack configure options so prevent them becoming
+ # automagic by using configure cache variables.
+ $(usex pci '' ac_cv_header_pci_pci_h=no)
+
+ # Ensure we use giflib, not ungif.
+ ac_cv_lib_ungif_EGifPutLine=no
+ )
+
+ econf "${econfargs[@]}"
}
src_compile() {
@@ -157,13 +164,15 @@ src_compile() {
src_install() {
# Get xdg-desktop-menu to play nicely while doing the install.
dodir /etc/xdg/menus /usr/share/{applications,desktop-directories}
+
XDG_UTILS_INSTALL_MODE=system \
XDG_DATA_DIRS="${ED}"/usr/share \
XDG_CONFIG_DIRS="${ED}"/etc/xdg \
multibuild_foreach_variant run_in_build_dir default
+
rm -f "${ED}"/usr/share/applications/*.cache || die
# Delete the bundled fonts. These could be packaged separately but
# they're only for the HTML documentation.
- rm -r "${ED}"/usr/share/doc/${PF}/html/fonts/ || die
+ rm -r "${ED}"/usr/share/doc/${PF}/html/fonts || die
}