Skip to content
This repository has been archived by the owner on Aug 8, 2021. It is now read-only.

Commit

Permalink
undefine _strict_symbol_defs_build
Browse files Browse the repository at this point in the history
use patch from Imagick/imagick#221
  • Loading branch information
remicollet committed Jan 29, 2018
1 parent 84cc3d7 commit 65d1d72
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
32 changes: 32 additions & 0 deletions 221.patch
@@ -0,0 +1,32 @@
From a516b549693ea373c0e4cb0286337f2e0fcd7f3c Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 14 Dec 2017 12:58:28 +0100
Subject: [PATCH] Fix #220 relax test to follow upstream change

---
tests/150_Imagick_setregistry.phpt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/150_Imagick_setregistry.phpt b/tests/150_Imagick_setregistry.phpt
index eb2b055..1b96452 100644
--- a/tests/150_Imagick_setregistry.phpt
+++ b/tests/150_Imagick_setregistry.phpt
@@ -35,10 +35,10 @@ if (array_key_exists("temporary-path", $registry) == true) {

try {
$tmpPath = Imagick::getRegistry("non-existent string");
- echo "Expected exception not thrown.\n";
+ var_dump($tmpPath == false); // Since 6.9.9-26, no exception raised
}
catch (\ImagickException $ie) {
- echo $ie->getMessage() . "\n";
+ var_dump(true);
}


@@ -47,4 +47,4 @@ catch (\ImagickException $ie) {
Temporary-path was empty at start.
Temporary path was set correctly.
Temporary path was listed correctly.
-Imagick::getRegistry exception (%s)
+bool(true)
12 changes: 11 additions & 1 deletion php-pecl-imagick.spec
@@ -1,16 +1,21 @@
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build

%global pecl_name imagick
%global ini_name 40-%{pecl_name}.ini
%global with_zts 0%{?__ztsphp:1}

Summary: Provides a wrapper to the ImageMagick library
Name: php-pecl-%pecl_name
Version: 3.4.3
Release: 4%{?dist}
Release: 5%{?dist}
License: PHP
Group: Development/Libraries
URL: http://pecl.php.net/package/%pecl_name

Source0: http://pecl.php.net/get/%pecl_name-%{version}%{?prever}.tgz
Patch0: https://patch-diff.githubusercontent.com/raw/mkoppanen/imagick/pull/221.patch

BuildRequires: php-pear >= 1.4.7
BuildRequires: php-devel >= 5.1.3
BuildRequires: ImageMagick-devel >= 6.2.4
Expand Down Expand Up @@ -59,6 +64,7 @@ then : "Font files detected!"
fi

cd NTS
%patch0 -p1

extver=$(sed -n '/#define PHP_IMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_imagick.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
Expand Down Expand Up @@ -180,6 +186,10 @@ cd ../ZTS


%changelog
* Mon Jan 29 2018 Remi Collet <remi@remirepo.net> - 3.4.3-5
- undefine _strict_symbol_defs_build
- use patch from https://github.com/mkoppanen/imagick/pull/221

* Tue Oct 03 2017 Remi Collet <remi@fedoraproject.org> - 3.4.3-4
- rebuild for https://fedoraproject.org/wiki/Changes/php72

Expand Down

0 comments on commit 65d1d72

Please sign in to comment.