app-misc/Clipboard: new package, add 0.6.0

Signed-off-by: Quincy Fleming <quincyf467@protonmail.com>
This commit is contained in:
Quincy Fleming
2023-04-24 22:02:10 -05:00
parent c858e783d2
commit e0705672ec
5 changed files with 198 additions and 0 deletions

View File

@@ -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

View File

@@ -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})