# Allow for selectively disabling from commandline %{!?quant:%define quant 16} %{!?perlm:%define perlm 1} %{!?cplus:%define cplus 1} Name: GraphicsMagick Version: 1.1.11 Release: alt1 Summary: An X application for displaying and manipulating images Summary(ru_RU.KOI8-R): ðÒÏÇÒÁÍÍÁ ÄÌÑ ÏÔÏÂÒÁÖÅÎÉÑ É ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ ÉÚÏÂÒÁÖÅÎÉÊ License: MIT Group: Graphics Source: ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/%name-%version.tar.bz2 Source2: %name.desktop Patch0: %name-libpath.patch Url: http://www.GraphicsMagick.org/ Requires: bzip2 freetype2 libjpeg libpng zlib ghostscript Requires: lib%name = %version-%release BuildPreReq: libltdl-devel chrpath # Automatically added by buildreq on Fri Jan 19 2007 BuildRequires: bzlib-devel enscript gcc-c++ ghostscript-classic graphviz groff-base imake libjasper-devel libjbig-devel liblcms-devel libSM-devel libtiff-devel libwmf-devel libXext-devel libxml2-devel ncompress netpbm perl-devel wget xorg-cf-files xterm %description GraphicsMagick(TM) provides a powerful image manipulation and translation utility. It is capable of displaying still images and animations using the X Window system, provides a simple interface for interactively editing images, and is capable of importing selected windows or the entire desktop. GraphicsMagick can read and write over 88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and Photo CD. It can resize, rotate, sharpen, color reduce, or add special effects to the image and save the result to any supported format. GraphicsMagick may be used to create animated or transparent .gifs, create composite images, create thumbnail images, and much, much, more. GraphicsMagick is one of your choices if you need a program to manipulate and display images. If you want to develop your own applications which use GraphicsMagick code or APIs, you need to install GraphicsMagick-devel as well. %description -l ru_RU.KOI8-R GraphicsMagick (ôí) ÍÎÏÇÏÆÕÎËÃÉÏÎÁÌØÎÁÑ ÐÒÏÇÒÁÍÍÁ ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ É ÐÒÅÏÂÒÁÚÏ×ÁÎÉÑ ÉÚÏÂÒÁÖÅÎÉÊ. ó ÅÅ ÐÏÍÏÝØÀ ×ÏÚÍÏÖÎÏ ÐÒÏÓÍÁÔÒÉ×ÁÔØ ÒÉÓÕÎËÉ É ÍÕÌØÔÉÐÌÉËÁÃÉÉ, ÉÓÐÏÌØÚÕÑ ÓÉÓÔÅÍÕ X Windows. ïÂÅÓÐÅÞÉ×ÁÅÔ ÐÒÏÓÔÏÊ ÉÎÔÅÒÆÅÊÓ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ × ÉÎÔÅÒÁËÔÉ×ÎÏÍ ÒÅÖÉÍÅ ÒÅÄÁËÔÉÒÏ×ÁÔØ ÉÚÏÂÒÁÖÅÎÉÑ, É ÓÐÏÓÏÂÎÁ Ë ÚÁÈ×ÁÔÕ ÏÔÄÅÌØÎÙÈ ÏËÏÎ ÉÌÉ ×ÓÅÇÏ ÒÁÂÏÞÅÇÏ ÓÔÏÌÁ. GraphicsMagick ÍÏÖÅÔ ÞÉÔÁÔØ É ÐÉÓÁÔØ ÂÏÌÅÅ ÞÅÍ × 88 ÇÒÁÆÉÞÅÓËÉÈ ÆÏÒÍÁÔÏ×, ×ËÌÀÞÁÑ JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, É Photo CD. ó ÅÅ ÐÏÍÏÝØÀ ÍÏÖÎÏ ÉÚÍÅÎÑÔØ ÒÁÚÍÅÒÙ, ×ÒÁÝÁÔØ, ÕÌÕÞÛÁÔØ, ÕÍÅÎØÛÁÔØ ÇÌÕÂÉÎÕ Ã×ÅÔÁ, ÉÌÉ ÄÏÂÁ×ÌÑÔØ ÓÐÅÃÉÁÌØÎÙÅ ÜÆÆÅËÔÙ Ë ÉÚÏÂÒÁÖÅÎÉÀ É ÓÏÈÒÁÎÑÔØ ÒÅÚÕÌØÔÁÔ × ÌÀÂÏÍ ÐÏÄÄÅÒÖÉ×ÁÅÍÏÍ ÆÏÒÍÁÔÅ. GraphicsMagick ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ, ÞÔÏÂÙ ÓÏÚÄÁ×ÁÔØ Ä×ÉÖÕÝÉÅÓÑ ÉÌÉ ÐÒÏÚÒÁÞÎÙÅ .gifs, ÓÏÚÄÁ×ÁÔØ ÓÌÏÖÎÙÅ ÉÚÏÂÒÁÖÅÎÉÑ, ÒÁÚÍÅÒÏÍ Ó ÎÏÇÏÔÏË, É ÏÞÅÎØ, ÏÞÅÎØ, ÂÏÌØÛÅ. GraphicsMagick ÐÅÒ×ÏÎÁÞÁÌØÎÏ ÏÓÎÏ×ÁÎ ÎÁ ImageMagick 5.5.2. GraphicsMagick ÐÏÄÄÅÒÖÉ×ÁÅÔ ÕÓÔÏÊÞÉ×ÕÀ ×ÅÔ×Ø ×ÙÐÕÓËÁ, ÄÅÔÁÌØÎÙÊ ChangeLog, É "ÞÉÓÔÙÊ" ÉÓÈÏÄÎÙÊ ËÏÄ Ó ÐÏÌÎÏÊ ÉÓÔÏÒÉÅÊ ×ÅÒÓÉÊ ÔÁË, ÞÔÏ ÉÚÍÅÎÅÎÉÑ ËÏÎÔÒÏÌÉÒÕÅÍÙ, É ÉÚÍÅÎÅÎÉÑ ÍÅÖÄÕ ×ÅÒÓÉÑÍÉ ÔÏÞÎÏ ÏÐÉÓÁÎÙ. ImageMagick ÎÅ ÐÒÅÄÌÁÇÁÅÔ ÜÔÏÇÏ. ôÁË ËÁË GraphicsMagick "ÂÏÌÅÅ ÕÓÔÏÊÞÉ×", ÂÏÌØÛÅ ×ÒÅÍÅÎÉ ÂÙÌÏ ÐÒÏ×ÅÄÅÎÏ, ÏÐÔÉÍÉÚÉÒÕÑ É ÏÔÌÁÖÉ×ÁÑ ÅÇÏ ËÏÄ. GraphicsMagick ÞÁÓÔÏ ÂÙÓÔÒÅÅ ÞÅÍ ImageMagick. ImageMagick ÓÏÓÒÅÄÏÔÁÞÉ×ÁÅÔÓÑ ÎÁ ÔÏÍ, ÞÔÏÂÙ ÄÏÂÁ×ÌÑÔØ ÎÏ×ÙÅ ÆÕÎËÃÉÏÎÁÌØÎÙÅ ×ÏÚÍÏÖÎÏÓÔÉ É ÏÓÏÂÅÎÎÏÓÔÉ. %package doc Summary: Documentation for %name Group: Documentation %description doc Documentation for %name %package ImageMagick-compat Summary: Image processing tools providing ImageMagick interface Group: Graphics Requires: %name = %version-%release Provides: ImageMagick Conflicts: ImageMagick %description ImageMagick-compat GraphicsMagick provides a set of command-line applications to manipulate image files. It is a fork of the ImageMagick project and therefore offers a similar set of features, but puts a larger emphasis on stability. With this package installed, the GraphicsMagick command line tools can be executed like their ImageMagick counterparts. It allows to migrate scripts from ImageMagick to GraphicsMagick without any code changes. %package -n lib%name Summary: %name shared libraries Group: System/Libraries %description -n lib%name lib%name contains the libraries files you'll need to use GraphicsMagick applications. GraphicsMagick is an image manipulation program. %package -n lib%name-devel Summary: Header files for GraphicsMagick app development Group: Development/C Requires: lib%name = %version-%release Obsoletes: %name-devel %description -n lib%name-devel GraphicsMagick-devel contains the header files you'll need to develop GraphicsMagick applications. GraphicsMagick is an image manipulation program. If you want to create applications that will use GraphicsMagick code or APIs, you need to install GraphicsMagick-devel as well as GraphicsMagick. You do not need to install it if you just want to use GraphicsMagick, however. %if %perlm %package -n perl-%name Summary: Libraries and modules for access to %name from perl Group: Development/Perl BuildPreReq: perl >= 5.6.0 Requires: lib%name = %version-%release, perl >= 5.6.0 %description -n perl-%name Perl bindings to GraphicsMagick. Install perl-%name if you want to use any perl scripts that use GraphicsMagick. %endif %if %cplus %package -n lib%name-c++ Summary: GraphicsMagick Magick++ library (C++ bindings) Group: Development/C++ Requires: lib%name = %version-%release Obsoletes: %name-c++ %description -n lib%name-c++ This package contains the Magick++ library, a C++ binding to the GraphicsMagick graphics manipulation library. Install GraphicsMagick-c++ if you want to use any applications that use Magick++. %package -n lib%name-c++-devel Summary: C++ bindings for the GraphicsMagick library Group: Development/C++ Requires: lib%name-devel = %version, lib%name-c++ = %version Requires: bzip2-devel, freetype2-devel Requires: libjpeg-devel, libpng-devel, libtiff-devel, zlib-devel, libxml2-devel Obsoletes: %name-c++-devel %description -n lib%name-c++-devel GraphicsMagick-devel contains the static libraries and header files you'll need to develop GraphicsMagick applications using the Magick++ C++ bindings. GraphicsMagick is an image manipulation program. If you want to create applications that will use Magick++ code or APIs, you'll need to install GraphicsMagick-c++-devel, GraphicsMagick-devel and GraphicsMagick. You don't need to install it if you just want to use GraphicsMagick, or if you want to develop/compile applications using the GraphicsMagick C interface, however. %endif %prep %setup -q %patch0 -p1 # local doc %__subst "s|http://www.imagemagick.org/|file://%_docdir/%name-%version/index.html|g" magick/animate.c magick/display.c # fix font in dialog "Open File" %__subst "s|iso8859-15|r|g" magick/xwindow.c %__subst "s|iso8859-1|r|g" magick/xwindow.c find PerlMagick scripts www -type f -exec perl -pi -e 's=!/usr/local/bin/perl=!/usr/bin/perl=' {} \; # don't require libtool 1.6 echo -e '\nAC_DEFUN([AC_LIBTOOL_TAGS],[])' >> acinclude.m4 %build %autoreconf %configure --enable-shared \ --disable-static \ --with-modules \ --enable-fast-install \ --enable-magick-compat \ %if %perlm --with-perl=%__perl \ --with-perl-options='PREFIX=%prefix INSTALLDIRS=vendor' \ %else --without-perl \ %endif %if %cplus --with-magick-plus-plus \ %else --without-magick-plus-plus \ %endif --with-windows-font-dir=%_datadir/fonts/default/TrueType-ms \ --with-quantum-depth=%quant %make_build %install %__make DESTDIR=%buildroot install # Fix RPATH chrpath -r /usr/lib %buildroot%perl_vendor_autolib/Graphics/Magick/Magick.so # doc stuff %__rm -Rf docs-%name-%version %__mkdir docs-%name-%version %__mv %buildroot%_datadir/%name-%version/* docs-%name-%version/ %__mv docs-%name-%version/config %buildroot%_datadir/%name-%version/ ##%__rm -Rf docs-%name-%version/config %__rm -Rf docs-%name-%version/web/*.rej %__install -pD -m644 images/gm-125x80t.png %buildroot%_miconsdir/%name.png %__install -pD -m644 images/gm-188x120t.png %buildroot%_niconsdir/%name.png %__install -pD -m644 images/gm-282x180t.png %buildroot%_liconsdir/%name.png # menu file %__install -pD -m644 %SOURCE2 %buildroot%_datadir/applications/%name.desktop %if %perlm %__rm -f `find %buildroot%_libdir/perl*/ -name perllocal.pod -type f` %__rm -f `find %buildroot%_libdir/perl*/ -name .packlist -type f` %endif %post %update_menus %postun %clean_menus %post -n lib%name %post_ldconfig %postun -n lib%name %postun_ldconfig %post -n lib%name-c++ %post_ldconfig %postun -n lib%name-c++ %postun_ldconfig %files %doc ChangeLog README.txt NEWS %_bindir/gm %_datadir/%name-%version/ %_mandir/man1/gm.1.bz2 %_datadir/applications/%name.desktop %_miconsdir/%name.png %_niconsdir/%name.png %_liconsdir/%name.png %files doc %doc docs-%name-%version/* %files ImageMagick-compat %_bindir/animate %_bindir/composite %_bindir/conjure %_bindir/convert %_bindir/display %_bindir/identify %_bindir/import %_bindir/mogrify %_bindir/montage %_mandir/man4/miff.4.gz %_mandir/man5/quantize.5.gz %files -n lib%name %_libdir/lib%name.so* %_libdir/lib%{name}Wand.so* %_libdir/%name-%version/ %files -n lib%name-devel %dir %_includedir/%name %_includedir/%name/wand/ %_includedir/%name/magick/ %_libdir/lib%name.so %_libdir/pkgconfig/%name.pc %_libdir/pkgconfig/%{name}Wand.pc %_bindir/%name-config %_bindir/%{name}Wand-config %_mandir/man1/%name-config.1.gz %_mandir/man1/%{name}Wand-config.1.gz %if %perlm %files -n perl-%name %doc PerlMagick/demo %perl_vendor_archlib/Graphics/ %perl_vendor_archlib/auto/Graphics/ %perl_vendor_man3dir/*gz %endif %if %cplus %files -n lib%name-c++ %_libdir/lib%name++.so* %files -n lib%name-c++-devel %_includedir/%name/Magick++.h %_includedir/%name/Magick++/ %_libdir/lib%name++.so %_libdir/pkgconfig/%name++.pc %_bindir/%name++-config %_mandir/man1/%name++-config.1.gz %_libdir/lib%name++.so* %endif %changelog * Tue Feb 26 2008 Slava Dubrovskiy <dubrsl@altlinux.org> 1.1.11-alt1 - New version - Bugs Fixed: + BMP: Support large files. + DIB: Support large files. + PNG: Fix depth handling with 16-bit PNG files in the Q8 build. + SUN: Properly report image depth. + TIFF: Endian option (-endian) now controls TIFF byte endian order rather than bit fill order. + DCM, DIB, XBM, XCF, XWD: Eliminate integer overflow vulnerability (IDefense 09.19.07) (SA29094). + HSL colorspace transform: Avoid optimization bug noticed on Opteron with GCC. + HWB colorspace transform: Avoid optimization bug noticed on Opteron with GCC. + RGBTransformImage()/TransformRGBImage(): Was using HWB colorspace when HSL was requested. + Successfully reads files with names like 'file[123]'. + 'gm display': No longer rely on isatty() to determine if input is from a pipe (use 'gm display -' to display an image read from a pipe). - Feature Improvements: + 'identify +ping' forces the pixels to be read (similar to GM 1.2). + 'gm -version' now indicates if build supports "Large Memory" (i.e. 64-bit). + TIFF: Use '-define tiff:fill-order={msb2lsb|lsb2msb}' to control TIFF bit fill order. - Performance Improvements: + No longer bogs down if a directory contains hundreds of thousands of files and the filename looks like a wildcard specification. * Thu Sep 20 2007 Slava Dubrovskiy <dubrsl@altlinux.org> 1.1.10-alt1 - This is an emergency bug-fix release to fix a problem with image rotation by 270 degrees. There are no other changes from the previous release. * Tue Sep 18 2007 Slava Dubrovskiy <dubrsl@altlinux.org> 1.1.9-alt1 - New version - Bugs Fixed: + In mogrify command, don't remove file name based on random junk in memory. + Fixed memory leak when reading MPC files. + Fixed crash when writing MIFF format and depth is not expected 8/16/32/. + In mogrify command, don't leak memory in the case where the image file contains multiple frames. + Fixed crash in PNG and JPEG coders when the image to be written is part of an image list. + PNG reader errors are not properly reported to the user. + TIFF output can now be written to a pipe or other non-seekable destination. + Support writing PDF with CCITT compression. - Feature Improvements + Added a new 'benchmark' command which can be used to perform benchmarking on any other command. + Image rotate in clockwise (90 degrees) or counter-clockwise (270 degrees) direction is now 2-9X faster than before. + The -version option now includes a list of supported features. * Mon Jul 30 2007 Slava Dubrovskiy <dubrsl@altlinux.org> 1.1.8-alt1 - New version - Removed patches from debian (in upstream) - Security Fixes: + Shell command injection via delegates subsystem (CVE-2005-4601). + Insecure use of filenames as a "sprintf" specification (CVE-2006-0082). + EXIF IFD stack overflow vulnerability. + BMP format: Verify seek before proceeding. + DCM format: Buffer overflow prevention (CVE-2006-5456). + DCM format: Integer overflow prevention (CVE-2007-1797). + PALM format: Heap overflow prevention (CVE-2006-5456). + SGI format: Fixes for RLE decoding issue (CVE-2006-4144). + XCF format: Buffer overflow prevention, infinite loop prevention. - Bugs Fixed: + Typo when searching for HTMLDecodeDelegate. + Avoid crash if delegate program fails to return an image. + EXIF memory leak fixes. + Command parser memory leak fixes. + Deadlock fix for event log initialization. + Work with latest Ghostscript "GPL Ghostscript" under Windows. + 'gm import' now returns image of appropriate depth. + Fixed memory map resource managment. + Fixed includedir variable in pkg-config files. + Fixed validation of -affine argument. + Fixed bug where fseeko() and ftello() were not used when available. + Fixed issue when pread() and pwrite() prototypes are missing. + Fixed pixel cache issues when size_t is an unsigned type. + Fixed dcraw delegate options to work with modern dcraw. + Fixed -level argument parsing to allow embedded %% characters. + Fix for segfault in InitializeMagick(NULL). + Fix for segfault in ModifyCache(). + Fix for Wand MagickGetQuantumDepth() interface. + Fix for GrayscalePseudoClassImage() on 64-bit systems. + Fix for MagickReallocMemory memory leak under certain error conditions. + Validate BLOB access range. + ICON format: Segfault fix. + JPEG format: Fixed reading 12-bit grayscale JPEG. + MAT format: Stability improvements. + MIFF format: Handle a compression value of 'None'. + PCX format: Segfault fix. Heap overflow fix. + PDF format: Fixed writing with JPEG compression. + PICT format: Segfault fix. + PNG format: Fixed compile problem with some libpng versions. Segfault fix. + PNM format: Fixed scaling problem due to rounding error. Validate scaling. + PSD format: Fixed memory leak with layerd PSD files. + SGI format: Handle 16-bit SGI image files correctly. + SUN format: Segfault fix. + TIFF format: Secure error reporting. Finally support LZW under Windows. + WPG format: Fixed crash with clip-art WPG files. + XWD format: Fix for integer under/overflow. - Feature Improvements + CIN format: Implementation is entirely replaced. + MAT format: Support Byte and Word formats, as well as big/little endian. + WPG format: Support for CTM translation. * Thu Apr 12 2007 Slava Dubrovskiy <dubrsl@altlinux.org> 1.1.7-alt7 - Delete fonts-ttf-ms from BuildPreReq (#11385) * Fri Jan 19 2007 Slava Dubrovskiy <dubrsl@altlinux.ru> 1.1.7-alt6 - Split of libraries, documents and imagemagick-compat packages - Add %name.desktop - Add %name-libpath.patch for fix link PerlMagick - Add chrpath -r /usr/lib %perl_vendor_autolib/Graphics/Magick/Magick.so - Add graphicsmagick_1.1.7-11.diff.gz from Debian + config/delegates.mgk.in: Lose obsolete option -2 when calling dcraw delegate. Fixes support for raw image data from digital cameras. + coders/png.c: Fix syntax errors in asm controlling code of PNG coder. + coders/dcm.c: Fix buffer overflow, thanks to M Joonas Pihlaja. (CVE-2006-5456) + coders/palm.c: Fix multiple heap overflows, thanks to M Joonas Pihlaja. (CVE-2006-5456) + coders/xcf.c: Fix buffer overflow in XCF coder (CVE-2006-3743). + coders/sgi.c: Fix multiple heap overflow vulnerabilities in SGI coder due to - missing boundary checks in SGIDecode(); - missing validation of pixel depth field; - integer overflow via large columns and rows fields (CVE-2006-4144) - missing validation of chunk size fields (variable 'runlength') in run-length encoded images. + coders/sgi.c: Check for bogus values of 'bytes_per_pixel' and 'depth'. + coders/sgi.c: Fix calculation of internal depth value. + magick/cache.c: Include definition of HAVE_PREAD before checking its value. Now really pulls in proper declarations of pread() and pwrite(). + coders/wpg.c: Fix segfault in WPG decoder. + tests/drawtest.c: Make sure filename strings do not run out of bounds. + magick/cache.c: Define as _XOPEN_SOURCE to pull in declarations for Unix98 extensions pread() and pwrite(). + magick/montage.c: Fix bogus modulation of brightness when creating shadows around tiles in montage. Instead, drop constant grey shadow like current ImageMagick. + PerlMagick/t/montage.t: Update reference signatures for montage test cases with shadow according to above change. + magick/tempfile.c: Canonify relative paths before referring to them in a symlink. + magick/{blob.c,command.c,image.c,log.c,utility.c,utility.h}: FormatString() was called with unsanitized user input. Introduced new helper function FormatStringNumeric() to allow a single numeric format expansion. (This is a more complete fix for CAN-2005-0397 reported against ImageMagick.) + magick/attribute.c: Apply missing piece of fix for heap overflow in EXIF parser from ImageMagick patch. (CAN-2004-0981) + configure.ac, configure: Fix typo that lead to an undefined delegate for HTML conversion. + magick/constitute.c: Apply upstream fix for potential NULL pointer dereference in ReadImage(). + magick/{delegate.c,symbols.h,tempfile.h,tempfile.c}: When calling external delegates, check filename against whitelist of safe characters, and pass securely named symlink to delegate if check fails. (CVE-2005-4601) * Tue Jan 09 2007 Slava Dubrovskiy <dubrsl@altlinux.ru> 1.1.7-alt5 - Rebuild with new libjasper * Wed Oct 18 2006 Slava Dubrovskiy <dubrsl@altlinux.ru> 1.1.7-alt4 - Fix russian filename in dialog "Open ..." * Thu Oct 12 2006 Slava Dubrovskiy <dubrsl@altlinux.ru> 1.1.7-alt3 - Update BuildRequires - Cleanup spec * Fri Feb 17 2006 Slava Dubrovskiy <dubrsl@altlinux.ru> 1.1.7-alt2 - removed miff.4.gz & quantize.5.gz for compatibility with ImageMagick * Fri Jan 27 2006 Slava Dubrovskiy <dubrsl@altlinux.ru> 1.1.7-alt1 - in %name-devel added dir %_includedir/%name - in perl-%name added dir %perl_vendor_archlib/auto/Graphics/ - Compatibility with ImageMagick is cleaned (#9074) * Thu Jan 19 2006 Slava Dubrovskiy <dubrsl@altlinux.ru> 1.1.7-alt0 - initial build