Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
libjpeg and printer driver
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Decha
n00b
n00b


Joined: 12 Jul 2003
Posts: 52
Location: Zürich

PostPosted: Sat Feb 27, 2010 12:16 pm    Post subject: libjpeg and printer driver Reply with quote

Hello All,


I got a Canon iR5880C/Ci printer here and I have to use Canon's closed-source drivers in order to print.

That worked all well until jpeg library got upgrade to 7 (driver needs 6.2). I used libjpeg-compat and that resolved the issue for me.
But now jpeg-compat is out of tree and a slotted libjpeg62 is in. Unfortunately I am not able to make the driver work with both 6.2 and 8 version installed.

Code:

kde-laptop decha # ls -al /usr/lib/libjpeg*
-rw-r--r-- 1 root root 255706 2010-02-26 15:38 /usr/lib/libjpeg.a
-rw-r--r-- 1 root root    914 2010-02-26 15:38 /usr/lib/libjpeg.la
lrwxrwxrwx 1 root root     16 2010-02-27 14:45 /usr/lib/libjpeg.so -> libjpeg.so.8.0.0
-rwxr-xr-x 1 root root 128480 2010-02-26 15:49 /usr/lib/libjpeg.so.62
-rwxr-xr-x 1 root root 214532 2010-02-26 15:38 /usr/lib/libjpeg.so.7
lrwxrwxrwx 1 root root     16 2010-02-26 15:38 /usr/lib/libjpeg.so.8 -> libjpeg.so.8.0.0
-rwxr-xr-x 1 root root 222728 2010-02-26 15:38 /usr/lib/libjpeg.so.8.0.0


Printing fails with:
[Job 234] Wrong JPEG library version: library is 80, caller expects 62

If I alter libjpeg.so symlink to point to .so.62 it works fine. But I can't keep system in that state...

Any ideas how to force cups/drivers to use the proper lib? Or any open driver for this hardware?

Thanks.

UPD: I tried to add LD_PRELOAD with libjpeg for cups and I can see it was passed to the canon binary but that didn't help - no error message, but no document printed too.
_________________
When It's Done - It's Done!
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 487
Location: Sao Paulo, Brazil

PostPosted: Tue Mar 16, 2010 12:29 am    Post subject: Reply with quote

Decha,
The current package is media-libs/jpeg-8. Emerge jpeg again and run revdep-rebuild afterwards.
Code:
revdep-rebuild --library libjpeg.so.62
revdep-rebuild --library libjpeg.so.7

I hope it helps.
ferreirafm
Back to top
View user's profile Send private message
Decha
n00b
n00b


Joined: 12 Jul 2003
Posts: 52
Location: Zürich

PostPosted: Tue Mar 16, 2010 11:02 am    Post subject: Reply with quote

Hello ferreirafm,


Thanks, but I tried that. Unfortunately as those Canon drivers are not part of portage and in fact binary drivers, it has no effect.

The work-around I am currently using was creating a new directory, putting libjpeg-6.2 from compat their and running cups with LD_LIBRARY_PATH=<this_dir>

That has a drawback all drivers affected, not to mention filesystem mess I am creating. So if there is any better solution, I would be happy to use it.

Thanks.


-Decha.
_________________
When It's Done - It's Done!
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Tue Mar 16, 2010 11:13 am    Post subject: Reply with quote

Maybe a superfluous question but did you try gutenprint?
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Tue Mar 16, 2010 11:15 am    Post subject: Reply with quote

Decha wrote:
Hello ferreirafm,


Thanks, but I tried that. Unfortunately as those Canon drivers are not part of portage and in fact binary drivers, it has no effect.

The work-around I am currently using was creating a new directory, putting libjpeg-6.2 from compat their and running cups with LD_LIBRARY_PATH=<this_dir>

That has a drawback all drivers affected, not to mention filesystem mess I am creating. So if there is any better solution, I would be happy to use it.

Thanks.


-Decha.


I'm not an expert in this, but to keep your system consistent I would simply use an custom overlay and keep the jpeg62 ebuild in it. Perhaps you can also move jpeg62 out into the /usr/local prefix, create a custom cups ebuild that also resides in /usr/local as well and make it look for the jpeg62 in another directory.
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Tue Mar 16, 2010 11:33 am    Post subject: Re: libjpeg and printer driver Reply with quote

Decha wrote:

