summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenjiTakahashi2015-07-05 02:48:52 +0200
committerKenjiTakahashi2015-07-05 02:48:52 +0200
commit89e5c09d848f145ca9901c3fee0b0715347d25eb (patch)
treeb2e72ac2fd87151199402b49949e208bc50624b6
downloadaur-89e5c09d848f145ca9901c3fee0b0715347d25eb.tar.gz
3.80-1: Initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD165
-rw-r--r--fix_configures.patch144
-rw-r--r--fix_cups.patch33
-rw-r--r--fix_png.patch23
5 files changed, 388 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..62d662796d0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = cnijfilter-mg4200
+ pkgdesc = Canon IJ Printer Driver (for mg4200 series)
+ pkgver = 3.80
+ pkgrel = 1
+ url = http://support-au.canon.com.au/contents/AU/EN/0100469302.html
+ arch = i686
+ arch = x86_64
+ license = custom
+ depends = popt
+ depends = gtk2
+ depends = cups
+ depends = ghostscript
+ source = http://gdlp01.c-wss.com/gds/3/0100004693/01/cnijfilter-source-3.80-1.tar.gz
+ source = fix_cups.patch
+ source = fix_png.patch
+ source = fix_configures.patch
+ md5sums = b6b92717930021d24bd750d4197bdf3b
+ md5sums = c973834af2962d7ad239811b0b0d1db1
+ md5sums = 5f665042df2175da3629667aaf258782
+ md5sums = d75d20fa9041fff6b5df02cdea9e8732
+
+pkgname = cnijfilter-mg4200
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..162b1b30a7c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,165 @@
+# Maintainer: Karol 'Kenji Takahashi' Wo┼║niak @ kenji.sx
+# Based on a cnijfilter-mg3200 package by morris555
+#
+# [Printer Model Name] [Printer Model ID]
+# ------------------------------------------------------------------
+# mp230 401
+# mg2200 402
+# e510 403
+# mg3200 404
+# mg4200 405
+# ip7200 406
+# mg5400 407
+# mg6300 408
+
+_name=mg4200
+_id=405
+
+pkgname=cnijfilter-${_name}
+pkgver=3.80
+pkgrel=1
+_pkgver=3.80-1
+pkgdesc="Canon IJ Printer Driver (for ${_name} series)"
+url="http://support-au.canon.com.au/contents/AU/EN/0100469302.html"
+arch=('i686' 'x86_64')
+license=('custom')
+depends=('popt' 'gtk2' 'cups' 'ghostscript')
+source=(http://gdlp01.c-wss.com/gds/3/0100004693/01/cnijfilter-source-${_pkgver}.tar.gz
+ fix_cups.patch
+ fix_png.patch
+ fix_configures.patch)
+md5sums=('b6b92717930021d24bd750d4197bdf3b'
+ 'c973834af2962d7ad239811b0b0d1db1'
+ '5f665042df2175da3629667aaf258782'
+ 'd75d20fa9041fff6b5df02cdea9e8732')
+
+if [ "$CARCH" == "x86_64" ]; then
+ _libdir=libs_bin64
+else
+ _libdir=libs_bin32
+fi
+
+build() {
+ ## Apply patches
+ cd ${srcdir}/cnijfilter-source-${_pkgver}
+ patch -p1 -i ${srcdir}/fix_cups.patch || return 1
+ patch -p1 -i ${srcdir}/fix_png.patch || return 1
+ patch -p1 -i ${srcdir}/fix_configures.patch || return 1
+
+ ## Compile model specific stuff
+ # ppd file
+ msg "Compile PPD file..."
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/ppd
+ ./autogen.sh --prefix=/usr --enable-ppdpath=/usr/share/cups/model --program-suffix=${_name}
+ make clean || return 1
+ make || return 1
+ # cnijfilter
+ msg "Compile cnijfilter..."
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/cnijfilter
+ ./autogen.sh --prefix=/usr --enable-libpath=/usr/lib/bjlib --enable-binpath=/usr/bin --program-suffix=${_name}
+ make clean || return 1
+ make || return 1
+ # lgmon
+ msg "Compile lgmon..."
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/lgmon
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --program-suffix=${_name}
+ make clean || return 1
+ make || return 1
+ # cngpijmon
+ msg "Compile cngpijmon..."
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/cngpijmon
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --datadir=/usr/share --program-suffix=${_name}
+ make clean || return 1
+ make || return 1
+
+ ## Compile common stuff
+ # libs
+ msg "Compile libs..."
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/libs
+ ./autogen.sh --prefix=/usr
+ make clean || return 1
+ make || return 1
+ # cngpij
+ msg "Compile cngpij..."
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/cngpij
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
+ make clean || return 1
+ make || return 1
+ # pstocanonij
+ msg "Compile pstocanonij..."
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/pstocanonij
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
+ make clean || return 1
+ make || return 1
+ # backend
+ msg "Compile backend..."
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/backend
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
+ make clean || return 1
+ make || return 1
+ # backendnet
+ msg "Compile backendnet..."
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/backendnet
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin LDFLAGS="-L../../com/${_libdir}"
+ make clean || return 1
+ make || return 1
+ # sm sub process
+ msg "Compile sm sub process..."
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/cngpijmon/cnijnpr
+ ./autogen.sh --prefix=/usr LIBS=-ldl
+ make clean || return 1
+ make || return 1
+}
+
+package() {
+ ## Install model specific stuff
+ # ppd file
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/ppd
+ make install DESTDIR=${pkgdir} || return 1
+ # cnijfilter
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/cnijfilter
+ make install DESTDIR=${pkgdir} || return 1
+ # lgmon
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/lgmon
+ make install DESTDIR=${pkgdir} || return 1
+ # cngpijmon
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/cngpijmon
+ make install DESTDIR=${pkgdir} || return 1
+
+ ## Install common stuff
+ # libs
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/libs
+ make install DESTDIR=${pkgdir} || return 1
+ # cngpij
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/cngpij
+ make install DESTDIR=${pkgdir} || return 1
+ # pstocanonij
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/pstocanonij
+ make install DESTDIR=${pkgdir} || return 1
+ # backend
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/backend
+ make install DESTDIR=${pkgdir} || return 1
+ # backendnet
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/backendnet
+ make install DESTDIR=${pkgdir} || return 1
+ # sm sub process
+ cd ${srcdir}/cnijfilter-source-${_pkgver}/cngpijmon/cnijnpr
+ make install DESTDIR=${pkgdir} || return 1
+
+ ## Install model specific libraries
+ install -d ${pkgdir}/usr/lib/
+ install -d ${pkgdir}/usr/lib/bjlib/
+ cp -d ${srcdir}/cnijfilter-source-${_pkgver}/${_id}/${_libdir}/* ${pkgdir}/usr/lib/
+ cp -d ${srcdir}/cnijfilter-source-${_pkgver}/${_id}/database/* ${pkgdir}/usr/lib/bjlib/
+
+ ## Install common libraries
+ cp -d ${srcdir}/cnijfilter-source-${_pkgver}/com/${_libdir}/* ${pkgdir}/usr/lib/
+ install -m 666 ${srcdir}/cnijfilter-source-${_pkgver}/com/ini/cnnet.ini ${pkgdir}/usr/lib/bjlib/
+
+ ## Install license files
+ cd ${srcdir}/cnijfilter-source-${_pkgver}
+ install -d ${pkgdir}/usr/share/licenses/${pkgname}/
+ install -m 644 LICENSE-* ${pkgdir}/usr/share/licenses/${pkgname}/
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/fix_configures.patch b/fix_configures.patch
new file mode 100644
index 00000000000..0dfb7f55c54
--- /dev/null
+++ b/fix_configures.patch
@@ -0,0 +1,144 @@
+diff -Naur a/backend/configure.in b/backend/configure.in
+--- a/backend/configure.in 2010-02-23 04:57:49.000000000 +0100
++++ b/backend/configure.in 2013-01-12 19:23:48.586029365 +0100
+@@ -1,8 +1,6 @@
+ AC_INIT(src/cnij_backend_common.c)
+ AM_INIT_AUTOMAKE(backend, 3.80-1)
+
+-AM_CONFIG_HEADER(config.h)
+-
+ AC_ARG_ENABLE(progpath)
+ if test "${enable_progpath}" = "" ; then
+ enable_progpath="${ac_default_prefix}/bin"
+diff -Naur a/backendnet/configure.in b/backendnet/configure.in
+--- a/backendnet/configure.in 2010-03-10 03:16:28.000000000 +0100
++++ b/backendnet/configure.in 2013-01-12 19:24:07.482056898 +0100
+@@ -1,8 +1,6 @@
+ AC_INIT(backend/cnijnetlm.c)
+ AM_INIT_AUTOMAKE(backendnet, 3.80-1)
+
+-AM_CONFIG_HEADER(config.h)
+-
+ AC_ARG_ENABLE(progpath)
+ if test "${enable_progpath}" = "" ; then
+ enable_progpath="${ac_default_prefix}/bin"
+diff -Naur a/cngpij/configure.in b/cngpij/configure.in
+--- a/cngpij/configure.in 2010-02-23 04:57:49.000000000 +0100
++++ b/cngpij/configure.in 2013-01-12 19:20:06.640325648 +0100
+@@ -1,8 +1,6 @@
+ AC_INIT(cngpij/bjcups.c)
+ AM_INIT_AUTOMAKE(cngpij, 3.80-1)
+
+-AM_CONFIG_HEADER(config.h)
+-
+ AC_ARG_ENABLE(progpath)
+ if test "${enable_progpath}" = "" ; then
+ enable_progpath="${ac_default_prefix}/bin"
+diff -Naur a/cngpijmon/cnijnpr/config.h.in b/cngpijmon/cnijnpr/config.h.in
+--- a/cngpijmon/cnijnpr/config.h.in 1970-01-01 01:00:00.000000000 +0100
++++ b/cngpijmon/cnijnpr/config.h.in 2013-01-12 19:40:34.119812703 +0100
+@@ -0,0 +1 @@
++/* config.h.in. Generated automatically from configure.in by autoheader. */
+diff -Naur a/cngpijmon/cnijnpr/configure.in b/cngpijmon/cnijnpr/configure.in
+--- a/cngpijmon/cnijnpr/configure.in 2010-03-11 02:33:21.000000000 +0100
++++ b/cngpijmon/cnijnpr/configure.in 2013-01-12 19:40:29.216635732 +0100
+@@ -1,8 +1,7 @@
+ AC_INIT(configure.in)
+ AM_INIT_AUTOMAKE(cnijnpr, 3.80-1)
+
+-AM_CONFIG_HEADER(config.h)
+-
++AC_CONFIG_HEADERS(config.h)
+
+ AC_ARG_ENABLE(libpath)
+ if test "${enable_libpath}" = "" ; then
+diff -Naur a/cngpijmon/configure.in b/cngpijmon/configure.in
+--- a/cngpijmon/configure.in 2010-03-11 02:33:21.000000000 +0100
++++ b/cngpijmon/configure.in 2013-01-12 19:09:22.964507680 +0100
+@@ -18,11 +18,10 @@
+
+
+ AM_INIT_AUTOMAKE(cngpijmon${program_suffix}, 3.80-1)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(src/config.h)
+
+ AC_ISC_POSIX
+ AC_PROG_CC
+-AM_PROG_CC_STDC
+ AC_HEADER_STDC
+
+ AM_PATH_GTK_2_0(2.0.0, ,
+diff -Naur a/cngpijmon/src/config.h.in b/cngpijmon/src/config.h.in
+--- a/cngpijmon/src/config.h.in 1970-01-01 01:00:00.000000000 +0100
++++ b/cngpijmon/src/config.h.in 2013-01-12 19:09:33.604073946 +0100
+@@ -0,0 +1 @@
++/* config.h.in. Generated automatically from configure.in by autoheader. */
+diff -Naur a/cnijfilter/configure.in b/cnijfilter/configure.in
+--- a/cnijfilter/configure.in 2010-03-09 11:51:24.000000000 +0100
++++ b/cnijfilter/configure.in 2013-01-12 18:43:57.922171960 +0100
+@@ -25,7 +25,7 @@
+
+
+ AM_INIT_AUTOMAKE(cif${program_suffix}, 3.80-1)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(src/config.h)
+
+ dnl Checks for programs.
+ AC_ISC_POSIX
+@@ -47,7 +47,6 @@
+ AC_SUBST(ARC)
+
+ AC_PROG_CC
+-AM_PROG_CC_STDC
+
+ dnl Checks for libraries.
+
+diff -Naur a/lgmon/configure.in b/lgmon/configure.in
+--- a/lgmon/configure.in 2010-03-11 02:18:24.000000000 +0100
++++ b/lgmon/configure.in 2013-01-12 19:00:44.964847295 +0100
+@@ -9,7 +9,7 @@
+ fi
+
+ AM_INIT_AUTOMAKE(lgmon{program_suffix}, 3.80-1)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(src/config.h)
+ dnl AM_MAINTAINER_MODE
+
+ AC_DEFINE_UNQUOTED(PACKAGE_PRINTER_MODEL, "${program_suffix}")
+@@ -41,7 +41,6 @@
+ AC_SUBST(ARC)
+
+ AC_PROG_CC
+-AM_PROG_CC_STDC
+ AC_HEADER_STDC
+ AC_PROG_RANLIB
+
+diff -Naur a/lgmon/src/config.h.in b/lgmon/src/config.h.in
+--- a/lgmon/src/config.h.in 1970-01-01 01:00:00.000000000 +0100
++++ b/lgmon/src/config.h.in 2013-01-12 19:02:58.769639063 +0100
+@@ -0,0 +1 @@
++/* config.h.in. Generated automatically from configure.in by autoheader. */
+diff -Naur a/libs/configure.in b/libs/configure.in
+--- a/libs/configure.in 2010-02-23 04:57:49.000000000 +0100
++++ b/libs/configure.in 2013-01-12 19:14:08.053329533 +0100
+@@ -1,8 +1,6 @@
+ AC_INIT(paramlist/paramlist.h)
+ AM_INIT_AUTOMAKE(buftool, 1.0.0)
+
+-AM_CONFIG_HEADER(config.h)
+-
+ # Checks for programs.
+ AC_PROG_CXX
+ AC_PROG_CC
+diff -Naur a/pstocanonij/configure.in b/pstocanonij/configure.in
+--- a/pstocanonij/configure.in 2010-02-23 04:57:49.000000000 +0100
++++ b/pstocanonij/configure.in 2013-01-12 19:23:21.666941082 +0100
+@@ -1,8 +1,6 @@
+ AC_INIT(filter/pstocanonij.c)
+ AM_INIT_AUTOMAKE(pstocanonij, 1.0.0)
+
+-AM_CONFIG_HEADER(config.h)
+-
+ AC_ARG_ENABLE(progpath)
+ if test "${enable_progpath}" = "" ; then
+ enable_progpath="${ac_default_prefix}/bin"
diff --git a/fix_cups.patch b/fix_cups.patch
new file mode 100644
index 00000000000..a8f9cbca40c
--- /dev/null
+++ b/fix_cups.patch
@@ -0,0 +1,33 @@
+diff -Naur a/backend/src/cnij_backend_common.c b/backend/src/cnij_backend_common.c
+--- a/backend/src/cnij_backend_common.c 2010-02-23 04:57:49.000000000 +0100
++++ b/backend/src/cnij_backend_common.c 2012-07-31 13:20:51.050057184 +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 -Naur a/cngpij/cngpij/bjcups.c b/cngpij/cngpij/bjcups.c
+--- a/cngpij/cngpij/bjcups.c 2010-03-15 09:48:58.000000000 +0100
++++ b/cngpij/cngpij/bjcups.c 2012-07-31 13:20:58.126523983 +0200
+@@ -21,6 +21,7 @@
+ #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 -Naur a/cngpijmon/src/bjcupsmon_cups.c b/cngpijmon/src/bjcupsmon_cups.c
+--- a/cngpijmon/src/bjcupsmon_cups.c 2010-05-11 10:49:30.000000000 +0200
++++ b/cngpijmon/src/bjcupsmon_cups.c 2012-07-31 13:20:58.129857221 +0200
+@@ -18,8 +18,9 @@
+ */
+
+ /*** Includes ***/
++#define _IPP_PRIVATE_STRUCTURES 1
+ #include <cups/cups.h>
+ #include <cups/ppd.h>
+ #include <cups/language.h>
diff --git a/fix_png.patch b/fix_png.patch
new file mode 100644
index 00000000000..a8acc59bd3d
--- /dev/null
+++ b/fix_png.patch
@@ -0,0 +1,23 @@
+diff -Naur a/cnijfilter/src/bjfimage.c b/cnijfilter/src/bjfimage.c
+--- a/cnijfilter/src/bjfimage.c 2012-03-17 12:19:45.912118222 +0100
++++ b/cnijfilter/src/bjfimage.c 2012-03-17 12:28:45.100456525 +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;