- Update to new upstream release 6.9.2-7 (bz#1224581)

- Drop fix-XPM patch.
- No so-name change, so will update in stable branch to fix also: bz#1267391
    (JPEG 2000 support), bz#1269556 (security buff overflow in coders/icon.c),
    bz#1269567 (Double free vulnerabilities in coders/{pict.c,tga.c})
- Solving miltilib conflict - bz#1208347 - add patch ImageMagick-6.9.2-7-multiarch-implicit-pkgconfig-dir.patch.
- Drop old options: --with-lcms2, --without-included-ltdl, --with-ltdl-include, --with-ltdl-lib
- Some spec cleanup (including README utf recoding, rpath clean hacks).
This commit is contained in:
Hubbitus 2015-12-06 19:28:56 +03:00
parent c6e35d1ec2
commit de0432bcf3
5 changed files with 62 additions and 64 deletions

1
.gitignore vendored
View File

@ -20,3 +20,4 @@ ImageMagick-6.4.0-multilib.patch
/ImageMagick-6.9.0-10.tar.xz
/ImageMagick-6.9.1-2.tar.xz
/ImageMagick-6.9.1-3.tar.bz2
/ImageMagick-6.9.2-7.tar.xz

View File

@ -0,0 +1,28 @@
diff -NurEbBH ImageMagick-6.9.2-7.orig/wand/MagickWand-config.in ImageMagick-6.9.2-7/wand/MagickWand-config.in
--- ImageMagick-6.9.2-7.orig/wand/MagickWand-config.in 2015-11-26 17:14:07.000000000 +0300
+++ ImageMagick-6.9.2-7/wand/MagickWand-config.in 2015-12-05 21:53:37.350660894 +0300
@@ -38,19 +38,19 @@
echo '@PACKAGE_VERSION@ Q@QUANTUM_DEPTH@ @MAGICK_HDRI@'
;;
--cflags)
- PKG_CONFIG_PATH="@libdir@/pkgconfig" pkg-config --cflags MagickWand
+ pkg-config --cflags MagickWand
;;
--cxxflags)
- PKG_CONFIG_PATH="@libdir@/pkgconfig" pkg-config --cflags MagickWand
+ pkg-config --cflags MagickWand
;;
--cppflags)
- PKG_CONFIG_PATH="@libdir@/pkgconfig" pkg-config --cflags MagickWand
+ pkg-config --cflags MagickWand
;;
--ldflags)
- PKG_CONFIG_PATH="@libdir@/pkgconfig" pkg-config --libs MagickWand
+ pkg-config --libs MagickWand
;;
--libs)
- PKG_CONFIG_PATH="@libdir@/pkgconfig" pkg-config --libs MagickWand
+ pkg-config --libs MagickWand
;;
*)
echo "${usage}" 1>&2

View File

