diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-28 20:54:54 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-28 22:15:13 +0200 |
commit | 656d0b047dc744a9bd9541dfa8b07ad60f4ebffc (patch) | |
tree | afcac02b83c1859b85efe33c65f285db45d9b255 /main/libgit2/build-both-static-dynamic.patch | |
parent | 8441638df3a9cf5fc2dbb8dd4c82fd6e01fe5386 (diff) | |
download | aports-656d0b047dc744a9bd9541dfa8b07ad60f4ebffc.tar.bz2 aports-656d0b047dc744a9bd9541dfa8b07ad60f4ebffc.tar.xz |
main/libgit2: upgrade to 0.27.0
Diffstat (limited to 'main/libgit2/build-both-static-dynamic.patch')
-rw-r--r-- | main/libgit2/build-both-static-dynamic.patch | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/main/libgit2/build-both-static-dynamic.patch b/main/libgit2/build-both-static-dynamic.patch index 9c85dc56b4..210054ed45 100644 --- a/main/libgit2/build-both-static-dynamic.patch +++ b/main/libgit2/build-both-static-dynamic.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Build both static and dynamic library This is very hack-ish, it makes option BUILD_SHARED_LIBS unusable. --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -28,7 +28,6 @@ +@@ -39,7 +39,6 @@ # Build options # OPTION( SONAME "Set the (SO)VERSION of the target" ON ) @@ -13,36 +13,32 @@ This is very hack-ish, it makes option BUILD_SHARED_LIBS unusable. OPTION( THREADSAFE "Build libgit2 as threadsafe" ON ) OPTION( BUILD_CLAR "Build Tests using the Clar suite" ON ) OPTION( BUILD_EXAMPLES "Build library usage example apps" OFF ) -@@ -45,6 +44,8 @@ - OPTION( CURL "Use curl for HTTP if available" ON) +@@ -58,6 +57,8 @@ OPTION( DEBUG_POOL "Enable debug pool allocator" OFF ) - -+SET( BUILD_SHARED_LIBS ON ) + OPTION( ENABLE_WERROR "Enable compilation with -Werror" OFF ) + OPTION( USE_BUNDLED_ZLIB "Use the bundled version of zlib" OFF ) + - IF(DEBUG_POOL) - ADD_DEFINITIONS(-DGIT_DEBUG_POOL) - ENDIF() -@@ -609,7 +610,8 @@ - ENDIF() ++SET( BUILD_SHARED_LIBS ON ) + + IF (UNIX AND NOT APPLE) + OPTION( ENABLE_REPRODUCIBLE_BUILDS "Enable reproducible builds" OFF ) +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -415,9 +415,12 @@ # Compile and link libgit2 --ADD_LIBRARY(git2 ${SRC_H} ${SRC_GIT2} ${SRC_OS} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SSH} ${SRC_SHA1} ${WIN_RC}) -+ADD_LIBRARY(objlib OBJECT ${SRC_H} ${SRC_GIT2} ${SRC_OS} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SSH} ${SRC_SHA1} ${WIN_RC}) -+ADD_LIBRARY(git2 SHARED $<TARGET_OBJECTS:objlib>) - TARGET_LINK_LIBRARIES(git2 ${SECURITY_DIRS}) - TARGET_LINK_LIBRARIES(git2 ${COREFOUNDATION_DIRS}) - TARGET_LINK_LIBRARIES(git2 ${SSL_LIBRARIES}) -@@ -618,6 +620,9 @@ - TARGET_LINK_LIBRARIES(git2 ${ICONV_LIBRARIES}) - TARGET_OS_LIBRARIES(git2) + LINK_DIRECTORIES(${LIBGIT2_LIBDIRS}) +-ADD_LIBRARY(git2 ${WIN_RC} ${LIBGIT2_OBJECTS}) ++ADD_LIBRARY(git2 SHARED ${WIN_RC} ${LIBGIT2_OBJECTS}) + TARGET_LINK_LIBRARIES(git2 ${LIBGIT2_LIBS}) -+ADD_LIBRARY(git2_static STATIC $<TARGET_OBJECTS:objlib>) ++ADD_LIBRARY(git2_static STATIC ${WIN_RC} ${LIBGIT2_OBJECTS}) +SET_TARGET_PROPERTIES(git2_static PROPERTIES OUTPUT_NAME git2 CLEAN_DIRECT_OUTPUT 1) + - # Workaround for Cmake bug #0011240 (see http://public.kitware.com/Bug/view.php?id=11240) - # Win64+MSVC+static libs = linker error - IF(MSVC AND GIT_ARCH_64 AND NOT BUILD_SHARED_LIBS) -@@ -646,7 +651,7 @@ + SET_TARGET_PROPERTIES(git2 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR}) + SET_TARGET_PROPERTIES(git2 PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR}) + SET_TARGET_PROPERTIES(git2 PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR}) +@@ -453,7 +457,7 @@ ENDIF () # Install |