Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7bdd1eaff2 | ||
|
d957b032a3 | ||
|
823dfd1f2c | ||
|
8687714c90 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -33,4 +33,4 @@
|
||||
/libgit2-0.28.2.tar.gz
|
||||
/libgit2-0.28.3.tar.gz
|
||||
/libgit2-0.28.4.tar.gz
|
||||
/libgit2-0.99.0.tar.gz
|
||||
/libgit2-0.28.5.tar.gz
|
||||
|
@ -1,81 +0,0 @@
|
||||
From fbda0575b133a57d8f5d264742098994c7624c99 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= <kloczko.tomasz@gmail.com>
|
||||
Date: Wed, 19 Feb 2020 12:54:19 +0000
|
||||
Subject: [PATCH] Fix #5410: fix installing libgit2.pc in wrong location
|
||||
|
||||
Remove using custom PKG_BUILD_PREFIu, PKG_BUILD_LIBDIR and
|
||||
PKG_BUILD_INCLUDEDIR variables.
|
||||
Use cmake CMAKE_INSTALL_PREFIX, LIB_INSTALL_DIR, INCLUDE_INSTALL_DIR instead.
|
||||
This patch fixes install libgit2.pc file in correct location and simpifies
|
||||
cmake module.
|
||||
---
|
||||
cmake/Modules/PkgBuildConfig.cmake | 39 +++---------------------------
|
||||
1 file changed, 4 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/cmake/Modules/PkgBuildConfig.cmake b/cmake/Modules/PkgBuildConfig.cmake
|
||||
index 1c0079eb0..e4c574431 100644
|
||||
--- a/cmake/Modules/PkgBuildConfig.cmake
|
||||
+++ b/cmake/Modules/PkgBuildConfig.cmake
|
||||
@@ -1,10 +1,5 @@
|
||||
# pkg-config file generation
|
||||
#
|
||||
-# Uses the following globals:
|
||||
-# - PKG_BUILD_PREFIX: the build location (aka prefix). Defaults to CMAKE_INSTALL_PREFIX
|
||||
-# - PKG_BUILD_LIBDIR: the libdir location. Defaults to ${prefix}/lib.
|
||||
-# - PKG_BUILD_INCLUDEDIR: the includedir location. Defaults to ${prefix}/include.
|
||||
-#
|
||||
|
||||
function(pkg_build_config)
|
||||
set(options)
|
||||
@@ -29,37 +24,11 @@ function(pkg_build_config)
|
||||
message(FATAL_ERROR "Missing VERSION argument")
|
||||
endif()
|
||||
|
||||
- if (DEFINED PKG_BUILD_PREFIX)
|
||||
- set(PKGCONFIG_PREFIX "${PKG_BUILD_PREFIX}")
|
||||
- else()
|
||||
- set(PKGCONFIG_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
- endif()
|
||||
-
|
||||
- if(DEFINED PKG_BUILD_LIBDIR)
|
||||
- if (IS_ABSOLUTE ${PKG_BUILD_LIBDIR})
|
||||
- set(PKGCONFIG_LIBDIR ${PKG_BUILD_LIBDIR})
|
||||
- else()
|
||||
- set(PKGCONFIG_LIBDIR "\${prefix}/${PKG_BUILD_LIBDIR}")
|
||||
- endif()
|
||||
- else()
|
||||
- set(PKGCONFIG_LIBDIR "\${prefix}/lib")
|
||||
- endif()
|
||||
-
|
||||
- if(DEFINED PKG_BUILD_INCLUDEDIR)
|
||||
- if (IS_ABSOLUTE ${PKG_BUILD_INCLUDEDIR})
|
||||
- set(PKGCONFIG_INCLUDEDIR ${PKG_BUILD_INCLUDEDIR})
|
||||
- else()
|
||||
- set(PKGCONFIG_INCLUDEDIR "\${prefix}/${PKG_BUILD_INCLUDEDIR}")
|
||||
- endif()
|
||||
- else()
|
||||
- set(PKGCONFIG_INCLUDEDIR "\${prefix}/include")
|
||||
- endif()
|
||||
-
|
||||
# Write .pc "header"
|
||||
file(WRITE "${PKGCONFIG_FILE}"
|
||||
- "prefix=\"${PKGCONFIG_PREFIX}\"\n"
|
||||
- "libdir=\"${PKGCONFIG_LIBDIR}\"\n"
|
||||
- "includedir=\"${PKGCONFIG_INCLUDEDIR}\"\n"
|
||||
+ "prefix=\"${CMAKE_INSTALL_PREFIX}\"\n"
|
||||
+ "libdir=\"${LIB_INSTALL_DIR}\"\n"
|
||||
+ "includedir=\"${INCLUDE_INSTALL_DIR}\"\n"
|
||||
"\n"
|
||||
"Name: ${PKGCONFIG_NAME}\n"
|
||||
"Description: ${PKGCONFIG_DESCRIPTION}\n"
|
||||
@@ -105,6 +74,6 @@ function(pkg_build_config)
|
||||
|
||||
# Install .pc file
|
||||
install(FILES "${PKGCONFIG_FILE}"
|
||||
- DESTINATION "${PKGCONFIG_PREFIX}/${PKGCONFIG_LIBDIR}/pkgconfig"
|
||||
+ DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
|
||||
)
|
||||
endfunction()
|
||||
--
|
||||
2.25.1
|
||||
|
35
libgit2.spec
35
libgit2.spec
@ -1,24 +1,22 @@
|
||||
Name: libgit2
|
||||
Version: 0.99.0
|
||||
Release: 2%{?dist}
|
||||
Version: 0.28.5
|
||||
Release: 1%{?dist}
|
||||
Summary: C implementation of the Git core methods as a library with a solid API
|
||||
License: GPLv2 with exceptions
|
||||
URL: https://libgit2.org/
|
||||
Source0: https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0001: 0001-Fix-5410-fix-installing-libgit2.pc-in-wrong-location.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: cmake >= 3.5.1
|
||||
BuildRequires: cmake >= 2.8.11
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: http-parser-devel
|
||||
BuildRequires: libcurl-devel
|
||||
BuildRequires: libssh2-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pcre2-devel
|
||||
BuildRequires: python3
|
||||
BuildRequires: zlib-devel
|
||||
Provides: bundled(libxdiff)
|
||||
Obsoletes: libgit2_0.28 < 0.28.3-2
|
||||
Obsoletes: libgit2_0.28 < 0.28.4-2
|
||||
|
||||
%description
|
||||
libgit2 is a portable, pure C implementation of the Git core methods
|
||||
@ -29,7 +27,7 @@ with bindings.
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Obsoletes: libgit2_0.28-devel < 0.28.3-2
|
||||
Obsoletes: libgit2_0.28-devel < 0.28.4-2
|
||||
|
||||
%description devel
|
||||
This package contains libraries and header files for
|
||||
@ -38,26 +36,21 @@ developing applications that use %{name}.
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
sed -i -e '/LIBGIT2_PC_REQUIRES/s/libpcre2/libpcre2-8/' src/CMakeLists.txt
|
||||
|
||||
# Remove VCS files from examples
|
||||
find examples -name ".gitignore" -delete -print
|
||||
|
||||
# Don't run "online" tests
|
||||
sed -i '/-sonline/s/^/#/' tests/CMakeLists.txt
|
||||
sed -i '/ADD_TEST(online/s/^/#/' tests/CMakeLists.txt
|
||||
|
||||
# Remove bundled libraries
|
||||
rm -vr deps
|
||||
rm -frv deps
|
||||
|
||||
%build
|
||||
%cmake . -B%{_target_platform} \
|
||||
-GNinja \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DREGEX_BACKEND=pcre2 \
|
||||
-DUSE_HTTP_PARSER=system \
|
||||
-DUSE_SHA1=HTTPS \
|
||||
-DSHA1_BACKEND=OpenSSL \
|
||||
-DUSE_HTTPS=OpenSSL \
|
||||
-DUSE_NTLMCLIENT=OFF \
|
||||
%{nil}
|
||||
%ninja_build -C %{_target_platform}
|
||||
|
||||
@ -79,14 +72,14 @@ rm -vr deps
|
||||
%{_includedir}/git2/
|
||||
|
||||
%changelog
|
||||
* Tue Mar 03 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.99.0-2
|
||||
- Fix broken deps for pcre2
|
||||
* Wed Apr 01 2020 Pete Walter <pwalter@fedoraproject.org> - 0.28.5-1
|
||||
- Update to 0.28.5
|
||||
|
||||
* Mon Mar 02 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.99.0-1
|
||||
- Update to 0.99.0
|
||||
* Thu Mar 19 2020 Pete Walter <pwalter@fedoraproject.org> - 0.28.4-3
|
||||
- Rebuild against http-parser 2.9.3 (#1814897)
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.28.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
* Sun Mar 15 2020 Pete Walter <pwalter@fedoraproject.org> - 0.28.4-2
|
||||
- Bump libgit2_0.28 obsoletes versions
|
||||
|
||||
* Wed Dec 11 09:00:52 CET 2019 Igor Gnatenko <ingnatenkobrain@fedoraproject.org> - 0.28.4-1
|
||||
- Update to 0.28.4
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (libgit2-0.99.0.tar.gz) = e38e18da0e6ed1e5c8198c9eb2c362b21da2d0b9c8bc23309d2f70183549f4b9f23a6db8ce5f1f0f24b373e6427039c2a845b62dd74f91b02cfe8954f961a91b
|
||||
SHA512 (libgit2-0.28.5.tar.gz) = abfea885f46444b0304ae57c32c06f4252afb0093c924da5e1ba10aaed952824d1b84036adb79b5b8ad8bea56a6331a51c62f3b9839aead16c7b26cb4554b53a
|
||||
|
Loading…
Reference in New Issue
Block a user