@ -1,14 +1,14 @@
%global VER 6.9.1
%global Patchlevel 3
%global VER 6.9.2
%global Patchlevel 7
Name: ImageMagick
Version: %{VER}.%{Patchlevel}
Release: 0.beta.4%{?dist}
Release: 1%{?dist}
Summary: An X application for displaying and manipulating images
Group: Applications/Multimedia
License: ImageMagick
Url: http://www.imagemagick.org/
Source0: ftp://ftp.ImageMagick.org/pub/%{name}/beta/%{name}-%{VER}-%{Patchlevel}.tar.bz2
Source0: ftp://ftp.ImageMagick.org/pub/%{name}/%{name}-%{VER}-%{Patchlevel}.tar.xz
Requires: %{name}-libs = %{version}-%{release}
@ -23,7 +23,7 @@ BuildRequires: fftw-devel, OpenEXR-devel, libwebp-devel
BuildRequires: jbigkit-devel
BuildRequires: openjpeg2-devel >= 2.1.0
Patch0: fix-XPM.patch
Patch0: ImageMagick-6.9.2-7-multiarch-implicit-pkgconfig-dir.patch
%description
ImageMagick is an image display and manipulation tool for the X
@ -137,17 +137,12 @@ however.
%prep
%setup -q -n %{name}-%{VER}-%{Patchlevel}
%patch0 -p0 -b .xpm-fix
%patch0 -p1 -b .multiarch-implicit-pkgconfig-dir
sed -i 's/libltdl.la/libltdl.so/g' configure
iconv -f ISO-8859-1 -t UTF-8 README.txt > README.txt.tmp
touch -r README.txt README.txt.tmp
mv README.txt.tmp README.txt
# for %%doc
mkdir Magick++/examples
cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples
%build
%configure \
--enable-shared \
@ -159,29 +154,21 @@ cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples
--with-magick_plus_plus \
--with-gslib \
--with-wmf \
--with-lcms2 \
--with-webp \
--with-openexr \
--with-rsvg \
--with-xml \
--with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
--without-dps \
--without-included-ltdl --with-ltdl-include=%{_includedir} \
--without-gcc-arch \
--with-ltdl-lib=%{_libdir} \
--with-jbig \
--with-openjp2
# Disable rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# Do *NOT* use %%{?_smp_mflags}, this causes PerlMagick to be silently misbuild
make
%install
rm -rf %{buildroot}
make %{?_smp_mflags} install DESTDIR=%{buildroot} INSTALL="install -p"
cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{VER}
# Delete *ONLY* _libdir/*.la files! .la files used internally to handle plugins - BUG#185237!!!
@ -211,40 +198,39 @@ if [ -z perl-pkg-files ] ; then
exit -1
fi
# fix multilib issues
# fix multilib issues: Rename provided file with platform-bits in name.
# Create platform independant file inplace of provided and conditionally include required.
# $1 - filename.h to process.
function multilibFileVersions(){
mv $1 ${1%%.h}-%{__isa_bits}.h
mv %{buildroot}%{_includedir}/%{name}-6/magick/magick-config.h \
%{buildroot}%{_includedir}/%{name}-6/magick/magick-config-%{__isa_bits}.h
cat >%{buildroot}%{_includedir}/%{name}-6/magick/magick-config.h <<EOF
#ifndef IMAGEMAGICK_MULTILIB
#define IMAGEMAGICK_MULTILIB
local basename=$(basename $1)
cat >$1 <<EOF
#include <bits/wordsize.h>
#if __WORDSIZE == 32
# include "magick-config-32.h"
# include "${basename%%.h}-32.h"
#elif __WORDSIZE == 64
# include "magick-config-64.h"
# include "${basename%%.h}-64.h"
#else
# error "unexpected value for __WORDSIZE macro"
#endif
#endif
EOF
}
# Fonts must be packaged separately. It does nothave matter and demos work without it.
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/magick-config.h
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/magick-baseconfig.h
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/version.h
# Fonts must be packaged separately. It does not have matter and demos work without it.
rm PerlMagick/demo/Generic.ttf
%check
#export LD_LIBRARY_PATH=%{buildroot}/wand/.libs/:%{buildroot}/Magick++/lib/.libs/
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
make %{?_smp_mflags} check
%clean
rm -rf %{buildroot}
%post libs -p /sbin/ldconfig
%post c++ -p /sbin/ldconfig
@ -261,7 +247,6 @@ rm -rf %{buildroot}
%{_mandir}/man1/%{name}.*
%files libs
%defattr(-,root,root,-)
%doc LICENSE NOTICE AUTHORS.txt QuickStart.txt
%{_libdir}/libMagickCore-6.Q16.so.2*
%{_libdir}/libMagickWand-6.Q16.so.2*
@ -271,7 +256,6 @@ rm -rf %{buildroot}
%{_sysconfdir}/%{name}-6
%files devel
%defattr(-,root,root,-)
%{_bindir}/MagickCore-config
%{_bindir}/Magick-config
%{_bindir}/MagickWand-config
@ -295,23 +279,19 @@ rm -rf %{buildroot}
%{_mandir}/man1/MagickWand-config.*
%files djvu
%defattr(-,root,root,-)
%{_libdir}/%{name}-%{VER}/modules-Q16/coders/djvu.*
%files doc
%defattr(-,root,root,-)
%doc %{_datadir}/doc/%{name}-6
%doc %{_datadir}/doc/%{name}-%{VER}
%doc LICENSE
%files c++
%defattr(-,root,root,-)
%doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README
%doc www/Magick++/COPYING
%{_libdir}/libMagick++-6.Q16.so.6*
%files c++-devel
%defattr(-,root,root,-)
%doc Magick++/examples
%{_bindir}/Magick++-config
%{_includedir}/%{name}-6/Magick++
@ -324,11 +304,20 @@ rm -rf %{buildroot}
%{_mandir}/man1/Magick++-config.*
%files perl -f perl-pkg-files
%defattr(-,root,root,-)
%{_mandir}/man3/*
%doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
%changelog
* Fri Dec 04 2015 Pavel Alexeev <Pahan@Hubbitus.info> - 6.9.2.7-1
- Update to new upstream release 6.9.2-7 (bz#1224581)
- Drop fix-XPM patch.
- No so-name change, so will update in stable branch to fix also: bz#1267391
(JPEG 2000 support), bz#1269556 (security buff overflow in coders/icon.c),
bz#1269567 (Double free vulnerabilities in coders/{pict.c,tga.c})
- Solving miltilib conflict - bz#1208347 - add patch ImageMagick-6.9.2-7-multiarch-implicit-pkgconfig-dir.patch.
- Drop old options: --with-lcms2, --without-included-ltdl, --with-ltdl-include, --with-ltdl-lib
- Some spec cleanup (including README utf recoding, rpath clean hacks).
* Sat Nov 21 2015 Pavel Alexeev <Pahan@Hubbitus.info> - 6.9.1.3-0.beta.4
- Add patch fix-XPM.patch (upstream fix for #1217178).

View File

@ -1,20 +0,0 @@
--- magick/colormap.c.orig 2014-12-25 21:05:34.000000000 +0300
+++ magick/colormap.c 2015-11-21 16:06:49.632335362 +0300
@@ -112,7 +112,7 @@
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- image->colors=MagickMax(colors,2);
+ image->colors=MagickMax(colors,1);
if (image->colormap == (PixelPacket *) NULL)
image->colormap=(PixelPacket *) AcquireQuantumMemory(image->colors,
sizeof(*image->colormap));
@@ -131,7 +131,7 @@
size_t
pixel;
- pixel=(size_t) (i*(QuantumRange/(image->colors-1)));
+ pixel=(size_t) (i*(QuantumRange/MagickMax(colors-1,1)));
image->colormap[i].red=(Quantum) pixel;
image->colormap[i].green=(Quantum) pixel;
image->colormap[i].blue=(Quantum) pixel;

View File

@ -1 +1 @@
3b9aa43863c9113a0b5c0e731c5688ce ImageMagick-6.9.1-3.tar.bz2
7b6d2b7b1afc4a924b848e712d94c8e0 ImageMagick-6.9.2-7.tar.xz