summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiogo Pereira <sir.suriv@gmail.com>2018-01-24 20:28:36 +0000
committerMichał Górny <mgorny@gentoo.org>2018-03-03 12:14:34 +0100
commit1119b23048a58fd61199f9ac950b689ca34b036b (patch)
treeb1d60ab131364e6790ef9d9f0044db6934e0f278 /x11-misc/j4-dmenu-desktop
parenthardened/linux/powerpc/ppc64/64bit-userland/use.mask: mask luajit USE (diff)
downloadgentoo-1119b23048a58fd61199f9ac950b689ca34b036b.tar.gz
gentoo-1119b23048a58fd61199f9ac950b689ca34b036b.tar.bz2
gentoo-1119b23048a58fd61199f9ac950b689ca34b036b.zip
x11-misc/j4-dmenu-desktop: new package
Closes: https://github.com/gentoo/gentoo/pull/6933 Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'x11-misc/j4-dmenu-desktop')
-rw-r--r--x11-misc/j4-dmenu-desktop/Manifest1
-rw-r--r--x11-misc/j4-dmenu-desktop/files/j4-dmenu-desktop-2.16_system_catch.patch183
-rw-r--r--x11-misc/j4-dmenu-desktop/j4-dmenu-desktop-2.16.ebuild44
-rw-r--r--x11-misc/j4-dmenu-desktop/metadata.xml21
4 files changed, 249 insertions, 0 deletions
diff --git a/x11-misc/j4-dmenu-desktop/Manifest b/x11-misc/j4-dmenu-desktop/Manifest
new file mode 100644
index 000000000000..6abb73d3cf2d
--- /dev/null
+++ b/x11-misc/j4-dmenu-desktop/Manifest
@@ -0,0 +1 @@
+DIST j4-dmenu-desktop-r2.16.tar.gz 32553 BLAKE2B c1c7f0f2a59421b2e244a8f65251b296ad44ae37c10cbffb62bdefb168b6104e3d89c0a43b74feaf0afcc52ac78c8d46204ed397f131e526c447379b066b9b88 SHA512 d5bb0902d4bdc474fa20bc9d8f79de90a92bb4941f0d325dfcfaa1347ea3ad355b87da8194bc3f654970e9ab8848e6ecb5093f3c75fbaa8dbc40199fe6ea2837
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
new file mode 100644
index 000000000000..7becf7d3f75a
--- /dev/null
+++ b/x11-misc/j4-dmenu-desktop/files/j4-dmenu-desktop-2.16_system_catch.patch
@@ -0,0 +1,183 @@
+From 210926d23d0f40277b549ca490f876f93c3ffb6d Mon Sep 17 00:00:00 2001
+From: Diogo Pereira <sir.suriv@gmail.com>
+Date: Wed, 24 Jan 2018 16:44:03 +0000
+Subject: [PATCH 1/3] CMake: simplify GCC version check
+
+---
+ CMakeLists.txt | 18 +++---------------
+ 1 file changed, 3 insertions(+), 15 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 392db54..78a71c0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,21 +2,9 @@ cmake_minimum_required(VERSION 2.8)
+
+ project(j4-dmenu)
+
+-exec_program(
+- ${CMAKE_CXX_COMPILER}
+- ARGS --version
+- OUTPUT_VARIABLE _compiler_output
+- )
+-string(REGEX REPLACE "(\n.*$)" "" cxx_compiler_version "${_compiler_output}")
+-string(REGEX REPLACE "([^0-9.])|([0-9.][^0-9.])" "" cxx_compiler_version "${cxx_compiler_version}")
+-
+-if(CMAKE_COMPILER_IS_GNUCXX)
+- if(${cxx_compiler_version} VERSION_LESS "4.7.0")
+- set(CXX_OPT "-std=c++0x")
+- else()
+- set(CXX_OPT "-std=c++11")
+- endif()
+-elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
++if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
++ set(CXX_OPT "-std=c++0x")
++else()
+ set(CXX_OPT "-std=c++11")
+ endif()
+
+
+From e6e05d0170554246118c2dffe5395a982e1af250 Mon Sep 17 00:00:00 2001
+From: Diogo Pereira <sir.suriv@gmail.com>
+Date: Wed, 24 Jan 2018 16:53:39 +0000
+Subject: [PATCH 2/3] CMake: clean up and reorder CMAKE_CXX_FLAGS
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 78a71c0..1b3f2b0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,7 +8,7 @@ else()
+ set(CXX_OPT "-std=c++11")
+ endif()
+
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_OPT} ${CXX_OPT} -Wall -pedantic -Wextra -O2")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_OPT} -Wall -Wextra -pedantic -O2")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
+
+ if(NOT DEFINED NO_TESTS)
+
+From 7be5116d0d6d80522517a58bb6e45ca1cdcd9612 Mon Sep 17 00:00:00 2001
+From: Diogo Pereira <sir.suriv@gmail.com>
+Date: Wed, 24 Jan 2018 17:51:28 +0000
+Subject: [PATCH 3/3] CMake: add option to disable downloading Catch
+
+---
+ CMakeLists.txt | 90 ++++++++++++++++++++++++++++++----------------------------
+ 1 file changed, 47 insertions(+), 43 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1b3f2b0..17605e8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 2.8)
+
+ project(j4-dmenu)
+
++option(WITH_TESTS "Build and run tests" ON)
++option(WITH_GIT_CATCH "Use a Git checkout of Catch to build the tests" ON)
++
+ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
+ set(CXX_OPT "-std=c++0x")
+ else()
+@@ -11,53 +14,54 @@ endif()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_OPT} -Wall -Wextra -pedantic -O2")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
+
+-if(NOT DEFINED NO_TESTS)
+- include(ExternalProject)
+-
+- ExternalProject_Add(
+- catch
+- PREFIX ${CMAKE_BINARY_DIR}/catch
+- GIT_TAG Catch1.x
+- GIT_REPOSITORY https://github.com/catchorg/Catch2
+- TIMEOUT 10
+- UPDATE_COMMAND git pull
+- CONFIGURE_COMMAND ""
+- BUILD_COMMAND ""
+- INSTALL_COMMAND ""
+- LOG_DOWNLOAD ON
+- )
+-
+- # Expose required variable (CATCH_INCLUDE_DIR) to parent scope
+- ExternalProject_Get_Property(catch source_dir)
+- set(CATCH_INCLUDE_DIR ${source_dir}/include CACHE INTERNAL "Path to include folder for Catch")
+-
+- # Includes Catch in the project:
+- #add_subdirectory(${EXT_PROJECTS_DIR}/catch)
+- include_directories(${CATCH_INCLUDE_DIR} ${COMMON_INCLUDES})
+-
+- add_definitions(-DTEST_FILES="${CMAKE_CURRENT_SOURCE_DIR}/test_files/")
+-
++if(WITH_TESTS)
+ enable_testing(true)
+-
+ add_test(
+- NAME j4-dmenu-tests
+- COMMAND j4-dmenu-tests
+- )
+-
++ NAME j4-dmenu-tests
++ COMMAND j4-dmenu-tests
++ )
+ add_executable(
+- j4-dmenu-tests
+- src/Test.cc
+- src/TestApplication.cc
+- src/TestApplicationRunner.cc
+- src/TestSearchPath.cc
+- src/TestLocaleSuffixes.cc
+- src/TestFileFinder.cc
+- src/TestFormatters.cc
+- )
+-
+- add_dependencies(j4-dmenu-tests catch)
+-endif(NOT DEFINED NO_TESTS)
++ j4-dmenu-tests
++ src/Test.cc
++ src/TestApplication.cc
++ src/TestApplicationRunner.cc
++ src/TestSearchPath.cc
++ src/TestLocaleSuffixes.cc
++ src/TestFileFinder.cc
++ src/TestFormatters.cc
++ )
++ add_definitions(-DTEST_FILES="${CMAKE_CURRENT_SOURCE_DIR}/test_files/")
+
++ if(WITH_GIT_CATCH)
++ include(ExternalProject)
++ ExternalProject_Add(
++ catch
++ PREFIX ${CMAKE_BINARY_DIR}/catch
++ GIT_TAG Catch1.x
++ GIT_REPOSITORY https://github.com/catchorg/Catch2
++ TIMEOUT 10
++ UPDATE_COMMAND git pull
++ CONFIGURE_COMMAND ""
++ BUILD_COMMAND ""
++ INSTALL_COMMAND ""
++ LOG_DOWNLOAD ON
++ )
++ add_dependencies(j4-dmenu-tests catch)
++
++ # Expose required variable (CATCH_INCLUDE_DIR) to parent scope
++ ExternalProject_Get_Property(catch source_dir)
++ set(CATCH_INCLUDE_DIR ${source_dir}/include CACHE INTERNAL "Path to include folder for Catch")
++ else()
++ # Use system-installed version of Catch
++ find_path(CATCH_INCLUDE_DIR catch.hpp PATH_SUFFIXES catch)
++ if(NOT CATCH_INCLUDE_DIR)
++ message(FATAL_ERROR "Catch include directory not found")
++ endif()
++ endif(WITH_GIT_CATCH)
++
++ # Include Catch in the project
++ include_directories(${CATCH_INCLUDE_DIR} ${COMMON_INCLUDES})
++endif(WITH_TESTS)
+
+ add_executable(
+ j4-dmenu-desktop
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
new file mode 100644
index 000000000000..e758d1c57c4a
--- /dev/null
+++ b/x11-misc/j4-dmenu-desktop/j4-dmenu-desktop-2.16.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+MY_PV="r${PV}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="A fast desktop menu"
+HOMEPAGE="https://github.com/enkore/j4-dmenu-desktop"
+SRC_URI="https://github.com/enkore/j4-dmenu-desktop/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="test? ( <dev-cpp/catch-2 )"
+RDEPEND="x11-misc/dmenu"
+
+S="${WORKDIR}/${MY_P}"
+
+# Merged upstream; remove in next version bump
+PATCHES=( "${FILESDIR}/${P}_system_catch.patch" )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ sed -i -e "s/-pedantic -O2//" CMakeLists.txt || die "sed failed"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_TESTS=$(usex test)
+ -DWITH_GIT_CATCH=no
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doman "j4-dmenu-desktop.1"
+}
diff --git a/x11-misc/j4-dmenu-desktop/metadata.xml b/x11-misc/j4-dmenu-desktop/metadata.xml
new file mode 100644
index 000000000000..581cc21d7364
--- /dev/null
+++ b/x11-misc/j4-dmenu-desktop/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sir.suriv@gmail.com</email>
+ <name>Diogo Pereira</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ j4-dmenu-desktop is a replacement for i3-dmenu-desktop. Its purpose is
+ to find .desktop files and offer you a menu to start an application
+ using dmenu. You can also execute shell commands using it.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">enkore/j4-dmenu-desktop</remote-id>
+ <bugs-to>https://github.com/enkore/j4-dmenu-desktop/issues</bugs-to>
+ </upstream>
+</pkgmetadata>