summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO42
-rw-r--r--PKGBUILD80
-rw-r--r--cnij.patch12
-rw-r--r--cnijfilter-mp560.install19
-rw-r--r--cups.patch22
-rw-r--r--grayscale.patch15
-rw-r--r--libpng15.patch23
7 files changed, 213 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a5e6f68b069
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,42 @@
+pkgbase = cnijfilter-mp560
+ pkgdesc = Canon IJ Printer Driver (MP560 series)
+ pkgver = 3.20
+ pkgrel = 4
+ url = http://software.canon-europe.com/products/0010756.asp
+ install = cnijfilter-mp560.install
+ arch = i686
+ license = custom
+ makedepends = autoconf>=2.13
+ makedepends = automake>=1.6
+ makedepends = tar
+ makedepends = make
+ makedepends = gcc
+ depends = patch
+ depends = libcups
+ depends = cups
+ depends = popt
+ depends = ghostscript
+ depends = gsfonts
+ depends = atk>=1.9.0
+ depends = gtk2>=2.8.0
+ depends = pango>=1.12.3
+ depends = libpng>=1.2.8
+ depends = libtiff
+ depends = cairo>=1.0.2
+ depends = libxml2>=2.6.24
+ depends = fontconfig>=2.3.0
+ depends = libxinerama
+ conflicts = cnijfilter-common
+ source = http://gdlp01.c-wss.com/gds/7/0100002367/01/cnijfilter-source-3.20-1.tar.gz
+ source = grayscale.patch
+ source = cups.patch
+ source = libpng15.patch
+ source = cnij.patch
+ md5sums = 0a40b46016511d59d1d0a3d3d9a653dd
+ md5sums = f3d01db16494ae9ca16d9be8e9cd193b
+ md5sums = abd0c2ee747e20558adcf327bb3a8633
+ md5sums = e75b117cd7a399c0861c4e8e10c30294
+ md5sums = 20e5efa2627f7176a3aa5984e44f1807
+
+pkgname = cnijfilter-mp560
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a17a5725b72
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Daniel Hillenbrand <codeworkx [at] bbqlinux [dot] org>
+# Modified original script from: Alessio Fachechi
+
+pkgname=cnijfilter-mp560
+pkgver=3.20
+pkgsubver=1
+pkgrel=4
+pkgdesc="Canon IJ Printer Driver (MP560 series)"
+url="http://software.canon-europe.com/products/0010756.asp"
+arch=('i686')
+license=('custom')
+depends=('patch' 'libcups' 'cups' 'popt' 'ghostscript' 'gsfonts' 'atk>=1.9.0' 'gtk2>=2.8.0' 'pango>=1.12.3' 'libpng>=1.2.8' 'libtiff' 'cairo>=1.0.2' 'libxml2>=2.6.24' 'fontconfig>=2.3.0' 'libxinerama')
+makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make' 'gcc')
+conflicts=('cnijfilter-common')
+install=cnijfilter-mp560.install
+
+source=(http://gdlp01.c-wss.com/gds/7/0100002367/01/cnijfilter-source-3.20-1.tar.gz
+ grayscale.patch
+ cups.patch
+ libpng15.patch
+ cnij.patch)
+
+md5sums=('0a40b46016511d59d1d0a3d3d9a653dd'
+ 'f3d01db16494ae9ca16d9be8e9cd193b'
+ 'abd0c2ee747e20558adcf327bb3a8633'
+ 'e75b117cd7a399c0861c4e8e10c30294'
+ '20e5efa2627f7176a3aa5984e44f1807')
+
+prepare() {
+
+ patch -p0 -d ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd < grayscale.patch
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
+ patch -p1 -i ${srcdir}/cups.patch
+ patch -p1 -i ${srcdir}/libpng15.patch
+ patch -p1 -i ${srcdir}/cnij.patch
+
+}
+
+build() {
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/libs
+ ./autogen.sh --prefix=/usr --program-suffix=mp560
+ make
+
+ for _dir in cngpij cnijfilter pstocanonij lgmon backend backendnet cngpijmon/cnijnpr
+ do
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/${_dir}
+ ./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
+ make
+ done
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd
+ ./autogen.sh --prefix=/usr --program-suffix=mp560
+ make
+
+}
+
+package() {
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/libs
+ make install DESTDIR=${pkgdir}
+
+ for _dir in cngpij cnijfilter pstocanonij lgmon backend backendnet cngpijmon/cnijnpr
+ do
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/${_dir}
+ make install DESTDIR=${pkgdir}
+ done
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd
+ make install DESTDIR=${pkgdir}
+
+ cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
+ install -d ${pkgdir}/usr/lib/bjlib
+ install -m 755 360/database/* ${pkgdir}/usr/lib/bjlib
+ install -s -m 755 360/libs_bin/*.so.* ${pkgdir}/usr/lib
+ install -s -m 755 com/libs_bin/*.so.* ${pkgdir}/usr/lib
+ install -D LICENSE-cnijfilter-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}EN.txt
+
+}
diff --git a/cnij.patch b/cnij.patch
new file mode 100644
index 00000000000..2d1b97e9b31
--- /dev/null
+++ b/cnij.patch
@@ -0,0 +1,12 @@
+diff -aur cnijfilter-source-3.20-1/cngpij/cngpij/bjcups.c cnijfilter-source-3.20-1.new/cngpij/cngpij/bjcups.c
+--- cnijfilter-source-3.20-1/cngpij/cngpij/bjcups.c 2009-06-11 06:10:32.000000000 +0200
++++ cnijfilter-source-3.20-1.new/cngpij/cngpij/bjcups.c 2015-01-21 23:07:04.416457760 +0100
+@@ -20,7 +20,7 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif // HAVE_CONFIG_H
+-
++#define _IPP_PRIVATE_STRUCTURES 1
+ #include <cups/cups.h>
+ #include <cups/language.h>
+ #include <cups/ppd.h>
diff --git a/cnijfilter-mp560.install b/cnijfilter-mp560.install
new file mode 100644
index 00000000000..8ca70aa8749
--- /dev/null
+++ b/cnijfilter-mp560.install
@@ -0,0 +1,19 @@
+post_install() {
+ ln -s /usr/lib/cups/filter/pstocanonijmp560 /usr/lib/cups/filter/pstocanonij
+
+ if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig
+ fi
+}
+post_upgrade() {
+ if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig
+ fi
+}
+post_remove() {
+ rm /usr/lib/cups/filter/pstocanonij
+
+ if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig
+ fi
+}
diff --git a/cups.patch b/cups.patch
new file mode 100644
index 00000000000..ca49351ea5c
--- /dev/null
+++ b/cups.patch
@@ -0,0 +1,22 @@
+diff -aur cnijfilter-source-3.20-1/backend/src/cnij_backend_common.c cnijfilter-source-3.20-1.new/backend/src/cnij_backend_common.c
+--- cnijfilter-source-3.20-1/backend/src/cnij_backend_common.c 2009-05-27 07:46:41.000000000 +0200
++++ cnijfilter-source-3.20-1.new/backend/src/cnij_backend_common.c 2011-08-29 10:14:36.237186319 +0200
+@@ -38,6 +38,7 @@
+ // CUPS Header
+ #include <cups/cups.h>
+ #include <cups/ipp.h>
++#include <cups/ppd.h>
+
+ // Header file for CANON
+ #include "cnij_backend_common.h"
+diff -aur cnijfilter-source-3.20-1/cngpijmon/src/bjcupsmon_cups.c cnijfilter-source-3.20-1.new/cngpijmon/src/bjcupsmon_cups.c
+--- cnijfilter-source-3.20-1/cngpijmon/src/bjcupsmon_cups.c 2009-04-24 08:12:49.000000000 +0200
++++ cnijfilter-source-3.20-1.new/cngpijmon/src/bjcupsmon_cups.c 2011-08-29 10:17:27.667192257 +0200
+@@ -19,6 +19,7 @@
+
+ /*** Includes ***/
+ #include <cups/cups.h>
++#include <cups/ppd.h>
+ #include <cups/language.h>
+ #include <sys/types.h>
+ #include <unistd.h>
diff --git a/grayscale.patch b/grayscale.patch
new file mode 100644
index 00000000000..6cb95ffd1ad
--- /dev/null
+++ b/grayscale.patch
@@ -0,0 +1,15 @@
+--- canonmp560.ppd 2010-10-09 11:52:34.706399908 +0200
++++ canonmp560.ppd 2010-10-09 11:57:01.831203052 +0200
+@@ -68,6 +68,12 @@
+ *ColorModel rgb/RGB: "<</cupsColorOrder 0/cupsColorSpace 1/cupsCompression 0/cupsBitsPerColor 8>>setpagedevice"
+ *CloseUI: *ColorModel
+
++*OpenUI *CNGrayscale/Grayscale: Boolean
++*DefaultCNGrayscale: False
++*CNGrayscale True/Yes: True
++*CNGrayscale False/No: False
++*CloseUI: *CNGrayscale
++
+ *OpenUI *PageSize/Page Size: PickOne
+ *DefaultPageSize: A4
+ *PageSize Letter/Letter 8.5"x11" 215.9x279.4mm: "<</CNPageSizeName(Letter)/PageSize[612 792]/ImagingBBox null>>setpagedevice"
diff --git a/libpng15.patch b/libpng15.patch
new file mode 100644
index 00000000000..f5b3a1b13db
--- /dev/null
+++ b/libpng15.patch
@@ -0,0 +1,23 @@
+diff -aur cnijfilter-source-3.20-1/cnijfilter/src/bjfimage.c cnijfilter-source-3.20-1.new/cnijfilter/src/bjfimage.c
+--- cnijfilter-source-3.20-1/cnijfilter/src/bjfimage.c 2009-03-26 06:11:05.000000000 +0100
++++ cnijfilter-source-3.20-1.new/cnijfilter/src/bjfimage.c 2012-02-10 09:33:52.512334139 +0100
+@@ -1520,8 +1520,8 @@
+ short tmpformat;
+ short retbyte = 0;
+ short bpp = 3;
+- long width = 0;
+- long length = 0;
++ png_uint_32 width = 0;
++ png_uint_32 length = 0;
+ long rstep = 0;
+ long RasterLength = 0;
+ long i;
+@@ -1574,7 +1574,7 @@
+ goto onErr;
+ }
+
+- if (setjmp (png_p->jmpbuf))
++ if (setjmp (png_jmpbuf(png_p)))
+ {
+ png_destroy_read_struct(&png_p, &info_p, (png_infopp)NULL);
+ goto onErr;