summaryrefslogtreecommitdiff
path: root/graphics/autotrace
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/autotrace')
-rw-r--r--graphics/autotrace/autotrace.SlackBuild5
-rw-r--r--graphics/autotrace/autotrace.info2
-rw-r--r--graphics/autotrace/autotrace.patch115
3 files changed, 120 insertions, 2 deletions
diff --git a/graphics/autotrace/autotrace.SlackBuild b/graphics/autotrace/autotrace.SlackBuild
index 8c70177a3d..a1345b0ad1 100644
--- a/graphics/autotrace/autotrace.SlackBuild
+++ b/graphics/autotrace/autotrace.SlackBuild
@@ -71,13 +71,16 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/autotrace.patch
+autoreconf -vif
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="-lMagickWand-6.Q16 -lMagick++-6.Q16" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
- --without-pstoedit \
+ --with-pstoedit \
--enable-static=no \
--enable-shared=yes \
--build=$ARCH-slackware-linux
diff --git a/graphics/autotrace/autotrace.info b/graphics/autotrace/autotrace.info
index 8be1f60d2b..b820ae4bc7 100644
--- a/graphics/autotrace/autotrace.info
+++ b/graphics/autotrace/autotrace.info
@@ -5,6 +5,6 @@ DOWNLOAD="http://sourceforge.net/projects/autotrace/files/AutoTrace/0.31.1/autot
MD5SUM="54eabbb38d2076ded6d271e1ee4d0783"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES=""
+REQUIRES="pstoedit"
MAINTAINER="Citizen X"
EMAIL="citizen.anon.x@gmail.com"
diff --git a/graphics/autotrace/autotrace.patch b/graphics/autotrace/autotrace.patch
new file mode 100644
index 0000000000..9cd4bff98e
--- /dev/null
+++ b/graphics/autotrace/autotrace.patch
@@ -0,0 +1,115 @@
+diff -ud autotrace-0.31.1/autotrace-config.in autotrace-0.31.1.patched/autotrace-config.in
+--- autotrace-0.31.1/autotrace-config.in 2002-11-08 19:18:31.000000000 +0100
++++ autotrace-0.31.1.patched/autotrace-config.in 2015-08-31 01:22:03.777617655 +0200
+@@ -4,6 +4,7 @@
+ af_cflags=
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
++libdir=`pkg-config --variable=libdir autotrace`
+
+
+ ##
+@@ -205,7 +206,7 @@
+ #dummy because this should always be selected
+
+ af_cflags="$af_cflags -I@includedir@"
+-af_libs="-L@libdir@ -lautotrace @LIBPNG_LDFLAGS@ @MAGICK_LDFLAGS@ @LIBSWF_LDFLAGS@ @LIBPSTOEDIT_LIBS@ $af_libs"
++af_libs="-L$libdir -lautotrace @LIBPNG_LDFLAGS@ @MAGICK_LDFLAGS@ @LIBSWF_LDFLAGS@ @LIBPSTOEDIT_LIBS@ $af_libs"
+
+
+
+diff -ud autotrace-0.31.1/autotrace.m4 autotrace-0.31.1.patched/autotrace.m4
+--- autotrace-0.31.1/autotrace.m4 2002-10-10 22:44:12.000000000 +0200
++++ autotrace-0.31.1.patched/autotrace.m4 2015-08-31 01:21:28.763826869 +0200
+@@ -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
+diff -ud autotrace-0.31.1/input-bmp.c autotrace-0.31.1.patched/input-bmp.c
+--- autotrace-0.31.1/input-bmp.c 2002-10-10 22:44:08.000000000 +0200
++++ autotrace-0.31.1.patched/input-bmp.c 2015-08-31 01:21:44.767369265 +0200
+@@ -166,7 +166,7 @@
+ /* 36 */
+ Maps = 4;
+ }
+- else if (Bitmap_File_Head.biSize <= 64) /* Probably OS/2 2.x */
++ else if (Bitmap_File_Head.biSize >= 40 && Bitmap_File_Head.biSize <= 64) /* Probably OS/2 2.x */
+ {
+ if (!ReadOK (fd, buffer, Bitmap_File_Head.biSize - 4))
+ {
+diff -ud autotrace-0.31.1/input-magick.c autotrace-0.31.1.patched/input-magick.c
+--- autotrace-0.31.1/input-magick.c 2002-10-29 04:42:05.000000000 +0100
++++ autotrace-0.31.1.patched/input-magick.c 2015-08-31 01:21:23.650426744 +0200
+@@ -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;
+diff -ud autotrace-0.31.1/input-png.c autotrace-0.31.1.patched/input-png.c
+--- autotrace-0.31.1/input-png.c 2002-10-10 22:44:14.000000000 +0200
++++ autotrace-0.31.1.patched/input-png.c 2015-08-31 01:21:33.000548879 +0200
+@@ -42,7 +42,7 @@
+
+ static void handle_warning(png_structp png, const at_string message) {
+ LOG1("PNG warning: %s", message);
+- at_exception_warning((at_exception_type *)png->error_ptr,
++ at_exception_warning((at_exception_type *)png_get_error_ptr(png),
+ message);
+ /* at_exception_fatal((at_exception_type *)at_png->error_ptr,
+ "PNG warning"); */
+@@ -50,7 +50,7 @@
+
+ static void handle_error(png_structp png, const at_string message) {
+ LOG1("PNG error: %s", message);
+- at_exception_fatal((at_exception_type *)png->error_ptr,
++ at_exception_fatal((at_exception_type *)png_get_error_ptr(png),
+ message);
+ /* at_exception_fatal((at_exception_type *)at_png->error_ptr,
+ "PNG error"); */
+@@ -157,8 +157,8 @@
+
+ png_set_strip_16(png_ptr);
+ png_set_packing(png_ptr);
+- if ((png_ptr->bit_depth < 8) ||
+- (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ||
++ if ((png_get_bit_depth(png_ptr, info_ptr) < 8) ||
++ (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) ||
+ (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
+ png_set_expand(png_ptr);
+
+@@ -181,20 +181,10 @@
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
+ } else
+ png_set_strip_alpha(png_ptr);
++ png_set_interlace_handling(png_ptr);
+ png_read_update_info(png_ptr, info_ptr);
+
+-
+- info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr,
+- info_ptr->height * sizeof(png_bytep));
+-#ifdef PNG_FREE_ME_SUPPORTED
+- info_ptr->free_me |= PNG_FREE_ROWS;
+-#endif
+- for (row = 0; row < (int)info_ptr->height; row++)
+- info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
+- png_get_rowbytes(png_ptr, info_ptr));
+-
+- png_read_image(png_ptr, info_ptr->row_pointers);
+- info_ptr->valid |= PNG_INFO_IDAT;
++ png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL);
+ png_read_end(png_ptr, info_ptr);
+ return png_get_rows(png_ptr, info_ptr);
+ }
+