I got a Canon iR5880C/Ci printer here and I have to use Canon's closed-source drivers in order to print.


Here where? I'd like to see the package itself to determine the correct path here.

Local jpeg installation like someone suggested here is a bad idea. It's fine grained and slotted in Portage as is,
and any meddling to that will just break other packages.
Back to top
View user's profile Send private message
Decha
n00b
n00b


Joined: 12 Jul 2003
Posts: 52
Location: Zürich

PostPosted: Wed Mar 17, 2010 5:40 pm    Post subject: Reply with quote

Quote:
Maybe a superfluous question but did you try gutenprint?
Gerard.


It doesn't seem to support this printer - at least supported_printers section list no similar model.


Rexilion, I think that wouldn't make the system any clearer... Guess better would be to write an ebuild to track the files I copied and have it local overlay. Too lazy for that right now.


Quote:
Here where? I'd like to see the package itself to determine the correct path here.


ssuominen, unfortunately there is no ebuild for these drivers - I had to install them from rpm canon provides.


Thanks for all the help, I plan to travel currently and would not be able to test anything or reply for few weeks - but I will bump this thread when I am back with solution or with no_solution.


-Decha.
_________________
When It's Done - It's Done!
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Wed Mar 17, 2010 5:43 pm    Post subject: Reply with quote

Decha wrote:

ssuominen, unfortunately there is no ebuild for these drivers - I had to install them from rpm canon provides.


That's what I meant, some link to the canon printers download site and filename perhaps?

Oh well...
Back to top
View user's profile Send private message
Decha
n00b
n00b


Joined: 12 Jul 2003
Posts: 52
Location: Zürich

PostPosted: Thu Mar 18, 2010 12:57 pm    Post subject: Reply with quote

ssuominen wrote:
That's what I meant, some link to the canon printers download site and filename perhaps?


Download page: http://software.canon-europe.com/software/0037431.asp?model=

File: o1015enx.zip 28766.26 Kb.

RPMs I installed:
UK/32-bit_Driver/RPM/cndrvcups-common-2.00-2.i386.rpm
UK/32-bit_Driver/RPM/cndrvcups-ufr2-uk-2.00-2.i386.rpm

BTW, there are some sources in archive - didn't look inside though... Might it be possible to make an ebuild of it?

Thanks.


-Decha.

P.S. Did revdep on those two libs - all intact.
_________________
When It's Done - It's Done!
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Thu Mar 18, 2010 1:33 pm    Post subject: Reply with quote

libcanonufr2.so.1.0.0 file is dlopen()ing libjpeg.so instead of linking against libjpeg.so.62

so if you copy libjpeg.so.62 and libjpeg.so symlink to in a local directory, like /home/user/jpeg/

you should be able to run the software/drivers with

LD_LIBRARY_PATH="/home/user/jpeg" <command to execute>

and this way it won't cause harm to the rest of system...
Back to top
View user's profile Send private message
Decha
n00b
n00b


Joined: 12 Jul 2003
Posts: 52
Location: Zürich

PostPosted: Thu Mar 18, 2010 9:13 pm    Post subject: Reply with quote

Hi ssuominen,


That's actually almost what I did. And I run cups with this preload. It doesn't affect system, but it might affect other printers (have like 20 others) - not sure on exact effect though.

But guess... there is no way around - unless canon releases a newer version depending on later jpeg.

Thanks anyway!


-Decha.
_________________
When It's Done - It's Done!
Back to top
View user's profile Send private message
MotivatedTea
Apprentice
Apprentice


Joined: 06 Nov 2006
Posts: 269
Location: Toronto, Canada

PostPosted: Fri Mar 19, 2010 1:53 am    Post subject: Reply with quote

