summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2019-04-08 18:43:27 +0200
committerDavid Seifert <soap@gentoo.org>2019-04-08 18:43:27 +0200
commit30555185ca6b09e3cdd04fd611ff8ad96b815b13 (patch)
tree2fdc88562edf43893837d831ffca64a132f2fc1f /media-sound
parentmedia-sound/mt-daapd: Port to EAPI 7 (diff)
downloadgentoo-30555185ca6b09e3cdd04fd611ff8ad96b815b13.tar.gz
gentoo-30555185ca6b09e3cdd04fd611ff8ad96b815b13.tar.bz2
gentoo-30555185ca6b09e3cdd04fd611ff8ad96b815b13.zip
media-sound/vkeybd: Port to EAPI 7
Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/vkeybd/files/vkeybd-0.1.18c-fix-buildsystem.patch81
-rw-r--r--media-sound/vkeybd/vkeybd-0.1.18d.ebuild57
2 files changed, 103 insertions, 35 deletions
diff --git a/media-sound/vkeybd/files/vkeybd-0.1.18c-fix-buildsystem.patch b/media-sound/vkeybd/files/vkeybd-0.1.18c-fix-buildsystem.patch
new file mode 100644
index 000000000000..84c99172ca4d
--- /dev/null
+++ b/media-sound/vkeybd/files/vkeybd-0.1.18c-fix-buildsystem.patch
@@ -0,0 +1,81 @@
+--- a/Makefile
++++ b/Makefile
+@@ -8,7 +8,7 @@
+ #
+ # installation directory
+ #
+-PREFIX = /usr/local
++PREFIX = $(EPREFIX)/usr
+ # binary and Tcl script are put there
+ BIN_DIR = $(PREFIX)/bin
+ # man page
+@@ -27,21 +27,21 @@
+ # device selections -- multiple avaialble
+ # to disable the device, set value 0 (do not comment out!)
+ #
+-USE_AWE = 1
+-USE_MIDI = 1
+-USE_ALSA = 1
+-USE_LASH = 0
++USE_AWE ?= 1
++USE_MIDI ?= 1
++USE_ALSA ?= 1
++USE_LASH ?= 0
+
+ #
+ # Tcl/Tk library -- depends on your distribution
+ #
+-TCL_VERSION = 8.4
++TCL_VERSION ?= 8.4
+ TCLLIB = -ltcl$(TCL_VERSION)
+ TCLINC =
+ TKLIB = -ltk$(TCL_VERSION)
+ TKINC =
+-XLIB = -L/usr/X11R6/lib -lX11
+-XINC = -I/usr/X11R6/include
++XLIB = $(shell $(PKG_CONFIG) --libs x11)
++XINC = $(shell $(PKG_CONFIG) --cflags x11)
+ EXTRALIB += -ldl
+
+ #----------------------------------------------------------------
+@@ -71,9 +71,9 @@
+ # LASH stuff
+ #
+ ifeq (1,$(USE_LASH))
+-LASHCFLAGS = $(shell pkg-config --cflags lash-1.0) \
+- $(shell pkg-config --exists lash-1.0 && echo "-DHAVE_LASH" )
+-LASHLIBS = $(shell pkg-config --libs lash-1.0)
++LASHCFLAGS = $(shell $(PKG_CONFIG) --cflags lash-1.0) \
++ $(shell $(PKG_CONFIG) --exists lash-1.0 && echo "-DHAVE_LASH" )
++LASHLIBS = $(shell $(PKG_CONFIG) --libs lash-1.0)
+ DEVICES += $(LASHCFLAGS)
+ EXTRALIB += $(LASHLIBS)
+ endif
+@@ -84,8 +84,7 @@
+
+ VKB_TCLFILE = $(VKBLIB_DIR)/vkeybd.tcl
+
+-COPTFLAGS = -Wall -O
+-CFLAGS = $(COPTFLAGS) -DVKB_TCLFILE=\"$(VKB_TCLFILE)\" \
++CFLAGS += -Wall -DVKB_TCLFILE=\"$(VKB_TCLFILE)\" \
+ -DVKBLIB_DIR=\"$(VKBLIB_DIR)\"\
+ -DVERSION_STR=\"$(VERSION)\"\
+ $(DEVICES) $(XINC) $(TCLINC) $(TKINC) $(LASHCFLAGS)
+@@ -100,7 +99,7 @@
+ sftovkb: sftovkb.o sffile.o malloc.o fskip.o
+ $(CC) $(LDFLAGS) -o $@ $^ -lm
+
+-install: $(TARGETS) vkeybd.tcl vkeybd.list vkeybdmap*
++install-default: $(TARGETS) vkeybd.tcl vkeybd.list vkeybdmap*
+ mkdir -p $(DESTDIR)$(BIN_DIR)
+ install -c -m 755 vkeybd $(DESTDIR)$(BIN_DIR)
+ install -c -m 755 sftovkb $(DESTDIR)$(BIN_DIR)
+@@ -120,7 +119,7 @@
+ mkdir -p $(DESTDIR)$(DATA_DIR)/pixmaps
+ install -c -m 644 pixmaps/*.png $(DESTDIR)$(DATA_DIR)/pixmaps
+
+-install-all: install install-man install-desktop
++install: install-default install-man install-desktop
+
+ clean:
+ rm -f *.o $(TARGETS)
diff --git a/media-sound/vkeybd/vkeybd-0.1.18d.ebuild b/media-sound/vkeybd/vkeybd-0.1.18d.ebuild
index 56fd2ccbeca4..eadf36bb8eca 100644
--- a/media-sound/vkeybd/vkeybd-0.1.18d.ebuild
+++ b/media-sound/vkeybd/vkeybd-0.1.18d.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=2
-inherit eutils toolchain-funcs
+EAPI=7
+
+inherit toolchain-funcs
DESCRIPTION="A virtual MIDI keyboard for X"
HOMEPAGE="http://www.alsa-project.org/~iwai/alsa.html"
@@ -13,44 +14,30 @@ SLOT="0"
KEYWORDS="amd64 ~sparc x86"
IUSE="alsa lash oss"
-RDEPEND="alsa? ( media-libs/alsa-lib )
- >=dev-lang/tk-8.3
- lash? ( media-sound/lash )
- x11-libs/libX11"
+RDEPEND="
+ >=dev-lang/tk-8.3:=
+ x11-libs/libX11
+ alsa? ( media-libs/alsa-lib:= )
+ lash? ( media-sound/lash:= )"
DEPEND="${RDEPEND}
- x11-base/xorg-proto"
+ x11-base/xorg-proto
+ virtual/pkgconfig"
S=${WORKDIR}/${PN}
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.1.18c-desktop_entry.patch
+ "${FILESDIR}"/${PN}-0.1.18c-fix-buildsystem.patch
+)
-pkg_setup() {
- TCL_VERSION=`echo 'puts [info tclversion]' | tclsh`
-
- vkeybconf="PREFIX=/usr"
-
- if use alsa; then
- vkeybconf+=" USE_ALSA=1"
- use oss || vkeybconf+=" USE_AWE=0 USE_MIDI=0"
- else
- vkeybconf+=" USE_ALSA=0 USE_AWE=1 USE_MIDI=1"
- fi
+src_configure() {
+ export TCL_VERSION="$(echo 'puts [info tclversion]' | tclsh)"
- use lash && vkeybconf+=" USE_LASH=1"
-
- vkeybconf+=" TCL_VERSION=${TCL_VERSION}"
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-0.1.18c-desktop_entry.patch
-}
-
-src_compile() {
- tc-export CC
- emake ${vkeybconf} COPTFLAGS="${CFLAGS}" || die
-}
+ export USE_ALSA=$(usex alsa 1 0)
+ export USE_AWE=$(usex alsa $(usex oss 1 0) 1)
+ export USE_MIDI=$(usex alsa $(usex oss 1 0) 1)
+ export USE_LASH=$(usex lash 1 0)
-src_install() {
- emake ${vkeybconf} DESTDIR="${D}" install-all || die
- dodoc ChangeLog README
+ tc-export CC PKG_CONFIG
}
pkg_postinst() {