diff options
Diffstat (limited to 'meta/recipes-devtools/librepo')
5 files changed, 163 insertions, 0 deletions
diff --git a/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch b/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch new file mode 100644 index 0000000000..01fea40467 --- /dev/null +++ b/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 36d87919223db9b054862ad38cdda8d9222a2bab Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 30 Dec 2016 18:04:35 +0200 | ||
4 | Subject: [PATCH 1/4] Correctly set the library installation directory | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | librepo/CMakeLists.txt | 3 ++- | ||
10 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/librepo/CMakeLists.txt b/librepo/CMakeLists.txt | ||
13 | index 2fe76d8..5026def 100644 | ||
14 | --- a/librepo/CMakeLists.txt | ||
15 | +++ b/librepo/CMakeLists.txt | ||
16 | @@ -60,7 +60,8 @@ CONFIGURE_FILE("version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.h" @ONLY) | ||
17 | IF (CMAKE_SIZEOF_VOID_P MATCHES "8") | ||
18 | SET (LIB_SUFFIX "64") | ||
19 | ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8") | ||
20 | -SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") | ||
21 | +#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") | ||
22 | +SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") | ||
23 | |||
24 | INSTALL(FILES ${librepo_HEADERS} DESTINATION include/librepo) | ||
25 | INSTALL(TARGETS librepo LIBRARY DESTINATION ${LIB_INSTALL_DIR}) | ||
26 | -- | ||
27 | 2.11.0 | ||
28 | |||
diff --git a/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch new file mode 100644 index 0000000000..7138dfce21 --- /dev/null +++ b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 1570ad33dd7e5d83f3ee80bd104b114709ac1e34 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 30 Dec 2016 18:05:36 +0200 | ||
4 | Subject: [PATCH 2/4] Do not try to obtain PYTHON_INSTALL_DIR by running | ||
5 | python. | ||
6 | |||
7 | Upstream-Status: Inappropriate [oe-core specific] | ||
8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
9 | --- | ||
10 | librepo/python/python2/CMakeLists.txt | 2 +- | ||
11 | librepo/python/python3/CMakeLists.txt | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/librepo/python/python2/CMakeLists.txt b/librepo/python/python2/CMakeLists.txt | ||
15 | index 3615e17..cffa99f 100644 | ||
16 | --- a/librepo/python/python2/CMakeLists.txt | ||
17 | +++ b/librepo/python/python2/CMakeLists.txt | ||
18 | @@ -1,6 +1,6 @@ | ||
19 | FIND_PACKAGE (PythonLibs 2 ) | ||
20 | FIND_PACKAGE (PythonInterp 2 REQUIRED) | ||
21 | -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) | ||
22 | +#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) | ||
23 | INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH}) | ||
24 | |||
25 | MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") | ||
26 | diff --git a/librepo/python/python3/CMakeLists.txt b/librepo/python/python3/CMakeLists.txt | ||
27 | index dfecac9..38bcc72 100644 | ||
28 | --- a/librepo/python/python3/CMakeLists.txt | ||
29 | +++ b/librepo/python/python3/CMakeLists.txt | ||
30 | @@ -10,7 +10,7 @@ message("--- ${PYTHON_INCLUDE_DIR}") | ||
31 | |||
32 | FIND_PACKAGE(PythonLibs 3.0) | ||
33 | FIND_PACKAGE(PythonInterp 3.0 REQUIRED) | ||
34 | -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) | ||
35 | +#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) | ||
36 | INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH}) | ||
37 | |||
38 | MESSAGE(STATUS "Python3 install dir is ${PYTHON_INSTALL_DIR}") | ||
39 | -- | ||
40 | 2.11.0 | ||
41 | |||
diff --git a/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch b/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch new file mode 100644 index 0000000000..0d2fae434a --- /dev/null +++ b/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From b1a5c92dbd1d11f1afdc094fccea64de334d2783 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 30 Dec 2016 18:06:24 +0200 | ||
4 | Subject: [PATCH 3/4] tests: fix a race when deleting temporary directories | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | tests/python/tests/test_yum_repo_downloading.py | 2 +- | ||
10 | tests/python/tests/test_yum_repo_locating.py | 2 +- | ||
11 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/tests/python/tests/test_yum_repo_downloading.py b/tests/python/tests/test_yum_repo_downloading.py | ||
14 | index ad597dc..4a32519 100644 | ||
15 | --- a/tests/python/tests/test_yum_repo_downloading.py | ||
16 | +++ b/tests/python/tests/test_yum_repo_downloading.py | ||
17 | @@ -32,7 +32,7 @@ class TestCaseYumRepoDownloading(TestCaseWithFlask): | ||
18 | os.environ.pop('GNUPGHOME') | ||
19 | else: | ||
20 | os.environ['GNUPGHOME'] = self._gnupghome | ||
21 | - shutil.rmtree(self.tmpdir) | ||
22 | + shutil.rmtree(self.tmpdir, True) | ||
23 | |||
24 | def test_download_repo_01(self): | ||
25 | h = librepo.Handle() | ||
26 | diff --git a/tests/python/tests/test_yum_repo_locating.py b/tests/python/tests/test_yum_repo_locating.py | ||
27 | index 8f4bea5..db4294c 100644 | ||
28 | --- a/tests/python/tests/test_yum_repo_locating.py | ||
29 | +++ b/tests/python/tests/test_yum_repo_locating.py | ||
30 | @@ -34,7 +34,7 @@ class TestCaseYumRepoLocating(TestCase): | ||
31 | os.environ.pop('GNUPGHOME') | ||
32 | else: | ||
33 | os.environ['GNUPGHOME'] = self._gnupghome | ||
34 | - shutil.rmtree(self.tmpdir) | ||
35 | + shutil.rmtree(self.tmpdir, True) | ||
36 | |||
37 | def test_read_mirrorlist(self): | ||
38 | h = librepo.Handle() | ||
39 | -- | ||
40 | 2.11.0 | ||
41 | |||
diff --git a/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch b/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch new file mode 100644 index 0000000000..6665b316cb --- /dev/null +++ b/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From a36be8192615e2a1fb5a5856d44565277f15583b Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 30 Dec 2016 18:23:27 +0200 | ||
4 | Subject: [PATCH 4/4] Set gpgme variables with pkg-config, not with cmake | ||
5 | module (which doesn't work properly) | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
9 | --- | ||
10 | CMakeLists.txt | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
14 | index ef07d2d..f1fa09b 100644 | ||
15 | --- a/CMakeLists.txt | ||
16 | +++ b/CMakeLists.txt | ||
17 | @@ -31,7 +31,8 @@ PKG_CHECK_MODULES(GLIB2 glib-2.0 REQUIRED) | ||
18 | PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto openssl) | ||
19 | FIND_PACKAGE(EXPAT REQUIRED) | ||
20 | FIND_PACKAGE(CURL REQUIRED) | ||
21 | -FIND_PACKAGE(Gpgme REQUIRED) | ||
22 | +PKG_CHECK_MODULES(GPGME gpgme REQUIRED) | ||
23 | +set(GPGME_VANILLA_LIBRARIES ${GPGME_LIBRARIES}) | ||
24 | FIND_PACKAGE(Xattr REQUIRED) | ||
25 | |||
26 | INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS}) | ||
27 | -- | ||
28 | 2.11.0 | ||
29 | |||
diff --git a/meta/recipes-devtools/librepo/librepo_git.bb b/meta/recipes-devtools/librepo/librepo_git.bb new file mode 100644 index 0000000000..70e88c47b9 --- /dev/null +++ b/meta/recipes-devtools/librepo/librepo_git.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = " A library providing C and Python (libcURL like) API for downloading linux repository metadata and packages." | ||
2 | LICENSE = "LGPLv2.1" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" | ||
4 | |||
5 | SRC_URI = "git://github.com/rpm-software-management/librepo.git \ | ||
6 | file://0001-Correctly-set-the-library-installation-directory.patch \ | ||
7 | file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \ | ||
8 | file://0003-tests-fix-a-race-when-deleting-temporary-directories.patch \ | ||
9 | file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \ | ||
10 | " | ||
11 | |||
12 | PV = "1.7.20+git${SRCPV}" | ||
13 | SRCREV = "e1137cbbda78fecb192146300790680a5bc811b1" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | DEPENDS = "curl expat glib-2.0 openssl attr libcheck gpgme" | ||
18 | |||
19 | inherit cmake distutils-base pkgconfig | ||
20 | |||
21 | EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}" | ||
22 | |||
23 | BBCLASSEXTEND = "native" | ||
24 | |||