Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/antimicro/, games-util/antimicro/files/
Date: Sat, 25 Aug 2018 15:27:26
Message-Id: 1535210508.0f917374bcbafc1e0ec7ecad84ada6331a67b8fa.asturm@gentoo
1 commit: 0f917374bcbafc1e0ec7ecad84ada6331a67b8fa
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 25 15:21:48 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 25 15:21:48 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f917374
7
8 games-util/antimicro: 2.23 version bump, EAPI-6
9
10 Thanks-to: Niranjan <niranjan.public <AT> gmail.com>
11 Thanks-to: Small_Penguin <dark.shadow <AT> gmx.at>
12 Closes: https://bugs.gentoo.org/603712
13 Package-Manager: Portage-2.3.48, Repoman-2.3.10
14
15 games-util/antimicro/Manifest | 1 +
16 games-util/antimicro/antimicro-2.23.ebuild | 54 ++++++++++++++++++++++
17 .../files/antimicro-2.23-linking-errors.patch | 40 ++++++++++++++++
18 3 files changed, 95 insertions(+)
19
20 diff --git a/games-util/antimicro/Manifest b/games-util/antimicro/Manifest
21 index 308f0153c43..e1f6d1de1c1 100644
22 --- a/games-util/antimicro/Manifest
23 +++ b/games-util/antimicro/Manifest
24 @@ -1 +1,2 @@
25 DIST antimicro-2.20.2.tar.gz 1069469 BLAKE2B 8507c4f46e3e016c54d6cc0081ad5e90a0473bd1b99c30e6ceb74804564fdde6cd4bcb4897be5ae06272ae0aa55f36976d91ee9b1d531fce2013dad81379c1bb SHA512 09847c804b6a1d022f2990d269c9124cfdfab821e0fd1cb1ab5e27e4c6a3bd250fab5977ca614f03c46456ca6e1c7111135b9b4d8f75e54c435e0b712653e282
26 +DIST antimicro-2.23.tar.gz 1157299 BLAKE2B 4577588414f3145f5e6a817160214d6f2d0fc3cc3c9dda456173c42586247420f413785b7ca26b9d02397fb970e005c386675a478fd07330d5b13683094f28ab SHA512 cd58b5a9771d35fc937306a3452e8776ef754bb5a4fa44aeedb735d8366a38b318c1bf14f105bf8003e4264c35f129224becdade32d2a7b61067ec5a705a1e7e
27
28 diff --git a/games-util/antimicro/antimicro-2.23.ebuild b/games-util/antimicro/antimicro-2.23.ebuild
29 new file mode 100644
30 index 00000000000..62d39364b1d
31 --- /dev/null
32 +++ b/games-util/antimicro/antimicro-2.23.ebuild
33 @@ -0,0 +1,54 @@
34 +# Copyright 1999-2018 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +inherit cmake-utils xdg-utils
40 +
41 +DESCRIPTION="Map keyboard and mouse buttons to gamepad buttons"
42 +HOMEPAGE="https://github.com/AntiMicro/antimicro"
43 +SRC_URI="https://github.com/AntiMicro/antimicro/archive/${PV}.tar.gz -> ${P}.tar.gz"
44 +
45 +LICENSE="GPL-3"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~x86"
48 +IUSE=""
49 +
50 +RDEPEND="
51 + dev-qt/qtcore:5
52 + dev-qt/qtgui:5
53 + dev-qt/qtnetwork:5
54 + dev-qt/qtwidgets:5
55 + media-libs/libsdl2[X,joystick]
56 + x11-libs/libX11
57 + x11-libs/libXtst
58 +"
59 +DEPEND="${RDEPEND}
60 + dev-qt/linguist-tools:5
61 + virtual/pkgconfig
62 +"
63 +
64 +PATCHES=( "${FILESDIR}/${P}-linking-errors.patch" )
65 +
66 +src_configure() {
67 + # TODO: Currently does not build w/o X
68 + # (!X would be: -DWITH_XTEST=OFF -DWITH_UINPUT=ON)
69 + local mycmakeargs=(
70 + -DUSE_QT5=ON
71 + -DUSE_SDL_2=ON
72 + -DWITH_X11=ON
73 + -DWITH_XTEST=ON
74 + -DWITH_UINPUT=OFF
75 + )
76 + cmake-utils_src_configure
77 +}
78 +
79 +pkg_postinst() {
80 + xdg_mimeinfo_database_update
81 + xdg_desktop_database_update
82 +}
83 +
84 +pkg_postrm() {
85 + xdg_mimeinfo_database_update
86 + xdg_desktop_database_update
87 +}
88
89 diff --git a/games-util/antimicro/files/antimicro-2.23-linking-errors.patch b/games-util/antimicro/files/antimicro-2.23-linking-errors.patch
90 new file mode 100644
91 index 00000000000..88d03e87670
92 --- /dev/null
93 +++ b/games-util/antimicro/files/antimicro-2.23-linking-errors.patch
94 @@ -0,0 +1,40 @@
95 +From d5cfe429edb8c5f6f039153a0f646f2198c06b16 Mon Sep 17 00:00:00 2001
96 +From: Raphael Kubo da Costa <rakuco@×××××××.org>
97 +Date: Mon, 29 Jan 2018 12:19:55 +0100
98 +Subject: [PATCH] cmake: Stop calling QT5_WRAP_CPP().
99 +
100 +The USE_QT5 code path already unconditionally sets CMAKE_AUTOMOC to on.
101 +
102 +Calling QT5_WRAP_CPP() used to be just redundant, as antimicro_HEADERS_MOC
103 +was never actually added as a source dependency of the antimicro target. In
104 +other words, CMake's own automoc infrastructure was actually being used and
105 +the moc invocations from QT5_WRAP_CPP() were not being made at all.
106 +
107 +Starting with Qt 5.9.4, calling QT5_WRAP_CPP() disables the AUTOMOC property
108 +on the macro's input files, which means neither CMake's automoc
109 +infrastructure not QT5_WRAP_CPP()'s code were being used and we ended up
110 +with several 'undefined reference to vtable' errors when linking.
111 +---
112 + CMakeLists.txt | 2 --
113 + 1 file changed, 2 deletions(-)
114 +
115 +diff --git a/CMakeLists.txt b/CMakeLists.txt
116 +index 63ef851..0e47889 100644
117 +--- a/CMakeLists.txt
118 ++++ b/CMakeLists.txt
119 +@@ -499,7 +499,6 @@ if (UNIX)
120 + find_package(Qt5Network REQUIRED)
121 + find_package(Qt5LinguistTools REQUIRED)
122 +
123 +- QT5_WRAP_CPP(antimicro_HEADERS_MOC ${antimicro_HEADERS})
124 + QT5_WRAP_UI(antimicro_FORMS_HEADERS ${antimicro_FORMS})
125 + QT5_ADD_RESOURCES(antimicro_RESOURCES_RCC ${antimicro_RESOURCES})
126 + add_subdirectory("share/antimicro/translations")
127 +@@ -550,7 +549,6 @@ elseif(WIN32)
128 + find_package(Qt5Network REQUIRED)
129 + find_package(Qt5LinguistTools REQUIRED)
130 +
131 +- QT5_WRAP_CPP(antimicro_HEADERS_MOC ${antimicro_HEADERS})
132 + QT5_WRAP_UI(antimicro_FORMS_HEADERS ${antimicro_FORMS})
133 + QT5_ADD_RESOURCES(antimicro_RESOURCES_RCC ${antimicro_RESOURCES})
134 + add_subdirectory("share/antimicro/translations")