Skip to content

Commit 13ec201

Browse files
committed
fix: hyprlang musl
1 parent 76ceb8e commit 13ec201

File tree

3 files changed

+30
-28
lines changed

3 files changed

+30
-28
lines changed

srcpkgs/hyprlang/files/cmake.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 aa8cdf9..b2ab5af 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -30,6 +30,7 @@ add_compile_definitions(HYPRLANG_INTERNAL)
6+
set(CMAKE_CXX_STANDARD 23)
7+
8+
find_package(PkgConfig REQUIRED)
9+
+find_package(fmt REQUIRED)
10+
pkg_check_modules(deps REQUIRED IMPORTED_TARGET hyprutils>=0.1.1)
11+
12+
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp" "include/hyprlang.hpp")
13+
@@ -45,7 +46,7 @@ set_target_properties(
14+
SOVERSION 2
15+
PUBLIC_HEADER include/hyprlang.hpp)
16+
17+
-target_link_libraries(hyprlang PkgConfig::deps)
18+
+target_link_libraries(hyprlang PkgConfig::deps fmt::fmt)
19+
20+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
21+
# for std::expected. probably evil. Arch's clang is very outdated tho...

srcpkgs/hyprlang/files/gcc.patch

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,19 @@
1-
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 4ec92f4..c8b50f9 100644
3-
--- a/CMakeLists.txt
4-
+++ b/CMakeLists.txt
5-
@@ -37,6 +37,7 @@ add_compile_options(
6-
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
7-
8-
find_package(PkgConfig REQUIRED)
9-
+find_package(fmt REQUIRED)
10-
pkg_check_modules(deps REQUIRED IMPORTED_TARGET hyprutils>=0.1.1)
11-
12-
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp" "include/hyprlang.hpp")
13-
@@ -52,7 +53,7 @@ set_target_properties(
14-
SOVERSION 2
15-
PUBLIC_HEADER include/hyprlang.hpp)
16-
17-
-target_link_libraries(hyprlang PkgConfig::deps)
18-
+target_link_libraries(hyprlang PkgConfig::deps fmt::fmt)
19-
20-
add_library(hypr::hyprlang ALIAS hyprlang)
21-
install(TARGETS hyprlang)
221
diff --git a/include/hyprlang.hpp b/include/hyprlang.hpp
23-
index 547fcb8..b59872b 100644
2+
index 863b277..9d15331 100644
243
--- a/include/hyprlang.hpp
254
+++ b/include/hyprlang.hpp
26-
@@ -8,8 +8,8 @@
5+
@@ -8,8 +8,9 @@
276
#include <string>
287
#include <ostream>
298
#include <vector>
309
-#include <print>
31-
#include <cstdlib>
3210
+#include <fmt/core.h>
11+
#include <cstdlib>
12+
+#include <cstdint>
3313

3414
class CConfigImpl;
3515
struct SConfigDefaultValue;
36-
@@ -467,7 +467,7 @@ namespace Hyprlang {
16+
@@ -467,7 +468,7 @@ namespace Hyprlang {
3717
const auto VAL = pConfig->getConfigValuePtr(val);
3818

3919
if (!VAL) {
@@ -42,7 +22,7 @@ index 547fcb8..b59872b 100644
4222
abort();
4323
}
4424

45-
@@ -484,7 +484,7 @@ namespace Hyprlang {
25+
@@ -484,7 +485,7 @@ namespace Hyprlang {
4626
const bool CUSTOMEX = (typeid(T) == typeid(Hyprlang::CUSTOMTYPE) && (TYPE == typeid(Hyprlang::CUSTOMTYPE*) || TYPE == typeid(void*) /* dunno why it does this? */));
4727

4828
if (typeid(T) != TYPE && !STRINGEX && !CUSTOMEX) {
@@ -51,7 +31,7 @@ index 547fcb8..b59872b 100644
5131
abort();
5232
}
5333
#endif
54-
@@ -504,7 +504,7 @@ namespace Hyprlang {
34+
@@ -504,7 +505,7 @@ namespace Hyprlang {
5535

5636
template <>
5737
inline std::string* CSimpleConfigValue<std::string>::ptr() const {
@@ -60,7 +40,7 @@ index 547fcb8..b59872b 100644
6040
abort();
6141
return nullptr;
6242
}
63-
@@ -531,7 +531,7 @@ namespace Hyprlang {
43+
@@ -531,7 +532,7 @@ namespace Hyprlang {
6444

6545
template <>
6646
inline Hyprlang::CUSTOMTYPE CSimpleConfigValue<Hyprlang::CUSTOMTYPE>::operator*() const {

srcpkgs/hyprlang/template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ _apply_patch() {
4040

4141
pre_configure() {
4242
if [ "$build_option_gcc" ]; then
43+
_apply_patch -p1 ${FILESDIR}/cmake.patch
4344
_apply_patch -p1 ${FILESDIR}/gcc.patch
4445
fi
4546

0 commit comments

Comments
 (0)