]> git.pld-linux.org Git - packages/php-pecl-imagick.git/blame - php-pecl-imagick.spec
- update to 3.4.3rc1 to fix most regressions wrt ImageMagick 7
[packages/php-pecl-imagick.git] / php-pecl-imagick.spec
CommitLineData
a70f8547
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
77bd0b10
ER
5%define php_name php%{?php_suffix}
6%define modname imagick
c3cb436b 7%define status stable
59b48731 8%define pre RC1
c3cb436b
ER
9Summary: %{modname} - PHP wrapper to the Image Magick Library
10Summary(pl.UTF-8): %{modname} - PHP-owy wrapper do biblioteki Image Magick
77bd0b10 11Name: %{php_name}-pecl-%{modname}
59b48731
JR
12Version: 3.4.3
13Release: 0.%{pre}.1
80c4878b 14License: PHP 3.01
7ef11872 15Group: Development/Languages/PHP
59b48731
JR
16Source0: http://pecl.php.net/get/%{modname}-%{version}%{pre}.tgz
17# Source0-md5: 32042fc3043f013047927de21ff15a47
4baa9e02 18Patch0: skip_version_check.patch
b46c9cbe 19URL: http://pecl.php.net/package/imagick/
4c078d1b 20BuildRequires: %{php_name}-devel >= 4:5.3
30d818b5 21BuildRequires: ImageMagick-devel >= 1:6.2.4.0
58592d83
ER
22BuildRequires: pkgconfig
23BuildRequires: re2c
696a2b4e 24BuildRequires: rpmbuild(macros) >= 1.650
a70f8547
ER
25%if %{with tests}
26BuildRequires: %{php_name}-cli
501a42f6 27BuildRequires: %{php_name}-pcre
a70f8547 28BuildRequires: %{php_name}-spl
4dc1d668
ER
29BuildRequires: ImageMagick-coder-jpeg
30BuildRequires: ImageMagick-coder-png
31BuildRequires: ImageMagick-coder-tiff
a70f8547 32%endif
dbfce4b3 33%{?requires_php_extension}
ac93969d 34Requires(triggerpostun): sed >= 4.0
b65e8485 35Requires: %{php_name}-spl
6e32b6ae
ER
36Suggests: ImageMagick-coder-jpeg
37Suggests: ImageMagick-coder-png
38Suggests: ImageMagick-coder-tiff
ee3b6a5c 39Provides: php(imagick) = %{version}
c056a9a3 40Obsoletes: php-pecl-imagick < 3.1.2-2
7ef11872 41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
7ef11872 43%description
44ImageMagick is a robust collection of tools and libraries to read,
45write, and manipulate an image in many image formats (over 68 major
46formats) including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD,
47and GIF. With ImageMagick you can create images dynamically, making it
48suitable for Web applications. You can also resize, rotate, sharpen,
49color reduce, or add special effects to an image and save your
50completed work in the same or differing image format.
51
c3cb436b 52In PECL status of this package is: %{status}.
3fd56945 53
98a194af
JR
54%description -l pl.UTF-8
55ImageMagick to duży zestaw narzędzi i bibliotek do odczytu, zapisu i
56modyfikowania obrazków w wielu formatach (ponad 68 głównych), w tym
57popularnych, takich jak TIFF, JPEG, PNG, PDF, PhotoCD i GIF. Za pomocą
58ImageMagick można dynamicznie tworzyć obrazki, co jest przydatne w
59aplikacjach WWW. Można je także przeskalowywać, obracać, wyostrzać,
60zmniejszać ilość kolorów - w tym samym lub innym formacie.
7ef11872 61
c3cb436b 62To rozszerzenie ma w PECL status: %{status}.
3fd56945 63
7ef11872 64%prep
4baa9e02 65%setup -qc
59b48731 66mv %{modname}-%{version}%{pre}/* .
4baa9e02 67%patch0 -p1
7ef11872 68
b49484d9
ER
69xfail() {
70 t=$1
71 cat >> $t <<-EOF
72
73 --XFAIL--
74 Skip
75 EOF
76}
f5c1a0f1
ER
77Test() {
78 nf=$(eval echo \$$#)
79 t=$nf; t=${t#\[}; t=${t%\]}
b49484d9 80 xfail $t
f5c1a0f1 81}
b49484d9 82# skip failing tests
f5c1a0f1
ER
83Test Imagick, annotateImage [tests/034_Imagick_annotateImage_basic.phpt]
84Test ImagickDraw, composite [tests/177_ImagickDraw_composite_basic.phpt]
85Test ImagickDraw, setFontSize [tests/206_ImagickDraw_setFontSize_basic.phpt]
86Test ImagickDraw, setFontFamily [tests/207_ImagickDraw_setFontFamily_basic.phpt]
87Test ImagickDraw, setFontStretch [tests/208_ImagickDraw_setFontStretch_basic.phpt]
88Test ImagickDraw, setFontWeight [tests/209_ImagickDraw_setFontWeight_basic.phpt]
89Test ImagickDraw, setFontStyle [tests/210_ImagickDraw_setFontStyle_basic.phpt]
90Test ImagickDraw, setGravity [tests/212_ImagickDraw_setGravity_basic.phpt]
91Test ImagickDraw, setTextAlignment [tests/222_ImagickDraw_setTextAlignment_basic.phpt]
92Test ImagickDraw, setTextAntialias [tests/223_ImagickDraw_setTextAntialias_basic.phpt]
93Test ImagickDraw, setTextUnderColor [tests/224_ImagickDraw_setTextUnderColor_basic.phpt]
94Test ImagickDraw, setTextDecoration [tests/225_ImagickDraw_setTextDecoration_basic.phpt]
95Test Tutorial, psychedelicFont [tests/241_Tutorial_psychedelicFont_basic.phpt]
96Test Tutorial, svgExample [tests/243_Tutorial_svgExample_basic.phpt]
97Test Tutorial, psychedelicFontGif [tests/244_Tutorial_psychedelicFontGif_basic.phpt]
59b48731
JR
98Test Imagick, Imagick::exportImagePixels [tests/256_Imagick_exportImagePixels_basic.phpt]
99Test ImagickDraw, getTextDirection [tests/264_ImagickDraw_getTextDirection_basic.phpt]
100Test ImagickDraw, getFontResolution [tests/266_ImagickDraw_getFontResolution_basic.phpt]
b49484d9
ER
101%ifarch x32
102# Fail on 7.0
103Test Imagick, quantizeImage [tests/101_Imagick_quantizeImage_basic.phpt]
104Test Imagick, uniqueImageColors [tests/163_Imagick_uniqueImageColors_basic.phpt]
105Test Tutorial, deconstructGif [tests/237_Tutorial_deconstructGif_basic.phpt]
106Test ImagickPixelIterator, setIteratorRow [tests/251_ImagickPixelIterator_setIteratorRow_basic.phpt]
107%endif
f5c1a0f1 108
7ef11872 109%build
7ef11872 110phpize
4f203515
JR
111%configure \
112 php_cv_cc_dashr=false
7ef11872 113
bc18093b 114%{__make} \
bc18093b 115 CFLAGS_CLEAN="%{rpmcflags}"
7ef11872 116
a70f8547
ER
117%if %{with tests}
118%{__php} -n -q \
119 -d extension_dir=modules \
501a42f6 120 -d extension=%{php_extensiondir}/pcre.so \
a70f8547
ER
121 -d extension=%{php_extensiondir}/spl.so \
122 -d extension=%{modname}.so \
123 -m > modules.log
124grep %{modname} modules.log
125
126export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
127%{__make} test \
128 PHP_EXECUTABLE=%{__php} \
501a42f6 129 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="pcre spl" \
a70f8547
ER
130%endif
131
7ef11872 132%install
133rm -rf $RPM_BUILD_ROOT
be7cd71f 134install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}}
c3cb436b
ER
135install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
136cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
137; Enable %{modname} extension module
138extension=%{modname}.so
dbfce4b3 139EOF
be7cd71f 140cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
7ef11872 141
142%clean
143rm -rf $RPM_BUILD_ROOT
144
145%post
f7ead91e 146%php_webserver_restart
7ef11872 147
dbfce4b3
ER
148%postun
149if [ "$1" = 0 ]; then
f7ead91e 150 %php_webserver_restart
7ef11872 151fi
152
dbfce4b3 153%triggerpostun -- %{name} < 0.9.11-2.1
c3cb436b 154%{__sed} -i -e '/^extension[[:space:]]*=[[:space:]]*%{modname}\.so/d' %{php_sysconfdir}/php.ini
dbfce4b3 155
7ef11872 156%files
157%defattr(644,root,root,755)
1fe13cac 158%doc CREDITS
c3cb436b
ER
159%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
160%attr(755,root,root) %{php_extensiondir}/%{modname}.so
be7cd71f 161%{_examplesdir}/%{name}-%{version}
This page took 0.093072 seconds and 4 git commands to generate.