diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-07-23 11:47:34 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-07-23 11:47:34 +0100 |
commit | 96c18127d9c7d7a753387456363a6f564dbd024d (patch) | |
tree | eae0705ca6b2162fe2e18bcc5641f2385d7ffcdc | |
parent | a682946240648ea27a30e07aaef46d0504e7566c (diff) |
net-print/cnijfilter-drivers : drop (merged into net-print/cnijfilter), net-print/cnijfilter-drivers : version bump
28 files changed, 426 insertions, 573 deletions
diff --git a/eclass/ecnij.eclass b/eclass/ecnij.eclass index 57d599b3..b48714b1 100644 --- a/eclass/ecnij.eclass +++ b/eclass/ecnij.eclass @@ -1,13 +1,14 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: eclass/ecnij.eclass,v 3.4 2016/05/14 19:33:34 Exp $ +# $Header: eclass/ecnij.eclass,v 4.1 2016/11/14 19:33:34 Exp $ # @ECLASS: ecnij.eclass # @MAINTAINER: -# bar-overlay <bar@overlay.org> +# bar-overlay <bar-overlay@noreply.github.com> # @AUTHOR: # Original author: tokiclover <tokiclover@gmail.com> -# @BLURB: Provide a set of functions to get Canon(R) printers/scanners utilities +# @BLURB: Provide a set of functions to get CUPS backends, filters and utilities +# for Canon(R) Pixma/Pixus printer series # @DESCRIPTION: # Exports base functions used by ebuilds written # for net-print/cnijfilter package for canon(r) hardware @@ -17,13 +18,6 @@ _ECNIJ_ECLASS=1 inherit autotools eutils flag-o-matic multilib-build -# @ECLASS-VARIABLE: CANON_PRINTERS -# @DESCRIPTION: -# Global use-expand variable -# -# CANON_PRINTERS="ip90 ip 100" -: ${CANON_PRINTERS:=} - # @ECLASS-VARIABLE: PRINTER_MODEL # @DESCRIPTION: # Array of printer models supported by the ebuild @@ -36,46 +30,47 @@ inherit autotools eutils flag-o-matic multilib-build # PRINTER_ID=(303 253) : ${PRINTER_ID:=} -# @ECLASS-VARIABLE: PRINTER_USE -# @DESCRIPTION: -# Array containing the expanded use flags from PRINTER_MODEL -# PRINTER_USE=(canon_printers_ip{90,100}) -: ${PRINTER_USE:=} - -for card in ${PRINTER_MODEL[@]}; do - has ${card} ${CANON_PRINTERS} && - PRINTER_USE=(${PRINTER_USE[@]} +canon_printers_${card}) || - PRINTER_USE=(${PRINTER_USE[@]} canon_printers_${card}) -done - -IUSE="${IUSE} backends debug +drivers gtk servicetools +usb ${PRINTER_USE[@]}" +IUSE="${IUSE} +cups debug servicetools ${PRINTER_MODEL[@]/#/canon_printers_}" KEYWORDS="~x86 ~amd64" -REQUIRED_USE="${REQUIRED_USE} servicetools? ( gtk ) - || ( drivers backends ) drivers? ( || ( ${PRINTER_USE[@]} ) )" -( (( ${PV:0:1} > 3 )) || ( (( ${PV:0:1} == 3 )) && (( ${PV:2:2} >= 10 )) ) ) && -REQUIRED_USE+=" servicetools? ( net ) backends? ( || ( net usb ) )" || -REQUIRED_USE+=" backends? ( usb )" +REQUIRED_USE="${REQUIRED_USE} + || ( cups ${PRINTER_MODEL[@]/#/canon_printers_} )" +if (( ${PV:0:1} > 3 )) || ( (( ${PV:0:1} == 3 )) && (( ${PV:2:2} >= 10 )) ); then +IUSE="${IUSE} +net +usb" +REQUIRED_USE="${REQUIRED_USE} + servicetools? ( net ) cups? ( || ( net usb ) )" +SLOT="3/${PV}" +else +SLOT="2/${PV}" +fi LICENSE="GPL-2" has net ${IUSE} && LICENSE+=" net? ( CNIJFILTER )" RDEPEND="${RDEPEND} + >=net-print/cups-1.6.0[${MULTILIB_USEDEP}] app-text/ghostscript-gpl dev-libs/glib[${MULTILIB_USEDEP}] dev-libs/popt[${MULTILIB_USEDEP}] - servicetools? ( - gnome-base/libglade[${MULTILIB_USEDEP}] - dev-libs/libxml2[${MULTILIB_USEDEP}] ) media-libs/tiff[${MULTILIB_USEDEP}] media-libs/libpng[${MULTILIB_USEDEP}] - !backends? ( >=${CATEGORY}/${P}[${MULTILIB_USEDEP},backends] )" + !cups? ( >=${CATEGORY}/${P}[${MULTILIB_USEDEP},cups] )" -( (( ${PV:0:1} >= 3 )) || (( ${PV:2:2} >= 80 )) ) && +if (( ${PV:0:1} == 3 )) || ( (( ${PV:0:1} == 2 )) && (( ${PV:2:2} >= 80 )) ); then RDEPEND="${RDEPEND} - gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )" || + servicetools? ( + dev-libs/libxml2[${MULTILIB_USEDEP}] + gnome-base/libglade[${MULTILIB_USEDEP}] + x11-libs/gtk+:2[${MULTILIB_USEDEP}] + )" +elif (( ${PV:0:1} == 2 )); then RDEPEND="${RDEPEND} - gtk? ( x11-libs/gtk+:1[${MULTILIB_USEDEP}] )" + servicetools? ( + dev-libs/libxml2[${MULTILIB_USEDEP}] + gnome-base/libglade[${MULTILIB_USEDEP}] + x11-libs/gtk+:2[${MULTILIB_USEDEP}] + )" +fi DEPEND="${DEPEND} virtual/libintl" @@ -89,14 +84,16 @@ EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_ # Internal wrapper to handle subdir phase {prepare,config,compilation...} dir_src_command() { - local dirs="${1}" cmd="${2}" args="${3}" + local dirs=( ${1} ) cmd="${2}" args="${3}" (( $# < 2 )) && eeror "Invalid number of argument" && return 1 - for dir in ${dirs}; do + for dir in "${dirs[@]}"; do pushd ${dir} || die case "${cmd}" in (eautoreconf) [[ -d po ]] && echo "no" | glib-gettextize --force --copy + [[ ! -e configure.in ]] && [[ -e configures/configure.in.new ]] && + mv -f configures/configure.in.new configure.in ${cmd} ${args} ;; (econf) @@ -136,32 +133,36 @@ ecnij_pkg_setup() use abi_x86_32 && use amd64 && multilib_toolchain_setup "x86" - CNIJFILTER_SRC="libs pstocanonij" - PRINTER_SRC="cnijfilter" - use usb && CNIJFILTER_SRC+=" backend" - use_if_iuse net && CNIJFILTER_SRC+=" backendnet" - if use gtk; then - CNIJFILTER_SRC+=" cngpij" - if (( ${PV:0:1} == 4 )); then - PRINTER_SRC+=" lgmon2" - use net && PRINTER_SRC+=" cnijnpr" - else - PRINTER_SRC+=" lgmon cngpijmon" - use_if_iuse net && PRINTER_SRC+=" cngpijmon/cnijnpr" - fi + CNIJFILTER_SRC+=( libs pstocanonij ) + PRINTER_SRC+=( cnijfilter ) + use_if_iuse usb && CNIJFILTER_SRC+=( backend ) + use_if_iuse net && CNIJFILTER_SRC+=( backendnet ) + if ! has usb; then + (( ${PV:0:1} >= 3 )) || ( (( ${PV:0:1} == 2 )) && (( ${PV:2:2} >= 80 )) ) && + CNIJFILTER_SRC+=( backend ) fi - use servicetools && + CNIJFILTER_SRC+=( cngpij ) + if (( ${PV:0:1} == 4 )); then + PRINTER_SRC+=( lgmon2 ) + use_if_iuse net && PRINTER_SRC+=( cnijnpr ) + else + PRINTER_SRC+=( lgmon cngpijmon ) + use_if_iuse net && PRINTER_SRC+=( cngpijmon/cnijnpr ) + fi + + if use servicetools; then if (( ${PV:0:1} == 4 )); then - CNIJFILTER_SRC+=" cngpijmnt" + CNIJFILTER_SRC+=( cngpijmnt ) elif (( ${PV:0:1} == 3 )) && (( ${PV:2:2} >= 80 )); then - CNIJFILTER_SRC+=" cngpijmnt maintenance" + CNIJFILTER_SRC+=( cngpijmnt maintenance ) else - PRINTER_SRC+=" printui" + PRINTER_SRC+=( printui ) + fi fi if (( ${PV:0:1} == 4 )); then - PRINTER_SRC="bscc2sts ${PRINTER_SRC}" - CNIJFILTER_SRC="cmdtocanonij ${CNIJFILTER_SRC} cnijbe" + PRINTER_SRC=( bscc2sts "${PRINTER_SRC[@]}" ) + CNIJFILTER_SRC=( cmdtocanonij "${CNIJFILTER_SRC[@]}" cnijbe ) fi } @@ -173,6 +174,7 @@ ecnij_src_unpack() debug-print-function ${FUNCNAME} "${@}" default + mv ${PN}-* ${P} || die "Failed to unpack" cd "${S}" } @@ -188,20 +190,17 @@ ecnij_src_prepare() epatch_user - use backends && - dir_src_command "${CNIJFILTER_SRC}" "eautoreconf" + use cups && dir_src_command "${CNIJFILTER_SRC[*]}" "eautoreconf" local p pr prid for (( p=0; p<${#PRINTER_ID[@]}; p++ )); do pr=${PRINTER_MODEL[$p]} prid=${PRINTER_ID[$p]} if use canon_printers_${pr}; then mkdir ${pr} || die - for dir in ${prid} ${PRINTER_SRC}; do - cp -a ${dir} ${pr} || die - done + cp -a ${prid} "${PRINTER_SRC[@]}" ${pr} || die pushd ${pr} || die [[ -d ../com ]] && ln -s {../,}com - dir_src_command "${PRINTER_SRC}" "eautoreconf" + dir_src_command "${PRINTER_SRC[*]}" "eautoreconf" popd fi done @@ -214,16 +213,14 @@ ecnij_src_configure() { debug-print-function ${FUNCNAME} "${@}" - use backends && - dir_src_command "${CNIJFILTER_SRC}" "econf" + use cups && dir_src_command "${CNIJFILTER_SRC[*]}" "econf" local p pr prid for (( p=0; p<${#PRINTER_ID[@]}; p++ )); do pr=${PRINTER_MODEL[$p]} prid=${PRINTER_ID[$p]} if use canon_printers_${pr}; then pushd ${pr} || die - dir_src_command "${PRINTER_SRC}" \ - "econf" "--program-suffix=${pr}" + dir_src_command "${PRINTER_SRC[*]}" "econf" "--program-suffix=${pr}" popd fi done @@ -240,13 +237,12 @@ ecnij_src_compile() { pr=${PRINTER_MODEL[$p]} prid=${PRINTER_ID[$p]} if use canon_printers_${pr}; then pushd ${pr} || die - dir_src_command "${PRINTER_SRC}" "emake" + dir_src_command "${PRINTER_SRC[*]}" "emake" popd fi done - use backends && - dir_src_command "${CNIJFILTER_SRC}" "emake" + use cups && dir_src_command "${CNIJFILTER_SRC[*]}" "emake" } # @FUNCTION: ecnij_src_install @@ -258,19 +254,20 @@ ecnij_src_install() local abi_libdir=/usr/$(get_libdir) p pr prid local abi_lib=${abi_libdir#*lib} - local lib license lingua lng + local lib license lingua=false local -a DOCS (( ${#MULTILIB_COMPAT[@]} == 1 )) && abi_lib= - use backends && - dir_src_command "${CNIJFILTER_SRC}" "emake" "DESTDIR=\"${D}\" install" + use cups && + dir_src_command "${CNIJFILTER_SRC[*]}" "emake" "DESTDIR=\"${D}\" install" for (( p=0; p<${#PRINTER_ID[@]}; p++ )); do pr=${PRINTER_MODEL[$p]} prid=${PRINTER_ID[$p]} if use canon_printers_${pr}; then + lingua=true pushd ${pr} || die - dir_src_command "${PRINTER_SRC}" "emake" "DESTDIR=\"${D}\" install" + dir_src_command "${PRINTER_SRC[*]}" "emake" "DESTDIR=\"${D}\" install" popd dolib.so ${prid}/libs_bin${abi_lib}/*.so* @@ -279,17 +276,17 @@ ecnij_src_install() insinto /usr/share/cups/model doins ppd/canon${pr}.ppd - use_if_iuse doc && + if use_if_iuse doc; then for lingua in ${LINGUAS}; do - lng=${lingua^^[a-z]} - [[ -f lproptions/lproptions-${pr}-${PV}${lng}.txt ]] && - DOCS+=(lproptions/lproptions-${pr}-${PV}${lng}.txt) + lingua="${lingua^^[a-z]}" + [[ -f lproptions/lproptions-${pr}-${PV}${lingua}.txt ]] && + DOCS+=(lproptions/lproptions-${pr}-${PV}${lingua}.txt) done + fi fi done - use backends && - if use_if_iuse net; then + if use cups && use_if_iuse net; then pushd com/libs_bin${abi_lib} || die for lib in lib*.so; do [[ -L ${lib} ]] && continue || @@ -303,18 +300,17 @@ ecnij_src_install() doexe com/ini/cnnet.ini fi - use backends && - if (( ${PV:0:1} == 4 )); then + if use cups && (( ${PV:0:1} == 4 )); then mkdir -p "${ED}"/usr/share/${PN} || die mv "${ED}"/usr/share/{cmdtocanonij,${PN}} || die fi - if use drivers || use_if_iuse net; then + if ${lingua} || use_if_iuse net; then for lingua in ${LINGUAS}; do - lng=${lingua^^[a-z]} - license=LICENSE-${PN}-${PV}${lng}.txt - [[ -e ${license%${lng:0:1}.txt}.txt ]] && - mv -f ${license%{lng:0:1}.txt} ${license} + lingua="${lingua^^[a-z]}" + license=LICENSE-${PN}-${PV}${lingua}.txt + [[ -e ${license%${lingua:0:1}.txt}.txt ]] && + mv -f ${license%{lingua:0:1}.txt} ${license} [[ -e ${license} ]] && DOCS+=(${license}) done fi @@ -329,13 +325,21 @@ ecnij_pkg_postinst() { debug-print-function ${FUNCNAME} "${@}" + # XXX: set up ppd files to use newer CUPS backends + if (( ${PV:0:1} < 3 )) || ( (( ${PV:0:1} == 3 )) && (( ${PV:2:1} == 0 )) ); then + use cups || sed 's,cnij_usb,cnijusb,g' -i "${ED}"/usr/share/cups/model/canon*.ppd + fi + elog "To install a printer:" - elog " * First, restart CUPS: /etc/init.d/cupsd restart" + elog " * First, restart CUPS: 'service cupsd restart'" elog " * Go to http://127.0.0.1:631/ with your favorite browser" elog " and then go to Printers/Add Printer" + elog elog "You can consult the following for any issue/bug:" + elog + elog "${FILESDIR%/*}/README.md" elog "https://forums.gentoo.org/viewtopic-p-3217721.html" - elog "https://bugs.gentoo.org/show_bug.cgi?id=258244" + elog "https://bugs.gentoo.org/show_bug.cgi?id=130645" } fi diff --git a/media-gfx/scangearmp/scangearmp-2.10.ebuild b/media-gfx/scangearmp/scangearmp-2.10-r1.ebuild index 47e13412..94e135bb 100644 --- a/media-gfx/scangearmp/scangearmp-2.10.ebuild +++ b/media-gfx/scangearmp/scangearmp-2.10-r1.ebuild @@ -35,21 +35,20 @@ SRC_URI="http://gdlp01.c-wss.com/gds/4/0100005184/01/scangearmp-source-2.10-1.ta LICENSE="UNKNOWN" # GPL-2 source and proprietary binaries SLOT="2" -KEYWORDS="~x86 ~amd64" -IUSE="amd64 - usb - mx720 - mx920 - mx390 - mx450 - mx520 - e610" +KEYWORDS="x86 amd64" +IUSE="+usb + +mx720 + +mx920 + +mx390 + +mx450 + +mx520 + +e610" DEPEND=">=media-libs/libpng-1.2.44 >=media-gfx/gimp-2.6.8 >=x11-libs/gtk+-2.20.1-r1 >=media-gfx/sane-backends-1.0.19-r2 dev-libs/libusb-compat - >=net-print/cnijfilter-drivers-3.80" + >=net-print/cnijfilter-4.0" RDEPEND="${DEPEND}" # Arrays of supported Printers, there IDs and compatible models diff --git a/net-print/cnijfilter-drivers/Manifest b/net-print/cnijfilter-drivers/Manifest deleted file mode 100644 index d445c620..00000000 --- a/net-print/cnijfilter-drivers/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST cnijfilter-source-3.80-1.tar.gz 8923054 SHA256 8b6d408f18191f19465ee8fc31aa08455e8bec186fdd3f02ee822f53a9b086a9 SHA512 95a16e3b4fc38ce0b7a12bd74466d97e726bc410b59bf6d1963fa52b16a8cc67f6a993a5ef945107201f860d8ac6734c462bc0bf6d2160d6c85c5f61aff040c1 WHIRLPOOL 2e27afa454ce1fa41700f65ace7ae7469464cc8685499c4927c559aef2fd79613297d1ec1e5cf1dd309da541c5b662a0c4d4d71fabf4b514e186eb2bceb80c5c diff --git a/net-print/cnijfilter-drivers/cnijfilter-drivers-3.80.ebuild b/net-print/cnijfilter-drivers/cnijfilter-drivers-3.80.ebuild deleted file mode 100644 index 45eb4b2a..00000000 --- a/net-print/cnijfilter-drivers/cnijfilter-drivers-3.80.ebuild +++ /dev/null @@ -1,167 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -MY_PN="${PN/-drivers/}" - -inherit eutils autotools flag-o-matic multilib - -DESCRIPTION="Canon InkJet Printer Driver for Linux (Pixus/Pixma-Series)." -HOMEPAGE="http://support-sg.canon-asia.com/contents/SG/EN/0100469302.html" -SRC_URI="http://gdlp01.c-wss.com/gds/3/0100004693/01/${MY_PN}-source-${PV}-1.tar.gz" - -LICENSE="GPL-2 cnijfilter" -SLOT="${PV}" -KEYWORDS="amd64 x86" -PRINTER_USE=( mp230 mg2200 e510 mg3200 mg4200 ip7200 mg5400 mg6300 ) -PRINTER_ID=( 401 402 403 404 405 406 407 408 ) -IUSE="${PRINTER_USE[@]} +servicetools" - -RDEPEND=" - net-print/cnijfilter[servicetools?] - >=media-libs/libpng-1.5 - >=media-libs/tiff-3.4 - >=net-print/cups-1.4 - servicetools? ( - >=dev-libs/libxml2-2.7.3-r2 - >=x11-libs/gtk+-2.6:2 - ) -" -DEPEND="${DEPEND} - sys-devel/gettext -" - -REQUIRED_USE="|| ( ${PRINTER_USE[@]} )" - -S="${WORKDIR}/${MY_PN}-source-${PV}-1" - -_dir_build() { - local dirs=$1 - local command=$2 - local d - - [[ $# -ne 2 ]] && die "Call as: _dir_build DIRS COMMAND" - - for d in ${dirs}; do - local suffix="" - echo ">>> Working in: ${d}" - pushd ${d} >/dev/null - # progpath must be set otherwise we go for /usr/local/bin - if [[ ${command} == econf* ]]; then - ${command} --enable-progpath="${EPREFIX}/usr/bin" - else - ${command} - fi - popd > /dev/null - done -} - -_printer_dir_build() { - local command=$1 - local d - - [[ $# -ne 1 ]] && die "Call as: _printer_dir_build COMMAND" - - for (( i=0; i<${#PRINTER_USE[@]}; i++ )); do - local name="${PRINTER_USE[$i]}" - if use ${name}; then - for d in ${DIRS_PRINTER}; do - echo ">>> Working in: ${name}/${d}" - pushd ${name}/${d} > /dev/null - if [[ ${command} == econf* ]]; then - ${command} \ - --enable-progpath="${EPREFIX}/usr/bin" \ - --program-suffix=${name} - else - ${command} - fi - popd > /dev/null - done - fi - done -} - -pkg_setup() { - [[ -z ${LINGUAS} ]] && LINGUAS="en" - - DIRS_PRINTER="cnijfilter" - # lgmon must be first as it is required by cngpijmon - use servicetools && DIRS_PRINTER+=" lgmon cngpijmon maintenance" -} - -src_prepare() { - local d i - - # missing macros directory make aclocal fail - mkdir maintenance/m4 || die - - epatch \ - "${FILESDIR}/${MY_PN}"-3.70-png.patch \ - "${FILESDIR}/${MY_PN}"-3.70-ppd.patch \ - "${FILESDIR}/${MY_PN}"-3.70-ppd2.patch \ - "${FILESDIR}/${MY_PN}"-3.70-libexec-cups.patch \ - "${FILESDIR}/${MY_PN}"-3.70-libexec-backend.patch \ - "${FILESDIR}/${MY_PN}"-3.80-cups.patch - - _dir_build "${DIRS_PRINTER}" "eautoreconf" - - for (( i=0; i<${#PRINTER_USE[@]}; i++ )); do - local name="${PRINTER_USE[$i]}" - local pid="${PRINTER_ID[$i]}" - if use ${name}; then - mkdir -p ${name} || die - ln -s "${S}"/${pid} ${name}/ || die - for d in ${DIRS_PRINTER}; do - cp -a ${d} ${name} || die - done - fi - done -} - -src_configure() { - local d i - - _printer_dir_build "econf" -} - -src_compile() { - _printer_dir_build "emake" -} - -src_install() { - local _libdir="${EPREFIX}/usr/$(get_libdir)" - local _libdir_pkg=libs_bin$(use amd64 && echo 64 || echo 32) - local _ppddir="${EPREFIX}/usr/share/cups/model" - - _printer_dir_build "emake DESTDIR=${D} install" - - for (( i=0; i<${#PRINTER_USE[@]}; i++ )); do - local name="${PRINTER_USE[$i]}" - local pid="${PRINTER_ID[$i]}" - if use ${name}; then - dodir ${_libdir} - # no doexe due to symlinks - cp -a "${pid}/${_libdir_pkg}"/* "${D}/${_libdir}" || die - exeinto ${_libdir}/cnijlib - doexe ${pid}/database/* - # create symlink for the cnijlib to bjlib as some formats need it - dosym ${_libdir}/cnijlib ${_libdir}/bjlib - insinto ${_ppddir} - doins ppd/canon${name}.ppd - fi - done -} - -pkg_postinst() { - einfo "" - einfo "For installing a printer:" - einfo " * Restart CUPS: /etc/init.d/cupsd restart" - einfo " * Go to http://127.0.0.1:631/" - einfo " -> Printers -> Add Printer" - einfo "" - einfo "If you experience any problems, please visit:" - einfo " http://forums.gentoo.org/viewtopic-p-3217721.html" - einfo "" -} diff --git a/net-print/cnijfilter-drivers/files/cnijfilter-3.70-libexec-backend.patch b/net-print/cnijfilter-drivers/files/cnijfilter-3.70-libexec-backend.patch deleted file mode 100644 index ca2073a5..00000000 --- a/net-print/cnijfilter-drivers/files/cnijfilter-3.70-libexec-backend.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -urN cnijfilter-source-3.70-1.old/backend/src/Makefile.am cnijfilter-source-3.70-1/backend/src/Makefile.am ---- cnijfilter-source-3.70-1.old/backend/src/Makefile.am 2012-12-22 11:09:21.674631729 +0100 -+++ cnijfilter-source-3.70-1/backend/src/Makefile.am 2012-12-22 14:20:50.879566578 +0100 -@@ -1,6 +1,6 @@ - ## Process this file with automake to produce Makefile.in - --backend_bindir = /usr/lib/cups/backend -+backend_bindir = /usr/libexec/cups/backend - backend_bin_PROGRAMS = cnijusb - transform = - -diff -urN cnijfilter-source-3.70-1.old/backendnet/backend/Makefile.am cnijfilter-source-3.70-1/backendnet/backend/Makefile.am ---- cnijfilter-source-3.70-1.old/backendnet/backend/Makefile.am 2012-12-22 11:09:21.673631729 +0100 -+++ cnijfilter-source-3.70-1/backendnet/backend/Makefile.am 2012-12-22 14:20:20.176569425 +0100 -@@ -1,6 +1,6 @@ - ## Process this file with automake to produce Makefile.in - --backendnet_bindir = /usr/lib/cups/backend -+backendnet_bindir = /usr/libexec/cups/backend - backendnet_bin_PROGRAMS = cnijnet - transform = - diff --git a/net-print/cnijfilter-drivers/files/cnijfilter-3.70-libexec-cups.patch b/net-print/cnijfilter-drivers/files/cnijfilter-3.70-libexec-cups.patch deleted file mode 100644 index 858343f4..00000000 --- a/net-print/cnijfilter-drivers/files/cnijfilter-3.70-libexec-cups.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -urN cnijfilter-source-3.70-1.old/pstocanonij/filter/Makefile.am cnijfilter-source-3.70-1/pstocanonij/filter/Makefile.am ---- cnijfilter-source-3.70-1.old/pstocanonij/filter/Makefile.am 2012-12-21 17:27:54.370964561 +0100 -+++ cnijfilter-source-3.70-1/pstocanonij/filter/Makefile.am 2012-12-21 18:22:48.804097963 +0100 -@@ -1,4 +1,4 @@ --filterdir=$(libdir)/cups/filter -+filterdir=$(libexecdir)/cups/filter - - filter_PROGRAMS= pstocanonij - diff --git a/net-print/cnijfilter-drivers/files/cnijfilter-3.70-png.patch b/net-print/cnijfilter-drivers/files/cnijfilter-3.70-png.patch deleted file mode 100644 index 0e32f236..00000000 --- a/net-print/cnijfilter-drivers/files/cnijfilter-3.70-png.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- cnijfilter-3.70/cnijfilter/src/bjfimage.c 2011-09-22 04:33:34.000000000 +0200 -+++ cnijfilter-3.70/cnijfilter/src/bjfimage.c 2012-09-15 16:22:38.000000000 +0200 -@@ -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; diff --git a/net-print/cnijfilter-drivers/files/cnijfilter-3.70-ppd.patch b/net-print/cnijfilter-drivers/files/cnijfilter-3.70-ppd.patch deleted file mode 100644 index a1d1ad23..00000000 --- a/net-print/cnijfilter-drivers/files/cnijfilter-3.70-ppd.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -urN cnijfilter-source-3.70-1.old/cngpijmon/src/bjcupsmon_cups.c cnijfilter-source-3.70-1/cngpijmon/src/bjcupsmon_cups.c ---- cnijfilter-source-3.70-1.old/cngpijmon/src/bjcupsmon_cups.c 2012-12-21 17:27:54.599964570 +0100 -+++ cnijfilter-source-3.70-1/cngpijmon/src/bjcupsmon_cups.c 2012-12-21 17:28:42.076966493 +0100 -@@ -20,6 +20,7 @@ - /*** Includes ***/ - #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/net-print/cnijfilter-drivers/files/cnijfilter-3.70-ppd2.patch b/net-print/cnijfilter-drivers/files/cnijfilter-3.70-ppd2.patch deleted file mode 100644 index 8b1e6ae3..00000000 --- a/net-print/cnijfilter-drivers/files/cnijfilter-3.70-ppd2.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -urN cnijfilter-source-3.70-1.old/backend/src/cnij_backend_common.c cnijfilter-source-3.70-1/backend/src/cnij_backend_common.c ---- cnijfilter-source-3.70-1.old/backend/src/cnij_backend_common.c 2012-12-22 11:09:21.674631729 +0100 -+++ cnijfilter-source-3.70-1/backend/src/cnij_backend_common.c 2012-12-22 11:11:31.903619656 +0100 -@@ -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 --git a/net-print/cnijfilter-drivers/files/cnijfilter-3.80-cups.patch b/net-print/cnijfilter-drivers/files/cnijfilter-3.80-cups.patch deleted file mode 100644 index ddaad73e..00000000 --- a/net-print/cnijfilter-drivers/files/cnijfilter-3.80-cups.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- cnijfilter-source-3.80-1.old/cngpijmon/src/bjcupsmon_cups.c 2014-04-05 23:24:12.193048137 +0200 -+++ cnijfilter-source-3.80-1/cngpijmon/src/bjcupsmon_cups.c 2014-04-05 23:11:35.748504996 +0200 -@@ -18,6 +18,7 @@ - */ - - /*** Includes ***/ -+#define _IPP_PRIVATE_STRUCTURES 1 - #include <cups/cups.h> - #include <cups/ppd.h> - #include <cups/language.h> diff --git a/net-print/cnijfilter/Manifest b/net-print/cnijfilter/Manifest index d445c620..590de2a4 100644 --- a/net-print/cnijfilter/Manifest +++ b/net-print/cnijfilter/Manifest @@ -1 +1 @@ -DIST cnijfilter-source-3.80-1.tar.gz 8923054 SHA256 8b6d408f18191f19465ee8fc31aa08455e8bec186fdd3f02ee822f53a9b086a9 SHA512 95a16e3b4fc38ce0b7a12bd74466d97e726bc410b59bf6d1963fa52b16a8cc67f6a993a5ef945107201f860d8ac6734c462bc0bf6d2160d6c85c5f61aff040c1 WHIRLPOOL 2e27afa454ce1fa41700f65ace7ae7469464cc8685499c4927c559aef2fd79613297d1ec1e5cf1dd309da541c5b662a0c4d4d71fabf4b514e186eb2bceb80c5c +DIST cnijfilter-source-4.10-1.tar.gz 7683230 SHA256 0cff37fe6684dcfeb12a7350fb94cb5dda055b18c9987bbd32259320d46fc598 SHA512 58198e92e360c71c95423bfa8278f449eb645245af1b96770323cb6f4b2b7186e5ab326d58377c20627c750d3d8c253addf637f9d18e085b1c89a81d6239ab51 WHIRLPOOL fe8071465a38dedb2d3b41802c9c243d8f748d3ef724830a9b8fe5c036c4c74f425cb13b4f141e0af951fdd77b424032689baf48387794b866fa252cda2f8534 diff --git a/net-print/cnijfilter/cnijfilter-3.80.ebuild b/net-print/cnijfilter/cnijfilter-3.80.ebuild deleted file mode 100644 index ba59915a..00000000 --- a/net-print/cnijfilter/cnijfilter-3.80.ebuild +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -inherit eutils autotools flag-o-matic multilib - -DESCRIPTION="Canon InkJet Printer Driver for Linux (Pixus/Pixma-Series)." -HOMEPAGE="http://support-sg.canon-asia.com/contents/SG/EN/0100469302.html" -SRC_URI="http://gdlp01.c-wss.com/gds/3/0100004693/01/${PN}-source-${PV}-1.tar.gz" - -LICENSE="GPL-2 cnijfilter" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="+net +servicetools" - -RDEPEND=" - >=media-libs/libpng-1.5 - >=media-libs/tiff-3.4 - >=net-print/cups-1.4 - servicetools? ( - >=dev-libs/libxml2-2.7.3-r2 - >=x11-libs/gtk+-2.6:2 - ) -" -DEPEND="${DEPEND} - sys-devel/gettext -" - -S="${WORKDIR}/${PN}-source-${PV}-1" - -_dir_build() { - local dirs=$1 - local command=$2 - local d - - [[ $# -ne 2 ]] && die "Call as: _dir_build DIRS COMMAND" - - for d in ${dirs}; do - local suffix="" - echo ">>> Working in: ${d}" - pushd ${d} >/dev/null - # progpath must be set otherwise we go for /usr/local/bin - if [[ ${command} == econf* ]]; then - ${command} --enable-progpath="${EPREFIX}/usr/bin" - else - ${command} - fi - popd > /dev/null - done -} - -pkg_setup() { - [[ -z ${LINGUAS} ]] && LINGUAS="en" - - DIRS="libs pstocanonij backend" - use net && DIRS+=" backendnet" - #use servicetools && DIRS+=" cngpij cngpijmon/cnijnpr" - use servicetools && DIRS+=" cngpij" -} - -src_prepare() { - local d i - - epatch \ - "${FILESDIR}/${PN}"-3.70-png.patch \ - "${FILESDIR}/${PN}"-3.70-ppd.patch \ - "${FILESDIR}/${PN}"-3.70-ppd2.patch \ - "${FILESDIR}/${PN}"-3.70-libexec-cups.patch \ - "${FILESDIR}/${PN}"-3.70-libexec-backend.patch \ - "${FILESDIR}/${P}"-cups1.6.patch - - _dir_build "${DIRS}" "eautoreconf" -} - -src_configure() { - local d i - - _dir_build "${DIRS}" "econf" -} - -src_compile() { - _dir_build "${DIRS}" "emake" -} - -src_install() { - local _libdir="${EPREFIX}/usr/$(get_libdir)" - local _libdir_pkg=libs_bin$(use amd64 && echo 64 || echo 32) - - _dir_build "${DIRS}" "emake DESTDIR=${D} install" - - if use net; then - pushd com/${_libdir_pkg} > /dev/null - dodir ${_libdir} - # no doexe to preserve symlinks - cp -a libcnnet.so* "${D}/${_libdir}" || die - popd > /dev/null - fi -} - -pkg_postinst() { - einfo "" - einfo "For installing a printer:" - einfo " * Restart CUPS: /etc/init.d/cupsd restart" - einfo " * Go to http://127.0.0.1:631/" - einfo " -> Printers -> Add Printer" - einfo "" - einfo "If you experience any problems, please visit:" - einfo " http://forums.gentoo.org/viewtopic-p-3217721.html" - einfo "" -} diff --git a/net-print/cnijfilter/cnijfilter-4.10-r2.ebuild b/net-print/cnijfilter/cnijfilter-4.10-r2.ebuild new file mode 100644 index 00000000..72368995 --- /dev/null +++ b/net-print/cnijfilter/cnijfilter-4.10-r2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id: net-print/cnijfilter-drivers/cnijfilter-drivers-4.00.ebuild,v 2.0 2015/08/08 03:10:53 Exp $ + +EAPI=5 + +MULTILIB_COMPAT=( abi_x86_{32,64} ) + +PRINTER_MODEL=( "ix6700" "ix6800" "ip2800" "mx470" "mx530" "ip8700" "e560" "e400" ) +PRINTER_ID=( "431" "432" "433" "434" "435" "436" "437" "438" ) + +inherit ecnij + +DESCRIPTION="Canon InkJet Printer Driver for Linux (Pixus/Pixma-Series)" +HOMEPAGE="http://www.canon-europe.com/Support/" +SRC_URI="http://gdlp01.c-wss.com/gds/8/0100005858/01/${PN}-source-${PV}-1.tar.gz" + +IUSE="+doc" + +DEPEND="virtual/libusb:1" +RDEPEND="${RDEPEND}" + +RESTRICT="mirror" + +PATCHES=( + "${FILESDIR}"/${PN}-3.70-1-libexec-cups.patch + "${FILESDIR}"/${PN}-3.70-1-libexec-backend.patch + "${FILESDIR}"/${PN}-4.00-1-libexec-backend.patch + "${FILESDIR}"/${PN}-4.00-1-libexec-cups.patch + "${FILESDIR}"/${PN}-4.00-4-ppd.patch + "${FILESDIR}"/${PN}-4.00-5-abi_x86_32.patch + "${FILESDIR}"/${PN}-3.80-1-cups-1.6.patch + "${FILESDIR}"/${PN}-3.90-6-headers.patch + "${FILESDIR}"/${PN}-3.80-6-cups-1.6.patch + "${FILESDIR}"/${PN}-4.00-6-headers.patch +) + +src_prepare() +{ + local arc=64 + [[ x${ABI} == xx86 ]] && arc=32 + sed -e "s,cnijlgmon2_LDADD =,cnijlgmon2_LDADD = -L../../com/libs_bin${arc}," \ + -i lgmon2/src/Makefile.am || die + + ecnij_src_prepare +} + diff --git a/net-print/cnijfilter/files/cnijfilter-3.70-1-libexec-backend.patch b/net-print/cnijfilter/files/cnijfilter-3.70-1-libexec-backend.patch new file mode 100644 index 00000000..0d8c9b88 --- /dev/null +++ b/net-print/cnijfilter/files/cnijfilter-3.70-1-libexec-backend.patch @@ -0,0 +1,21 @@ +--- a/backend/src/Makefile.am 2012-12-22 11:09:21.674631729 +0100 ++++ b/backend/src/Makefile.am 2012-12-22 14:20:50.879566578 +0100 +@@ -1,6 +1,6 @@ + ## Process this file with automake to produce Makefile.in + +-backend_bindir = /usr/lib/cups/backend ++backend_bindir = /usr/libexec/cups/backend + backend_bin_PROGRAMS = cnijusb + transform = + +--- a/backendnet/backend/Makefile.am 2012-12-22 11:09:21.673631729 +0100 ++++ b/backendnet/backend/Makefile.am 2012-12-22 14:20:20.176569425 +0100 +@@ -1,6 +1,6 @@ + ## Process this file with automake to produce Makefile.in + +-backendnet_bindir = /usr/lib/cups/backend ++backendnet_bindir = /usr/libexec/cups/backend + backendnet_bin_PROGRAMS = cnijnet + transform = + + diff --git a/net-print/cnijfilter/files/cnijfilter-3.70-1-libexec-cups.patch b/net-print/cnijfilter/files/cnijfilter-3.70-1-libexec-cups.patch new file mode 100644 index 00000000..25f7b2ea --- /dev/null +++ b/net-print/cnijfilter/files/cnijfilter-3.70-1-libexec-cups.patch @@ -0,0 +1,9 @@ +--- a/pstocanonij/filter/Makefile.am 2012-12-21 17:27:54.370964561 +0100 ++++ b/pstocanonij/filter/Makefile.am 2012-12-21 18:22:48.804097963 +0100 +@@ -1,4 +1,4 @@ +-filterdir=$(libdir)/cups/filter ++filterdir=$(libexecdir)/cups/filter + + filter_PROGRAMS= pstocanonij + + diff --git a/net-print/cnijfilter/files/cnijfilter-3.70-libexec-backend.patch b/net-print/cnijfilter/files/cnijfilter-3.70-libexec-backend.patch deleted file mode 100644 index ca2073a5..00000000 --- a/net-print/cnijfilter/files/cnijfilter-3.70-libexec-backend.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -urN cnijfilter-source-3.70-1.old/backend/src/Makefile.am cnijfilter-source-3.70-1/backend/src/Makefile.am ---- cnijfilter-source-3.70-1.old/backend/src/Makefile.am 2012-12-22 11:09:21.674631729 +0100 -+++ cnijfilter-source-3.70-1/backend/src/Makefile.am 2012-12-22 14:20:50.879566578 +0100 -@@ -1,6 +1,6 @@ - ## Process this file with automake to produce Makefile.in - --backend_bindir = /usr/lib/cups/backend -+backend_bindir = /usr/libexec/cups/backend - backend_bin_PROGRAMS = cnijusb - transform = - -diff -urN cnijfilter-source-3.70-1.old/backendnet/backend/Makefile.am cnijfilter-source-3.70-1/backendnet/backend/Makefile.am ---- cnijfilter-source-3.70-1.old/backendnet/backend/Makefile.am 2012-12-22 11:09:21.673631729 +0100 -+++ cnijfilter-source-3.70-1/backendnet/backend/Makefile.am 2012-12-22 14:20:20.176569425 +0100 -@@ -1,6 +1,6 @@ - ## Process this file with automake to produce Makefile.in - --backendnet_bindir = /usr/lib/cups/backend -+backendnet_bindir = /usr/libexec/cups/backend - backendnet_bin_PROGRAMS = cnijnet - transform = - diff --git a/net-print/cnijfilter/files/cnijfilter-3.70-libexec-cups.patch b/net-print/cnijfilter/files/cnijfilter-3.70-libexec-cups.patch deleted file mode 100644 index 858343f4..00000000 --- a/net-print/cnijfilter/files/cnijfilter-3.70-libexec-cups.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -urN cnijfilter-source-3.70-1.old/pstocanonij/filter/Makefile.am cnijfilter-source-3.70-1/pstocanonij/filter/Makefile.am ---- cnijfilter-source-3.70-1.old/pstocanonij/filter/Makefile.am 2012-12-21 17:27:54.370964561 +0100 -+++ cnijfilter-source-3.70-1/pstocanonij/filter/Makefile.am 2012-12-21 18:22:48.804097963 +0100 -@@ -1,4 +1,4 @@ --filterdir=$(libdir)/cups/filter -+filterdir=$(libexecdir)/cups/filter - - filter_PROGRAMS= pstocanonij - diff --git a/net-print/cnijfilter/files/cnijfilter-3.70-png.patch b/net-print/cnijfilter/files/cnijfilter-3.70-png.patch deleted file mode 100644 index 0e32f236..00000000 --- a/net-print/cnijfilter/files/cnijfilter-3.70-png.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- cnijfilter-3.70/cnijfilter/src/bjfimage.c 2011-09-22 04:33:34.000000000 +0200 -+++ cnijfilter-3.70/cnijfilter/src/bjfimage.c 2012-09-15 16:22:38.000000000 +0200 -@@ -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; diff --git a/net-print/cnijfilter/files/cnijfilter-3.70-ppd.patch b/net-print/cnijfilter/files/cnijfilter-3.70-ppd.patch deleted file mode 100644 index a1d1ad23..00000000 --- a/net-print/cnijfilter/files/cnijfilter-3.70-ppd.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -urN cnijfilter-source-3.70-1.old/cngpijmon/src/bjcupsmon_cups.c cnijfilter-source-3.70-1/cngpijmon/src/bjcupsmon_cups.c ---- cnijfilter-source-3.70-1.old/cngpijmon/src/bjcupsmon_cups.c 2012-12-21 17:27:54.599964570 +0100 -+++ cnijfilter-source-3.70-1/cngpijmon/src/bjcupsmon_cups.c 2012-12-21 17:28:42.076966493 +0100 -@@ -20,6 +20,7 @@ - /*** Includes ***/ - #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/net-print/cnijfilter/files/cnijfilter-3.70-ppd2.patch b/net-print/cnijfilter/files/cnijfilter-3.70-ppd2.patch deleted file mode 100644 index 8b1e6ae3..00000000 --- a/net-print/cnijfilter/files/cnijfilter-3.70-ppd2.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -urN cnijfilter-source-3.70-1.old/backend/src/cnij_backend_common.c cnijfilter-source-3.70-1/backend/src/cnij_backend_common.c ---- cnijfilter-source-3.70-1.old/backend/src/cnij_backend_common.c 2012-12-22 11:09:21.674631729 +0100 -+++ cnijfilter-source-3.70-1/backend/src/cnij_backend_common.c 2012-12-22 11:11:31.903619656 +0100 -@@ -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 --git a/net-print/cnijfilter/files/cnijfilter-3.80-cups1.6.patch b/net-print/cnijfilter/files/cnijfilter-3.80-1-cups-1.6.patch index 8971d067..dfc0bb22 100644 --- a/net-print/cnijfilter/files/cnijfilter-3.80-cups1.6.patch +++ b/net-print/cnijfilter/files/cnijfilter-3.80-1-cups-1.6.patch @@ -1,34 +1,5 @@ -diff -ur cnijfilter-source-3.80-1/cngpij/cngpij/bjcups.c cnijfilter-source-3.80-1.new/cngpij/cngpij/bjcups.c ---- cnijfilter-source-3.80-1/cngpij/cngpij/bjcups.c -+++ cnijfilter-source-3.80-1.new/cngpij/cngpij/bjcups.c -@@ -66,6 +66,27 @@ - - char* g_printer_name = NULL; - -+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) -+#define HAVE_CUPS_1_6 1 -+#endif -+ -+#ifndef HAVE_CUPS_1_6 -+ -+#define ippSetOperation(ipp_request, ipp_op_id) ipp_request->request.op.operation_id = ipp_op_id -+#define ippSetRequestId(ipp_request, ipp_rq_id) ipp_request->request.op.request_id = ipp_rq_id -+#define ippGetStatusCode(ipp_request) ipp_request->request.status.status_code -+#define ippFirstAttribute(ipp) ipp->attrs /* simplistic */ -+#define bjcups_ippNextAttribute(resp, attr) attr->next -+#define ippGetGroupTag(attr) attr->group_tag -+#define ippGetName(attr) attr->name -+#define ippGetString(attr, ind, lang) attr->values[ind].string.text -+#define ippGetValueTag(attr) attr->value_tag -+ -+#else -+ -+#define bjcups_ippNextAttribute(resp, attr) ippNextAttribute(resp) -+ -+#endif - - extern int GetIPCData(LPIPCU pipc, char *sname); - static short getDeviceURI( const char *pDestName, char *pDeviceURI, short bufSize); +--- a/cngpij/cngpij/bjcups.c ++++ a/cngpij/cngpij/bjcups.c @@ -698,8 +719,8 @@ else { pRequest = ippNew(); @@ -57,7 +28,7 @@ diff -ur cnijfilter-source-3.80-1/cngpij/cngpij/bjcups.c cnijfilter-source-3.80- - while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) { - pAttribute = pAttribute->next; + while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) { -+ pAttribute = bjcups_ippNextAttribute(pResponse, pAttribute); ++ pAttribute = ippNextAttribute(pResponse); } if (pAttribute == NULL) { break; @@ -76,7 +47,7 @@ diff -ur cnijfilter-source-3.80-1/cngpij/cngpij/bjcups.c cnijfilter-source-3.80- + pDUri = ippGetString(pAttribute, 0, NULL); } - pAttribute = pAttribute->next; -+ pAttribute = bjcups_ippNextAttribute(pResponse, pAttribute); ++ pAttribute = ippNextAttribute(pResponse); } if (strcasecmp(pDestName, pPrinter) == 0) { @@ -85,6 +56,7 @@ diff -ur cnijfilter-source-3.80-1/cngpij/cngpij/bjcups.c cnijfilter-source-3.80- if (pAttribute != NULL) - pAttribute = pAttribute->next; -+ pAttribute = bjcups_ippNextAttribute(pResponse, pAttribute); ++ pAttribute = ippNextAttribute(pResponse); } } + diff --git a/net-print/cnijfilter/files/cnijfilter-3.80-6-cups-1.6.patch b/net-print/cnijfilter/files/cnijfilter-3.80-6-cups-1.6.patch new file mode 100644 index 00000000..6b51d483 --- /dev/null +++ b/net-print/cnijfilter/files/cnijfilter-3.80-6-cups-1.6.patch @@ -0,0 +1,87 @@ +diff --git a/cngpijmnt/src/getipc.c b/cngpijmnt/src/getipc.c +index 8688032..54c7933 100755 +--- a/cngpijmnt/src/getipc.c ++++ b/cngpijmnt/src/getipc.c +@@ -42,7 +42,7 @@ int GetIPCData(LPIPCU pipc, char *sname) + int server_fd; + int client_fd; + char buf[128]; +- size_t len; ++ socklen_t len; + short ret = RET_ERROR; + + if( (server_fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0 ) + +--- a/cngpijmnt/src/main.c 2016-11-12 23:39:03.534855723 +0100 ++++ b/cngpijmnt/src/main.c 2016-11-12 23:47:02.521847145 +0100 +@@ -308,8 +308,8 @@ + *pResponse; // Pointer to CUPS IPP response. + ipp_attribute_t *pAttribute; // Pointer to CUPS attributes. + cups_lang_t *pLanguage; // Pointer to language. +- char *pPrinter = NULL; // Pointer to printer name. +- char *pDUri = NULL; // Pointer to Device uri. ++ const char *pPrinter = NULL; // Pointer to printer name. ++ const char *pDUri = NULL; // Pointer to Device uri. + short retVal = -1; // Return value. + /*** Parameters end ***/ + +@@ -321,8 +321,8 @@ + else { + pRequest = ippNew(); + +- pRequest->request.op.operation_id = CUPS_GET_PRINTERS; +- pRequest->request.op.request_id = 1; ++ ippSetOperation(pRequest, CUPS_GET_PRINTERS); ++ ippSetRequestId(pRequest, 1); + + pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19 + +@@ -331,29 +331,29 @@ + ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL); + + if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) { +- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) { ++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) { + fputs("ERROR: IPP ERROR\n", stderr); + goto onErr; + } + else { +- pAttribute = pResponse->attrs; ++ pAttribute = ippFirstAttribute(pResponse); + + while (pAttribute != NULL) { +- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) { +- pAttribute = pAttribute->next; ++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) { ++ pAttribute = ippNextAttribute(pResponse); + } + if (pAttribute == NULL) { + break; + } + +- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) { +- if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) { +- pPrinter = pAttribute->values[0].string.text; ++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) { ++ if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) { ++ pPrinter = ippGetString(pAttribute, 0, NULL); + } +- if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) { +- pDUri = pAttribute->values[0].string.text; ++ if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) { ++ pDUri = ippGetString(pAttribute, 0, NULL); + } +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + + if (strcasecmp(pDestName, pPrinter) == 0) { +@@ -362,7 +362,7 @@ + } + + if (pAttribute != NULL) +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + } + diff --git a/net-print/cnijfilter/files/cnijfilter-3.90-6-headers.patch b/net-print/cnijfilter/files/cnijfilter-3.90-6-headers.patch new file mode 100644 index 00000000..c1c4a540 --- /dev/null +++ b/net-print/cnijfilter/files/cnijfilter-3.90-6-headers.patch @@ -0,0 +1,69 @@ +diff --git a/cnijfilter/src/bjfilter.c b/cnijfilter/src/bjfilter.c +index 926d745..68f3e57 100755 +--- a/cnijfilter/src/bjfilter.c ++++ b/cnijfilter/src/bjfilter.c +@@ -26,6 +26,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> ++#include <ctype.h> + #include <popt.h> + #include <time.h> + #include <string.h> +diff --git a/cnijfilter/src/bjfimage.c b/cnijfilter/src/bjfimage.c +index 7c2feda..9231caf 100755 +--- a/cnijfilter/src/bjfimage.c ++++ b/cnijfilter/src/bjfimage.c +@@ -26,6 +26,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <unistd.h> + #include <string.h> + + #include "cpktypes.h" +diff --git a/cnijfilter/src/bjfoption.c b/cnijfilter/src/bjfoption.c +index 5465534..64a5187 100755 +--- a/cnijfilter/src/bjfoption.c ++++ b/cnijfilter/src/bjfoption.c +@@ -26,6 +26,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <ctype.h> + #include <popt.h> + #include <string.h> + +diff --git a/cnijfilter/src/bjfpos.h b/cnijfilter/src/bjfpos.h +index 64086da..aeb04f7 100755 +--- a/cnijfilter/src/bjfpos.h ++++ b/cnijfilter/src/bjfpos.h +@@ -84,6 +84,7 @@ typedef struct BJF_MARGIN_INFO /* borderless information */ + extern void bjf_pos_img_init( LPBJF_POS_IMGINFO lpimginfo ); + extern void bjf_pos_prn_init( LPBJF_POS_PRNINFO lpprninfo ); + extern void bjf_pos_init( LPBJF_POSINFO lpposinfo ); ++extern void bjf_margin_init( LPBJF_MARGIN_INFO ); + extern short bjf_pos_imageresolution( LPBJF_POS_IMGINFO, LPBJF_POS_PRNINFO, LPBJF_POSINFO ); + extern short bjf_pos_imageresolution_fit( LPBJF_POS_IMGINFO, LPBJF_POS_PRNINFO, LPBJF_POSINFO ); + extern short bjf_pos_imageresolution_center( LPBJF_POS_IMGINFO, LPBJF_POS_PRNINFO, LPBJF_POSINFO ); +@@ -120,6 +121,7 @@ extern short ImageScaling(LPBJF_POS_PRNINFO, LPBJF_POSINFO,short); + extern short ImageCenter( LPBJF_POS_IMGINFO, LPBJF_POS_PRNINFO, LPBJF_POSINFO, LPBJF_MARGIN_INFO ); + extern short ImageCut( LPBJF_POS_IMGINFO, LPBJF_POS_PRNINFO, LPBJF_POSINFO, LPBJF_MARGIN_INFO ); + extern short MarginInit(LPBJF_POS_PRNINFO, LPBJF_POSINFO, LPBJF_MARGIN_INFO); ++extern short SetExtLevel( LPBJF_MARGIN_INFO, short); + extern short SetExtMargin(LPBJF_POS_PRNINFO, LPBJF_POSINFO, LPBJF_MARGIN_INFO, LPBJFLTOVERMARGININFO); + extern short SetBbox(LPBJF_OPTINFO , LPBJF_POS_IMGINFO , LPBJF_POSINFO , LPBJF_MARGIN_INFO , int , int); + short bjf_pos_set_paperwidth( LPBJF_MARGIN_INFO , long ); +diff --git a/cnijfilter/src/getipc.c b/cnijfilter/src/getipc.c +index e6973b0..ec7f8b5 100755 +--- a/cnijfilter/src/getipc.c ++++ b/cnijfilter/src/getipc.c +@@ -43,7 +43,7 @@ short GetIPCData(LPIPCU pipc, char *sname) + struct sockaddr_un sun; + int s, c; + char buf[128]; +- size_t adrlen; ++ socklen_t adrlen; + short ret = RET_ERROR; + + if ((s = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) diff --git a/net-print/cnijfilter/files/cnijfilter-4.00-1-libexec-backend.patch b/net-print/cnijfilter/files/cnijfilter-4.00-1-libexec-backend.patch new file mode 100644 index 00000000..f55e79a2 --- /dev/null +++ b/net-print/cnijfilter/files/cnijfilter-4.00-1-libexec-backend.patch @@ -0,0 +1,10 @@ +--- cnijbe/src/Makefile.am 2014-08-08 22:40:21.697967931 +0200 ++++ cnijbe/src/Makefile.am 2014-08-08 22:41:44.972967317 +0200 +@@ -1,6 +1,6 @@ + ## Process this file with automake to produce Makefile.in + +-cnijbe_bindir = /usr/lib/cups/backend ++cnijbe_bindir = /usr/libexec/cups/backend + cnijbe_bin_PROGRAMS = cnijbe + transform = + diff --git a/net-print/cnijfilter/files/cnijfilter-4.00-1-libexec-cups.patch b/net-print/cnijfilter/files/cnijfilter-4.00-1-libexec-cups.patch new file mode 100644 index 00000000..1c04c49f --- /dev/null +++ b/net-print/cnijfilter/files/cnijfilter-4.00-1-libexec-cups.patch @@ -0,0 +1,9 @@ +--- cmdtocanonij/filter/Makefile.am 2012-12-21 17:27:54.370964561 +0100 ++++ cmdtocanonij/filter/Makefile.am 2012-12-21 18:22:48.804097963 +0100 +@@ -1,4 +1,4 @@ +-filterdir=$(libdir)/cups/filter ++filterdir=$(libexecdir)/cups/filter + + filter_PROGRAMS= cmdtocanonij + + diff --git a/net-print/cnijfilter/files/cnijfilter-4.00-4-ppd.patch b/net-print/cnijfilter/files/cnijfilter-4.00-4-ppd.patch new file mode 100644 index 00000000..bbd0dcb1 --- /dev/null +++ b/net-print/cnijfilter/files/cnijfilter-4.00-4-ppd.patch @@ -0,0 +1,10 @@ +--- backend/src/cnij_backend_common.c 2016-11-13 00:08:34.600824006 +0100 ++++ backend/src/cnij_backend_common.c 2016-11-13 00:08:52.037823694 +0100 +@@ -37,6 +37,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 --git a/net-print/cnijfilter/files/cnijfilter-4.00-5-abi_x86_32.patch b/net-print/cnijfilter/files/cnijfilter-4.00-5-abi_x86_32.patch new file mode 100644 index 00000000..d3b00f52 --- /dev/null +++ b/net-print/cnijfilter/files/cnijfilter-4.00-5-abi_x86_32.patch @@ -0,0 +1,45 @@ +--- backendnet/configure.in 2014-08-11 08:38:46.034984462 +0200 ++++ backendnet/configure.in 2014-08-11 08:35:42.902985813 +0200 +@@ -19,7 +19,11 @@ + AC_DEFINE_UNQUOTED(BJLIB_PATH, "$enable_libpath") + AC_SUBST(BJLIB_PATH) + +-ARC=`getconf LONG_BIT` ++case "$ABI" in ++ x86) ARC=32;; ++ amd64) ARC=64;; ++ *) ARC=`getconf LONG_BIT`;; ++esac + AC_SUBST(ARC) + + # Checks for programs. +--- cnijfilter/configure.in 2014-08-11 08:39:44.426984031 +0200 ++++ cnijfilter/configure.in 2014-08-11 08:35:19.788985984 +0200 +@@ -43,7 +43,11 @@ + esac + AC_SUBST(CNCL_LIB_ID) + +-ARC=`getconf LONG_BIT` ++case "$ABI" in ++ x86) ARC=32;; ++ amd64) ARC=64;; ++ *) ARC=`getconf LONG_BIT`;; ++esac + AC_SUBST(ARC) + + AC_PROG_CC +--- cnijnpr/configure.in 2014-08-11 08:41:12.712983380 +0200 ++++ cnijnpr/configure.in 2014-08-11 08:40:44.354983589 +0200 +@@ -37,7 +37,11 @@ + + CFLAGS="-O2" + +-ARC=`getconf LONG_BIT` ++case "$ABI" in ++ x86) ARC=32;; ++ amd64) ARC=64;; ++ *) ARC=`getconf LONG_BIT`;; ++esac + AC_SUBST(ARC) + + AC_OUTPUT(Makefile diff --git a/net-print/cnijfilter/files/cnijfilter-4.00-6-headers.patch b/net-print/cnijfilter/files/cnijfilter-4.00-6-headers.patch new file mode 100644 index 00000000..824892d2 --- /dev/null +++ b/net-print/cnijfilter/files/cnijfilter-4.00-6-headers.patch @@ -0,0 +1,11 @@ +--- cnijnpr/src/cnijnpr.c 2016-11-13 21:51:33.844977618 +0100 ++++ cnijnpr/src/cnijnpr.c 2016-11-13 21:52:03.129977094 +0100 +@@ -34,6 +34,8 @@ + #include <sys/ioctl.h> + #include <net/if.h> + #include <sys/sysctl.h> ++#include <sys/types.h> ++#include <unistd.h> + #include <config.h> + #include <fcntl.h> + |