aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2014-08-27 22:49:43 +0200
committerAndreas Oberritter <obi@opendreambox.org>2018-05-07 23:25:22 +0200
commit57def43588306f07907a888a8c173afab28dbe25 (patch)
tree7708a555598015345741a98a6bae2c6bc850210d
parent0723b81ddba6bbe132930645011bedc7460b9d4f (diff)
downloadopenembedded-core-contrib-57def43588306f07907a888a8c173afab28dbe25.tar.gz
dpkg: use PACKAGECONFIG
Keep default dependencies as before. Set default compressor to xz if selected, gzip otherwise. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-rw-r--r--meta/recipes-devtools/dpkg/dpkg.inc29
1 files changed, 16 insertions, 13 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 03588b1a23..3b0bf8f3b9 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -1,13 +1,10 @@
SUMMARY = "Package maintenance system from Debian"
LICENSE = "GPLv2.0+"
SECTION = "base"
+DEPENDS = "perl"
+DEPENDS_append_class-native = " bzip2-replacement-native ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', '', 'virtual/update-alternatives-native', d)}"
PROVIDES = "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
-DEPENDS = "zlib bzip2 perl ncurses"
-DEPENDS_class-native = "bzip2-replacement-native zlib-native ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', '', 'virtual/update-alternatives-native', d)} gettext-native perl-native"
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
-RDEPENDS_${PN}_class-native = ""
-
UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
inherit autotools gettext perlnative pkgconfig systemd perl-version
@@ -27,16 +24,18 @@ PERL_LIBDIR_class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}"
UA = "update-alternatives"
UA_native = "${@['', 'update-alternatives'][d.getVar('PREFERRED_PROVIDER_virtual/update-alternatives-native', True) == 'dpkg-native']}"
-PACKAGECONFIG ??= "${UA}"
+PACKAGECONFIG ??= "bzip2 gzip start-stop-daemon ${UA}"
+PACKAGECONFIG[bzip2] = "--with-libbz2,--without-libbz2,bzip2"
+PACKAGECONFIG[dselect] = "--enable-dselect,--disable-dselect,ncurses"
+PACKAGECONFIG[gzip] = "--with-libz,--without-libz,zlib"
+PACKAGECONFIG[selinux] = "--with-libselinux,--without-libselinux,libselinux"
+PACKAGECONFIG[start-stop-daemon] = "--enable-start-stop-daemon,--disable-start-stop-daemon"
PACKAGECONFIG[update-alternatives] = "--enable-update-alternatives,--disable-update-alternatives"
+PACKAGECONFIG[xz] = "--with-liblzma,--without-liblzma,xz"
+
+DPKG_DEB_COMPRESSOR ?= "${@bb.utils.contains('PACKAGECONFIG', 'xz', 'xz', 'gzip', d)}"
-EXTRA_OECONF = "\
- --disable-dselect \
- --enable-start-stop-daemon \
- --with-libz \
- --with-libbz2 \
- --without-libselinux \
- "
+EXTRA_OECONF += "--with-dpkg-deb-compressor=${DPKG_DEB_COMPRESSOR}"
PACKAGECONFIG = "liblzma"
PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz"
@@ -67,6 +66,10 @@ do_install_append () {
}
PACKAGES =+ "update-alternatives-dpkg"
+
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
+RDEPENDS_${PN}_class-native = ""
+
FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
RPROVIDES_update-alternatives-dpkg = "update-alternatives"
RCONFLICTS_update-alternatives-dpkg = "update-alternatives"