commit:     e0705672ec72b999d135801a7d0bb1f61fa3ccbf
Author:     Quincy Fleming <quincyf467 <AT> protonmail <DOT> com>
AuthorDate: Tue Apr 25 03:02:10 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Apr 25 03:02:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e0705672

app-misc/Clipboard: new package, add 0.6.0

Signed-off-by: Quincy Fleming <quincyf467 <AT> protonmail.com>

 app-misc/Clipboard/Clipboard-0.6.0.ebuild          |  49 ++++++++++
 app-misc/Clipboard/Manifest                        |   1 +
 .../files/Clipboard-0.6.0-disable-debug.patch      |  18 ++++
 ....0-libdestination-and-disable-lto-and-git.patch | 103 +++++++++++++++++++++
 app-misc/Clipboard/metadata.xml                    |  27 ++++++
 5 files changed, 198 insertions(+)

diff --git a/app-misc/Clipboard/Clipboard-0.6.0.ebuild 
b/app-misc/Clipboard/Clipboard-0.6.0.ebuild
new file mode 100644
index 000000000..856d2293c
--- /dev/null
+++ b/app-misc/Clipboard/Clipboard-0.6.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Cut, copy, and paste anything in your terminal"
+HOMEPAGE="https://getclipboard.app/ https://github.com/Slackadays/Clipboard";
+SRC_URI="https://github.com/Slackadays/${PN}/archive/refs/tags/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="X wayland lto debug"
+
+RDEPEND="X? ( x11-libs/libX11 )
+               wayland? (
+                       dev-libs/wayland-protocols
+                       dev-libs/wayland
+               )
+"
+PATCHES=(
+       "${FILESDIR}/${P}-libdestination-and-disable-lto-and-git.patch"
+)
+
+src_prepare() {
+       if ! use wayland; then
+               sed -i '/pkg_check_modules(WAYLAND_CLIENT wayland-client 
wayland-protocols)/d' CMakeLists.txt || die
+       fi
+
+       if ! use debug; then
+               eapply "${FILESDIR}/${P}-disable-debug.patch"
+       fi
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+       "-DCMAKE_INSTALL_LIBDIR=$(get_libdir)"
+       "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=$(usex lto TRUE FALSE)"
+       "-DCMAKE_DISABLE_FIND_PACKAGE_X11=$(usex X OFF ON)"
+       )
+       cmake_src_configure
+}
+
+pkg_postinst() {
+       elog "The \"clipboard\" command is depreciated.  Use \"cb\" instead.  
\"cb\" is symlinked to \"clipboard\" for now."
+}

diff --git a/app-misc/Clipboard/Manifest b/app-misc/Clipboard/Manifest
new file mode 100644
index 000000000..58b92a5cd
--- /dev/null
+++ b/app-misc/Clipboard/Manifest
@@ -0,0 +1 @@
+DIST Clipboard-0.6.0.tar.gz 9187112 BLAKE2B 
91f1a4064d7cb539aa4e2cb227703cee6a7f9a4931d7555bf35fa9b4499a641cdd9093cadb713ab4f4d2a985e98616216921b658388b2adc939b4495293a301c
 SHA512 
aaf8a05736ba36b24448ec2df822d633f3532557b8f976447e19342fb6a482be8194d2c4d67c8fb9c4d8ecc04f88db5af14ad9d836b923fedfecce275c420875

