Sync from SUSE:ALP:Source:Standard:1.0 GraphicsMagick revision 50be359aa495f74ab7c30f7fa5cd30b6

This commit is contained in:
Adrian Schröter 2023-12-22 10:18:52 +01:00
commit 0128d5cece
6 changed files with 2375 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
GraphicsMagick-1.3.42.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,320 @@
Index: GraphicsMagick-1.3.42/coders/pdf.c
===================================================================
--- GraphicsMagick-1.3.42.orig/coders/pdf.c
+++ GraphicsMagick-1.3.42/coders/pdf.c
@@ -499,7 +499,7 @@ ModuleExport void RegisterPDFImage(void)
entry->seekable_stream=True;
entry->description="Encapsulated Portable Document Format";
entry->module="PDF";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
entry=SetMagickInfo("PDF");
@@ -512,7 +512,7 @@ ModuleExport void RegisterPDFImage(void)
entry->seekable_stream=True;
entry->description="Portable Document Format";
entry->module="PDF";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
}
Index: GraphicsMagick-1.3.42/coders/ps.c
===================================================================
--- GraphicsMagick-1.3.42.orig/coders/ps.c
+++ GraphicsMagick-1.3.42/coders/ps.c
@@ -456,7 +456,7 @@ ModuleExport void RegisterPSImage(void)
entry->adjoin=False;
entry->description="Adobe Encapsulated PostScript Interchange format";
entry->module="PS";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
entry=SetMagickInfo("EPS");
@@ -468,7 +468,7 @@ ModuleExport void RegisterPSImage(void)
entry->adjoin=False;
entry->description="Adobe Encapsulated PostScript";
entry->module="PS";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
entry=SetMagickInfo("EPSF");
@@ -480,7 +480,7 @@ ModuleExport void RegisterPSImage(void)
entry->adjoin=False;
entry->description="Adobe Encapsulated PostScript";
entry->module="PS";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
entry=SetMagickInfo("EPSI");
@@ -492,7 +492,7 @@ ModuleExport void RegisterPSImage(void)
entry->adjoin=False;
entry->description="Adobe Encapsulated PostScript Interchange format";
entry->module="PS";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
entry=SetMagickInfo("PS");
@@ -503,7 +503,7 @@ ModuleExport void RegisterPSImage(void)
entry->magick=(MagickHandler) IsPS;
entry->description="Adobe PostScript";
entry->module="PS";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
}
Index: GraphicsMagick-1.3.42/coders/ps2.c
===================================================================
--- GraphicsMagick-1.3.42.orig/coders/ps2.c
+++ GraphicsMagick-1.3.42/coders/ps2.c
@@ -252,7 +252,7 @@ ModuleExport void RegisterPS2Image(void)
entry->seekable_stream=True;
entry->description="Adobe Level II Encapsulated PostScript";
entry->module="PS2";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
entry=SetMagickInfo("PS2");
@@ -260,7 +260,7 @@ ModuleExport void RegisterPS2Image(void)
entry->seekable_stream=True;
entry->description="Adobe Level II PostScript";
entry->module="PS2";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
}
Index: GraphicsMagick-1.3.42/coders/ps3.c
===================================================================
--- GraphicsMagick-1.3.42.orig/coders/ps3.c
+++ GraphicsMagick-1.3.42/coders/ps3.c
@@ -394,7 +394,7 @@ ModuleExport void RegisterPS3Image(void)
entry->description="Adobe Level III Encapsulated PostScript";
entry->seekable_stream=MagickTrue;
entry->module="PS3";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
entry=SetMagickInfo("PS3");
@@ -402,7 +402,7 @@ ModuleExport void RegisterPS3Image(void)
entry->description="Adobe Level III PostScript";
entry->seekable_stream=MagickTrue;
entry->module="PS3";
- entry->coder_class=PrimaryCoderClass;
+ entry->coder_class=BrokenCoderClass;
(void) RegisterMagickInfo(entry);
}
Index: GraphicsMagick-1.3.42/config/delegates.mgk.in
===================================================================
--- GraphicsMagick-1.3.42.orig/config/delegates.mgk.in
+++ GraphicsMagick-1.3.42/config/delegates.mgk.in
@@ -76,27 +76,27 @@
<delegate decode="dot" command='"@DOTDecodeDelegate@" -Tps "%i" -o "%o"' />
<delegate decode="dvi" command='"@DVIDecodeDelegate@" -q -o "%o" "%i"' />
<delegate decode="edit" stealth="True" command='"@EditorDelegate@" -title "Edit Image Comment" -e vi "%o"' />
- <delegate decode="eps" encode="pdf" mode="bi" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPDFDevice@ "-sOutputFile=%o" -- "%i" -c quit' />
- <delegate decode="eps" encode="ps" mode="bi" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPSDevice@ "-sOutputFile=%o" -- "%i" -c quit' />
+ <!--delegate decode="eps" encode="pdf" mode="bi" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPDFDevice@ "-sOutputFile=%o" -- "%i" -c quit' /-->
+ <!--delegate decode="eps" encode="ps" mode="bi" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPSDevice@ "-sOutputFile=%o" -- "%i" -c quit' /-->
<delegate decode="fig" command='"@FIGDecodeDelegate@" -L ps "%i" "%o"' />
<!-- Read monochrome Postscript, EPS, and PDF -->
- <delegate decode="gs-mono" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSMonoDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
+ <!--delegate decode="gs-mono" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSMonoDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' /-->
<!-- Read grayscale Postscript, EPS, and PDF -->
- <delegate decode="gs-gray" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSGrayDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
+ <!--delegate decode="gs-gray" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSGrayDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' /-->
<!-- Read colormapped Postscript, EPS, and PDF -->
- <delegate decode="gs-palette" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPaletteDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
+ <!--delegate decode="gs-palette" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPaletteDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' /-->
<!-- Read color Postscript, EPS, and PDF -->
- <delegate decode="gs-color" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSColorDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
+ <!--delegate decode="gs-color" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSColorDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' /-->
<!-- Read color+alpha Postscript, EPS, and PDF -->
- <delegate decode="gs-color+alpha" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSColorAlphaDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
+ <!--delegate decode="gs-color+alpha" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSColorAlphaDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' /-->
<!-- Read CMYK Postscript, EPS, and PDF -->
- <delegate decode="gs-cmyk" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSCMYKDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
+ <!--delegate decode="gs-cmyk" stealth="True" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSCMYKDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' /-->
<!-- Read monochrome PDF using Poppler's pdftoppm -->
<delegate decode="poppler-mono" stealth="True" command='"pdftoppm" "-mono" "-freetype" "yes" "-aa" "yes" "-aaVector" "yes" "-rx" "72" "-ry" "72" "%s" ">" "%s"' />
@@ -119,16 +119,10 @@
<delegate decode="mpeg" command='"@MPEGDecodeDelegate@" -q -b "%i" -f -o3 "%u%%05d"; @GMDelegate@ convert -temporary "%u*.ppm" "miff:%o" ; rm -f "%u"*.ppm ' />
<!-- Write MPEG file using mpeg2encode -->
<delegate encode="mpeg-encode" stealth="True" command='"@MPEGEncodeDelegate@" "%i" "%o"' />
- <!-- Convert PDF to Encapsulated Poscript using Ghostscript -->
- <delegate decode="pdf" encode="eps" mode="bi" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSEPSDevice@ "-sOutputFile=%o" -- "%i" -c quit' />
- <!-- Convert PDF to Postcript using Ghostscript -->
- <delegate decode="pdf" encode="ps" mode="bi" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPSDevice@ "-sOutputFile=%o" -- "%i" -c quit' />
<!-- Convert PNM file to IFF ILBM format using ppmtoilbm -->
<delegate decode="pnm" encode="ilbm" mode="encode" command='"@ILBMEncodeDelegate@" -24if "%i" > "%o"' />
<delegate decode="pnm" encode="launch" mode="encode" command='"@LaunchDelegate@" "%i"' />
<delegate decode="pnm" encode="win" mode="encode" command='"@GMDelegate@" display -immutable "%i"' />
- <delegate decode="ps" encode="eps" mode="bi" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSEPSDevice@ "-sOutputFile=%o" -- "%i" -c quit' />
- <delegate decode="ps" encode="pdf" mode="bi" command='"@PSDelegate@" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPDFDevice@ "-sOutputFile=%o" -- "%i" -c quit' />
<delegate decode="ps" encode="print" mode="encode" command='"@PrintDelegate@" "%i"' />
<!-- Read HTML file -->
<delegate decode="shtml" command='"@HTMLDecodeDelegate@" -U -o "%o" "%i"' />
Index: GraphicsMagick-1.3.42/Makefile.in
===================================================================
--- GraphicsMagick-1.3.42.orig/Makefile.in
+++ GraphicsMagick-1.3.42/Makefile.in
@@ -4338,7 +4338,6 @@ TESTS_TESTS = \
tests/rwfile.tap \
tests/rwfile_sized.tap \
tests/rwfile_miff.tap \
- tests/rwfile_pdf.tap \
tests/rwfile_deep.tap
TESTS_EXTRA_DIST = \
Index: GraphicsMagick-1.3.42/tests/rwblob.tap
===================================================================
--- GraphicsMagick-1.3.42.orig/tests/rwblob.tap
+++ GraphicsMagick-1.3.42/tests/rwblob.tap
@@ -10,7 +10,7 @@ rwblob=./rwblob
check_types='bilevel gray pallette truecolor'
# Number of tests we plan to run
-test_plan_fn 213
+test_plan_fn 205
# ART format
for type in ${check_types}
@@ -68,18 +68,6 @@ do
test_command_fn "DPX ${type}" ${MEMCHECK} ${rwblob} "${SRCDIR}/input_${type}.miff" DPX
done
-# EPDF format
-for type in ${check_types}
-do
- test_command_fn "EPDF ${type}" -F 'PS' ${MEMCHECK} ${rwblob} "${SRCDIR}/input_${type}.miff" EPDF
-done
-
-# EPT format
-for type in ${check_types}
-do
- test_command_fn "EPT ${type}" -F 'PS TIFF' ${MEMCHECK} ${rwblob} "${SRCDIR}/input_${type}.miff" EPT
-done
-
# FAX format
for type in ${check_types}
do
Index: GraphicsMagick-1.3.42/tests/rwfile.tap
===================================================================
--- GraphicsMagick-1.3.42.orig/tests/rwfile.tap
+++ GraphicsMagick-1.3.42/tests/rwfile.tap
@@ -12,7 +12,7 @@ check_types='bilevel gray pallette truec
check_types_noone='bilevel gray pallette truecolor'
# Number of tests we plan to run
-test_plan_fn 838 # 828
+test_plan_fn 788 # 828
# ART format
for type in ${check_types}
@@ -84,48 +84,6 @@ do
test_command_fn "DPX ${type} (stdio)" ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" DPX
done
-# EPDF format
-for type in ${check_types}
-do
- test_command_fn "EPDF ${type}" -F 'PS' ${MEMCHECK} ${rwfile} -filespec "out_${type}_%d" "${SRCDIR}/input_${type}.miff" EPDF
- #test_command_fn "EPDF ${type} (stdio)" -F 'PS' ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" EPDF
-done
-
-# EPSF format
-for type in ${check_types}
-do
- test_command_fn "EPSF ${type}" -F 'PS' ${MEMCHECK} ${rwfile} -filespec "out_${type}_%d" "${SRCDIR}/input_${type}.miff" EPSF
- #test_command_fn "EPSF ${type} (stdio)" -F 'PS' ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" EPSF
-done
-
-# EPSI format
-for type in ${check_types}
-do
- test_command_fn "EPSI ${type}" -F 'PS' ${MEMCHECK} ${rwfile} -filespec "out_${type}_%d" "${SRCDIR}/input_${type}.miff" EPSI
- #test_command_fn "EPSI ${type} (stdio)" -F 'PS' ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" EPSI
-done
-
-# EPI format
-for type in ${check_types}
-do
- test_command_fn "EPI ${type}" -F 'PS' ${MEMCHECK} ${rwfile} -filespec "out_${type}_%d" "${SRCDIR}/input_${type}.miff" EPI
- #test_command_fn "EPI ${type} (stdio)" -F 'PS' ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" EPI
-done
-
-# EPS format
-for type in ${check_types}
-do
- test_command_fn "EPS ${type}" -F 'PS' ${MEMCHECK} ${rwfile} -filespec "out_${type}_%d" "${SRCDIR}/input_${type}.miff" EPS
- #test_command_fn "EPS ${type} (stdio)" -F 'PS' ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" EPS
-done
-
-# EPT format
-for type in ${check_types}
-do
- test_command_fn "EPT ${type}" -F 'PS TIFF' ${MEMCHECK} ${rwfile} -filespec "out_${type}_%d" "${SRCDIR}/input_${type}.miff" EPT
- #test_command_fn "EPT ${type} (stdio)" -F 'PS TIFF' ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" EPT
-done
-
# FAX format
for type in ${check_types}
do
@@ -298,13 +256,6 @@ do
test_command_fn "PCX ${type} (stdio)" ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" PCX
done
-# PDF format
-for type in ${check_types}
-do
- test_command_fn "PDF ${type}" -F PS ${MEMCHECK} ${rwfile} -filespec "out_${type}_%d" "${SRCDIR}/input_${type}.miff" PDF
- #test_command_fn "PDF ${type} (stdio)" -F PS ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" PDF
-done
-
# PGM format
for type in ${check_types}
do
@@ -364,27 +315,6 @@ do
done
done
-# PS format
-for type in ${check_types}
-do
- test_command_fn "PS ${type}" -F PS ${MEMCHECK} ${rwfile} -filespec "out_${type}_%d" "${SRCDIR}/input_${type}.miff" PS
- #test_command_fn "PS ${type} (stdio)" -F PS ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" PS
-done
-
-# PS2 format
-for type in ${check_types}
-do
- test_command_fn "PS2 ${type}" -F PS ${MEMCHECK} ${rwfile} -filespec "out_${type}_%d" "${SRCDIR}/input_${type}.miff" PS2
- #test_command_fn "PS2 ${type} (stdio)" -F PS ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" PS2
-done
-
-# PS3 format
-for type in ${check_types}
-do
- test_command_fn "PS3 ${type}" -F PS ${MEMCHECK} ${rwfile} -filespec "out_${type}_%d" "${SRCDIR}/input_${type}.miff" PS3
- #test_command_fn "PS3 ${type} (stdio)" -F PS ${MEMCHECK} ${rwfile} -stdio -filespec "out_${type}_stdio_%d" "${SRCDIR}/input_${type}.miff" PS3
-done
-
# PSD format
for type in ${check_types}
do

