gscan2pdf (good app.) and how to install using local overlay

Anything that pertains to Portage

Moderator: Moderators

Fitzcarraldo
Sagely Hen
Posts: 8200
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: gscan2pdf (good app.) and how to install using local overlay

Post by Fitzcarraldo » Sun Jul 05, 2009 1:15

Installation has become a bit easier since my previous post about version 0.9.27 of gscan2pdf: an updated version of the 0.9.27 ebuild is now in the Gentoo Bugzilla (see Gentoo Bugzilla Report No. 254704), and the dependencies it requires, dev-perl/Sane and dev-perl/Gtk2-ImageView, are in Portage. To install it you need to do the following:

1. Save the page http://bugs.gentoo.org/attachment.cgi?id=193316 to your Desktop as the file gscan2pdf-0.9.27.ebuild

2. If you have not already done it, edit the file /etc/make.conf as the root user and add the following line at the end of it:

Code: Select all

PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"
3. Enter the following commands as root user in a Terminal/Konsole window:

Code: Select all

# emerge --sync
# layman -S
# mkdir -p /usr/local/portage/media-gfx/gscan2pdf/
# cp /home/<your_username>/Desktop/gscan2pdf-0.9.27.ebuild /usr/local/portage/media-gfx/gscan2pdf/
# ebuild /usr/local/portage/media-gfx/gscan2pdf/gscan2pdf-0.9.27.ebuild manifest
# emerge -1v dev-perl/Sane
# emerge -1v dev-perl/Gtk2-ImageView
# emerge -1v gscan2pdf
4. Make sure your scanner is switched on. If you click on Kickoff > Applications > Graphics you should find gscan2pdf listed. If you wish you can instead launch it from the command line by typing gscan2pdf<Enter>.

5. You can ignore the little window titled "warning: missing packages" that pops up saying "The scanadf frontend is not available. unpaper missing." and just click on OK.

OPTIONAL:

There's an ebuild for the unpaper utility in Gentoo Bugzilla Report No. 172958, so if you want to add the unpaper utility then you can also install it via your local overlay:

1. Save the page http://bugs.gentoo.org/attachment.cgi?id=194009 to your Desktop as the file unpaper-0.3.ebuild

2. As root in a Terminal/Konsole window:

Code: Select all

# mkdir -p /usr/local/portage/media-gfx/unpaper/
# cp /home/<your_username>/Desktop/unpaper-0.3.ebuild /usr/local/portage/media-gfx/unpaper/
# ebuild /usr/local/portage/media-gfx/unpaper/unpaper-0.3.ebuild manifest
# emerge -1v unpaper
# USE="unpaper" emerge -1v gscan2pdf

Fitzcarraldo
Sagely Hen
Posts: 8200
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: gscan2pdf (good app.) and how to install using local overlay

Post by Fitzcarraldo » Mon Oct 12, 2009 22:40

The good news is that a) unpaper is now in Portage, and b) there is now a version 0.9.29 of gscan2pdf (see Gentoo Bugzilla Report No. 254704).

The bad news is that it's a little trickier to install gscan2pdf-0.9.29. You now need to download ebuilds for the following packages from the Gentoo Bugzilla and merge them before you can merge gscan2pdf.

However, don't put them in your local overlay, put them in the normal Portage ebuild directory for Perl (/usr/portage/dev-perl/) i.e. create the following directories and copy the relevant ebuilds into them:

Code: Select all

mkdir /usr/portage/dev-perl/Sys-SigAction/
mkdir /usr/portage/dev-perl/Acme-Damn/
mkdir /usr/portage/dev-perl/forks/
You'll find the ebuilds for each of the above-mentioned three packages in the Gentoo Bugzilla if you use the Gentoo Bugzilla search facility.

Then you'll have to edit /etc/portage/package.keywords and add the following to it:

Code: Select all

dev-perl/forks **
dev-perl/Acme-Damn **
dev-perl/Sys-SigAction **
Then you need to create a manifest for each of the three dev-perl packages by using the ebuild command (see my previous post for an example). For some reason the repository contacted by the three ebuilds does not respond, so I just googled the tarballs listed on screen by the ebuild command and downloaded the tarballs manually into /usr/portage/distfiles/ then repeated the ebuild command.

Then you need to merge the three packages, and finally you can go ahead and merge gscan2pdf-0.9.29 itself.

Code: Select all

emerge -1v dev-perl/Sys-SigAction
emerge -1v dev-perl/Acme-Damn
emerge -1v dev-perl/forks
emerge -1v gscan2pdf
Of course you have to download the gscan2pdf-0.9.29.ebuild file and put it in your local overlay directory /usr/local/portage/media-gfx/gscan2pdf/ and generate a manifest for it as explained in my previous post. And don't forget to add the line to /etc/make.conf (also see my previous post) if you did not do it already.

As I wrote above, unpaper is now in Portage, so you can just go ahead and merge that normally.

One of my favourite (and most used) applications.

Fitzcarraldo
Sagely Hen
Posts: 8200
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: gscan2pdf (good app.) and how to install using local ove

Post by Fitzcarraldo » Wed Mar 31, 2010 19:16

Just a heads-up in case this happens if you try to install gscan2pdf:

I'm just now installing gscan2pdf on a new installation of SL 5.2 amd64 KDE, and I found that I didn't need to perform the steps relating to dev-perl/Sys-SigAction mentioned in my previous post. dev-perl/Sys-SigAction must have been installed by another package I installed after completing the installation of SL 5.2. Anyway, I just omitted the steps pertaining to Sys-SigAction.

Fitzcarraldo
Sagely Hen
Posts: 8200
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: gscan2pdf (good app.) and how to install using local ove

Post by Fitzcarraldo » Fri Apr 30, 2010 9:37

If you install gscan2pdf in SL 5.2 and find that the application hangs half way through saving a PDF file, this is a known bug (Bug #424249 in gscan2pdf (Ubuntu): "locks when trying to save as PDF"). To fix it, merge the latest version of ImageMagick and, if prompted to do so, run emerge @preserved-rebuild:

Code: Select all

# emerge --sync
# layman -S
# emerge -1v imagemagick
# emerge @preserved-rebuild

Post Reply