summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoroberon20072015-09-22 00:55:52 +0200
committeroberon20072015-09-22 00:55:52 +0200
commitc42c8728cefbb91e99d823b9aec5d3af9bd75ff1 (patch)
tree6bf496b9d461de397472df3c74c3778e1c6868a5
downloadaur-cnijfilter-mg4100.tar.gz
new
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD126
-rw-r--r--configures.patch168
-rw-r--r--cups.patch36
-rw-r--r--libpng15.patch23
5 files changed, 378 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..9bb21c281f6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = cnijfilter-mg4100
+ pkgdesc = Canon IJ Printer Driver (for mg4100 series)
+ pkgver = 3.60
+ pkgrel = 5
+ url = http://support-au.canon.com.au/contents/AU/EN/0100392802.html
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = findutils
+ makedepends = gawk
+ depends = libpng>=1.2.8
+ depends = libtiff
+ depends = gtk2
+ depends = popt
+ source = http://gdlp01.c-wss.com/gds/8/0100003928/01/cnijfilter-source-3.60-1.tar.gz
+ source = cups.patch
+ source = libpng15.patch
+ source = configures.patch
+ md5sums = 70e412331a21f4b573b4e901c89cee18
+ md5sums = 438586f7386033bff8de318e56779545
+ md5sums = 448241d96048dfc76f7bb7b53f9d7621
+ md5sums = 5100f205bfbd86741679f697ebe64a4b
+
+pkgname = cnijfilter-mg4100
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..cbc97a190b5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,126 @@
+# Maintainer: Bernhard Landauer <oberon@manjaro.org>
+# Maintainer: Pavol Hluchy (Lopo) <lopo at losys dot eu>
+# Changed model to mg4100 from original package cnijfilter-mg6200
+_model=mg4100
+pkgname=cnijfilter-${_model}
+pkgver=3.60
+pkgrel=5
+_pkgver=3.60-1
+pkgdesc="Canon IJ Printer Driver (for ${_model} series)"
+url="http://support-au.canon.com.au/contents/AU/EN/0100392802.html"
+arch=('i686' 'x86_64')
+license=('custom')
+depends=('libpng>=1.2.8' 'libtiff' 'gtk2' 'popt')
+makedepends=('findutils' 'gawk')
+source=("http://gdlp01.c-wss.com/gds/8/0100003928/01/cnijfilter-source-${_pkgver}.tar.gz"
+ 'cups.patch'
+ 'libpng15.patch'
+ 'configures.patch')
+md5sums=('70e412331a21f4b573b4e901c89cee18'
+ '438586f7386033bff8de318e56779545'
+ '448241d96048dfc76f7bb7b53f9d7621'
+ '5100f205bfbd86741679f697ebe64a4b')
+
+
+_getlibdir() {
+ if [ "$CARCH" == "x86_64" ]; then
+ echo libs_bin64
+ else
+ echo libs_bin32
+ fi
+ }
+
+prepare() {
+ cd "${srcdir}/cnijfilter-source-${_pkgver}"
+ patch -p1 < "${startdir}/cups.patch"
+ patch -p1 < "${startdir}/libpng15.patch"
+ patch -p1 < "${startdir}/configures.patch"
+ }
+
+build() {
+ _libdir=$(_getlibdir)
+
+ ## Compile and install ${_model} stuff
+ # ppd file
+ cd "${srcdir}/cnijfilter-source-${_pkgver}/ppd"
+ ./autogen.sh --prefix=/usr --enable-ppdpath=/usr/share/cups/model --program-suffix=${_model}
+ make clean || return 1
+ make || return 1
+ # cnijfilter
+ cd "${srcdir}/cnijfilter-source-${_pkgver}/cnijfilter"
+ ./autogen.sh --prefix=/usr --enable-libpath=/usr/lib/bjlib --enable-binpath=/usr/bin --program-suffix=${_model}
+ make clean || return 1
+ make || return 1
+ # printui
+ cd "${srcdir}/cnijfilter-source-${_pkgver}/printui"
+ ./autogen.sh --prefix=/usr --datadir=/usr/share --program-suffix=${_model}
+ make || true # Needed to avoid errors while building locales
+ make clean || return 1
+ make || return 1
+ # lgmon
+ cd "${srcdir}/cnijfilter-source-${_pkgver}/lgmon"
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --program-suffix=${_model}
+ make clean || return 1
+ make || return 1
+ # cngpijmon
+ cd "${srcdir}/cnijfilter-source-${_pkgver}/cngpijmon"
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --datadir=/usr/share --program-suffix=${_model}
+ make clean || return 1
+ make || return 1
+
+ ## Compile common stuff
+ # libs
+ cd "${srcdir}/cnijfilter-source-${_pkgver}/libs"
+ ./autogen.sh --prefix=/usr
+ make clean || return 1
+ make || return 1
+ # cngpij, pstocanonij, backend
+ for _c in cngpij pstocanonij backend; do
+ cd "${srcdir}/cnijfilter-source-${_pkgver}/${_c}"
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
+ make clean || return 1
+ make || return 1
+ done
+ # 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
+ cd "${srcdir}/cnijfilter-source-${_pkgver}/cngpijmon/cnijnpr"
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin LIBS="-ldl"
+ make clean || return 1
+ make || return 1
+ }
+
+package() {
+ _modelid=`find ${srcdir}/cnijfilter-source-${_pkgver} -type f -name cif${_model}.conf -path '*[\d]*' -printf '%P' \
+ | gawk -F/ '{print $1}'`
+ [ -n "${_modelid}" ] || return 1
+ _libdir=$(_getlibdir)
+
+ for dir in ppd cnijfilter printui lgmon cngpijmon libs cngpij pstocanonij backend backendnet cngpijmon/cnijnpr; do
+ cd "${srcdir}/cnijfilter-source-${_pkgver}/${dir}"
+ make install DESTDIR="${pkgdir}" || return 1
+ done
+
+ # Install ${_model} libraries
+ install -d ${pkgdir}/usr/lib/
+ install -m 755 ${srcdir}/cnijfilter-source-${_pkgver}/${_modelid}/${_libdir}/*so.* ${pkgdir}/usr/lib/
+ install -d ${pkgdir}/usr/lib/bjlib/
+ install -m 644 ${srcdir}/cnijfilter-source-${_pkgver}/${_modelid}/database/* ${pkgdir}/usr/lib/bjlib/
+ # Install common libraries
+ install -m 755 ${srcdir}/cnijfilter-source-${_pkgver}/com/${_libdir}/*so.* ${pkgdir}/usr/lib/
+ install -m 666 ${srcdir}/cnijfilter-source-${_pkgver}/com/ini/* ${pkgdir}/usr/lib/bjlib/
+ # Make symbolic links for libraries
+ cd ${pkgdir}/usr/lib/
+ ln -s libcnnet.so.*.*.* libcnnet.so
+ for _l in cmcm cnclapi cnclbjcmd cnclui ess; do
+ ln -s libcnbp${_l}${_modelid}.so.*.*.* libcnbp${_l}${_modelid}.so
+ done
+ ln -s libcnbpess${_modelid}.so.*.*.* libcnbpo${_modelid}.so
+
+ # Install license file
+ cd ${srcdir}/cnijfilter-source-${_pkgver}
+ install -D LICENSE-cnijfilter-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}EN.txt
+ }
diff --git a/configures.patch b/configures.patch
new file mode 100644
index 00000000000..3972aefdb12
--- /dev/null
+++ b/configures.patch
@@ -0,0 +1,168 @@
+diff -Naur old/backend/configure.in new/backend/configure.in
+--- old/backend/configure.in 2011-02-14 08:27:08.000000000 +0100
++++ new/backend/configure.in 2013-03-19 12:39:23.188481530 +0100
+@@ -1,8 +1,6 @@
+ AC_INIT(src/cnij_backend_common.c)
+ AM_INIT_AUTOMAKE(backend, 3.60-1)
+
+-AM_CONFIG_HEADER(config.h)
+-
+ AC_ARG_ENABLE(progpath)
+ if test "${enable_progpath}" = "" ; then
+ enable_progpath="${ac_default_prefix}/bin"
+diff -Naur old/backendnet/configure.in new/backendnet/configure.in
+--- old/backendnet/configure.in 2011-02-14 08:27:08.000000000 +0100
++++ new/backendnet/configure.in 2013-03-19 12:39:39.761558997 +0100
+@@ -1,8 +1,6 @@
+ AC_INIT(backend/cnijnetlm.c)
+ AM_INIT_AUTOMAKE(backendnet, 3.60-1)
+
+-AM_CONFIG_HEADER(config.h)
+-
+ AC_ARG_ENABLE(progpath)
+ if test "${enable_progpath}" = "" ; then
+ enable_progpath="${ac_default_prefix}/bin"
+diff -Naur old/cngpij/configure.in new/cngpij/configure.in
+--- old/cngpij/configure.in 2011-02-14 08:27:08.000000000 +0100
++++ new/cngpij/configure.in 2013-03-19 12:39:53.104685598 +0100
+@@ -1,8 +1,6 @@
+ AC_INIT(cngpij/bjcups.c)
+ AM_INIT_AUTOMAKE(cngpij, 3.60-1)
+
+-AM_CONFIG_HEADER(config.h)
+-
+ AC_ARG_ENABLE(progpath)
+ if test "${enable_progpath}" = "" ; then
+ enable_progpath="${ac_default_prefix}/bin"
+diff -Naur old/cngpijmon/cnijnpr/config.h.in new/cngpijmon/cnijnpr/config.h.in
+--- old/cngpijmon/cnijnpr/config.h.in 1970-01-01 01:00:00.000000000 +0100
++++ new/cngpijmon/cnijnpr/config.h.in 2013-03-19 12:53:41.398442772 +0100
+@@ -0,0 +1 @@
++/* config.h.in. Generated automatically from configure.in by autoheader. */
+diff -Naur old/cngpijmon/cnijnpr/configure.in new/cngpijmon/cnijnpr/configure.in
+--- old/cngpijmon/cnijnpr/configure.in 2011-03-01 06:52:18.000000000 +0100
++++ new/cngpijmon/cnijnpr/configure.in 2013-03-19 12:40:28.234138444 +0100
+@@ -1,7 +1,7 @@
+ AC_INIT(configure.in)
+ AM_INIT_AUTOMAKE(cnijnpr, 3.60-1)
+
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+
+
+ AC_ARG_ENABLE(libpath)
+diff -Naur old/cngpijmon/configure.in new/cngpijmon/configure.in
+--- old/cngpijmon/configure.in 2011-03-01 06:52:18.000000000 +0100
++++ new/cngpijmon/configure.in 2013-03-19 12:44:29.270305182 +0100
+@@ -18,11 +18,10 @@
+
+
+ AM_INIT_AUTOMAKE(cngpijmon${program_suffix}, 3.60-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 old/cngpijmon/src/config.h.in new/cngpijmon/src/config.h.in
+--- old/cngpijmon/src/config.h.in 1970-01-01 01:00:00.000000000 +0100
++++ new/cngpijmon/src/config.h.in 2013-03-19 12:54:13.694598963 +0100
+@@ -0,0 +1 @@
++/* config.h.in. Generated automatically from configure.in by autoheader. */
+diff -Naur old/cnijfilter/configure.in new/cnijfilter/configure.in
+--- old/cnijfilter/configure.in 2011-03-29 12:49:28.000000000 +0200
++++ new/cnijfilter/configure.in 2013-03-19 12:44:43.860070129 +0100
+@@ -25,7 +25,7 @@
+
+
+ AM_INIT_AUTOMAKE(cif${program_suffix}, 3.60-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 old/lgmon/configure.in new/lgmon/configure.in
+--- old/lgmon/configure.in 2011-03-01 06:43:25.000000000 +0100
++++ new/lgmon/configure.in 2013-03-19 12:45:02.529768998 +0100
+@@ -9,7 +9,7 @@
+ fi
+
+ AM_INIT_AUTOMAKE(lgmon{program_suffix}, 3.60-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 old/lgmon/src/config.h.in new/lgmon/src/config.h.in
+--- old/lgmon/src/config.h.in 1970-01-01 01:00:00.000000000 +0100
++++ new/lgmon/src/config.h.in 2013-03-19 12:54:33.290955885 +0100
+@@ -0,0 +1 @@
++/* config.h.in. Generated automatically from configure.in by autoheader. */
+diff -Naur old/libs/configure.in new/libs/configure.in
+--- old/libs/configure.in 2011-02-14 08:27:08.000000000 +0100
++++ new/libs/configure.in 2013-03-19 12:43:08.148273803 +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 old/printui/configure.in new/printui/configure.in
+--- old/printui/configure.in 2011-02-15 10:10:31.000000000 +0100
++++ new/printui/configure.in 2013-03-19 13:00:44.055089528 +0100
+@@ -9,7 +9,7 @@
+ fi
+
+ AM_INIT_AUTOMAKE(printui${program_suffix}, 3.60-1)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(src/config.h)
+ AM_MAINTAINER_MODE
+
+ AC_DEFINE_UNQUOTED(PACKAGE_PRINTER_MODEL, "${program_suffix}")
+@@ -45,7 +45,6 @@
+
+ AC_ISC_POSIX
+ AC_PROG_CC
+-AM_PROG_CC_STDC
+ AC_HEADER_STDC
+
+ AM_PATH_GTK_2_0(2.6.0, ,
+diff -Naur old/printui/src/config.h.in new/printui/src/config.h.in
+--- old/printui/src/config.h.in 1970-01-01 01:00:00.000000000 +0100
++++ new/printui/src/config.h.in 2013-03-19 12:55:27.570104347 +0100
+@@ -0,0 +1 @@
++/* config.h.in. Generated automatically from configure.in by autoheader. */
+diff -Naur old/pstocanonij/configure.in new/pstocanonij/configure.in
+--- old/pstocanonij/configure.in 2011-02-14 08:27:08.000000000 +0100
++++ new/pstocanonij/configure.in 2013-03-19 12:44:02.444070048 +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/cups.patch b/cups.patch
new file mode 100644
index 00000000000..997b1fe15e5
--- /dev/null
+++ b/cups.patch
@@ -0,0 +1,36 @@
+diff -aur old/backend/src/cnij_backend_common.c new/backend/src/cnij_backend_common.c
+--- old/backend/src/cnij_backend_common.c 2011-02-14 08:27:08.000000000 +0100
++++ new/backend/src/cnij_backend_common.c 2012-09-08 16:50:14.118801365 +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 old/cngpij/cngpij/bjcups.c new/cngpij/cngpij/bjcups.c
+--- old/cngpij/cngpij/bjcups.c 2011-03-22 10:57:29.000000000 +0100
++++ new/cngpij/cngpij/bjcups.c 2012-09-08 16:48:34.042128877 +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 -aur old/cngpijmon/src/bjcupsmon_cups.c new/cngpijmon/src/bjcupsmon_cups.c
+--- old/cngpijmon/src/bjcupsmon_cups.c 2011-03-01 06:52:18.000000000 +0100
++++ new/cngpijmon/src/bjcupsmon_cups.c 2012-09-08 16:49:30.332132152 +0200
+@@ -18,8 +18,10 @@
+ */
+
+ /*** Includes ***/
++#define _IPP_PRIVATE_STRUCTURES 1
+ #include <cups/cups.h>
+ #include <cups/language.h>
++#include <cups/ppd.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <pwd.h>
diff --git a/libpng15.patch b/libpng15.patch
new file mode 100644
index 00000000000..ca808753a92
--- /dev/null
+++ b/libpng15.patch
@@ -0,0 +1,23 @@
+diff -aur old/cnijfilter/src/bjfimage.c new/cnijfilter/src/bjfimage.c
+--- old/cnijfilter/src/bjfimage.c 2011-02-17 02:45:45.000000000 +0100
++++ new/cnijfilter/src/bjfimage.c 2012-03-06 18:34:16.580291794 +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;