diff options
author | Helmut Grohne <helmut@subdivi.de> | 2017-06-27 15:47:41 +0300 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2017-06-27 15:48:40 +0300 |
commit | d829d58a77c27b80a4043898fcafd310d8ccac3d (patch) | |
tree | 21ec8f9e1eca329fb0abb9522b5acb3f22a98c0b | |
parent | e46b67192a04091fcde54238422359672d6c6da8 (diff) | |
download | pkg-kde-tools-d829d58a77c27b80a4043898fcafd310d8ccac3d.tar.gz |
Make bit-depenedent type substitutions work generically.
Closes: #854493.
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm | 28 |
2 files changed, 23 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog index 545b8dd..bf32564 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,7 @@ pkg-kde-tools (0.15.25) UNRELEASED; urgency=medium + [ Helmut Grohne ] + * Make bit-dependent type substitutions work generically (Closes: #854493). -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Tue, 27 Jun 2017 15:44:05 +0300 diff --git a/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm b/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm index 1632189..29a24d3 100644 --- a/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm +++ b/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm @@ -150,6 +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); sub new { my $class = shift; @@ -161,7 +162,8 @@ sub new { sub _expand { my ($self, $arch) = @_; - return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'm' : 'j'; + my ($bits, $endian) = debarch_to_cpuattrs($arch); + return $bits == 64 ? 'm' : 'j'; } package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::ssize_t; @@ -169,6 +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); sub new { my $class = shift; @@ -180,7 +183,8 @@ sub new { sub _expand { my ($self, $arch) = @_; - return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'l' : 'i'; + my ($bits, $endian) = debarch_to_cpuattrs($arch); + return $bits == 64 ? 'l' : 'i'; } package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::int64_t; @@ -188,6 +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); sub new { my $class = shift; @@ -199,7 +204,8 @@ sub new { sub _expand { my ($self, $arch) = @_; - return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'l' : 'x'; + my ($bits, $endian) = debarch_to_cpuattrs($arch); + return $bits == 64 ? 'l' : 'x'; } package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::uint64_t; @@ -207,6 +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); sub new { my $class = shift; @@ -218,7 +225,8 @@ sub new { sub _expand { my ($self, $arch) = @_; - return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'm' : 'y'; + my ($bits, $endian) = debarch_to_cpuattrs($arch); + return $bits == 64 ? 'm' : 'y'; } package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::qptrdiff; @@ -226,6 +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); sub new { my $class = shift; @@ -237,7 +246,8 @@ sub new { sub _expand { my ($self, $arch) = @_; - return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'x' : 'i'; + my ($bits, $endian) = debarch_to_cpuattrs($arch); + return $bits == 64 ? 'x' : 'i'; } package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::quintptr; @@ -245,6 +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); sub new { my $class = shift; @@ -256,7 +267,8 @@ sub new { sub _expand { my ($self, $arch) = @_; - return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'y' : 'j'; + my ($bits, $endian) = debarch_to_cpuattrs($arch); + return $bits == 64 ? 'y' : 'j'; } package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::intptr_t; @@ -264,6 +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); sub new { my $class = shift; @@ -275,7 +288,8 @@ sub new { sub _expand { my ($self, $arch) = @_; - return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'l' : 'i'; + my ($bits, $endian) = debarch_to_cpuattrs($arch); + return $bits == 64 ? 'l' : 'i'; } package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::qreal; |