summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/libdnf
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2016-12-30 18:57:22 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-14 14:42:16 +0000
commit374494e746e58d4efa308d0baf52a56ca5b72fb2 (patch)
treeb01f691e0a9ca48bb6d0339c3e9cbf81a6d41d08 /meta/recipes-devtools/libdnf
parentbbddf83f65f490c88130d794c53ff9e4c45d0693 (diff)
downloadpoky-374494e746e58d4efa308d0baf52a56ca5b72fb2.tar.gz
libdnf: add a recipe
libdnf is required by dnf. (From OE-Core rev: 8ac3fb682928aeb076c8f78fb429936ae747bc77) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/libdnf')
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch31
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch28
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch36
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch29
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch29
-rw-r--r--meta/recipes-devtools/libdnf/libdnf_git.bb40
6 files changed, 193 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
new file mode 100644
index 0000000000..73acda6af8
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
@@ -0,0 +1,31 @@
1From 9bb7630915c3e787732463a3e2064fe0e177101b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 24 Nov 2016 14:33:07 +0200
4Subject: [PATCH 1/4] FindGtkDoc.cmake: drop the requirement for
5 GTKDOC_SCANGOBJ_WRAPPER
6
7For some reason cmake is not able to find it when building in openembedded,
8and it's bundled with the source code anyway.
9
10Upstream-Status: Pending
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12---
13 cmake/modules/FindGtkDoc.cmake | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/cmake/modules/FindGtkDoc.cmake b/cmake/modules/FindGtkDoc.cmake
17index 92b2cc7..39f34bd 100644
18--- a/cmake/modules/FindGtkDoc.cmake
19+++ b/cmake/modules/FindGtkDoc.cmake
20@@ -52,7 +52,7 @@ find_program(GTKDOC_MKHTML_EXE gtkdoc-mkhtml PATH "${GLIB_PREFIX}/bin")
21 find_program(GTKDOC_FIXXREF_EXE gtkdoc-fixxref PATH "${GLIB_PREFIX}/bin")
22
23 find_package_handle_standard_args(GtkDoc
24- REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_SCANGOBJ_WRAPPER GTKDOC_MKDB_EXE GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
25+ REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_MKDB_EXE GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
26 VERSION_VAR GtkDoc_VERSION)
27
28 # ::
29--
302.11.0
31
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
new file mode 100644
index 0000000000..954add6e73
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
@@ -0,0 +1,28 @@
1From 5958b151a4dbb89114e90c971a34b74f873b7beb Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 7 Feb 2017 12:16:03 +0200
4Subject: [PATCH] Get parameters for both libsolv and libsolvext (libdnf is
5 using both)
6
7Upstream-Status: Pending [depends on whether https://github.com/openSUSE/libsolv/pull/177 is accepted]
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9---
10 CMakeLists.txt | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/CMakeLists.txt b/CMakeLists.txt
14index b531da1..e512da0 100644
15--- a/CMakeLists.txt
16+++ b/CMakeLists.txt
17@@ -28,7 +28,7 @@ find_package (PkgConfig REQUIRED)
18 SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
19 PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
20 FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
21-PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
22+PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext)
23 set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
24 pkg_check_modules (CHECK REQUIRED check)
25 pkg_check_modules (REPO REQUIRED librepo)
26--
272.11.0
28
diff --git a/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch b/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
new file mode 100644
index 0000000000..3d772a5f8a
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
@@ -0,0 +1,36 @@
1From c8211ad99ccaa4af4a75e0ba639527267fcfd69e Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 30 Dec 2016 18:17:19 +0200
4Subject: [PATCH 2/4] Prefix sysroot path to introspection tools path.
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 libdnf/CMakeLists.txt | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12diff --git a/libdnf/CMakeLists.txt b/libdnf/CMakeLists.txt
13index 63f07bf..837792b 100644
14--- a/libdnf/CMakeLists.txt
15+++ b/libdnf/CMakeLists.txt
16@@ -133,7 +133,7 @@ if (GOBJECT_INTROSPECTION_FOUND)
17 set(GIR_TYPELIB "${GIR_PREFIX}.typelib")
18
19 add_custom_command(OUTPUT ${GIR_XML}
20- COMMAND env CFLAGS=${CMAKE_C_FLAGS} ${GOBJECT_INTROSPECTION_1.0_G_IR_SCANNER}
21+ COMMAND env CFLAGS=${CMAKE_C_FLAGS} $ENV{PKG_CONFIG_SYSROOT_DIR}${GOBJECT_INTROSPECTION_1.0_G_IR_SCANNER}
22 --namespace=Dnf
23 --nsversion=${DNF_SO_VERSION}.0
24 --library-path=${CMAKE_CURRENT_BINARY_DIR}
25@@ -153,7 +153,7 @@ if (GOBJECT_INTROSPECTION_FOUND)
26 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
27
28 add_custom_command(OUTPUT ${GIR_TYPELIB}
29- COMMAND ${GOBJECT_INTROSPECTION_1.0_G_IR_COMPILER}
30+ COMMAND $ENV{PKG_CONFIG_SYSROOT_DIR}${GOBJECT_INTROSPECTION_1.0_G_IR_COMPILER}
31 -o ${GIR_TYPELIB}
32 ${GIR_XML}
33 DEPENDS ${GIR_XML}
34--
352.11.0
36
diff --git a/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch b/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
new file mode 100644
index 0000000000..d7e59d8333
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
@@ -0,0 +1,29 @@
1From 8d29879fe3606c78769c1bcdddf0bcfc7191c710 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 30 Dec 2016 18:20:01 +0200
4Subject: [PATCH 3/4] Set the library installation directory correctly.
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 CMakeLists.txt | 4 +++-
10 1 file changed, 3 insertions(+), 1 deletion(-)
11
12diff --git a/CMakeLists.txt b/CMakeLists.txt
13index d35f0d7..8edb627 100644
14--- a/CMakeLists.txt
15+++ b/CMakeLists.txt
16@@ -62,7 +62,9 @@ ADD_DEFINITIONS(-DPACKAGE_VERSION=\\"${LIBDNF_VERSION}\\")
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
25 ADD_SUBDIRECTORY (libdnf)
26 ENABLE_TESTING()
27--
282.11.0
29
diff --git a/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch b/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
new file mode 100644
index 0000000000..931959b5f3
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
@@ -0,0 +1,29 @@
1From 6d2718b925453f9a6915001f489606eb8e4086c8 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 30 Dec 2016 18:24:50 +0200
4Subject: [PATCH 4/4] Set libsolv variables with pkg-config (cmake's own module
5 doesn't work properly).
6
7Upstream-Status: Pending
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9---
10 CMakeLists.txt | 3 ++-
11 1 file changed, 2 insertions(+), 1 deletion(-)
12
13diff --git a/CMakeLists.txt b/CMakeLists.txt
14index 8edb627..b531da1 100644
15--- a/CMakeLists.txt
16+++ b/CMakeLists.txt
17@@ -28,7 +28,8 @@ find_package (PkgConfig REQUIRED)
18 SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
19 PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
20 FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
21-find_package (LibSolv 0.6.21 REQUIRED COMPONENTS ext)
22+PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
23+set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
24 pkg_check_modules (CHECK REQUIRED check)
25 pkg_check_modules (REPO REQUIRED librepo)
26 FIND_PROGRAM (VALGRIND_PROGRAM NAMES valgrind PATH /usr/bin /usr/local/bin)
27--
282.11.0
29
diff --git a/meta/recipes-devtools/libdnf/libdnf_git.bb b/meta/recipes-devtools/libdnf/libdnf_git.bb
new file mode 100644
index 0000000000..681c0029c5
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf_git.bb
@@ -0,0 +1,40 @@
1SUMMARY = "Library providing simplified C and Python API to libsolv"
2LICENSE = "LGPLv2.1"
3LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
4
5SRC_URI = "git://github.com/rpm-software-management/libdnf \
6 file://0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch \
7 file://0002-Prefix-sysroot-path-to-introspection-tools-path.patch \
8 file://0003-Set-the-library-installation-directory-correctly.patch \
9 file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
10 file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
11 "
12
13PV = "0.2.3+git${SRCPV}"
14SRCREV = "367545629cc01a8e622890d89bd13d062ce60d7b"
15
16S = "${WORKDIR}/git"
17
18DEPENDS = "glib-2.0 libsolv libcheck librepo rpm gtk-doc"
19
20inherit gtk-doc gobject-introspection cmake pkgconfig
21
22# We cannot inherit pythonnative (or descendant classes like distutils etc.)
23# because that would conflict with inheriting python3native
24# (which is done by inheriting gobject-introspection).
25# But libdnf only needs the path to native Python 2.x binary
26# so we simply set it explicitly here.
27#
28# These lines can be dropped when dnf stack is moved to python 3.x
29EXTRANATIVEPATH += "python-native"
30FILES_${PN} += " ${libdir}/python2.7/*"
31DEPENDS += "python-native"
32
33EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF \
34 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \
35 "
36EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
37EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
38
39BBCLASSEXTEND = "native"
40