File: 003-embed.patch

package info (click to toggle)
hyprland 0.51.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 53,472 kB
  • sloc: cpp: 70,714; xml: 4,094; sh: 254; makefile: 90
file content (35 lines) | stat: -rw-r--r-- 1,494 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Description: Avoid #embed directive
 Workaround gcc-14's lack of #embed support. This can be dropped when Debian's
 default gcc is 15+.
Origin: https://github.com/cpiber/hyprland-ppa/blob/0dcd5f3101f7ced40879d0f34f337b1a2cdd79ae/hyprland/debian/patches/03-embed
Author: Constantin Piber <cp.piber@gmail.com>
Forwarded: not-needed
Index: source/CMakeLists.txt
===================================================================
--- source.orig/CMakeLists.txt
+++ source/CMakeLists.txt
@@ -30,6 +30,11 @@ execute_process(COMMAND ./scripts/genera
 execute_process(COMMAND ./scripts/generateShaderIncludes.sh
                 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
 
+execute_process(COMMAND xxd -i
+                INPUT_FILE ./example/hyprland.conf
+                OUTPUT_FILE ./src/config/defaultConfigBytes.hpp
+                WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+
 find_package(PkgConfig REQUIRED)
 
 # Try to find canihavesomecoffee's udis86 using pkgconfig vmd/udis86 does not
Index: source/src/config/defaultConfig.hpp
===================================================================
--- source.orig/src/config/defaultConfig.hpp
+++ source/src/config/defaultConfig.hpp
@@ -12,7 +12,7 @@ autogenerated = 1 # remove this line to
 
 )#";
 inline constexpr char             EXAMPLE_CONFIG_BYTES[] = {
-#embed "../../example/hyprland.conf"
+#include "defaultConfigBytes.hpp"
 };
 
 inline constexpr std::string_view EXAMPLE_CONFIG = {EXAMPLE_CONFIG_BYTES, sizeof(EXAMPLE_CONFIG_BYTES)};