]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
dpkg: use PACKAGECONFIG
authorAndreas Oberritter <obi@opendreambox.org>
Wed, 27 Aug 2014 20:49:43 +0000 (22:49 +0200)
committerAndreas Oberritter <obi@opendreambox.org>
Mon, 7 May 2018 21:25:22 +0000 (23:25 +0200)
Keep default dependencies as before. Set default compressor to xz
if selected, gzip otherwise.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/recipes-devtools/dpkg/dpkg.inc

index 03588b1a238d99f80d87193b99e6704b696c045a..3b0bf8f3b993ac4475a2b83a170d781515f0cf31 100644 (file)
@@ -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"