summaryrefslogtreecommitdiff
path: root/app-text
diff options
context:
space:
mode:
Diffstat (limited to 'app-text')
-rw-r--r--app-text/epdfview/epdfview-0.1.6-r1.ebuild49
-rw-r--r--app-text/epdfview/files/applymypatches.ebuild.patch14
-rw-r--r--app-text/epdfview/files/epdfview-0.1.6-gcc-4.3.patch11
-rw-r--r--app-text/epdfview/files/epdfview-0.1.6-print-segfault.patch95
-rw-r--r--app-text/epdfview/files/nofitfullscreen.patch14
-rw-r--r--app-text/epdfview/files/vikeybindings.patch42
6 files changed, 225 insertions, 0 deletions
diff --git a/app-text/epdfview/epdfview-0.1.6-r1.ebuild b/app-text/epdfview/epdfview-0.1.6-r1.ebuild
new file mode 100644
index 0000000..05528b3
--- /dev/null
+++ b/app-text/epdfview/epdfview-0.1.6-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/epdfview/epdfview-0.1.6-r1.ebuild,v 1.13 2009/04/10 23:20:31 loki_val Exp $
+
+EAPI="2"
+inherit eutils
+
+DESCRIPTION="Lightweight PDF viewer using Poppler and GTK+ libraries."
+HOMEPAGE="http://trac.emma-soft.com/epdfview/"
+SRC_URI="http://trac.emma-soft.com/epdfview/chrome/site/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="cups nls test"
+
+COMMON_DEPEND=">=virtual/poppler-glib-0.5.0[cairo]
+ >=x11-libs/gtk+-2.6
+ cups? ( >=net-print/cups-1.1 )"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/pkgconfig-0.9
+ nls? ( sys-devel/gettext )
+ test? ( dev-util/cppunit )"
+RDEPEND="${COMMON_DEPEND}
+ nls? ( virtual/libintl )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-gcc-4.3.patch"
+ epatch "${FILESDIR}/${P}-print-segfault.patch"
+
+ # other useful patches
+ epatch "${FILESDIR}/vikeybindings.patch"
+ # my patches
+ epatch "${FILESDIR}/nofitfullscreen.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable cups) \
+ $(use_with nls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS NEWS README THANKS
+}
diff --git a/app-text/epdfview/files/applymypatches.ebuild.patch b/app-text/epdfview/files/applymypatches.ebuild.patch
new file mode 100644
index 0000000..12905c1
--- /dev/null
+++ b/app-text/epdfview/files/applymypatches.ebuild.patch
@@ -0,0 +1,14 @@
+--- epdfview-0.1.6-r1.ebuild 2009-04-11 00:40:27.000000000 +0100
++++ epdfview-0.1.6-r1.ebuild 2009-06-12 14:03:18.000000000 +0100
+@@ -30,6 +30,11 @@ src_unpack() {
+
+ epatch "${FILESDIR}/${P}-gcc-4.3.patch"
+ epatch "${FILESDIR}/${P}-print-segfault.patch"
++
++ # other useful patches
++ epatch "${FILESDIR}/vikeybindings.patch"
++ # my patches
++ epatch "${FILESDIR}/nofitfullscreen.patch"
+ }
+
+ src_configure() {
diff --git a/app-text/epdfview/files/epdfview-0.1.6-gcc-4.3.patch b/app-text/epdfview/files/epdfview-0.1.6-gcc-4.3.patch
new file mode 100644
index 0000000..a8835a9
--- /dev/null
+++ b/app-text/epdfview/files/epdfview-0.1.6-gcc-4.3.patch
@@ -0,0 +1,11 @@
+--- IDocumentLink.h 2008-03-20 19:16:03.000000000 +0100
++++ epdfview-1.6-r1/src/IDocumentLink.h 2008-03-20 19:16:43.000000000 +0100
+@@ -33,7 +33,7 @@
+ class IDocumentLink
+ {
+ public:
+- IDocumentLink (gdouble x1, gdouble y1, gdouble x2, gdouble y1);
++ IDocumentLink (gdouble x1, gdouble y1, gdouble x2, gdouble y2);
+ virtual ~IDocumentLink (void);
+
+ virtual void activate (IDocument *document) = 0;
diff --git a/app-text/epdfview/files/epdfview-0.1.6-print-segfault.patch b/app-text/epdfview/files/epdfview-0.1.6-print-segfault.patch
new file mode 100644
index 0000000..498febb
--- /dev/null
+++ b/app-text/epdfview/files/epdfview-0.1.6-print-segfault.patch
@@ -0,0 +1,95 @@
+--- src/PrintPter.cxx (revision 262)
++++ src/PrintPter.cxx (revision 281)
+@@ -231,17 +231,24 @@
+ view.clearPageSizeList ();
+ int pageSizeToSelect = 0;
+- ppd_choice_t *pageSizeChoice = pageSizeOption->choices;
+- for ( int currentSize = 0 ;
+- currentSize < pageSizeOption->num_choices ;
+- ++currentSize, ++pageSizeChoice )
+- {
+- const gchar *sizeName = pageSizeChoice->text;
+- const gchar *sizeValue = pageSizeChoice->choice;
+-
+- view.addPageSize (_(sizeName), sizeValue);
+- if ( pageSizeChoice->marked )
++ if ( 0 != pageSizeOption )
++ {
++ ppd_choice_t *pageSizeChoice = pageSizeOption->choices;
++ for ( int currentSize = 0 ;
++ currentSize < pageSizeOption->num_choices ;
++ ++currentSize, ++pageSizeChoice )
+ {
+- pageSizeToSelect = currentSize;
++ const gchar *sizeName = pageSizeChoice->text;
++ const gchar *sizeValue = pageSizeChoice->choice;
++
++ view.addPageSize (_(sizeName), sizeValue);
++ if ( pageSizeChoice->marked )
++ {
++ pageSizeToSelect = currentSize;
++ }
+ }
++ }
++ else
++ {
++ view.addPageSize (_("A4"), "A4");
+ }
+ view.selectPageSize (pageSizeToSelect);
+@@ -252,17 +259,24 @@
+ view.clearResolutionList ();
+ int resolutionToSelect = 0;
+- ppd_choice_t *resolutionChoice = resolutionOption->choices;
+- for ( int currentRes = 0 ;
+- currentRes < resolutionOption->num_choices ;
+- ++currentRes, ++resolutionChoice )
+- {
+- const gchar *resName = resolutionChoice->text;
+- const gchar *resValue = resolutionChoice->choice;
+-
+- view.addResolution (_(resName), resValue);
+- if ( resolutionChoice->marked )
++ if ( 0 != resolutionOption )
++ {
++ ppd_choice_t *resolutionChoice = resolutionOption->choices;
++ for ( int currentRes = 0 ;
++ currentRes < resolutionOption->num_choices ;
++ ++currentRes, ++resolutionChoice )
+ {
+- resolutionToSelect = currentRes;
++ const gchar *resName = resolutionChoice->text;
++ const gchar *resValue = resolutionChoice->choice;
++
++ view.addResolution (_(resName), resValue);
++ if ( resolutionChoice->marked )
++ {
++ resolutionToSelect = currentRes;
++ }
+ }
++ }
++ else
++ {
++ view.addResolution (_("300 DPI"), "300x300dpi");
+ }
+ view.selectResolution (resolutionToSelect);
+@@ -272,7 +286,7 @@
+ ppdFindOption (printerPPD, "ColorModel");
+ view.clearColorModelList ();
++ int colorModelToSelect = 0;
+ if ( NULL != colorModelOption )
+ {
+- int colorModelToSelect = 0;
+ ppd_choice_t *colorModelChoice = colorModelOption->choices;
+ for ( int currentColor = 0 ;
+@@ -289,5 +303,4 @@
+ }
+ }
+- view.selectColorModel (colorModelToSelect);
+ }
+ else
+@@ -295,4 +308,5 @@
+ view.addColorModel (_("Grayscale"), "Gray");
+ }
++ view.selectColorModel (colorModelToSelect);
+ ppdClose (printerPPD);
+ }
diff --git a/app-text/epdfview/files/nofitfullscreen.patch b/app-text/epdfview/files/nofitfullscreen.patch
new file mode 100644
index 0000000..72540e4
--- /dev/null
+++ b/app-text/epdfview/files/nofitfullscreen.patch
@@ -0,0 +1,14 @@
+Index: src/gtk/MainView.cxx
+===================================================================
+--- src/gtk/MainView.cxx (revision 312)
++++ src/gtk/MainView.cxx (working copy)
+@@ -699,9 +699,6 @@
+ gtk_widget_hide (toolBar);
+ gtk_widget_hide (m_StatusBar);
+ gtk_widget_hide (m_Sidebar);
+- gtk_toggle_action_set_active (
+- GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (m_UIManager,
+- "/MenuBar/ViewMenu/ZoomFit")), TRUE);
+ }
+ else
+ {
diff --git a/app-text/epdfview/files/vikeybindings.patch b/app-text/epdfview/files/vikeybindings.patch
new file mode 100644
index 0000000..2e4b4d4
--- /dev/null
+++ b/app-text/epdfview/files/vikeybindings.patch
@@ -0,0 +1,42 @@
+Index: src/gtk/PageView.cxx
+===================================================================
+--- src/gtk/PageView.cxx (revision 296)
++++ src/gtk/PageView.cxx (revision 300)
+@@ -572,23 +572,37 @@
+ {
+ case GDK_Left:
+ case GDK_KP_Left:
++ case GDK_h:
+ direction = GTK_SCROLL_STEP_LEFT;
+ horizontal = TRUE;
+ break;
+
+ case GDK_Right:
+ case GDK_KP_Right:
++ case GDK_l:
+ horizontal = TRUE;
+ direction = GTK_SCROLL_STEP_RIGHT;
+ break;
+
+ case GDK_Up:
+ case GDK_KP_Up:
++ case GDK_k:
++ if ( position == adjustment->lower )
++ {
++ pter->scrollToPreviousPage ();
++ return TRUE;
++ }
+ direction = GTK_SCROLL_STEP_UP;
+ break;
+
+ case GDK_Down:
+ case GDK_KP_Down:
++ case GDK_j:
++ if ( position == ( adjustment->upper - adjustment->page_size) )
++ {
++ pter->scrollToNextPage ();
++ return TRUE;
++ }
+ direction = GTK_SCROLL_STEP_DOWN;
+ break;
+