diff --git a/libs/libgit2/libgit2-0.28.1-20190216.diff b/libs/libgit2/libgit2-0.28.1-20190216.diff index 4a389c41..4bbad4e9 100644 --- a/libs/libgit2/libgit2-0.28.1-20190216.diff +++ b/libs/libgit2/libgit2-0.28.1-20190216.diff @@ -1,66 +1,64 @@ diff -Nrub -x '*~' -x '*\.rej' -x '*\.orig' -x '*\.o' -x '*\.pyc' libgit2-0.28.1.orig/cmake/Modules/FindIconv.cmake libgit2-0.28.1/cmake/Modules/FindIconv.cmake --- libgit2-0.28.1.orig/cmake/Modules/FindIconv.cmake 2019-02-14 17:36:00.000000000 +0100 +++ libgit2-0.28.1/cmake/Modules/FindIconv.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,45 +0,0 @@ -# - Try to find Iconv -# Once done this will define -# -# ICONV_FOUND - system has Iconv -# ICONV_INCLUDE_DIR - the Iconv include directory -# ICONV_LIBRARIES - Link these to use Iconv -# - -IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - # Already in cache, be silent - SET(ICONV_FIND_QUIETLY TRUE) -ENDIF() - -FIND_PATH(ICONV_INCLUDE_DIR iconv.h) -CHECK_FUNCTION_EXISTS(iconv_open libc_has_iconv) -FIND_LIBRARY(iconv_lib NAMES iconv libiconv libiconv-2 c) - -IF(ICONV_INCLUDE_DIR AND libc_has_iconv) - SET(ICONV_FOUND TRUE) - SET(ICONV_LIBRARIES "") - IF(NOT ICONV_FIND_QUIETLY) - MESSAGE(STATUS "Found Iconv: provided by libc") - ENDIF(NOT ICONV_FIND_QUIETLY) -ELSEIF(ICONV_INCLUDE_DIR AND iconv_lib) - SET(ICONV_FOUND TRUE) - # split iconv into -L and -l linker options, so we can - # set them for pkg-config - GET_FILENAME_COMPONENT(iconv_path ${iconv_lib} PATH) - GET_FILENAME_COMPONENT(iconv_name ${iconv_lib} NAME_WE) - STRING(REGEX REPLACE "^lib" "" iconv_name ${iconv_name}) - SET(ICONV_LIBRARIES "-L${iconv_path} -l${iconv_name}") - - IF(NOT ICONV_FIND_QUIETLY) - MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") - ENDIF(NOT ICONV_FIND_QUIETLY) -ELSE() - IF(Iconv_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Iconv") - ENDIF(Iconv_FIND_REQUIRED) -ENDIF() - -MARK_AS_ADVANCED( - ICONV_INCLUDE_DIR - ICONV_LIBRARIES -) diff -Nrub -x '*~' -x '*\.rej' -x '*\.orig' -x '*\.o' -x '*\.pyc' libgit2-0.28.1.orig/src/CMakeLists.txt libgit2-0.28.1/src/CMakeLists.txt --- libgit2-0.28.1.orig/src/CMakeLists.txt 2019-02-14 17:36:00.000000000 +0100 +++ libgit2-0.28.1/src/CMakeLists.txt 2019-02-16 10:13:41.235118200 +0100 @@ -375,9 +375,8 @@ ENDIF() IF (ICONV_FOUND) SET(GIT_USE_ICONV 1) - LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${ICONV_INCLUDE_DIR}) - LIST(APPEND LIBGIT2_LIBS ${ICONV_LIBRARIES}) - LIST(APPEND LIBGIT2_PC_LIBS ${ICONV_LIBRARIES}) + LIST(APPEND LIBGIT2_LIBS Iconv::Iconv) + LIST(APPEND LIBGIT2_PC_LIBS ${Iconv_LIBRARY}) ENDIF() ADD_FEATURE_INFO(iconv GIT_USE_ICONV "iconv encoding conversion support") -C:\CraftRoot\dev-utils\bin\diff.exe: libgit2-0.28.1.orig/tests/resources/status: Invalid argument -C:\CraftRoot\dev-utils\bin\diff.exe: libgit2-0.28.1/tests/resources/status: Invalid argument diff --git a/libs/libgit2/libgit2.py b/libs/libgit2/libgit2.py index b00c5cf0..58512133 100644 --- a/libs/libgit2/libgit2.py +++ b/libs/libgit2/libgit2.py @@ -1,34 +1,35 @@ # -*- coding: utf-8 -*- import info class subinfo(info.infoclass): def setTargets(self): self.svnTargets['master'] = 'https://github.com/libgit2/libgit2.git' for ver in ['0.28.1', "1.0.1"]: self.targets[ver] = f"https://github.com/libgit2/libgit2/archive/v{ver}.tar.gz" self.archiveNames[ver] = f"libgit2-{ver}.tar.gz" self.targetInstSrc[ver] = f"libgit2-{ver}" - self.patchToApply["0.28.1"] = [ ("libgit2-0.28.1-20190216.diff", 1)] + self.patchToApply["0.28.1"] = [("libgit2-0.28.1-20190216.diff", 1)] + self.patchToApply["1.0.1"] = [("libgit2-0.28.1-20190216.diff", 1)] self.targetDigests["0.28.1"] = (['0ca11048795b0d6338f2e57717370208c2c97ad66c6d5eac0c97a8827d13936b'], CraftHash.HashAlgorithm.SHA256) self.targetDigests["1.0.1"] = (['1775427a6098f441ddbaa5bd4e9b8a043c7401e450ed761e69a415530fea81d2'], CraftHash.HashAlgorithm.SHA256) self.patchLevel["0.28.1"] = 3 self.description = "a portable C library for accessing git repositories" self.defaultTarget = '1.0.1' def setDependencies(self): self.buildDependencies['dev-utils/pkg-config'] = 'default' self.runtimeDependencies["virtual/base"] = None self.runtimeDependencies['libs/iconv'] = 'default' self.runtimeDependencies['libs/libssh2'] = 'default' self.runtimeDependencies['libs/openssl'] = 'default' from Package.CMakePackageBase import * class Package(CMakePackageBase): def __init__(self, **args): CMakePackageBase.__init__(self) self.subinfo.options.configure.args += "-DUSE_ICONV=ON -DBUILD_CLAR=OFF"