diff --git a/app-misc/Clipboard/files/Clipboard-0.6.0-disable-debug.patch 
b/app-misc/Clipboard/files/Clipboard-0.6.0-disable-debug.patch
new file mode 100644
index 000000000..12c68f3ae
--- /dev/null
+++ b/app-misc/Clipboard/files/Clipboard-0.6.0-disable-debug.patch
@@ -0,0 +1,18 @@
+diff -ur '--color=auto' 
Clipboard-0.6.0/src/gui/include/all/clipboard/logging.hpp 
Clipboard-0.6.0-new/src/gui/include/all/clipboard/logging.hpp
+--- Clipboard-0.6.0/src/gui/include/all/clipboard/logging.hpp  2023-04-08 
12:34:14.000000000 -0500
++++ Clipboard-0.6.0-new/src/gui/include/all/clipboard/logging.hpp      
2023-04-19 23:01:23.069641770 -0500
+@@ -17,7 +17,6 @@
+ #include <iostream>
+ #include <streambuf>
+ 
+-#if defined(NDEBUG)
+ class NullBuffer : public std::streambuf {
+ public:
+     int overflow(int c) override { return c; }
+@@ -26,6 +25,3 @@
+ static NullBuffer nullBuffer;
+ static std::ostream nullStream(&nullBuffer);
+ static std::ostream& debugStream = nullStream;
+-#else
+-static std::ostream& debugStream = std::cerr;
+-#endif

diff --git 
a/app-misc/Clipboard/files/Clipboard-0.6.0-libdestination-and-disable-lto-and-git.patch
 
b/app-misc/Clipboard/files/Clipboard-0.6.0-libdestination-and-disable-lto-and-git.patch
new file mode 100644
index 000000000..e717f94ba
--- /dev/null
+++ 
b/app-misc/Clipboard/files/Clipboard-0.6.0-libdestination-and-disable-lto-and-git.patch
@@ -0,0 +1,103 @@
+diff -ur '--color=auto' Clipboard-0.6.0/CMakeLists.txt 
Clipboard-0.6.0-new/CMakeLists.txt
+--- Clipboard-0.6.0/CMakeLists.txt     2023-04-08 12:34:14.000000000 -0500
++++ Clipboard-0.6.0-new/CMakeLists.txt 2023-04-24 10:03:45.180861938 -0500
+@@ -11,22 +11,6 @@
+   set(X11WL ON)
+ endif()
+ 
+-execute_process( # save the current branch to GIT_BRANCH
+-  COMMAND git rev-parse --abbrev-ref HEAD
+-  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-  OUTPUT_VARIABLE GIT_BRANCH
+-  OUTPUT_STRIP_TRAILING_WHITESPACE
+-)
+-
+-execute_process( # save the current commit hash to GIT_COMMIT_HASH
+-  COMMAND git log -1 --format=%h
+-  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+-  OUTPUT_VARIABLE GIT_COMMIT_HASH
+-  OUTPUT_STRIP_TRAILING_WHITESPACE
+-)
+-
+-add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}")
+-add_definitions(-DGIT_BRANCH="${GIT_BRANCH}")
+ add_definitions(-DCLIPBOARD_VERSION="${PROJECT_VERSION}")
+ 
+ if (MSVC)
+@@ -74,17 +58,6 @@
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE} ${LIB_LOCATION})
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE} ${BIN_LOCATION})
+ 
+-function(enable_lto this_target)
+-include(CheckIPOSupported)
+-check_ipo_supported(RESULT lto_supported)
+-if(lto_supported AND NOT NO_LTO)
+-  set_property(TARGET ${this_target} PROPERTY INTERPROCEDURAL_OPTIMIZATION 
TRUE)
+-  if(CMAKE_COMPILER_IS_GNUCXX)
+-    list(APPEND CMAKE_CXX_COMPILE_OPTIONS_IPO "-flto=auto") # set the thread 
amount to what is available on the CPU
+-  endif()
+-endif()
+-endfunction()
+-
+ add_subdirectory(src/gui)
+ 
+ find_package(X11)
+diff -ur '--color=auto' Clipboard-0.6.0/src/clipboard/CMakeLists.txt 
Clipboard-0.6.0-new/src/clipboard/CMakeLists.txt
+--- Clipboard-0.6.0/src/clipboard/CMakeLists.txt       2023-04-08 
12:34:14.000000000 -0500
++++ Clipboard-0.6.0-new/src/clipboard/CMakeLists.txt   2023-04-24 
10:04:39.144864894 -0500
+@@ -5,8 +5,6 @@
+   src/themes.cpp
+ )
+ 
+-enable_lto(clipboard)
+-
+ target_link_libraries(clipboard gui)
+ 
+ if(WIN32)
+@@ -45,13 +43,13 @@
+     TARGET clipboard
+     APPEND
+     PROPERTY BUILD_RPATH
+-    "${CMAKE_INSTALL_PREFIX}/lib"
++    "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
+   )
+   set_property(
+     TARGET clipboard
+     APPEND
+     PROPERTY INSTALL_RPATH
+-    "${CMAKE_INSTALL_PREFIX}/lib"
++    "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
+   )
+   target_link_options(clipboard PRIVATE -z origin) # set the rpath to $ORIGIN
+   target_link_libraries(clipboard ${CMAKE_DL_LIBS})
+diff -ur '--color=auto' Clipboard-0.6.0/src/clipboardwayland/CMakeLists.txt 
Clipboard-0.6.0-new/src/clipboardwayland/CMakeLists.txt
+--- Clipboard-0.6.0/src/clipboardwayland/CMakeLists.txt        2023-04-08 
12:34:14.000000000 -0500
++++ Clipboard-0.6.0-new/src/clipboardwayland/CMakeLists.txt    2023-04-24 
10:05:44.524868476 -0500
+@@ -60,8 +60,6 @@
+ )
+ add_dependencies(clipboardwayland clipboardwayland_generatedheaders)
+ 
+-enable_lto(clipboardwayland)
+-
+ target_link_libraries(clipboardwayland
+   ${WAYLAND_CLIENT_LIBRARIES}
+   gui
+@@ -71,4 +69,4 @@
+   ${GENERATED_INCLUDE_DIR}
+ )
+ 
+-install(TARGETS clipboardwayland LIBRARY DESTINATION lib)
++install(TARGETS clipboardwayland LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff -ur '--color=auto' Clipboard-0.6.0/src/clipboardx11/CMakeLists.txt 
Clipboard-0.6.0-new/src/clipboardx11/CMakeLists.txt
+--- Clipboard-0.6.0/src/clipboardx11/CMakeLists.txt    2023-04-08 
12:34:14.000000000 -0500
++++ Clipboard-0.6.0-new/src/clipboardx11/CMakeLists.txt        2023-04-24 
10:05:23.048867299 -0500
+@@ -7,8 +7,6 @@
+   gui
+ )
+ 
+-enable_lto(clipboardx11)
+-
+ target_include_directories(clipboardx11 PRIVATE ${X11_INCLUDE_DIR})
+ 
+-install(TARGETS clipboardx11 LIBRARY DESTINATION lib)
++install(TARGETS clipboardx11 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

diff --git a/app-misc/Clipboard/metadata.xml b/app-misc/Clipboard/metadata.xml
new file mode 100644
index 000000000..0f4bbcf12
--- /dev/null
+++ b/app-misc/Clipboard/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person" proxied="yes">
+    <email>quincyf...@protonmail.com</email>
+    <name>Quincy Fleming</name>
+  </maintainer>
+  <maintainer type="project" proxied="proxy">
+    <email>proxy-ma...@gentoo.org</email>
+    <name>Proxy Maintainers</name>
+  </maintainer>
+  <use>
+    <flag name="lto">Enable Link Time Optimization (LTO)</flag>
+  </use>
+  <upstream>
+    <remote-id type="github">Slackadays/Clipboard</remote-id>
+    <doc 
lang="en">https://github.com/Slackadays/Clipboard/blob/main/README.md</doc>
+    <bugs-to>https://github.com/Slackadays/Clipboard/issues</bugs-to>
+  </upstream>
+  <longdescription lang="en">
+    CB (or Clipboard) is a ridonkulously easy-to-use data remembrance tool 
bursting with oodles of useful features and absolutely gorgeous eye candy.
+
+    That's underselling it a bit.      
+
+    This is your one-way golden ticket to saving time and effort anytime and 
anywhere. Have a telepath with an infallible memory always by your side. Feel 
the sheer power flowing through your commanding body as you cut, copy, paste, 
add, remove, load, and make note of anything that dares lay in your terminal at 
the mere press of a button. In no time, you'll be reclined back on a sunny 
beach in the Caribbean sipping a succulent papaya smoothie with the love of 
your life all while you watch dolphins leaping from the shimmering waves of the 
soft blue water. Ok, so maybe that last part won't actually happen, but you get 
the idea
+  </longdescription>
+</pkgmetadata>

Reply via email to