summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2021-04-05 00:28:41 +0200
committerDavid Seifert <soap@gentoo.org>2021-04-05 00:28:41 +0200
commit0eae9ea80ef4b1b9dd6088892cb40357abf4b4a0 (patch)
tree89cd3e5b7b03c9436f30b405f6db324719a5be18
parentapp-editors/xmlcopyeditor: Port to EAPI 7 (diff)
downloadgentoo-0eae9ea80ef4b1b9dd6088892cb40357abf4b4a0.tar.gz
gentoo-0eae9ea80ef4b1b9dd6088892cb40357abf4b4a0.tar.bz2
gentoo-0eae9ea80ef4b1b9dd6088892cb40357abf4b4a0.zip
app-misc/tek: Port to EAPI 7
Closes: https://bugs.gentoo.org/734252 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--app-misc/tek/files/tek-1.3.0-makefile.patch25
-rw-r--r--app-misc/tek/tek-1.3.0.ebuild28
2 files changed, 37 insertions, 16 deletions
diff --git a/app-misc/tek/files/tek-1.3.0-makefile.patch b/app-misc/tek/files/tek-1.3.0-makefile.patch
new file mode 100644
index 000000000000..b04985235e49
--- /dev/null
+++ b/app-misc/tek/files/tek-1.3.0-makefile.patch
@@ -0,0 +1,25 @@
+--- a/Makefile
++++ b/Makefile
+@@ -15,11 +15,10 @@
+
+ SOURCES=gui.cpp ihex.cpp usb.cpp
+
+-CXXFLAGS=-O2 -std=c++11
++CXXFLAGS+=-std=c++11
+
+ tek.lin: $(patsubst %.cpp,%-lin.o,$(SOURCES))
+- $(LIN_CXX) $(CXXFLAGS) $^ `$(LIN_WXCONFIG) --libs` -lusb-1.0 -o $@
+- $(LIN_STRIP) -s $@
++ $(CXX) $(LDFLAGS) $^ `$(WX_CONFIG) --libs` -lusb-1.0 -o $@ $(LIBS)
+
+ tek.mac: $(patsubst %.cpp,%-mac.o,$(SOURCES))
+ $(OSX_CXX) $(CXXFLAGS) $^ `$(OSX_WXCONFIG) --libs --static` -lusb-1.0 -o $@ -v
+@@ -30,7 +29,7 @@
+ $(WIN_STRIP) -s $@
+
+ %-lin.o: %.cpp
+- $(LIN_CXX) -c $(CXXFLAGS) `$(LIN_WXCONFIG) --cxxflags` $(filter %.cpp,$^) -o $@
++ $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) `$(WX_CONFIG) --cxxflags` $(filter %.cpp,$^) -o $@
+
+ %-win.o: %.cpp
+ $(WIN_CXX) -c $(CXXFLAGS) `$(WIN_WXCONFIG) --cxxflags` $(filter %.cpp,$^) -o $@
diff --git a/app-misc/tek/tek-1.3.0.ebuild b/app-misc/tek/tek-1.3.0.ebuild
index 69421b1eaec1..644b9e272307 100644
--- a/app-misc/tek/tek-1.3.0.ebuild
+++ b/app-misc/tek/tek-1.3.0.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-WX_GTK_VER=3.0
+EAPI=7
-inherit udev wxwidgets
+WX_GTK_VER="3.0"
+inherit toolchain-funcs udev wxwidgets
DESCRIPTION="GUI tool for upgrading the firmware of a Truly Ergonomic Keyboard"
HOMEPAGE="https://trulyergonomic.com/ https://github.com/m-ou-se/tek"
@@ -13,24 +13,20 @@ SRC_URI="https://github.com/m-ou-se/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="all-rights-reserved GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
RESTRICT="mirror"
-RDEPEND="x11-libs/wxGTK:${WX_GTK_VER}=[X]
+RDEPEND="
+ x11-libs/wxGTK:${WX_GTK_VER}=[X]
virtual/libusb:1
virtual/udev"
-DEPEND="${RDEPEND}
- app-editors/vim-core"
+DEPEND="${RDEPEND}"
+BDEPEND="app-editors/vim-core"
-src_prepare() {
- default
+PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
+
+src_configure() {
+ tc-export CXX
setup-wxwidgets
- sed -r \
- -e '/LIN_STRIP/d' \
- -e 's/LIN_CXX/CXX/g' \
- -e 's/CXX=/CXX\?=/' \
- -e 's/CXXFLAGS=(.*)/CXXFLAGS:=\1 $(CXXFLAGS)/' \
- -i "${S}"/Makefile || die
}
src_install() {