View File

@ -0,0 +1,13 @@
Index: GraphicsMagick-1.3.31/PerlMagick/Makefile.PL.in
===================================================================
--- GraphicsMagick-1.3.31.orig/PerlMagick/Makefile.PL.in 2018-12-19 11:03:59.273709484 +0100
+++ GraphicsMagick-1.3.31/PerlMagick/Makefile.PL.in 2018-12-19 11:06:05.822305744 +0100
@@ -78,7 +78,7 @@ WriteMakefile
'INSTALLBIN' => $magick_BIN_DIR,
# Library specification
- 'LIBS' => ["-L$magick_LIB_DIR $magick_LDFLAGS $magick_API_LIBS"],
+ 'LIBS' => ["-L$magick_LIB_DIR -L../magick/.libs $magick_LDFLAGS $magick_API_LIBS"],
# Perl binary name (if a Perl binary is built)
'MAP_TARGET' => 'PerlMagick',

1660
GraphicsMagick.changes Normal file

File diff suppressed because it is too large Load Diff

356
GraphicsMagick.spec Normal file
View File

@ -0,0 +1,356 @@
#
# spec file for package GraphicsMagick
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define asan_build 0
%define debug_build 0
%define quant 16
%define base_version 1.3
%define so_ver 3
%define pp_so_ver 12
%define wand_so_ver 2
Name: GraphicsMagick
Version: 1.3.42
Release: 0
Summary: Viewer and Converter for Images
License: MIT
Group: Productivity/Graphics/Convertors
URL: http://www.GraphicsMagick.org/
Source: https://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/%{version}/%{name}-%{version}.tar.xz
Patch0: GraphicsMagick-perl-linkage.patch
Patch1: GraphicsMagick-disable-insecure-coders.patch
BuildRequires: cups-client
BuildRequires: dcraw
BuildRequires: gcc-c++
BuildRequires: ghostscript
BuildRequires: ghostscript-fonts-std
BuildRequires: libjbig-devel
BuildRequires: libjpeg-devel
BuildRequires: libltdl-devel
BuildRequires: libwmf-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libwebp)
BuildRequires: pkgconfig(libwebpmux)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(zlib)
%if 0%{?suse_version} > 1500
BuildRequires: pkgconfig(libjxl)
%endif
%description
GraphicsMagick provides an image manipulation and translation
utility. It is capable of displaying still images and animations
using the X Window system which provides an interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. It can read and write over 88 image
formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, andPhoto CD.
It also allows to resize, rotate, sharpen, color reduce, or add
special effects to an image and to save the result to any supported
format. GraphicsMagick may be used to create animated or transparent
.gifs, to composite images, and to create thumbnail images.
This package is compiled with Q%{quant}, which means that it provides better
performance on %{quant} bit images and less.
%package -n libGraphicsMagick-Q%{quant}-%{so_ver}
Summary: The GraphicsMagick image conversion runtime library
Group: System/Libraries
Requires: libGraphicsMagick3-config = %{version}
%description -n libGraphicsMagick-Q%{quant}-%{so_ver}
GraphicsMagick provides an image manipulation and translation utility
and library. It can read and write over 88 image formats, including
JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, andPhoto CD. It also allows to
resize, rotate, sharpen, color reduce, or add special effects to an
image and to save the result to any supported format. GraphicsMagick
may be used to create animated or transparent .gifs, to composite
images, and to create thumbnail images.
This package is compiled with Q%{quant}, that means it provides better
performance on %{quant} and less bit images.
%package -n libGraphicsMagick%{so_ver}-config
Summary: Configuration for the GraphicsMagick image conversion library
Group: System/Libraries
# %{_libdir}/GraphicsMagick-*/config/type-ghostscript.mgk references fonts
# shipped as part of ghostscript-fonts-std (boo#1216604)
Requires: ghostscript-fonts-std
%description -n libGraphicsMagick%{so_ver}-config
GraphicsMagick provides an image manipulation and translation utility
and library. It can read and write over 88 image formats, including
JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, andPhoto CD. It also allows to
resize, rotate, sharpen, color reduce, or add special effects to an
image and to save the result to any supported format. GraphicsMagick
may be used to create animated or transparent .gifs, to composite
images, and to create thumbnail images.
This package contains GraphicsMagick library configuration files.
%package -n libGraphicsMagickWand-Q%{quant}-%{wand_so_ver}
Summary: Runtime library for the GraphicsMagick image conversion library
Group: System/Libraries
%description -n libGraphicsMagickWand-Q%{quant}-%{wand_so_ver}
GraphicsMagick provides an image manipulation and translation utility
and library. It can read and write over 88 image formats, including
JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, andPhoto CD. It also allows to
resize, rotate, sharpen, color reduce, or add special effects to an
image and to save the result to any supported format. GraphicsMagick
may be used to create animated or transparent .gifs, to composite
images, and to create thumbnail images.
This package is compiled with Q%{quant}, that means it provides better
performance on %{quant} and less bit images.
%package devel
Summary: Development files for the GraphicsMagick C language API
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libGraphicsMagick-Q%{quant}-%{so_ver} = %{version}
Requires: libGraphicsMagickWand-Q%{quant}-%{wand_so_ver} = %{version}
%description devel
GraphicsMagick provides an image manipulation and translation utility
and library. It can read and write over 88 image formats, including
JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, andPhoto CD. It also allows to
resize, rotate, sharpen, color reduce, or add special effects to an
image and to save the result to any supported format. GraphicsMagick
may be used to create animated or transparent .gifs, to composite
images, and to create thumbnail images.
%package -n perl-GraphicsMagick
Summary: Perl interface for the GraphicsMagick image conversion library
Group: Development/Languages/Perl
Requires: %{name} = %{version}
Requires: perl = %{perl_version}
%description -n perl-GraphicsMagick
GraphicsMagick provides an image manipulation and translation utility
and library. It can read and write over 88 image formats, including
JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, andPhoto CD. It also allows to
resize, rotate, sharpen, color reduce, or add special effects to an
image and to save the result to any supported format. GraphicsMagick
may be used to create animated or transparent .gifs, to composite
images, and to create thumbnail images.
This package contains perl interface to GraphicsMagick library.
%package -n libGraphicsMagick++-Q%{quant}-%{pp_so_ver}
Summary: C++ interface for the GraphisMagick image conversion library
Group: System/Libraries
%description -n libGraphicsMagick++-Q%{quant}-%{pp_so_ver}
GraphicsMagick provides an image manipulation and translation utility
and library. It can read and write over 88 image formats, including
JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, andPhoto CD. It also allows to
resize, rotate, sharpen, color reduce, or add special effects to an
image and to save the result to any supported format. GraphicsMagick
may be used to create animated or transparent .gifs, to composite
images, and to create thumbnail images.
This subpackage contains C++ interface to GraphicsMagick library.
%package -n libGraphicsMagick++-devel
Summary: Development files for the GraphicsMagick C++ language API
Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version}
Requires: c++_compiler
Requires: libGraphicsMagick++-Q%{quant}-%{pp_so_ver} = %{version}
Provides: GraphicsMagick-C++-devel
Obsoletes: GraphicsMagick-C++-devel <= 1.1.7
%description -n libGraphicsMagick++-devel
GraphicsMagick provides an image manipulation and translation utility
and library. It can read and write over 88 image formats, including
JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, andPhoto CD. It also allows to
resize, rotate, sharpen, color reduce, or add special effects to an
image and to save the result to any supported format. GraphicsMagick
may be used to create animated or transparent .gifs, to composite
images, and to create thumbnail images.
%prep
%setup -q
%autopatch -p1
%build
# This shouldn't be there yet.
rm -f PerlMagick/Makefile.PL
%if !%{debug_build}
export CFLAGS="%{optflags} -fPIE"
%else
export CFLAGS="%{optflags} -O0"
export CXXFLAGS="%{optflags} -O0"
%endif
%configure --enable-shared --disable-static \
%if !%{debug_build}
--with-modules \
%else
--without-modules \
%endif
--with-frozenpaths \
--without-dps \
--without-jp2 \
--without-perl \
--without-trio \
--without-zstd \
--with-magick-plus-plus \
--with-quantum-depth=%{quant} \
--enable-quantum-library-names \
--docdir=%{_defaultdocdir}/%{name} \
--with-x \
--x-libraries=%{_libdir} \
--x-includes=%{_includedir}
%if %{asan_build}
sed -i -e 's/\(^CFLAGS.*\)/\1 -fsanitize=address/' \
-e 's/\(^LIBS =.*\)/\1 -lasan/' \
Makefile
%endif
# sanity check to prevent ghostscript support from being reenabled
# for reasoning see bsc#1122792
grep -q -- -DHasGS Makefile && GS_ENABLED=1
if [ ! -z "$GS_ENABLED" ]; then
echo "Refusing to build with ghostscript support (-DHasGS)" 1>&2
echo "See bsc#1122792 for the security implications" 1>&2
exit 1
fi
%if !%{debug_build}
%make_build LDFLAGS="-pie"
%else
%make_build
%endif
cd PerlMagick
perl Makefile.PL
%make_build LD_RUN_PATH="%{_libdir}"
%install
%make_install
rm -f %{buildroot}%{_libdir}/libGraphicsMagick.la
rm -f %{buildroot}%{_libdir}/libGraphicsMagick++.la
rm -f %{buildroot}%{_libdir}/libGraphicsMagickWand.la
cp ChangeLog* *.txt %{buildroot}/%{_defaultdocdir}/%{name}
cd PerlMagick
make DESTDIR=%{buildroot} LD_RUN_PATH="%{_libdir}" install_vendor
%perl_process_packlist
# Remove unpackaged files.
rm -f `find %{buildroot}%{_libdir}/perl*/ -name perllocal.pod -type f`
rm -f `find %{buildroot}%{_libdir}/perl*/ -name .packlist -type f`
# perl modules are in lib even on 64 bit arch
rm -f `find %{buildroot}%{_prefix}/lib/perl*/ -name perllocal.pod -type f`
rm -f `find %{buildroot}%{_prefix}/lib/perl*/ -name .packlist -type f`
rm -f %{buildroot}%{_localstatedir}/adm/perl-modules/GraphicsMagick
%check
%if %{asan_build}
# ASAN needs /proc to be mounted
exit 0
%endif
%make_build check
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/magick/.libs:$PWD/wand/.libs
export MAGICK_CODER_MODULE_PATH=$PWD/coders/.libs
export MAGICK_CONFIGURE_PATH=$PWD/config
cd PerlMagick
# bsc#1105592
rm -r t/ps
%make_build test
%post -n libGraphicsMagick-Q%{quant}-%{so_ver} -p /sbin/ldconfig
%postun -n libGraphicsMagick-Q%{quant}-%{so_ver} -p /sbin/ldconfig
%post -n libGraphicsMagickWand-Q%{quant}-%{wand_so_ver} -p /sbin/ldconfig
%postun -n libGraphicsMagickWand-Q%{quant}-%{wand_so_ver} -p /sbin/ldconfig
%post -n libGraphicsMagick++-Q%{quant}-%{pp_so_ver} -p /sbin/ldconfig
%postun -n libGraphicsMagick++-Q%{quant}-%{pp_so_ver} -p /sbin/ldconfig
%files
%docdir %{_defaultdocdir}/%{name}
%{_defaultdocdir}/%{name}
%doc %{_datadir}/%{name}-%{version}
%exclude %{_datadir}/%{name}-%{version}/config
%attr(755, root, root) %{_bindir}/gm
%{_mandir}/man1/gm.1%{?ext_man}
%{_mandir}/man4/*%{ext_man}
%{_mandir}/man5/*%{ext_man}
%files -n libGraphicsMagick-Q%{quant}-%{so_ver}
%{_libdir}/lib%{name}-Q%{quant}.so.*
%dir %{_libdir}/%{name}-%{version}
%if !%{debug_build}
%dir %{_libdir}/%{name}-%{version}/modules-Q%{quant}
%dir %{_libdir}/%{name}-%{version}/modules-Q%{quant}/coders
%dir %{_libdir}/%{name}-%{version}/modules-Q%{quant}/filters
%{_libdir}/%{name}-%{version}/modules-Q%{quant}/*/*.so
%{_libdir}/%{name}-%{version}/modules-Q%{quant}/*/*.la
%endif
%files -n libGraphicsMagick%{so_ver}-config
%dir %{_libdir}/%{name}-%{version}/config
%{_libdir}/%{name}-%{version}/config/*.mgk
%dir %{_datadir}/%{name}-%{version}
%{_datadir}/%{name}-%{version}/config
%files -n libGraphicsMagickWand-Q%{quant}-%{wand_so_ver}
%{_libdir}/lib%{name}Wand-Q%{quant}.so.*
%files devel
%dir %{_includedir}/%{name}
%dir %{_includedir}/%{name}/wand
%{_includedir}/%{name}/wand/*
%dir %{_includedir}/%{name}/magick
%{_includedir}/%{name}/magick/*
%{_libdir}/lib%{name}.so
%{_libdir}/lib%{name}Wand.so
%if !%{debug_build}
%dir %{_libdir}/%{name}-%{version}/modules-Q%{quant}
%endif
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{name}Wand.pc
%attr(755, root, root) %{_bindir}/%{name}-config
%attr(755, root, root) %{_bindir}/%{name}Wand-config
%{_mandir}/man1/%{name}-config.1%{?ext_man}
%{_mandir}/man1/%{name}Wand-config.1%{?ext_man}
%files -n perl-GraphicsMagick
%dir %{perl_vendorarch}/Graphics
%dir %{perl_vendorarch}/auto/Graphics
%dir %{perl_vendorarch}/auto/Graphics/Magick
%{perl_vendorarch}/Graphics/Magick.pm
%{perl_vendorarch}/auto/Graphics/Magick/*
%{_mandir}/man3/*%{ext_man}
%files -n libGraphicsMagick++-Q%{quant}-%{pp_so_ver}
%{_libdir}/lib%{name}++-Q%{quant}.so.*
%files -n libGraphicsMagick++-devel
%dir %{_includedir}/%{name}
%dir %{_includedir}/%{name}/Magick++
%{_includedir}/%{name}/Magick++.h
%{_includedir}/%{name}/Magick++/*
%{_libdir}/lib%{name}++.so
%{_libdir}/pkgconfig/%{name}++.pc
%attr(755, root, root) %{_bindir}/%{name}++-config
%{_mandir}/man1/%{name}++-config.1%{?ext_man}
%changelog