clipboard, new recipe (#11767)

This commit is contained in:
Schrijvers Luc
2025-02-12 11:39:59 +01:00
committed by GitHub
parent f4a3b1e925
commit 8952fa9a5f
2 changed files with 149 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
SUMMARY="Cut, copy, and paste anything in your terminal"
DESCRIPTION="The Clipboard Project is a fast and lightweight, feature packed, and user friendly \
tool that lets you do more on the computer in _style_. Seriously.
Say hello to one of the most cutting-edge clipboard managers ever. Save time and effort easier \
and more powerfully than ever before.
Don't just take my word for it!
Just let the features speak for themselves.
* Copy and paste text, files, directories, binary data, your goat, _anything_
* Infinite numbers of clipboards with unlimited capacity **and** history each,
* Seriously kickASS performance because I'm sick of slow software,
* Seamless integration with your existing clipboard systems,
* Support for your favorite languages like español, português, Türkçe, and Français,
* A superbly scriptable API to automate your workflows in a cinch,
* Gorgeous and ear candy for your viewing and listening pleasure,
* Documentation you'll actually want to read all in the readme
* And oodles more!"
HOMEPAGE="https://getclipboard.app/"
COPYRIGHT="2022-2024 Jackson Huff"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/Slackadays/Clipboard/archive/refs/tags/0.10.0.tar.gz"
CHECKSUM_SHA256="741717ee505a7852fab5c69740b019e2b33f81d948232894ce294ed0a55e70fb"
SOURCE_DIR="Clipboard-$portVersion"
PATCHES="clipboard-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
clipboard$secondaryArchSuffix = $portVersion
cmd:cb = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcrypto$secondaryArchSuffix >= 3
devel:libssl$secondaryArchSuffix >= 3
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ninja
cmd:pkg_config$secondaryArchSuffix
# for completion
cmd:fish
cmd:zsh
"
BUILD()
{
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$prefix
ninja -v -C build
}
INSTALL()
{
ninja -C build install
mkdir -p $docDir
cp *.md $docDir
}

View File

@@ -0,0 +1,79 @@
From d9b7092fbd280868e2713e193bf2e5864abec527 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Tue, 11 Feb 2025 15:55:32 +0100
Subject: Haiku fixes
diff --git a/src/cb/src/actions/history.cpp b/src/cb/src/actions/history.cpp
index 10e2cbc..2c59325 100644
--- a/src/cb/src/actions/history.cpp
+++ b/src/cb/src/actions/history.cpp
@@ -35,7 +35,7 @@ int SQEsSubmitted = 0;
#include <sys/types.h>
#endif
-#if (defined(UNIX_OR_UNIX_LIKE)) && !defined(__OpenBSD__)
+#if (defined(UNIX_OR_UNIX_LIKE)) && !defined(__OpenBSD__) && !defined(__HAIKU__)
#define USE_AIO 1
#include <aio.h>
#endif
diff --git a/src/cb/src/utils/utils.cpp b/src/cb/src/utils/utils.cpp
index 02eb72c..0fa5f20 100644
--- a/src/cb/src/utils/utils.cpp
+++ b/src/cb/src/utils/utils.cpp
@@ -321,7 +321,7 @@ void verifyClipboardName() {
constexpr std::array forbiddenFilenameCharacters {'<', '>', ':', '"', '/', '\\', '|', '?', '*'};
#elif defined(__APPLE__)
constexpr std::array forbiddenFilenameCharacters {'/', ':'};
-#elif defined(__linux__) || defined(__unix__)
+#elif defined(__linux__) || defined(__unix__) || defined(__HAIKU__)
constexpr std::array forbiddenFilenameCharacters {'/'};
#else
constexpr std::array forbiddenFilenameCharacters {};
@@ -773,4 +773,4 @@ void showSuccesses() {
else if ((successes.files > 1) && (successes.directories > 1))
fprintf(stderr, many_files_many_directories_success_message().data(), did_action[action].data(), successes.files.load(), successes.directories.load());
}
-}
\ No newline at end of file
+}
--
2.45.2
From f9b97be8a6486df7141706ffa62db0d81559c8d8 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Tue, 11 Feb 2025 17:10:34 +0100
Subject: Fix paths for completions and manpage
diff --git a/src/cb/CMakeLists.txt b/src/cb/CMakeLists.txt
index e975488..7c95941 100644
--- a/src/cb/CMakeLists.txt
+++ b/src/cb/CMakeLists.txt
@@ -143,4 +143,20 @@ if(X11WL OR APPLE)
if(ZSH)
install(FILES ${CMAKE_SOURCE_DIR}/documentation/completions/cb.zsh DESTINATION share/zsh/site-functions RENAME _cb)
endif()
-endif()
\ No newline at end of file
+endif()
+
+if(HAIKU)
+ install(FILES ${CMAKE_SOURCE_DIR}/documentation/manpages/man.1 DESTINATION documentation/man/man1 RENAME cb.1)
+ find_program(FISH fish)
+ if(FISH)
+ install(FILES ${CMAKE_SOURCE_DIR}/documentation/completions/cb.fish DESTINATION data/fish/completions RENAME cb.fish)
+ endif()
+ find_program(BASH bash)
+ if(BASH)
+ install(FILES ${CMAKE_SOURCE_DIR}/documentation/completions/cb.bash DESTINATION data/bash-completion/completions RENAME cb)
+ endif()
+ find_program(ZSH zsh)
+ if(ZSH)
+ install(FILES ${CMAKE_SOURCE_DIR}/documentation/completions/cb.zsh DESTINATION data/zsh/site-functions RENAME _cb)
+ endif()
+endif()
--
2.45.2