[gentoo-commits] repo/gentoo:master commit in: games-util/antimicro/, games-util/antimicro/files/

2021-06-13 Thread Sam James
commit: 92ba03cd5810614dd2175279b149858d4d1b5d5a
Author: Sam James  gentoo  org>
AuthorDate: Sun Jun 13 15:31:20 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jun 13 17:13:49 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92ba03cd

games-util/antimicro: fix build with GCC 11

Comparing pointer with 0. Check the size of the underlying structure
instead.

Closes: https://bugs.gentoo.org/791145
Signed-off-by: Sam James  gentoo.org>

 games-util/antimicro/antimicro-2.23.ebuild   |  1 +
 .../antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch   | 12 
 2 files changed, 13 insertions(+)

diff --git a/games-util/antimicro/antimicro-2.23.ebuild 
b/games-util/antimicro/antimicro-2.23.ebuild
index 1363ec031a9..965970f2d3b 100644
--- a/games-util/antimicro/antimicro-2.23.ebuild
+++ b/games-util/antimicro/antimicro-2.23.ebuild
@@ -32,6 +32,7 @@ PATCHES=(
"${FILESDIR}"/${P}-linking-errors.patch
"${FILESDIR}"/${PN}-2.23-no-compress-man-page.patch
"${FILESDIR}"/${PN}-2.23-SDL2-include.patch
+   "${FILESDIR}"/${PN}-2.23-gcc11-ptr-compare.patch
 )
 
 src_prepare() {

diff --git a/games-util/antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch 
b/games-util/antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch
new file mode 100644
index 000..2ed157c1e84
--- /dev/null
+++ b/games-util/antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/791145
+--- a/src/mainwindow.cpp
 b/src/mainwindow.cpp
+@@ -364,7 +364,7 @@ void MainWindow::makeJoystickTabs()
+ ui->tabWidget->addTab(tabwidget, joytabName);
+ }
+ 
+-if (joysticks > 0)
++if (joysticks->size() > 0)
+ {
+ ui->tabWidget->setCurrentIndex(0);
+ ui->stackedWidget->setCurrentIndex(1);



[gentoo-commits] repo/gentoo:master commit in: games-util/antimicro/, games-util/antimicro/files/

2021-04-05 Thread Sam James
commit: 44408c23a81c88f99ab2ea6a94bae01f1a3e2f19
Author: Sam James  gentoo  org>
AuthorDate: Mon Apr  5 23:23:34 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Apr  5 23:24:34 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44408c23

games-util/antimicro: include SDL 2 patch

Not clear why this doesn't happen for me, but it happened
for toralf and a user, which is good enough. Patch is
straightforward.

Thanks-to: Tim Barnes  gmail.com>
Closes: https://bugs.gentoo.org/649242
Signed-off-by: Sam James  gentoo.org>

 games-util/antimicro/antimicro-2.23.ebuild   |  1 +
 games-util/antimicro/files/antimicro-2.23-SDL2-include.patch | 12 
 2 files changed, 13 insertions(+)

diff --git a/games-util/antimicro/antimicro-2.23.ebuild 
b/games-util/antimicro/antimicro-2.23.ebuild
index 13efec5688b..1363ec031a9 100644
--- a/games-util/antimicro/antimicro-2.23.ebuild
+++ b/games-util/antimicro/antimicro-2.23.ebuild
@@ -31,6 +31,7 @@ BDEPEND="
 PATCHES=(
"${FILESDIR}"/${P}-linking-errors.patch
"${FILESDIR}"/${PN}-2.23-no-compress-man-page.patch
+   "${FILESDIR}"/${PN}-2.23-SDL2-include.patch
 )
 
 src_prepare() {

diff --git a/games-util/antimicro/files/antimicro-2.23-SDL2-include.patch 
b/games-util/antimicro/files/antimicro-2.23-SDL2-include.patch
new file mode 100644
index 000..a71e9b4b862
--- /dev/null
+++ b/games-util/antimicro/files/antimicro-2.23-SDL2-include.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/649242
+Thanks-to: Tim Barnes
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -585,6 +585,7 @@
+ endif(WITH_XTEST)
+ 
+ if(USE_SDL_2)
++include_directories(${SDL2_INCLUDE_DIRS})
+ list(APPEND LIBS ${SDL2_LIBRARIES})
+ else()
+ list(APPEND LIBS ${SDL_LIBRARIES})



[gentoo-commits] repo/gentoo:master commit in: games-util/antimicro/, games-util/antimicro/files/

2018-08-25 Thread Andreas Sturmlechner
commit: 0f917374bcbafc1e0ec7ecad84ada6331a67b8fa
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sat Aug 25 15:21:48 2018 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Aug 25 15:21:48 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f917374

games-util/antimicro: 2.23 version bump, EAPI-6

Thanks-to: Niranjan  gmail.com>
Thanks-to: Small_Penguin  gmx.at>
Closes: https://bugs.gentoo.org/603712
Package-Manager: Portage-2.3.48, Repoman-2.3.10

 games-util/antimicro/Manifest  |  1 +
 games-util/antimicro/antimicro-2.23.ebuild | 54 ++
 .../files/antimicro-2.23-linking-errors.patch  | 40 
 3 files changed, 95 insertions(+)

diff --git a/games-util/antimicro/Manifest b/games-util/antimicro/Manifest
index 308f0153c43..e1f6d1de1c1 100644
--- a/games-util/antimicro/Manifest
+++ b/games-util/antimicro/Manifest
@@ -1 +1,2 @@
 DIST antimicro-2.20.2.tar.gz 1069469 BLAKE2B 
8507c4f46e3e016c54d6cc0081ad5e90a0473bd1b99c30e6ceb74804564fdde6cd4bcb4897be5ae06272ae0aa55f36976d91ee9b1d531fce2013dad81379c1bb
 SHA512 
09847c804b6a1d022f2990d269c9124cfdfab821e0fd1cb1ab5e27e4c6a3bd250fab5977ca614f03c46456ca6e1c735b9b4d8f75e54c435e0b712653e282
+DIST antimicro-2.23.tar.gz 1157299 BLAKE2B 
4577588414f3145f5e6a817160214d6f2d0fc3cc3c9dda456173c42586247420f413785b7ca26b9d02397fb970e005c386675a478fd07330d5b13683094f28ab
 SHA512 
cd58b5a9771d35fc937306a3452e8776ef754bb5a4fa44aeedb735d8366a38b318c1bf14f105bf8003e4264c35f129224becdade32d2a7b61067ec5a705a1e7e

diff --git a/games-util/antimicro/antimicro-2.23.ebuild 
b/games-util/antimicro/antimicro-2.23.ebuild
new file mode 100644
index 000..62d39364b1d
--- /dev/null
+++ b/games-util/antimicro/antimicro-2.23.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils xdg-utils
+
+DESCRIPTION="Map keyboard and mouse buttons to gamepad buttons"
+HOMEPAGE="https://github.com/AntiMicro/antimicro;
+SRC_URI="https://github.com/AntiMicro/antimicro/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+   dev-qt/qtcore:5
+   dev-qt/qtgui:5
+   dev-qt/qtnetwork:5
+   dev-qt/qtwidgets:5
+   media-libs/libsdl2[X,joystick]
+   x11-libs/libX11
+   x11-libs/libXtst
+"
+DEPEND="${RDEPEND}
+   dev-qt/linguist-tools:5
+   virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}/${P}-linking-errors.patch" )
+
+src_configure() {
+   # TODO: Currently does not build w/o X
+   # (!X would be: -DWITH_XTEST=OFF -DWITH_UINPUT=ON)
+   local mycmakeargs=(
+   -DUSE_QT5=ON
+   -DUSE_SDL_2=ON
+   -DWITH_X11=ON
+   -DWITH_XTEST=ON
+   -DWITH_UINPUT=OFF
+   )
+   cmake-utils_src_configure
+}
+
+pkg_postinst() {
+   xdg_mimeinfo_database_update
+   xdg_desktop_database_update
+}
+
+pkg_postrm() {
+   xdg_mimeinfo_database_update
+   xdg_desktop_database_update
+}

diff --git a/games-util/antimicro/files/antimicro-2.23-linking-errors.patch 
b/games-util/antimicro/files/antimicro-2.23-linking-errors.patch
new file mode 100644
index 000..88d03e87670
--- /dev/null
+++ b/games-util/antimicro/files/antimicro-2.23-linking-errors.patch
@@ -0,0 +1,40 @@
+From d5cfe429edb8c5f6f039153a0f646f2198c06b16 Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa 
+Date: Mon, 29 Jan 2018 12:19:55 +0100
+Subject: [PATCH] cmake: Stop calling QT5_WRAP_CPP().
+
+The USE_QT5 code path already unconditionally sets CMAKE_AUTOMOC to on.
+
+Calling QT5_WRAP_CPP() used to be just redundant, as antimicro_HEADERS_MOC
+was never actually added as a source dependency of the antimicro target. In
+other words, CMake's own automoc infrastructure was actually being used and
+the moc invocations from QT5_WRAP_CPP() were not being made at all.
+
+Starting with Qt 5.9.4, calling QT5_WRAP_CPP() disables the AUTOMOC property
+on the macro's input files, which means neither CMake's automoc
+infrastructure not QT5_WRAP_CPP()'s code were being used and we ended up
+with several 'undefined reference to vtable' errors when linking.
+---
+ CMakeLists.txt | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 63ef851..0e47889 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -499,7 +499,6 @@ if (UNIX)
+ find_package(Qt5Network REQUIRED)
+ find_package(Qt5LinguistTools REQUIRED)
+ 
+-QT5_WRAP_CPP(antimicro_HEADERS_MOC ${antimicro_HEADERS})
+ QT5_WRAP_UI(antimicro_FORMS_HEADERS ${antimicro_FORMS})
+ QT5_ADD_RESOURCES(antimicro_RESOURCES_RCC ${antimicro_RESOURCES})
+ add_subdirectory("share/antimicro/translations")
+@@ -550,7 +549,6 @@ elseif(WIN32)
+ find_package(Qt5Network REQUIRED)
+ find_package(Qt5LinguistTools REQUIRED)
+ 
+-