As you mentioned, Canon has a driver download. We have a different model printer that also uses Canon's UFR-II drivers in the lab. I made a pair of ebuilds for myself to compile and install from the source code inside the zip file. (The source code appears to be distributed under GPL-2, though, so they're actually open source.) Note that I've based this on a slightly older release (g8b5enx.zip). You could probably adapt it to the current release. The older drivers work fine for me, though, so I haven't bothered to update it. Here are a few notes, and I'll post the ebuild files below:


  • This is an ugly ebuild! I don't know very much about writing ebuilds. This is one of the first ones I ever wrote, and I just needed something that worked on my system. I considered submitting this ebuild to the sunrise overlay, but I'm sure it would need a lot of work before it would be accepted, and I just don't have the time. In particular:
    • I don't list any dependencies. If you get a compiler error, try to figure out what libraries it's looking for, and then guess at what packages it needs. Sorry about that. But the source doesn't have a handy list of Gentoo package atoms, and it worked fine for me with the libraries I already had installed.
    • The unpack, compile, and install steps might be more complicated than necessary. However, the default ebuild actions don't work out of the box. I wrote these based on the .deb build rules that come with the source.

  • There are two ebuilds. "cndrvcups-lb" is the one that contains the UFR-II drivers, but it depends on "cndrvcups-common". "cndrvcups-common" must be installed before you can build "cndrvcups-lb". The names I used here match the Debian package names that would get generated if you were using the built-in Debian rules.
  • The Canon source seems to install multiple versions of the .ppd files in different languages in /usr/share/cups/model/. I only need the English versions, so in my ebuild, I delete the other ones (i.e. *ZJ.ppd and *ZK.ppd) from the install image directory. This shouldn't affect you. However, if you install the package and find that there's no driver compatible with your printer, try removing those "rm" lines from near the bottom of src_install and see if it makes a difference.
  • The good news is that I have used this on both 32- and 64-bit systems.



Without further ado, here are the files you can put in your personal overlay:
EDIT: Updated ebuilds on 14 June 2010
/your/custom/overlay/net-print/cndrvcups-common/cndrvcups-common-1.80.ebuild
Code:
inherit eutils

DESCRIPTION="Canon UFRII Printer Driver for Linux - Common Modules"
HOMEPAGE="http://software.canon-europe.com/software/0031040.asp"
My_ZIP="g8b5enx.zip"
SRC_URI="http://files.canon-europe.com/files/soft31040/software/${My_ZIP}"
RESTRICT="mirror"
LICENSE="GPL-2"
SLOT="0"

KEYWORDS="x86 amd64"

RESTRICT="strip"
RDEPEND=">=dev-libs/glib-2.0"
DEPEND="${RDEPEND} app-arch/unzip app-arch/tar"

src_unpack() {
   # This zipfile uses the wrong separators for directory names.
   # Don't use "unpack", or it will die because unzip will not exit cleanly.
   einfo Unpacking ${My_ZIP}
   unzip ${DISTDIR}/${My_ZIP} -d ${T}
   # Currently, the .tar.gz file from Canon is named ${P}-1.tar.gz,
   # but it unpacks into a directory named ${P}.
   einfo Unpacking ${P}\*.tar.gz
   tar xzf ${T}/UK/Sources/${P}*.tar.gz -C ${WORKDIR} || die "unpack failed"
}

src_compile() {
   # Adapted from the configure: and build: targets of debian/rules
   cd ${WORKDIR}/${P}

   for d in buftool cngplp; do
      (cd ${d} && ./autogen.sh --prefix=/usr) || die "./autogen.sh failed in ${d}"
   done
   for d in cpca; do
      (cd ${d} && ./autogen.sh --prefix=/usr --libdir=/usr/libexec --disable-static --enable-shared) || die "./autogen.sh failed in ${d}"
   done

   for d in buftool cngplp cpca; do
      emake -C ${d} || die "emake ${d} failed"
   done
   for d in c3plmod_ipc; do
      emake -C ${d} || die "emake ${d} failed"
   done
}

