aports/community/neko/remove-git-dependent-targets.patch
alpine-mips-patches b7b4370cce community/neko: fix build without git installed
Remove all targets that depend on git (source_archive and friends),
none of them are used during normal build.
2018-12-17 07:40:12 +00:00

111 lines
3.2 KiB
Diff

--- 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()