diff options
Diffstat (limited to 'fix_libgit2_build.patch')
-rw-r--r-- | fix_libgit2_build.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/fix_libgit2_build.patch b/fix_libgit2_build.patch new file mode 100644 index 000000000000..bd8cb43e0c26 --- /dev/null +++ b/fix_libgit2_build.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4783e3ef9..da34f9fe7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -327,34 +327,15 @@ IF(WIN32 OR AMIGA OR CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)") + SET(SRC_REGEX deps/regex/regex.c) + ENDIF() + +-# Optional external dependency: http-parser +-FIND_PACKAGE(HTTP_Parser) +-IF (HTTP_PARSER_FOUND AND HTTP_PARSER_VERSION_MAJOR EQUAL 2) +- INCLUDE_DIRECTORIES(${HTTP_PARSER_INCLUDE_DIRS}) +- LINK_LIBRARIES(${HTTP_PARSER_LIBRARIES}) +- LIST(APPEND LIBGIT2_PC_LIBS "-lhttp_parser") +-ELSE() + MESSAGE(STATUS "http-parser version 2 was not found; using bundled 3rd-party sources.") + INCLUDE_DIRECTORIES(deps/http-parser) + FILE(GLOB SRC_HTTP deps/http-parser/*.c deps/http-parser/*.h) +-ENDIF() + + # Optional external dependency: zlib +-FIND_PACKAGE(ZLIB) +-IF (ZLIB_FOUND) +- INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS}) +- LINK_LIBRARIES(${ZLIB_LIBRARIES}) +- IF(APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +- LIST(APPEND LIBGIT2_PC_LIBS "-lz") +- ELSE() +- SET(LIBGIT2_PC_REQUIRES "${LIBGIT2_PC_REQUIRES} zlib") +- ENDIF() +-ELSE() + MESSAGE(STATUS "zlib was not found; using bundled 3rd-party sources." ) + INCLUDE_DIRECTORIES(deps/zlib) + ADD_DEFINITIONS(-DNO_VIZ -DSTDC -DNO_GZIP) + FILE(GLOB SRC_ZLIB deps/zlib/*.c deps/zlib/*.h) +-ENDIF() + + # Optional external dependency: libssh2 + IF (USE_SSH) |