Gentoo Archives: gentoo-commits

From: "Maciej Barć" <xgqt@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/antimicrox/files/, games-util/antimicrox/
Date: Fri, 02 Sep 2022 02:20:10
Message-Id: 1662085130.b226852e92f98a0f42dfdadab9fc3373addb6ea7.xgqt@gentoo
1 commit: b226852e92f98a0f42dfdadab9fc3373addb6ea7
2 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 1 22:34:22 2022 +0000
4 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 2 02:18:50 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b226852e
7
8 games-util/antimicrox: new package; add version 3.2.5
9
10 Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
11
12 games-util/antimicrox/Manifest | 1 +
13 games-util/antimicrox/antimicrox-3.2.5.ebuild | 72 ++++++++++++++++++++++
14 .../antimicrox/files/antimicrox-man_gz.patch | 13 ++++
15 games-util/antimicrox/metadata.xml | 13 ++++
16 4 files changed, 99 insertions(+)
17
18 diff --git a/games-util/antimicrox/Manifest b/games-util/antimicrox/Manifest
19 new file mode 100644
20 index 000000000000..4947556b9ad9
21 --- /dev/null
22 +++ b/games-util/antimicrox/Manifest
23 @@ -0,0 +1 @@
24 +DIST antimicrox-3.2.5.tar.gz 1801792 BLAKE2B 8e42bef2c04f57a4ca733fa9632bb8b2070e4bfc6f0ac1c01016dd221a6cf24a229d1090c0d8ed2a7562d4c7224668cebdf0fe23265ac4d9208403f9fbe7e85c SHA512 5b9e75fcb1e5d7e12d5880f83451c12f0eb2da1a6e43387fc42bbcba8c24a77398868f69177277840b9a7541736007fdbec58fd852d32d12ca559f6f75178c0b
25
26 diff --git a/games-util/antimicrox/antimicrox-3.2.5.ebuild b/games-util/antimicrox/antimicrox-3.2.5.ebuild
27 new file mode 100644
28 index 000000000000..71c41513753d
29 --- /dev/null
30 +++ b/games-util/antimicrox/antimicrox-3.2.5.ebuild
31 @@ -0,0 +1,72 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +inherit udev xdg cmake
38 +
39 +DESCRIPTION="Graphical program used to map keyboard buttons and mouse controls to a gamepad"
40 +HOMEPAGE="https://github.com/AntiMicroX/antimicrox/"
41 +SRC_URI="https://github.com/AntiMicroX/${PN}/archive/${PV}.tar.gz
42 + -> ${P}.tar.gz"
43 +
44 +LICENSE="GPL-3+"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~x86"
47 +IUSE="doc"
48 +# Tests fail to build
49 +# https://github.com/AntiMicroX/antimicrox/issues/530
50 +RESTRICT="test"
51 +
52 +RDEPEND="
53 + dev-qt/qtcore:5
54 + dev-qt/qtgui:5
55 + dev-qt/qtnetwork:5
56 + dev-qt/qtwidgets:5
57 + media-libs/libsdl2[X,joystick]
58 + virtual/udev
59 + x11-libs/libX11
60 + x11-libs/libXi
61 + x11-libs/libXtst
62 +"
63 +DEPEND="${RDEPEND}"
64 +BDEPEND="
65 + dev-qt/linguist-tools:5
66 + doc? ( app-doc/doxygen[dot] )
67 +"
68 +
69 +PATCHES=( "${FILESDIR}"/${PN}-man_gz.patch )
70 +DOCS=( CHANGELOG.md README.md )
71 +
72 +src_configure() {
73 + local mycmakeargs=(
74 + -DAPPDATA=OFF
75 + -DCHECK_FOR_UPDATES=OFF
76 + -DINSTALL_UINPUT_UDEV_RULES=OFF # Install in src_install
77 + -DWITH_TESTS=OFF
78 + -DWITH_UINPUT=ON
79 + -DWITH_X11=ON
80 + -DWITH_XTEST=ON
81 + -DBUILD_DOCS=$(usex doc ON OFF)
82 + )
83 + cmake_src_configure
84 +}
85 +
86 +src_install() {
87 + cmake_src_install
88 + rm -r "${ED}"/usr/share/doc/${PN} || die
89 +
90 + udev_dorules "${S}"/other/60-${PN}-uinput.rules
91 +
92 + use doc && dodoc -r "${S}"/docs/{html,latex}
93 +}
94 +
95 +pkg_postinst() {
96 + udev_reload
97 + xdg_pkg_postinst
98 +}
99 +
100 +pkg_postrm() {
101 + udev_reload
102 + xdg_pkg_postrm
103 +}
104
105 diff --git a/games-util/antimicrox/files/antimicrox-man_gz.patch b/games-util/antimicrox/files/antimicrox-man_gz.patch
106 new file mode 100644
107 index 000000000000..0a6bb9cae71c
108 --- /dev/null
109 +++ b/games-util/antimicrox/files/antimicrox-man_gz.patch
110 @@ -0,0 +1,13 @@
111 +diff --git a/other/CMakeLists.txt b/other/CMakeLists.txt
112 +index 22b10574..66f2e483 100644
113 +--- a/other/CMakeLists.txt
114 ++++ b/other/CMakeLists.txt
115 +@@ -1,7 +1,3 @@
116 + add_subdirectory(appdata)
117 +
118 +-add_custom_target(manpage)
119 +-add_custom_command(TARGET manpage PRE_BUILD
120 +- COMMAND gzip -c -9 -n "${PROJECT_SOURCE_DIR}/other/antimicrox.1" > "antimicrox.1.gz" VERBATIM
121 +- )
122 +-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/antimicrox.1.gz" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/man/man1")
123 ++install(FILES "${PROJECT_SOURCE_DIR}/other/antimicrox.1" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/man/man1")
124
125 diff --git a/games-util/antimicrox/metadata.xml b/games-util/antimicrox/metadata.xml
126 new file mode 100644
127 index 000000000000..77865b917d88
128 --- /dev/null
129 +++ b/games-util/antimicrox/metadata.xml
130 @@ -0,0 +1,13 @@
131 +<?xml version="1.0" encoding="UTF-8"?>
132 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
133 +
134 +<pkgmetadata>
135 + <maintainer type="person">
136 + <email>xgqt@g.o</email>
137 + <name>Maciej Barć</name>
138 + </maintainer>
139 + <upstream>
140 + <bugs-to>https://github.com/AntiMicroX/antimicrox/issues</bugs-to>
141 + <remote-id type="github">AntiMicroX/antimicrox</remote-id>
142 + </upstream>
143 +</pkgmetadata>