zbar: 0.10 -> 0.22

The original upstream at http://zbar.sourceforge.net/ has not produced a
new release or a new commit on their repository in about 7 years. Most
distros (Debian, Gentoo, Arch, ...) have switched already to the more
maintained fork at https://github.com/mchehab/zbar

Update dependencies from qt4 to qt5, reducing "electrum" closure size in
the process (now only depends on one Qt version).
This commit is contained in:
Pierre Bourdon 2019-03-25 09:59:21 +01:00
parent 60e2d2ce2b
commit 57ffe86efa
No known key found for this signature in database
GPG Key ID: 6FB80DCD84DA0F1C

View File

@ -1,53 +1,35 @@
{ stdenv, fetchurl, imagemagickBig, pkgconfig, python2Packages, perl { stdenv, fetchFromGitHub, imagemagickBig, pkgconfig, python2Packages, perl
, libX11, libv4l, qt4, lzma, gtk2, fetchpatch, autoreconfHook , libX11, libv4l, qt5, lzma, gtk2, xmlto, docbook_xsl, autoreconfHook
, enableVideo ? stdenv.isLinux , enableVideo ? stdenv.isLinux
}: }:
let let
inherit (python2Packages) pygtk python; inherit (python2Packages) pygtk python;
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "zbar"; pname = "zbar";
version = "0.10"; version = "0.22";
src = fetchurl {
url = "mirror://sourceforge/project/${pname}/${pname}/${version}/${name}.tar.bz2"; src = fetchFromGitHub {
sha256 = "1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3"; owner = "mchehab";
repo = "zbar";
rev = version;
sha256 = "0pz0vq6a97vnc3lcjw9k12dk2awgmws46cjfh16zin0jiz18d1xq";
}; };
patches = [ nativeBuildInputs = [ pkgconfig xmlto autoreconfHook docbook_xsl ];
(fetchpatch {
name = "0001-Description-Linux-2.6.38-and-later-do-not-support-th.patch"; buildInputs = [
url = "https://git.recluse.de/raw/debian/pkg-zbar.git/35182c3ac2430c986579b25f1826fe1b7dfd15de/debian!patches!0001-Description-Linux-2.6.38-and-later-do-not-support-th.patch"; imagemagickBig python pygtk perl libX11
sha256 = "1zy1wdyhmpw877pv6slfhjy0c6dm0gxli0i4zs1akpvh052j4a69"; ] ++ stdenv.lib.optionals enableVideo [
}) libv4l gtk2 qt5.qtbase qt5.qtx11extras
(fetchpatch {
name = "python-zbar-import-fix-am.patch";
url = "https://git.recluse.de/raw/debian/pkg-zbar.git/1f15f52e53ee0bf7b4761d673dc859c6b10e6be5/debian!patches!python-zbar-import-fix-am.patch";
sha256 = "15xx9ms137hvwpynbgvbc6zgmmzfaf7331rfhls24rgbnywbgirx";
})
(fetchpatch {
name = "new_autotools_build_fix.patch";
url = "https://git.recluse.de/raw/debian/pkg-zbar.git/2c641cc94d4f728421ed750d95d6d1c2d06a534d/debian!patches!new_autotools_build_fix.patch";
sha256 = "0jhl5jnnjhfdv51xqimkbkdvj8d38z05fhd11yx1sgmw82f965s3";
})
(fetchpatch {
name = "threading-fix.patch";
url = "https://git.recluse.de/raw/debian/pkg-zbar.git/d3eba6e2c3acb0758d19519015bf1a53ffb8e645/debian!patches!threading-fix.patch";
sha256 = "1jjgrx9nc7788vfriai4z26mm106sg5ylm2w5rdyrwx7420x1wh7";
})
]; ];
buildInputs = configureFlags = [
[ imagemagickBig pkgconfig python pygtk perl libX11 "--with-dbusconfdir=$out/etc/dbus-1/system.d"
lzma autoreconfHook ] ++ ] ++ stdenv.lib.optionals (!enableVideo) [
stdenv.lib.optionals enableVideo [ libv4l gtk2 qt4 ];
configureFlags = stdenv.lib.optionals (!enableVideo) [
"--disable-video" "--without-gtk" "--without-qt" "--disable-video" "--without-gtk" "--without-qt"
]; ];
hardeningDisable = [ "fortify" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Bar code reader"; description = "Bar code reader";
longDescription = '' longDescription = ''
@ -57,15 +39,9 @@ in stdenv.mkDerivation rec {
EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR
Code. Code.
''; '';
maintainers = with maintainers; [ raskin ]; maintainers = with maintainers; [ delroth raskin ];
platforms = platforms.unix; platforms = platforms.unix;
license = licenses.lgpl21; license = licenses.lgpl21;
homepage = http://zbar.sourceforge.net/; homepage = https://github.com/mchehab/zbar;
};
passthru = {
updateInfo = {
downloadPage = "http://zbar.sourceforge.net/";
};
}; };
} }