Cosmetic changes in the spec-file (closes rhbz #803928 and #817950)

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This commit is contained in:
Peter Lemenkov 2012-07-21 23:13:35 +04:00
parent 1ec2787d2a
commit 962f812cf1
6 changed files with 95 additions and 57 deletions

View File

@ -1,15 +0,0 @@
diff -ru autotrace-0.31.1.orig/input-magick.c autotrace-0.31.1/input-magick.c
--- autotrace-0.31.1.orig/input-magick.c 2009-03-02 12:08:45.000000000 +0000
+++ autotrace-0.31.1/input-magick.c 2009-03-02 12:12:21.000000000 +0000
@@ -83,7 +83,11 @@
for(j=0,runcount=0,point=0;j<image->rows;j++)
for(i=0;i<image->columns;i++) {
+#if (MagickLibVersion < 0x0645) || (MagickLibVersion >= 0x0649)
p=GetOnePixel(image,i,j);
+#else
+ GetOnePixel(image,i,j,pixel);
+#endif
AT_BITMAP_BITS(bitmap)[point++]=pixel->red; /* if gray: red=green=blue */
if(np==3) {
AT_BITMAP_BITS(bitmap)[point++]=pixel->green;

View File

@ -0,0 +1,29 @@
From 296538ef2754df0c6e704ac172854816d4ff5cd2 Mon Sep 17 00:00:00 2001
From: Caolan McNamara <caolanm@fedoraproject.org>
Date: Mon, 2 Mar 2009 12:21:34 +0000
Subject: [PATCH 1/3] Modify GetOnePixel usage to build against current
ImageMagick api
---
input-magick.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/input-magick.c b/input-magick.c
index 51c6409..bc36b8f 100644
--- a/input-magick.c
+++ b/input-magick.c
@@ -83,7 +83,11 @@ at_bitmap_type input_magick_reader(at_string filename,
for(j=0,runcount=0,point=0;j<image->rows;j++)
for(i=0;i<image->columns;i++) {
+#if (MagickLibVersion < 0x0645) || (MagickLibVersion >= 0x0649)
p=GetOnePixel(image,i,j);
+#else
+ GetOnePixel(image,i,j,pixel);
+#endif
AT_BITMAP_BITS(bitmap)[point++]=pixel->red; /* if gray: red=green=blue */
if(np==3) {
AT_BITMAP_BITS(bitmap)[point++]=pixel->green;
--
1.7.11.2

View File

@ -0,0 +1,31 @@
From c3410ede752b3b0a092a2a4d196f4a6ccf8c3a10 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <peter@fedoraproject.org>
Date: Mon, 27 Jul 2009 14:20:46 +0000
Subject: [PATCH 2/3] Fixed underquoted AM_PATH_AUTOTRACE definition
See rhbz #477980 for the details:
* https://bugzilla.redhat.com/477980
Reported-by: Jerry James <loganjerry@gmail.com>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
autotrace.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/autotrace.m4 b/autotrace.m4
index 4b16a77..11d6276 100644
--- a/autotrace.m4
+++ b/autotrace.m4
@@ -4,7 +4,7 @@
dnl AM_PATH_AUTOTRACE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test to see if libautotrace is installed, and define AUTOTRACE_CFLAGS, LIBS
dnl
-AC_DEFUN(AM_PATH_AUTOTRACE,
+AC_DEFUN([AM_PATH_AUTOTRACE],
[dnl
dnl Get the cflags and libraries from the autotrace-config script
dnl
--
1.7.11.2

View File

@ -1,6 +1,17 @@
--- input-png.c.orig 2012-03-02 09:30:00.958350697 -0600
+++ input-png.c 2012-03-02 09:32:50.728927667 -0600
@@ -42,7 +42,7 @@
From 56103b05af8a9d67ce158eceab9f7c984b38eabb Mon Sep 17 00:00:00 2001
From: Jon Ciesla <limburgher@gmail.com>
Date: Fri, 2 Mar 2012 09:39:36 -0600
Subject: [PATCH 3/3] libpng fix.
---
input-png.c | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/input-png.c b/input-png.c
index 77b96f1..b631f07 100644
--- a/input-png.c
+++ b/input-png.c
@@ -42,7 +42,7 @@ static png_bytep * read_png(png_structp png_ptr, png_infop info_ptr, at_input_op
static void handle_warning(png_structp png, const at_string message) {
LOG1("PNG warning: %s", message);
@ -9,7 +20,7 @@
message);
/* at_exception_fatal((at_exception_type *)at_png->error_ptr,
"PNG warning"); */
@@ -50,7 +50,7 @@
@@ -50,7 +50,7 @@ static void handle_warning(png_structp png, const at_string message) {
static void handle_error(png_structp png, const at_string message) {
LOG1("PNG error: %s", message);
@ -18,7 +29,7 @@
message);
/* at_exception_fatal((at_exception_type *)at_png->error_ptr,
"PNG error"); */
@@ -157,8 +157,8 @@
@@ -157,8 +157,8 @@ read_png(png_structp png_ptr, png_infop info_ptr, at_input_opts_type * opts)
png_set_strip_16(png_ptr);
png_set_packing(png_ptr);
@ -29,7 +40,7 @@
(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
png_set_expand(png_ptr);
@@ -181,20 +181,10 @@
@@ -181,20 +181,10 @@ read_png(png_structp png_ptr, png_infop info_ptr, at_input_opts_type * opts)
PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
} else
png_set_strip_alpha(png_ptr);
@ -52,3 +63,6 @@
png_read_end(png_ptr, info_ptr);
return png_get_rows(png_ptr, info_ptr);
}
--
1.7.11.2

View File

@ -1,13 +0,0 @@
--- autotrace.m4~ 2002-10-10 23:44:12.000000000 +0300
+++ autotrace.m4 2005-05-22 22:17:06.000000000 +0300
@@ -4,7 +4,7 @@
dnl AM_PATH_AUTOTRACE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test to see if libautotrace is installed, and define AUTOTRACE_CFLAGS, LIBS
dnl
-AC_DEFUN(AM_PATH_AUTOTRACE,
+AC_DEFUN([AM_PATH_AUTOTRACE],
[dnl
dnl Get the cflags and libraries from the autotrace-config script
dnl

View File

@ -1,14 +1,14 @@
Name: autotrace
Version: 0.31.1
Release: 30%{?dist}.1
Release: 31%{?dist}
Summary: Utility for converting bitmaps to vector graphics
Group: Applications/Multimedia
License: GPLv2+ and LGPLv2+
URL: http://autotrace.sourceforge.net/
Source0: http://dl.sf.net/autotrace/autotrace-0.31.1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: http://download.sf.net/autotrace/autotrace-0.31.1.tar.gz
Patch1: autotrace-0001-Modify-GetOnePixel-usage-to-build-against-current-Im.patch
Patch2: autotrace-0002-Fixed-underquoted-AM_PATH_AUTOTRACE-definition.patch
Patch3: autotrace-0003-libpng-fix.patch
BuildRequires: ImageMagick-devel
BuildRequires: libpng-devel > 2:1.2
BuildRequires: libexif-devel
@ -20,9 +20,6 @@ BuildRequires: freetype-devel
#BuildRequires: pstoedit-devel
BuildConflicts: pstoedit-devel
Patch0: autotrace-0.31.1-GetOnePixel.patch
Patch1: autotrace-aclocal18.patch
Patch2: autotrace-0.31.1-libpng15.patch
%description
AutoTrace is a program for converting bitmaps to vector graphics.
@ -32,9 +29,9 @@ supported by ImageMagick, whereas output can be produced in
Postscript, SVG, xfig, SWF, and others.
%package devel
Summary: Header files and static libraries for autotrace
Summary: Header files for autotrace
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
Requires: ImageMagick-devel
#Requires: pstoedit-devel
@ -46,9 +43,9 @@ This package contains header files and development libraries for autotrace.
%prep
%setup -q
%patch0 -p1 -b .GetOnePixel
%patch1 -p0 -b .aclocal18
%patch2 -p0 -b .libpng15
%patch1 -p1 -b .GetOnePixel
%patch2 -p1 -b .aclocal18
%patch3 -p1 -b .libpng15
%build
%configure
@ -56,17 +53,11 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
@ -74,23 +65,24 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING COPYING.LIB ChangeLog FAQ NEWS README THANKS TODO
%{_bindir}/autotrace
%{_libdir}/*.so.*
%{_mandir}/man[^3]/*
%files devel
%defattr(-,root,root,-)
%doc HACKING
%{_bindir}/autotrace-config
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/pkgconfig/autotrace.pc
%{_includedir}/autotrace/
%{_datadir}/aclocal/*.m4
%{_datadir}/aclocal/autotrace.m4
%changelog
* Sat Jul 21 2012 Peter Lemenkov <lemenkov@gmail.com> - 0.31.1-31
- Cosmetic changes in the spec-file (closes rhbz #803928 and #817950)
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.31.1-30.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild