Skip to content

Commit 20805fa

Browse files
committed
fix: hyprpaper
1 parent ae0581b commit 20805fa

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

srcpkgs/hyprpaper/files/gcc.patch

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index bde1540..da424fa 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -47,6 +47,7 @@ add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value
6+
7+
find_package(Threads REQUIRED)
8+
find_package(PkgConfig REQUIRED)
9+
+find_package(fmt REQUIRED)
10+
find_package(hyprwayland-scanner 0.4.0 REQUIRED)
11+
12+
pkg_check_modules(
13+
@@ -120,7 +121,7 @@ set(CPACK_PROJECT_NAME ${PROJECT_NAME})
14+
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
15+
include(CPack)
16+
17+
-target_link_libraries(hyprpaper PkgConfig::deps)
18+
+target_link_libraries(hyprpaper PkgConfig::deps fmt::fmt)
19+
20+
target_link_libraries(
21+
hyprpaper

srcpkgs/hyprpaper/template

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,20 @@ if [ "$build_option_clang" ]; then
4242
makedepends+=" libcxx libcxx-devel libcxxabi libcxxabi-devel"
4343
fi
4444

45+
_apply_patch() {
46+
local args="$1" pname="$(basename $2)"
47+
48+
if [ ! -f ".${pname}_done" ]; then
49+
patch -N $args -i $2
50+
touch .${pname}_done
51+
fi
52+
}
53+
4554
pre_configure() {
55+
if [ "$build_option_gcc" ]; then
56+
_apply_patch -p1 ${FILESDIR}/gcc.patch
57+
fi
58+
4659
if [ "$build_option_clang" ]; then
4760
export CC=clang
4861
export CXX=clang++

0 commit comments

Comments
 (0)