diff -Nru php-imagick-3.4.0~rc6/debian/changelog php-imagick-3.4.0~rc6/debian/changelog --- php-imagick-3.4.0~rc6/debian/changelog 2016-03-06 19:58:23.000000000 -0800 +++ php-imagick-3.4.0~rc6/debian/changelog 2016-03-07 17:56:41.000000000 -0800 @@ -1,3 +1,11 @@ +php-imagick (3.4.0~rc6-1ubuntu3) xenial; urgency=medium + + * Fix failures in autopkgtests (LP: #1549942) + - imagick-3.4.0RC6/tests/025-get-color.phpt: Do not do version + check, as Ubuntu has backported the referenced fixes. + + -- Nishanth Aravamudan Mon, 07 Mar 2016 17:55:24 -0800 + php-imagick (3.4.0~rc6-1ubuntu2) xenial; urgency=medium * Fix failures in autopkgtests (LP: #1549942) diff -Nru php-imagick-3.4.0~rc6/debian/patches/0002-Do-not-hardcode-version-check-in-025-get-color.patch php-imagick-3.4.0~rc6/debian/patches/0002-Do-not-hardcode-version-check-in-025-get-color.patch --- php-imagick-3.4.0~rc6/debian/patches/0002-Do-not-hardcode-version-check-in-025-get-color.patch 1969-12-31 16:00:00.000000000 -0800 +++ php-imagick-3.4.0~rc6/debian/patches/0002-Do-not-hardcode-version-check-in-025-get-color.patch 2016-03-09 12:38:05.000000000 -0800 @@ -0,0 +1,56 @@ +Description: Version check in test is no longer valid + imagemagick 6.8.9.9-7ubuntu2 has fully backported the changes + referenced in 025-get-color.phpt but the version value for imagemagick + is still 0x689. We can just modify the test, since we control the + expected result from imagemagick. +Author: Nishanth Aravamudan +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1549942 + +Index: gitwd/imagick-3.4.0RC6/tests/025-get-color.phpt +=================================================================== +--- gitwd.orig/imagick-3.4.0RC6/tests/025-get-color.phpt ++++ gitwd/imagick-3.4.0RC6/tests/025-get-color.phpt +@@ -19,19 +19,6 @@ function checkExpectedValue($expectedVal + + $variance = 0; + +- // Behaviour of 50% pixel was changed in +- // key = version +- // value = variance expected in result +- $troubledVersions = array( +- 0x692 => 1 +- ); +- $v = Imagick::getVersion(); +- $versionNumber = $v['versionNumber']; +- +- if (array_key_exists($versionNumber, $troubledVersions)) { +- $variance = $troubledVersions[$versionNumber]; +- } +- + if (Imagick::getHDRIEnabled()) { + return abs($expectedValue - $actualValue) < (0.01 + $variance); + } +@@ -57,14 +44,8 @@ function getExpectedValue($someValue) { + } + + $v = Imagick::getVersion(); +- if ($v['versionNumber'] >= 0x692) { +- //this is the new correct behaviour +- return (intval(round($someValue, 0, PHP_ROUND_HALF_UP))); +- } +- else { +- //old behaviour had wrong rounding. +- return (intval(round($someValue, 0, PHP_ROUND_HALF_DOWN))); +- } ++ // Ubuntu source only as the new correct behaviour ++ return (intval(round($someValue, 0, PHP_ROUND_HALF_UP))); + } + + +@@ -167,4 +148,4 @@ foreach ($tests as $test) { + echo "OK" . PHP_EOL; + ?> + --EXPECT-- +-OK +\ No newline at end of file ++OK diff -Nru php-imagick-3.4.0~rc6/debian/patches/series php-imagick-3.4.0~rc6/debian/patches/series --- php-imagick-3.4.0~rc6/debian/patches/series 2016-03-06 19:36:20.000000000 -0800 +++ php-imagick-3.4.0~rc6/debian/patches/series 2016-03-07 17:52:27.000000000 -0800 @@ -1,2 +1,3 @@ 0001-Hardcode-path-to-usrsharefontstruetypettf-dejavuDeja.patch no-openmp-threads.patch +0002-Do-not-hardcode-version-check-in-025-get-color.patch