src_install() {
   # Adapted from the (US portion of the) install: target of debian/rules
   cd ${WORKDIR}/${P}

   for d in buftool cngplp cpca; do
      emake -C ${d} install DESTDIR=${D}
   done
   for d in c3plmod_ipc; do
      emake -C ${d} install DESTDIR=${D} LIBDIR=/usr/lib
   done

   dodir /usr/bin
   exeinto /usr/bin
   exeopts -m4755
   doexe libs/cnpkmodule
   exeopts -m755
   doexe libs/c3pldrv

   dodir /usr/lib
   insinto /usr/lib
   insopts -m755
   doins libs/libcaiowrap.so.1.0.0 libs/libcaiousb.so.1.0.0 \
      libs/libc3pl.so.0.0.1 libs/libcnaccm.so.1.0 \
      libs/libcaepcm.so.1.0 libs/libcnlbcm.so.1.0
   dosym libc3pl.so.0.0.1   /usr/lib/libc3pl.so.0
   dosym libc3pl.so.0.0.1   /usr/lib/libc3pl.so
   dosym libcnaeccm.so.1.0   /usr/lib/libcnaccm.so.1
   dosym libcnaeccm.so.1.0   /usr/lib/libcnaccm.so
   dosym libcnaccm.so.1.0   /usr/lib/libcnaccm.so.1
   dosym libcnaccm.so.1.0   /usr/lib/libcnaccm.so
   dosym libcaepcm.so.1.0   /usr/lib/libcaepcm.so.1
   dosym libcaepcm.so.1.0   /usr/lib/libcaepcm.so
   dosym libcnlbcm.so.1.0   /usr/lib/libcnlbcm.so.1
   dosym libcnlbcm.so.1.0   /usr/lib/libcnlbcm.so
   dosym libcaiowrap.so.1.0.0   /usr/lib/libcaiowrap.so.1
   dosym libcaiowrap.so.1.0.0   /usr/lib/libcaiowrap.so
   dosym libcaiousb.so.1.0.0   /usr/lib/libcaiousb.so.1
   dosym libcaiousb.so.1.0.0   /usr/lib/libcaiousb.so
   dosym libcanonc3pl.so.1.0.0   /usr/lib/libcanonc3pl.so.1
   dosym libcanonc3pl.so.1.0.0   /usr/lib/libcanonc3pl.so

   dodir /usr/share/caepcm
   insinto /usr/share/caepcm
   insopts -m644
   doins data/CA* data/CNZ0*
}



/your/custom/overlay/net-print/cndrvcups-lb/cndrvcups-lb-1.80.ebuild
Code:
inherit eutils

DESCRIPTION="Canon UFRII Printer Driver for Linux - Canon LBP/iR Printers"
HOMEPAGE="http://software.canon-europe.com/software/0031040.asp"
My_ZIP="g8b5enx.zip"
SRC_URI="http://files.canon-europe.com/files/soft31040/software/${My_ZIP}"
RESTRICT="mirror"
LICENSE="GPL-2"
SLOT="0"

KEYWORDS="x86 amd64"

RESTRICT="strip"
RDEPEND="net-print/cndrvcups-common"
DEPEND="${RDEPEND} app-arch/unzip app-arch/tar"

src_unpack() {
   # This zipfile uses the wrong separators for directory names.
   # Don't use "unpack", or it will die because unzip will not exit cleanly.
   einfo Unpacking ${My_ZIP}
   unzip ${DISTDIR}/${My_ZIP} -d ${T}
   # Currently, the .tar.gz file from Canon is named ${P}-1.tar.gz,
   # but it unpacks into a directory named ${P}.
   einfo Unpacking ${P}\*.tar.gz
   tar xzf ${T}/UK/Sources/${P}*.tar.gz -C ${WORKDIR} || die "unpack failed"
}

src_compile() {
        # Adapted from the configure: and build: targets of debian/rules
   cd ${WORKDIR}/${P}

   # The instructions that come with the package tell us to run ./allgen.sh.
   # That script sets the directories in which things will be installed.
   # We want to change some of those. So rather than running allgen.sh,
   # We will perform the same steps that it would do.
   cd ${WORKDIR}/${P}/ppd
   ./autogen.sh --prefix=/usr --libdir=/usr/libexec || die "./autogen.sh in ppd failed"
   cd ${WORKDIR}/${P}/pstoufr2cpca
   ./autogen.sh --prefix=/usr --libdir=/usr/libexec --enable-progpath=/usr/bin --enable-shared --disable-static \
      || die "./autogen.sh in pstoufr2cpca failed"

   cd ${WORKDIR}/${P}
   for d in ppd pstoufr2cpca; do
      emake -C ${d} || die "emake ${d} failed"
   done
}

