1 |
commit: 1119b23048a58fd61199f9ac950b689ca34b036b |
2 |
Author: Diogo Pereira <sir.suriv <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Jan 24 20:28:36 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 3 11:14:34 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1119b230 |
7 |
|
8 |
x11-misc/j4-dmenu-desktop: new package |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/6933 |
11 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
12 |
|
13 |
x11-misc/j4-dmenu-desktop/Manifest | 1 + |
14 |
.../files/j4-dmenu-desktop-2.16_system_catch.patch | 183 +++++++++++++++++++++ |
15 |
.../j4-dmenu-desktop/j4-dmenu-desktop-2.16.ebuild | 44 +++++ |
16 |
x11-misc/j4-dmenu-desktop/metadata.xml | 21 +++ |
17 |
4 files changed, 249 insertions(+) |
18 |
|
19 |
diff --git a/x11-misc/j4-dmenu-desktop/Manifest b/x11-misc/j4-dmenu-desktop/Manifest |
20 |
new file mode 100644 |
21 |
index 00000000000..6abb73d3cf2 |
22 |
--- /dev/null |
23 |
+++ b/x11-misc/j4-dmenu-desktop/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST j4-dmenu-desktop-r2.16.tar.gz 32553 BLAKE2B c1c7f0f2a59421b2e244a8f65251b296ad44ae37c10cbffb62bdefb168b6104e3d89c0a43b74feaf0afcc52ac78c8d46204ed397f131e526c447379b066b9b88 SHA512 d5bb0902d4bdc474fa20bc9d8f79de90a92bb4941f0d325dfcfaa1347ea3ad355b87da8194bc3f654970e9ab8848e6ecb5093f3c75fbaa8dbc40199fe6ea2837 |
26 |
|
27 |
diff --git a/x11-misc/j4-dmenu-desktop/files/j4-dmenu-desktop-2.16_system_catch.patch b/x11-misc/j4-dmenu-desktop/files/j4-dmenu-desktop-2.16_system_catch.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..7becf7d3f75 |
30 |
--- /dev/null |
31 |
+++ b/x11-misc/j4-dmenu-desktop/files/j4-dmenu-desktop-2.16_system_catch.patch |
32 |
@@ -0,0 +1,183 @@ |
33 |
+From 210926d23d0f40277b549ca490f876f93c3ffb6d Mon Sep 17 00:00:00 2001 |
34 |
+From: Diogo Pereira <sir.suriv@×××××.com> |
35 |
+Date: Wed, 24 Jan 2018 16:44:03 +0000 |
36 |
+Subject: [PATCH 1/3] CMake: simplify GCC version check |
37 |
+ |
38 |
+--- |
39 |
+ CMakeLists.txt | 18 +++--------------- |
40 |
+ 1 file changed, 3 insertions(+), 15 deletions(-) |
41 |
+ |
42 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
43 |
+index 392db54..78a71c0 100644 |
44 |
+--- a/CMakeLists.txt |
45 |
++++ b/CMakeLists.txt |
46 |
+@@ -2,21 +2,9 @@ cmake_minimum_required(VERSION 2.8) |
47 |
+ |
48 |
+ project(j4-dmenu) |
49 |
+ |
50 |
+-exec_program( |
51 |
+- ${CMAKE_CXX_COMPILER} |
52 |
+- ARGS --version |
53 |
+- OUTPUT_VARIABLE _compiler_output |
54 |
+- ) |
55 |
+-string(REGEX REPLACE "(\n.*$)" "" cxx_compiler_version "${_compiler_output}") |
56 |
+-string(REGEX REPLACE "([^0-9.])|([0-9.][^0-9.])" "" cxx_compiler_version "${cxx_compiler_version}") |
57 |
+- |
58 |
+-if(CMAKE_COMPILER_IS_GNUCXX) |
59 |
+- if(${cxx_compiler_version} VERSION_LESS "4.7.0") |
60 |
+- set(CXX_OPT "-std=c++0x") |
61 |
+- else() |
62 |
+- set(CXX_OPT "-std=c++11") |
63 |
+- endif() |
64 |
+-elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") |
65 |
++if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7") |
66 |
++ set(CXX_OPT "-std=c++0x") |
67 |
++else() |
68 |
+ set(CXX_OPT "-std=c++11") |
69 |
+ endif() |
70 |
+ |
71 |
+ |
72 |
+From e6e05d0170554246118c2dffe5395a982e1af250 Mon Sep 17 00:00:00 2001 |
73 |
+From: Diogo Pereira <sir.suriv@×××××.com> |
74 |
+Date: Wed, 24 Jan 2018 16:53:39 +0000 |
75 |
+Subject: [PATCH 2/3] CMake: clean up and reorder CMAKE_CXX_FLAGS |
76 |
+ |
77 |
+--- |
78 |
+ CMakeLists.txt | 2 +- |
79 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
80 |
+ |
81 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
82 |
+index 78a71c0..1b3f2b0 100644 |
83 |
+--- a/CMakeLists.txt |
84 |
++++ b/CMakeLists.txt |
85 |
+@@ -8,7 +8,7 @@ else() |
86 |
+ set(CXX_OPT "-std=c++11") |
87 |
+ endif() |
88 |
+ |
89 |
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_OPT} ${CXX_OPT} -Wall -pedantic -Wextra -O2") |
90 |
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_OPT} -Wall -Wextra -pedantic -O2") |
91 |
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") |
92 |
+ |
93 |
+ if(NOT DEFINED NO_TESTS) |
94 |
+ |
95 |
+From 7be5116d0d6d80522517a58bb6e45ca1cdcd9612 Mon Sep 17 00:00:00 2001 |
96 |
+From: Diogo Pereira <sir.suriv@×××××.com> |
97 |
+Date: Wed, 24 Jan 2018 17:51:28 +0000 |
98 |
+Subject: [PATCH 3/3] CMake: add option to disable downloading Catch |
99 |
+ |
100 |
+--- |
101 |
+ CMakeLists.txt | 90 ++++++++++++++++++++++++++++++---------------------------- |
102 |
+ 1 file changed, 47 insertions(+), 43 deletions(-) |
103 |
+ |
104 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
105 |
+index 1b3f2b0..17605e8 100644 |
106 |
+--- a/CMakeLists.txt |
107 |
++++ b/CMakeLists.txt |
108 |
+@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 2.8) |
109 |
+ |
110 |
+ project(j4-dmenu) |
111 |
+ |
112 |
++option(WITH_TESTS "Build and run tests" ON) |
113 |
++option(WITH_GIT_CATCH "Use a Git checkout of Catch to build the tests" ON) |
114 |
++ |
115 |
+ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7") |
116 |
+ set(CXX_OPT "-std=c++0x") |
117 |
+ else() |
118 |
+@@ -11,53 +14,54 @@ endif() |
119 |
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_OPT} -Wall -Wextra -pedantic -O2") |
120 |
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") |
121 |
+ |
122 |
+-if(NOT DEFINED NO_TESTS) |
123 |
+- include(ExternalProject) |
124 |
+- |
125 |
+- ExternalProject_Add( |
126 |
+- catch |
127 |
+- PREFIX ${CMAKE_BINARY_DIR}/catch |
128 |
+- GIT_TAG Catch1.x |
129 |
+- GIT_REPOSITORY https://github.com/catchorg/Catch2 |
130 |
+- TIMEOUT 10 |
131 |
+- UPDATE_COMMAND git pull |
132 |
+- CONFIGURE_COMMAND "" |
133 |
+- BUILD_COMMAND "" |
134 |
+- INSTALL_COMMAND "" |
135 |
+- LOG_DOWNLOAD ON |
136 |
+- ) |
137 |
+- |
138 |
+- # Expose required variable (CATCH_INCLUDE_DIR) to parent scope |
139 |
+- ExternalProject_Get_Property(catch source_dir) |
140 |
+- set(CATCH_INCLUDE_DIR ${source_dir}/include CACHE INTERNAL "Path to include folder for Catch") |
141 |
+- |
142 |
+- # Includes Catch in the project: |
143 |
+- #add_subdirectory(${EXT_PROJECTS_DIR}/catch) |
144 |
+- include_directories(${CATCH_INCLUDE_DIR} ${COMMON_INCLUDES}) |
145 |
+- |
146 |
+- add_definitions(-DTEST_FILES="${CMAKE_CURRENT_SOURCE_DIR}/test_files/") |
147 |
+- |
148 |
++if(WITH_TESTS) |
149 |
+ enable_testing(true) |
150 |
+- |
151 |
+ add_test( |
152 |
+- NAME j4-dmenu-tests |
153 |
+- COMMAND j4-dmenu-tests |
154 |
+- ) |
155 |
+- |
156 |
++ NAME j4-dmenu-tests |
157 |
++ COMMAND j4-dmenu-tests |
158 |
++ ) |
159 |
+ add_executable( |
160 |
+- j4-dmenu-tests |
161 |
+- src/Test.cc |
162 |
+- src/TestApplication.cc |
163 |
+- src/TestApplicationRunner.cc |
164 |
+- src/TestSearchPath.cc |
165 |
+- src/TestLocaleSuffixes.cc |
166 |
+- src/TestFileFinder.cc |
167 |
+- src/TestFormatters.cc |
168 |
+- ) |
169 |
+- |
170 |
+- add_dependencies(j4-dmenu-tests catch) |
171 |
+-endif(NOT DEFINED NO_TESTS) |
172 |
++ j4-dmenu-tests |
173 |
++ src/Test.cc |
174 |
++ src/TestApplication.cc |
175 |
++ src/TestApplicationRunner.cc |
176 |
++ src/TestSearchPath.cc |
177 |
++ src/TestLocaleSuffixes.cc |
178 |
++ src/TestFileFinder.cc |
179 |
++ src/TestFormatters.cc |
180 |
++ ) |
181 |
++ add_definitions(-DTEST_FILES="${CMAKE_CURRENT_SOURCE_DIR}/test_files/") |
182 |
+ |
183 |
++ if(WITH_GIT_CATCH) |
184 |
++ include(ExternalProject) |
185 |
++ ExternalProject_Add( |
186 |
++ catch |
187 |
++ PREFIX ${CMAKE_BINARY_DIR}/catch |
188 |
++ GIT_TAG Catch1.x |
189 |
++ GIT_REPOSITORY https://github.com/catchorg/Catch2 |
190 |
++ TIMEOUT 10 |
191 |
++ UPDATE_COMMAND git pull |
192 |
++ CONFIGURE_COMMAND "" |
193 |
++ BUILD_COMMAND "" |
194 |
++ INSTALL_COMMAND "" |
195 |
++ LOG_DOWNLOAD ON |
196 |
++ ) |
197 |
++ add_dependencies(j4-dmenu-tests catch) |
198 |
++ |
199 |
++ # Expose required variable (CATCH_INCLUDE_DIR) to parent scope |
200 |
++ ExternalProject_Get_Property(catch source_dir) |
201 |
++ set(CATCH_INCLUDE_DIR ${source_dir}/include CACHE INTERNAL "Path to include folder for Catch") |
202 |
++ else() |
203 |
++ # Use system-installed version of Catch |
204 |
++ find_path(CATCH_INCLUDE_DIR catch.hpp PATH_SUFFIXES catch) |
205 |
++ if(NOT CATCH_INCLUDE_DIR) |
206 |
++ message(FATAL_ERROR "Catch include directory not found") |
207 |
++ endif() |
208 |
++ endif(WITH_GIT_CATCH) |
209 |
++ |
210 |
++ # Include Catch in the project |
211 |
++ include_directories(${CATCH_INCLUDE_DIR} ${COMMON_INCLUDES}) |
212 |
++endif(WITH_TESTS) |
213 |
+ |
214 |
+ add_executable( |
215 |
+ j4-dmenu-desktop |
216 |
|
217 |
diff --git a/x11-misc/j4-dmenu-desktop/j4-dmenu-desktop-2.16.ebuild b/x11-misc/j4-dmenu-desktop/j4-dmenu-desktop-2.16.ebuild |
218 |
new file mode 100644 |
219 |
index 00000000000..e758d1c57c4 |
220 |
--- /dev/null |
221 |
+++ b/x11-misc/j4-dmenu-desktop/j4-dmenu-desktop-2.16.ebuild |
222 |
@@ -0,0 +1,44 @@ |
223 |
+# Copyright 1999-2018 Gentoo Foundation |
224 |
+# Distributed under the terms of the GNU General Public License v2 |
225 |
+ |
226 |
+EAPI=6 |
227 |
+ |
228 |
+inherit cmake-utils |
229 |
+ |
230 |
+MY_PV="r${PV}" |
231 |
+MY_P="${PN}-${MY_PV}" |
232 |
+ |
233 |
+DESCRIPTION="A fast desktop menu" |
234 |
+HOMEPAGE="https://github.com/enkore/j4-dmenu-desktop" |
235 |
+SRC_URI="https://github.com/enkore/j4-dmenu-desktop/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz" |
236 |
+ |
237 |
+LICENSE="GPL-3+" |
238 |
+SLOT="0" |
239 |
+KEYWORDS="~amd64 ~x86" |
240 |
+IUSE="test" |
241 |
+ |
242 |
+DEPEND="test? ( <dev-cpp/catch-2 )" |
243 |
+RDEPEND="x11-misc/dmenu" |
244 |
+ |
245 |
+S="${WORKDIR}/${MY_P}" |
246 |
+ |
247 |
+# Merged upstream; remove in next version bump |
248 |
+PATCHES=( "${FILESDIR}/${P}_system_catch.patch" ) |
249 |
+ |
250 |
+src_prepare() { |
251 |
+ cmake-utils_src_prepare |
252 |
+ sed -i -e "s/-pedantic -O2//" CMakeLists.txt || die "sed failed" |
253 |
+} |
254 |
+ |
255 |
+src_configure() { |
256 |
+ local mycmakeargs=( |
257 |
+ -DWITH_TESTS=$(usex test) |
258 |
+ -DWITH_GIT_CATCH=no |
259 |
+ ) |
260 |
+ cmake-utils_src_configure |
261 |
+} |
262 |
+ |
263 |
+src_install() { |
264 |
+ cmake-utils_src_install |
265 |
+ doman "j4-dmenu-desktop.1" |
266 |
+} |
267 |
|
268 |
diff --git a/x11-misc/j4-dmenu-desktop/metadata.xml b/x11-misc/j4-dmenu-desktop/metadata.xml |
269 |
new file mode 100644 |
270 |
index 00000000000..581cc21d736 |
271 |
--- /dev/null |
272 |
+++ b/x11-misc/j4-dmenu-desktop/metadata.xml |
273 |
@@ -0,0 +1,21 @@ |
274 |
+<?xml version="1.0" encoding="UTF-8"?> |
275 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
276 |
+<pkgmetadata> |
277 |
+ <maintainer type="person"> |
278 |
+ <email>sir.suriv@×××××.com</email> |
279 |
+ <name>Diogo Pereira</name> |
280 |
+ </maintainer> |
281 |
+ <maintainer type="project"> |
282 |
+ <email>proxy-maint@g.o</email> |
283 |
+ <name>Proxy Maintainers</name> |
284 |
+ </maintainer> |
285 |
+ <longdescription lang="en"> |
286 |
+ j4-dmenu-desktop is a replacement for i3-dmenu-desktop. Its purpose is |
287 |
+ to find .desktop files and offer you a menu to start an application |
288 |
+ using dmenu. You can also execute shell commands using it. |
289 |
+ </longdescription> |
290 |
+ <upstream> |
291 |
+ <remote-id type="github">enkore/j4-dmenu-desktop</remote-id> |
292 |
+ <bugs-to>https://github.com/enkore/j4-dmenu-desktop/issues</bugs-to> |
293 |
+ </upstream> |
294 |
+</pkgmetadata> |