summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/nc/nchat/go-libs-build.patch
blob: 0f0e137e8064ce225cdf3233eee7c402fee6cbb9 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git c/CMakeLists.txt i/CMakeLists.txt
index bc227885..d37cafe9 100644
--- c/CMakeLists.txt
+++ i/CMakeLists.txt
@@ -182,10 +182,6 @@ message(STATUS "Static Go: ${HAS_STATICGOLIB}")
 
 # Check Golang version for whatsmeow minimum requirement
 set(GO_VERSION_MIN 1.23)
-execute_process(COMMAND bash "-c" "go version 2> /dev/null | cut -c14- | cut -d' ' -f1 | tr -d '\n'" OUTPUT_VARIABLE GO_VERSION)
-if((HAS_WHATSAPP OR HAS_SIGNAL) AND (NOT GO_VERSION VERSION_GREATER_EQUAL GO_VERSION_MIN))
-  message(FATAL_ERROR "Go version ${GO_VERSION} (need >= ${GO_VERSION_MIN} to build WhatsApp or Signal)")
-endif()
 
 # Check Little/Big Endian for tdlib requirement
 test_big_endian(IS_BIG_ENDIAN)
diff --git c/lib/tgchat/ext/td/CMakeLists.txt i/lib/tgchat/ext/td/CMakeLists.txt
index f65c6e45..46b08fdd 100644
--- c/lib/tgchat/ext/td/CMakeLists.txt
+++ i/lib/tgchat/ext/td/CMakeLists.txt
@@ -140,7 +140,6 @@ if (CLANG OR GCC)
 endif()
 
 include(GetGitRevisionDescription)
-get_git_head_revision(TD_GIT_REFSPEC TD_GIT_COMMIT_HASH)
 message(STATUS "Git state: ${TD_GIT_COMMIT_HASH}")
 
 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/td/telegram/GitCommitHash.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/td/telegram/GitCommitHash.cpp" @ONLY)
diff --git c/lib/wmchat/CMakeLists.txt i/lib/wmchat/CMakeLists.txt
index 84a42ef9..556df050 100644
--- c/lib/wmchat/CMakeLists.txt
+++ i/lib/wmchat/CMakeLists.txt
@@ -20,8 +20,8 @@ install(TARGETS wmchat DESTINATION ${CMAKE_INSTALL_LIBDIR})
 target_common_config(wmchat)
 
 # Dependency libraries
-add_subdirectory(go)
-add_dependencies(wmchat ref-cgowm)
+set(GO_LIBRARIES @libcgowm@/libcgowm.a)
+target_include_directories(wmchat PRIVATE @libcgowm@)
 
 # Platform specifics
 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
@@ -44,4 +44,4 @@ set_target_properties(wmchat PROPERTIES COMPILE_FLAGS
 
 # Linking
 message(STATUS "Go libraries: ${GO_LIBRARIES}")
-target_link_libraries(wmchat PUBLIC ref-cgowm ncutil ${GO_LIBRARIES})
+target_link_libraries(wmchat PUBLIC @libcgowm@/libcgowm.a ncutil ${GO_LIBRARIES})