aboutsummaryrefslogtreecommitdiffstats
path: root/community/neko/remove-git-dependent-targets.patch
blob: f05d766d85b3d2d59c7c8a390f84df58f9f6fe0f (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -194,9 +194,6 @@
 	find_package(PkgConfig REQUIRED)
 endif()
 
-# git is used for source_archive and for applying patch
-find_package(Git REQUIRED)
-
 # copy the lib/src folder to build directory
 # (if it is a fat archive, there will be external libraries)
 if(EXISTS ${CMAKE_SOURCE_DIR}/libs/src)
@@ -524,56 +521,6 @@
 
 #######################
 
-# source_archive
-# We create our own source package target instead of using CPack's package_source.
-# One reason is that the CPack VS generator doesn't generate package_source target.
-# See https://cmake.org/Bug/view.php?id=13058
-
-if (WIN32)
-	set(source_archive_format zip)
-else()
-	set(source_archive_format tar.gz)
-endif()
-
-set(source_archive_name_we neko-${NEKO_VERSION}-src)
-set(source_archive_name ${source_archive_name_we}.${source_archive_format})
-
-add_custom_command(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source_archive_name}
-	COMMAND ${GIT_EXECUTABLE} archive --prefix=${source_archive_name_we}/ -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source_archive_name} HEAD
-	WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-	VERBATIM
-)
-
-add_custom_target(source_archive
-	DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source_archive_name}
-)
-
-# source_archive_fat
-# It is source_archive + STATIC_DEPS placed in libs/src.
-
-set(source_archive_fat_name_we neko-${NEKO_VERSION}-src-fat)
-set(source_archive_fat_name ${source_archive_fat_name_we}.${source_archive_format})
-
-add_custom_command(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source_archive_fat_name}
-	COMMAND ${CMAKE_COMMAND}
-		-Dsource_archive_name_we=${source_archive_name_we}
-		-Dsource_archive=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source_archive_name}
-		-Dsource_archive_fat_name_we=${source_archive_fat_name_we}
-		-Dsource_archive_fat_name=${source_archive_fat_name}
-		-Dbin_dir=${CMAKE_BINARY_DIR}
-		-Dsrc_dir=${CMAKE_SOURCE_DIR}
-		-Dlib_src_dir=libs/src
-		-P ${CMAKE_SOURCE_DIR}/cmake/source_archive_fat.cmake
-	DEPENDS source_archive download_static_deps
-	VERBATIM
-)
-
-add_custom_target(source_archive_fat
-	DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source_archive_fat_name}
-)
-
-#######################
-
 # install target
 
 if (WIN32)
@@ -811,40 +758,6 @@
 	set_tests_properties(-version test.n nekoc nekotools
 		PROPERTIES
 		ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
-	)
-endif()
-
-
-#######################
-
-# debian source packages
-
-if(UNIX AND NOT APPLE)
-	add_custom_target(upload_to_ppa
-		COMMAND ${CMAKE_COMMAND}
-			-Dsource_dir=${CMAKE_SOURCE_DIR}
-			-Dbin_dir=${CMAKE_BINARY_DIR}
-			-Dsource_archive=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source_archive_fat_name}
-			-DNEKO_VERSION=${NEKO_VERSION}
-			-P ${CMAKE_SOURCE_DIR}/cmake/upload_to_ppa.cmake
-		DEPENDS source_archive_fat
-	)
-endif()
-
-
-#######################
-
-# chocolatey
-if(WIN32)
-	add_custom_target(package_choco
-		COMMAND ${CMAKE_COMMAND}
-			-Dsource_dir=${CMAKE_SOURCE_DIR}
-			-Dbin_dir=${CMAKE_BINARY_DIR}
-			-Dbin_archive=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${bin_archive_name}
-			-Dbin_archive_name_we=${bin_archive_name_we}
-			-DNEKO_VERSION=${NEKO_VERSION}
-			-P ${CMAKE_SOURCE_DIR}/cmake/package_choco.cmake
-		DEPENDS package
 	)
 endif()