src_install() {
        # Adapted from the (US portion of the) install: target of debian/rules

   for d in ppd pstoufr2cpca; do
      emake -C ${d} install DESTDIR=${D}
   done

   dodir /usr/lib
   insinto /usr/lib
   # Skipping the .la, which is broken because it's missing -lslim.
   doins libs/libcanonufr2.so.1.0.0 \
      libs/libufr2filter.so.1.0.0

   dosym libcanonufr2.so.1.0.0 /usr/lib/libcanonufr2.so.1
   dosym libcanonufr2.so.1.0.0 /usr/lib/libcanonufr2.so
   dosym libufr2filter.so.1.0.0 /usr/lib/libufr2filter.so.1
   dosym libufr2filter.so.1.0.0 /usr/lib/libufr2filter.so

   dodir /usr/share/caepcm
   insinto /usr/share/caepcm
   insopts -m644
   doins data/C*
   rm -rf ${D}/usr/share/cups/model/*ZJ.ppd
   rm -rf ${D}/usr/share/cups/model/*ZK.ppd

   # And now do the same for the US documentation.
   # We modify the install paths here so the doc directory includes the version number.

   dodoc LICENSE*ufr2*0E.txt README README*ufr2*US*.txt
}


You'll need to run "ebuild manifest cndrvcups-common-1.80.ebuild" and "ebuild manifest cndrvcups-lb-1.80.ebuild" in the directories you install these, respectively, before portage will let you emerge them. Try these without modification first. The newest version of Canon's drivers comes in a file called "o1015enx.zip", as you indicated, but I haven't tested my ebuild with that version. It might need to be changed. Also, temporarily undo the various tricks you've tried for keeping an old version of libjpeg around before you try this. You don't want the ebuild linking to the old version by mistake.


Last edited by MotivatedTea on Mon Jun 14, 2010 7:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
dougthug
n00b
n00b


Joined: 19 Jan 2006
Posts: 64

PostPosted: Fri Apr 16, 2010 4:09 pm    Post subject: Reply with quote

Hey MotivatedTea,

Can I be the first to tell you how much you kick ass? Brilliant job! I was really not interested in using the RPM's and I was having weird issues compiling the source by hand for some reason. Inserted your ebuilds into my local repository and they just worked. No hitch, no problem, and my Dad's crappy imageClass MF1450 printer is working for him :). I think these need to be included into the portage tree. Thanks again.
Back to top
View user's profile Send private message
Kiwon Um
n00b
n00b


Joined: 15 Jul 2009
Posts: 49

PostPosted: Sun Jun 13, 2010 6:57 am    Post subject: slim library? Reply with quote

I tried the ebuild files, and the emerging process seemed fine. But the printer didn't work at all. If I do revdev-rebuild, it always re-emerge cndrvcups-lb, reporting "broken /usr/lib/libcanonufr2.la (requires -lslim)." What package does have libslim in gentoo? Does anybody help me?
Back to top
View user's profile Send private message
MotivatedTea
Apprentice
Apprentice


Joined: 06 Nov 2006
Posts: 269
Location: Toronto, Canada

PostPosted: Mon Jun 14, 2010 7:52 pm    Post subject: Reply with quote

The libcanonufr2.la file comes that way directly from the source zip file, so you'll need to talk to Canon if you want it fixed. However, you also don't actually need the file for anything, since you don't need to link against it yourself. I've updated the ebuilds in my previous post. Now it won't install libcanonufr2.la, so revdep-rebuild won't complain. If you can't print, something else must be wrong. It works for me, and it apparently also works for dougthug. Try turning up the log level in cups and then check for error messages in your log files.
Back to top
View user's profile Send private message
dougthug
n00b
n00b


Joined: 19 Jan 2006
Posts: 64

PostPosted: Tue Jun 15, 2010 12:04 am    Post subject: Reply with quote

I can verify it definitely works for the sake of printing. As for the issue of having to re-emerge when you do revdep-rebuild, these updated files resolved it for me. Thanks a ton!
Back to top
View user's profile Send private message
Kiwon Um
n00b
n00b


Joined: 15 Jul 2009
Posts: 49

PostPosted: Tue Jun 15, 2010 5:03 am    Post subject: New version of cndrvcups Reply with quote

With the great work of MotivatedTea, I wrote new ebuild files for cndrvcups-{common,lb}-2.00.

Because my canon printer is MF8400 family, the previous version of cndrvcups which doesn't have my model name in the support list didn't seem to work for me. So I wrote these. It works for me well now. For other gentoo users, I put the ebuild files here.

Before emerging, please check the contents and comment please. I'm not so mush professional to writing ebuild file. Good luck!
Thanks.

/your/custom/overlay/net-print/cndrvcups-common/cndrvcups-common-2.00.ebuild
Code:

inherit eutils

DESCRIPTION="Canon UFRII Printer Driver for Linux - Common Modules"
HOMEPAGE="http://software.canon-europe.com/software/0031040.asp"
My_ZIP="o1015enx.zip"
SRC_URI="http://files.canon-europe.com/files/soft37431/software/${My_ZIP}"
RESTRICT="mirror"
LICENSE="GPL-2"
SLOT="0"

# Setting to stable because this is my own private ebuild.
KEYWORDS="x86 ~amd64"

RESTRICT="strip"
RDEPEND=">=dev-libs/glib-2.0"
DEPEND="${RDEPEND} app-arch/unzip app-arch/tar"

src_unpack() {
   # This zipfile uses the wrong separators for directory names.
   # Don't use "unpack", or it will die because unzip will not
   # exit cleanly.
   einfo Unpacking ${My_ZIP}
   unzip ${DISTDIR}/${My_ZIP} -d ${T}
   # Currently, the .tar.gz file from Canon is named ${P}-1.tar.gz,
   # but it unpacks into a directory named ${P}.
   einfo Unpacking ${P}\*.tar.gz
   tar xzf ${T}/UK/Sources/${P}*.tar.gz -C ${WORKDIR} || die "unpack failed"
}

src_compile() {
   for d in buftool; do
      (cd ${d} && ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --libdir=/usr/lib --disable-shared --enable-static) || die "./autogen.sh failed in ${d}"
   done

   for d in cpca; do
      (cd ${d} && ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --libdir=/usr/lib --enable-shared --disable-static) || die "./autogen.sh failed in ${d}"
   done

   for d in cngplp; do
      (cd ${d} && ./autogen.sh --libdir=/usr/lib) || die "./autogen.sh failed in ${d}"
   done

   emake || die "emake ${d} failed"
   emake -C ./c3plmod_ipc || die "emake ${d} failed"
}

src_install() {

   emake install DESTDIR=${D} || die "emake install failed"
   emake -C c3plmod_ipc install DESTDIR=${D} LIBDIR=/usr/lib || die "emake install in c3plmod_ipc failed"

   dodir /usr/bin
   dobin libs/cnpkmodule

   dolib.so libs/libcaiowrap.so.1.0.0
   dolib.so libs/libcaiousb.so.1.0.0

   dolib.so libs/libc3pl.so.0.0.1
   dolib.so libs/libcnaccm.so.1.0
   dolib.so libs/libcaepcm.so.1.0
   dolib.so libs/libcnlbcm.so.1.0

   dodir /usr/share/caepcm
   insinto /usr/share/caepcm
   doins data/CA*
   doins data/CNZ0*

   dobin libs/c3pldrv

   dolib.so libs/libcanon_slim.so.1.0.0

   dosym libc3pl.so.0.0.1 /usr/lib/libc3pl.so.0
   dosym libc3pl.so.0.0.1 /usr/lib/libc3pl.so
   dosym libcnaccm.so.1.0 /usr/lib/libcnaccm.so.1
   dosym libcnaccm.so.1.0 /usr/lib/libcnaccm.so
   dosym libcaepcm.so.1.0 /usr/lib/libcaepcm.so.1
   dosym libcaepcm.so.1.0 /usr/lib/libcaepcm.so
   dosym libcnlbcm.so.1.0 /usr/lib/libcnlbcm.so.1
   dosym libcnlbcm.so.1.0 /usr/lib/libcnlbcm.so
   dosym libcaiowrap.so.1.0.0 /usr/lib/libcaiowrap.so.1
   dosym libcaiowrap.so.1.0.0 /usr/lib/libcaiowrap.so
   dosym libcaiousb.so.1.0.0 /usr/lib/libcaiousb.so.1
   dosym libcaiousb.so.1.0.0 /usr/lib/libcaiousb.so
   dosym libcanon_slim.so.1.0.0 /usr/lib/libcanon_slim.so.1
   dosym libcanon_slim.so.1.0.0 /usr/lib/libcanon_slim.so

   dosym libcanonc3pl.so.1.0.0 /usr/lib/libcanonc3pl.so.1
   dosym libcanonc3pl.so.1.0.0 /usr/lib/libcanonc3pl.so
}


/your/custom/overlay/net-print/cndrvcups-lb/cndrvcups-lb-2.00.ebuild
Code:

inherit eutils

DESCRIPTION="Canon UFRII Printer Driver for Linux - Canon LBP/iR Printers"
HOMEPAGE="http://software.canon-europe.com/software/0031040.asp"
My_ZIP="o1015enx.zip"
SRC_URI="http://files.canon-europe.com/files/soft37431/software/${My_ZIP}"
RESTRICT="mirror"
LICENSE="GPL-2"
SLOT="0"

# Setting to stable because this is my own private ebuild.
KEYWORDS="x86 ~amd64"

RESTRICT="strip"
RDEPEND="net-print/cndrvcups-common"
DEPEND="${RDEPEND} app-arch/unzip app-arch/tar"

src_unpack() {
   # This zipfile uses the wrong separators for directory names.
   # Don't use "unpack", or it will die because unzip will not
   # exit cleanly.
   einfo Unpacking ${My_ZIP}
   unzip ${DISTDIR}/${My_ZIP} -d ${T}
   # Currently, the .tar.gz file from Canon is named ${P}-1.tar.gz,
   # but it unpacks into a directory named ${P}.
   einfo Unpacking ${P}\*.tar.gz
   tar xzf ${T}/UK/Sources/${P}*.tar.gz -C ${WORKDIR} || die "unpack failed"
}

src_compile() {
   # The instructions that come with the package tell us to run ./allgen.sh.
   # That script sets the directories in which things will be installed.
   # We want to change some of those. So rather than running allgen.sh,
   # We will perform the same steps that it would do.
   cd ${S}/ppd
   ./autogen.sh --prefix=/usr --libdir=/usr/libexec || die "./autogen.sh in ppd failed"
   emake || die "emake ppd failed"

   cd ${S}/pstoufr2cpca
   ./autogen.sh --prefix=/usr --libdir=/usr/libexec || die "./autogen.sh in pstoufr2cpca failed"
   emake || die "emake pstoufr2cpca failed"

   #cd ${S}/backend
   #./autogen.sh --prefix=/usr --libdir=/usr/lib || die "./autogen.sh in backend failed"

   #cd ${S}
   #emake || die "emake ${d} failed"
}

src_install() {

   emake -C ppd install DESTDIR=${D} || die "emake install ppd failed"
   emake -C pstoufr2cpca install DESTDIR=${D} || die "emake install pstourf2cpca failed"

   dodir /usr/lib
   dodir /usr/bin
   dodir /usr/share/caepcm
   dodir /usr/share/cnpkbidi
   dodir /usr/share/ufr2filter

   #dolib.so libs/libcanonufr2.la
   dolib.so libs/libcanonufr2.so.1.0.0
   dolib.so libs/libufr2filter.so.1.0.0
   dolib.so libs/libEnoJBIG.so.1.0.0
   dobin libs/cnpkbidi
   dolib.so libs/libcaiocnpkbidi.so.1.0.0

   insinto /usr/share/caepcm
   doins data/CNC*
   doins data/CNL6*
   doins data/CNL8*
   doins data/CNL9*
   doins data/CNLC*
   doins data/CNLA*
   doins data/CNLB*
   doins data/CnLB*

   insinto /usr/share/cnpkbidi
   doins libs/cnpkbidi_info*

   insinto /usr/share/ufr2filter
   doins libs/ThLB*

   dosym libcanonufr2.so.1.0.0 /usr/lib/libcanonufr2.so
   dosym libcanonufr2.so.1.0.0 /usr/lib/libcanonufr2.so.1
   dosym libufr2filter.so.1.0.0 /usr/lib/libufr2filter.so
   dosym libufr2filter.so.1.0.0 /usr/lib/libufr2filter.so.1
   dosym libEnoJBIG.so.1.0.0 /usr/lib/libEnoJBIG.so
   dosym libEnoJBIG.so.1.0.0 /usr/lib/libEnoJBIG.so.1
   dosym libcaiocnpkbidi.so.1.0.0 /usr/lib/libcaiocnpkbidi.so
   dosym libcaiocnpkbidi.so.1.0.0 /usr/lib/libcaiocnpkbidi.so.1

   dodoc LICENSE*ufr2*0E.txt README README*ufr2*US*.txt
}
Back to top
View user's profile Send private message
aditsu
n00b
n00b


Joined: 16 Jul 2004
Posts: 6

PostPosted: Tue Feb 19, 2013 6:23 pm    Post subject: UFR2 driver Reply with quote

Hi all, I just found this thread now. I'd like to mention the bug report I filed (and recently updated) related to the UFR II driver: https://bugs.gentoo.org/show_bug.cgi?id=302881
Maybe we can get this resolved by joining forces?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum