diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-11-19 20:06:21 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-11-19 20:06:21 +0300 |
commit | 9eca60931489f8cd12e013b15bd051eb2af7309f (patch) | |
tree | 4023d1fab241c353501f2f057fe88558091e18ea | |
parent | 1ee17d7d941b0c0ab1098df61bb9a240f25599d2 (diff) | |
parent | 767341cbacdd9e5b8ecdd0e1ae3b36660adaece4 (diff) | |
download | pkg-kde-tools-9eca60931489f8cd12e013b15bd051eb2af7309f.tar.gz |
Merge https://anonscm.debian.org/git/pkg-kde/pkg-kde-tools
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | debian/changelog | 23 | ||||
-rw-r--r-- | debian/control | 8 | ||||
-rw-r--r-- | debian/pkg-kde-tools.install | 2 | ||||
-rwxr-xr-x | dh_qmlcdeps | 96 | ||||
-rw-r--r-- | man1/pkgkde-symbolshelper.1 | 2 | ||||
-rw-r--r-- | perllib/Debian/Debhelper/Sequence/qmlcdeps.pm | 8 | ||||
-rw-r--r-- | perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm | 28 | ||||
-rw-r--r-- | perllib/Debian/PkgKde/SymbolsHelper/SymbolFile.pm | 11 | ||||
-rwxr-xr-x | pkgkde-gensymbols | 10 |
10 files changed, 162 insertions, 29 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0dabc71..697c050 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,12 +62,13 @@ install(DIRECTORY perllib/ # Install debhelper helpers programs install(PROGRAMS dh_movelibkdeinit + dh_qmlcdeps dh_sameversiondep dh_sodeps DESTINATION ${BIN_INSTALL_DIR} COMPONENT Programs ) -install_pod_manpages(1 dh_movelibkdeinit dh_sameversiondep dh_sodeps) +install_pod_manpages(1 dh_movelibkdeinit dh_qmlcdeps dh_sameversiondep dh_sodeps) # Install pkgkde binaries install(PROGRAMS diff --git a/debian/changelog b/debian/changelog index 74a08c0..33bb312 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,26 @@ +pkg-kde-tools (0.15.28) unstable; urgency=medium + + * Bump libdpkg-perl build-dependency too, to make the tests pass. + * Adapt to SymbolFile API changes in libdpkg-perl 1.19.0 (Closes: #878892). + + -- Dmitry Shachnev <mitya57@debian.org> Tue, 17 Oct 2017 19:52:53 +0300 + +pkg-kde-tools (0.15.27) unstable; urgency=medium + + * Adapt SymbolsHelper to debarch_to_cpuattrs() → debarch_to_abiattrs() + renaming in libdpkg-perl 1.19.0. + + -- Dmitry Shachnev <mitya57@debian.org> Tue, 17 Oct 2017 17:53:45 +0300 + +pkg-kde-tools (0.15.26) unstable; urgency=medium + + * Add a new script, dh_qmlcdeps, for generating proper Qt dependencies + for QML compiled data files (Closes: #872325). + * Bump Standards-Version to 4.1.1, no changes needed. + * Fix syntax error in pkgkde-symbolshelper.1 manpage. + + -- Dmitry Shachnev <mitya57@debian.org> Sat, 14 Oct 2017 10:16:06 +0300 + pkg-kde-tools (0.15.25+dyson1) unstable; urgency=medium * Package for Dyson. diff --git a/debian/control b/debian/control index 4f40229..535f0b4 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,8 @@ Source: pkg-kde-tools Section: devel Priority: optional Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> -Build-Depends: cmake (>= 2.6.4), debhelper (>= 9), libdpkg-perl (>= 1.15.6~) -Standards-Version: 4.1.0 +Build-Depends: cmake (>= 2.6.4), debhelper (>= 9), libdpkg-perl (>= 1.19.0~) +Standards-Version: 4.1.1 Uploaders: Sune Vuorela <sune@debian.org>, Modestas Vainius <modax@debian.org>, Maximiliano Curia <maxy@debian.org>, @@ -16,7 +16,7 @@ Vcs-Browser: https://anonscm.debian.org/git/pkg-kde/pkg-kde-tools.git Package: pkg-kde-tools Architecture: all Multi-Arch: foreign -Depends: libdpkg-perl (>= 1.15.6~), +Depends: libdpkg-perl (>= 1.19.0~), python3:any (>= 3.3.2-2~), ${misc:Depends}, ${perl:Depends} @@ -41,6 +41,8 @@ Description: various packaging tools and scripts for KDE Applications location; - dh_sodeps (and sodeps dh addon) for generating so:Depends substvar for -dev packages based to which local packages lib*.so symlinks point to; + - dh_qmlcdeps (and qmlcdeps dh addon) for generating qmlc:Depends substvar + for packages shipping QML cache files. - pkgkde-symbolshelper tool for efficient management of C and C++ symbol files; - pkgkde-debs2symbols tool for generating symbol files and symbol file diff --git a/debian/pkg-kde-tools.install b/debian/pkg-kde-tools.install index 2042096..489d61d 100644 --- a/debian/pkg-kde-tools.install +++ b/debian/pkg-kde-tools.install @@ -1,4 +1,5 @@ usr/bin/dh_movelibkdeinit +usr/bin/dh_qmlcdeps usr/bin/dh_sameversiondep usr/bin/dh_sodeps usr/bin/pkgkde-debs2symbols @@ -11,6 +12,7 @@ usr/bin/pkgkde-override-sc-dev-latest usr/bin/pkgkde-symbolshelper usr/bin/pkgkde-vcs usr/share/man/man1/dh_movelibkdeinit.1 +usr/share/man/man1/dh_qmlcdeps.1 usr/share/man/man1/dh_sameversiondep.1 usr/share/man/man1/dh_sodeps.1 usr/share/man/man1/pkgkde-gensymbols.1 diff --git a/dh_qmlcdeps b/dh_qmlcdeps new file mode 100755 index 0000000..0b86df4 --- /dev/null +++ b/dh_qmlcdeps @@ -0,0 +1,96 @@ +#!/usr/bin/perl -w + +# Copyright: 2017 Dmitry Shachnev <mitya57@debian.org> +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +=head1 NAME + +dh_qmlcdeps - generate proper dependencies for QML cache files + +=head1 SYNOPSIS + +B<dh_qmlcdeps> [S<I<debhelper options>>] + +=head1 DESCRIPTION + +B<dh_qmlcdeps> is a debhelper program that looks for F<*.qmlc> files +(generated by B<qmlcachegen>) in the package temporary locations, performs +sanity check on them, and adds a dependency on B<libqt5qml5> package to +B<${qmlc:Depends}> substitution variable to make sure its version matches +the Qt version in these files. + +You can pass B<--with qmlcdeps> to L<dh(1)> to make it automatically call +B<dh_qmlcdeps> after B<dh_install>. + +=cut + +use strict; +use warnings; +use File::Find; +use Debian::Debhelper::Dh_Lib; + +init(options => {}); + +foreach my $package (@{$dh{DOPACKAGES}}) { + my $tmpdir = tmpdir($package); + next unless -d $tmpdir; + my $qt_version_bin; + + find({ + wanted => sub { + my $filename = $_; + return unless ($filename =~ m/\.qmlc$/); + open (my $fh, "<", $filename); + binmode $fh; + read ($fh, my $magic, 8); + if ($magic ne "qv4cdata") { + close $fh; + error("Unknown .qmlc file: $File::Find::name"); + } + read ($fh, my $struct_version, 4); + read ($fh, my $file_qt_version_bin, 4); + close $fh; + if ($qt_version_bin and $file_qt_version_bin ne $qt_version_bin) { + error("Package $package contains .qmlc files built for different Qt versions"); + } + $qt_version_bin = $file_qt_version_bin; + } + }, $tmpdir); + + $qt_version_bin or exit(0); + my @qt_version = unpack("C4", $qt_version_bin); + my $qt_version_str = "$qt_version[2].$qt_version[1].$qt_version[0]"; + $qt_version[2] == 5 or error("Qt version $qt_version_str is not supported"); + my $qt_next_version_str = "$qt_version[2].$qt_version[1]." . ($qt_version[0] + 1); + + addsubstvar($package, "qmlc:Depends", "libqt5qml5 (>= $qt_version_str)"); + addsubstvar($package, "qmlc:Depends", "libqt5qml5 (<< $qt_next_version_str)"); +} + +=head1 SEE ALSO + +L<debhelper(7)> + +=head1 AUTHOR + +Dmitry Shachnev <mitya57@debian.org> + +=cut diff --git a/man1/pkgkde-symbolshelper.1 b/man1/pkgkde-symbolshelper.1 index ee8356e..f72a282 100644 --- a/man1/pkgkde-symbolshelper.1 +++ b/man1/pkgkde-symbolshelper.1 @@ -24,7 +24,7 @@ pkgkde-gensymbols -plibfoo1 -v1.7 -Osymbols.amd64 -edebian/libfoo1/usr/lib/libfo pkgkde-symbolshelper create -o debian/libfoo1.symbols -v 1.7 symbols.amd64 \fR .RE -.ni +.fi .P The above commands should be invoked from the top level directory of your package's source after having built the package before cleaning, diff --git a/perllib/Debian/Debhelper/Sequence/qmlcdeps.pm b/perllib/Debian/Debhelper/Sequence/qmlcdeps.pm new file mode 100644 index 0000000..07449d7 --- /dev/null +++ b/perllib/Debian/Debhelper/Sequence/qmlcdeps.pm @@ -0,0 +1,8 @@ +use warnings; +use strict; + +use Debian::Debhelper::Dh_Lib; + +insert_after("dh_install", "dh_qmlcdeps"); + +1; diff --git a/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm b/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm index 29a24d3..f64bba9 100644 --- a/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm +++ b/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm @@ -150,7 +150,7 @@ package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::size_t; use strict; use warnings; use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst'; -use Dpkg::Arch qw(debarch_to_cpuattrs); +use Dpkg::Arch qw(debarch_to_abiattrs); sub new { my $class = shift; @@ -162,7 +162,7 @@ sub new { sub _expand { my ($self, $arch) = @_; - my ($bits, $endian) = debarch_to_cpuattrs($arch); + my ($bits, $endian) = debarch_to_abiattrs($arch); return $bits == 64 ? 'm' : 'j'; } @@ -171,7 +171,7 @@ package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::ssize_t; use strict; use warnings; use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst'; -use Dpkg::Arch qw(debarch_to_cpuattrs); +use Dpkg::Arch qw(debarch_to_abiattrs); sub new { my $class = shift; @@ -183,7 +183,7 @@ sub new { sub _expand { my ($self, $arch) = @_; - my ($bits, $endian) = debarch_to_cpuattrs($arch); + my ($bits, $endian) = debarch_to_abiattrs($arch); return $bits == 64 ? 'l' : 'i'; } @@ -192,7 +192,7 @@ package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::int64_t; use strict; use warnings; use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst'; -use Dpkg::Arch qw(debarch_to_cpuattrs); +use Dpkg::Arch qw(debarch_to_abiattrs); sub new { my $class = shift; @@ -204,7 +204,7 @@ sub new { sub _expand { my ($self, $arch) = @_; - my ($bits, $endian) = debarch_to_cpuattrs($arch); + my ($bits, $endian) = debarch_to_abiattrs($arch); return $bits == 64 ? 'l' : 'x'; } @@ -213,7 +213,7 @@ package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::uint64_t; use strict; use warnings; use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst'; -use Dpkg::Arch qw(debarch_to_cpuattrs); +use Dpkg::Arch qw(debarch_to_abiattrs); sub new { my $class = shift; @@ -225,7 +225,7 @@ sub new { sub _expand { my ($self, $arch) = @_; - my ($bits, $endian) = debarch_to_cpuattrs($arch); + my ($bits, $endian) = debarch_to_abiattrs($arch); return $bits == 64 ? 'm' : 'y'; } @@ -234,7 +234,7 @@ package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::qptrdiff; use strict; use warnings; use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst'; -use Dpkg::Arch qw(debarch_to_cpuattrs); +use Dpkg::Arch qw(debarch_to_abiattrs); sub new { my $class = shift; @@ -246,7 +246,7 @@ sub new { sub _expand { my ($self, $arch) = @_; - my ($bits, $endian) = debarch_to_cpuattrs($arch); + my ($bits, $endian) = debarch_to_abiattrs($arch); return $bits == 64 ? 'x' : 'i'; } @@ -255,7 +255,7 @@ package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::quintptr; use strict; use warnings; use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst'; -use Dpkg::Arch qw(debarch_to_cpuattrs); +use Dpkg::Arch qw(debarch_to_abiattrs); sub new { my $class = shift; @@ -267,7 +267,7 @@ sub new { sub _expand { my ($self, $arch) = @_; - my ($bits, $endian) = debarch_to_cpuattrs($arch); + my ($bits, $endian) = debarch_to_abiattrs($arch); return $bits == 64 ? 'y' : 'j'; } @@ -276,7 +276,7 @@ package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::intptr_t; use strict; use warnings; use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst'; -use Dpkg::Arch qw(debarch_to_cpuattrs); +use Dpkg::Arch qw(debarch_to_abiattrs); sub new { my $class = shift; @@ -288,7 +288,7 @@ sub new { sub _expand { my ($self, $arch) = @_; - my ($bits, $endian) = debarch_to_cpuattrs($arch); + my ($bits, $endian) = debarch_to_abiattrs($arch); return $bits == 64 ? 'l' : 'i'; } diff --git a/perllib/Debian/PkgKde/SymbolsHelper/SymbolFile.pm b/perllib/Debian/PkgKde/SymbolsHelper/SymbolFile.pm index 081d543..42c7d2b 100644 --- a/perllib/Debian/PkgKde/SymbolsHelper/SymbolFile.pm +++ b/perllib/Debian/PkgKde/SymbolsHelper/SymbolFile.pm @@ -30,11 +30,12 @@ use Debian::PkgKde::SymbolsHelper::Substs; # Use Debian::PkgKde::SymbolsHelper::Symbol as base symbol sub parse { - my ($self, $fh, $file, $seen, $obj_ref, $base_symbol) = @_; - unless (defined $base_symbol) { - $base_symbol = 'Debian::PkgKde::SymbolsHelper::Symbol'; + my ($self, $fh, $file, %opts) = @_; + my $state = $opts{state} //= {}; + unless (defined $state->{base_symbol}) { + $state->{base_symbol} = 'Debian::PkgKde::SymbolsHelper::Symbol'; } - if (!defined $seen) { + unless (defined $state->{seen}) { # Read 'SymbolsHelper-Confirmed' header open(my $fh, "<", $file) or error("unable to open symbol file '$file' for reading"); @@ -46,7 +47,7 @@ sub parse { $self->set_confirmed(split(/\s+/, $1)); } } - return $self->SUPER::parse($fh, $file, $seen, $obj_ref, $base_symbol); + return $self->SUPER::parse($fh, $file, %opts); } sub set_confirmed { diff --git a/pkgkde-gensymbols b/pkgkde-gensymbols index 0f0a065..2277bf1 100755 --- a/pkgkde-gensymbols +++ b/pkgkde-gensymbols @@ -25,12 +25,12 @@ my $old_symbolfile_parse; sub new_symbolfile_parse { # Use Debian::PkgKde::SymbolsHelper::Symbol as base symbol - my ($self, $fh, $file, $seen, $obj_ref, $base_symbol) = @_; - unless (defined $base_symbol) { - $base_symbol = 'Debian::PkgKde::SymbolsHelper::Symbol'; + my ($self, $fh, $file, %opts) = @_; + my $state = $opts{state} //= {}; + unless (defined $state->{base_symbol}) { + $state->{base_symbol} = 'Debian::PkgKde::SymbolsHelper::Symbol'; } - return &$old_symbolfile_parse($self, $fh, $file, $seen, $obj_ref, - $base_symbol); + return &$old_symbolfile_parse($self, $fh, $file, %opts); } sub check_dpkg_version { |