diff options
author | Tom Wijsman <tomwij@gentoo.org> | 2014-03-12 17:22:13 +0000 |
---|---|---|
committer | Tom Wijsman <tomwij@gentoo.org> | 2014-03-12 17:22:13 +0000 |
commit | 4fbe4ee9e3e27024785686c67811d304f8e4544f (patch) | |
tree | 8d4a17e8cca824b840080fd8f629df5a86d6b29b /app-text/mate-document-viewer | |
parent | New ebuild for app-editors/mate-text-editor, Pluma text editor for the MATE d... (diff) | |
download | gentoo-2-4fbe4ee9e3e27024785686c67811d304f8e4544f.tar.gz gentoo-2-4fbe4ee9e3e27024785686c67811d304f8e4544f.tar.bz2 gentoo-2-4fbe4ee9e3e27024785686c67811d304f8e4544f.zip |
New ebuild for app-text/mate-document-viewer, Atril document viewer for MATE; imported from the mate-overlay, reviewed and adjusted.
(Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)
Diffstat (limited to 'app-text/mate-document-viewer')
4 files changed, 289 insertions, 0 deletions
diff --git a/app-text/mate-document-viewer/ChangeLog b/app-text/mate-document-viewer/ChangeLog new file mode 100644 index 000000000000..02861efdbe9d --- /dev/null +++ b/app-text/mate-document-viewer/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for app-text/mate-document-viewer +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/mate-document-viewer/ChangeLog,v 1.1 2014/03/12 17:22:13 tomwij Exp $ + +*mate-document-viewer-1.6.2 (12 Mar 2014) + + 12 Mar 2014; Tom Wijsman <TomWij@gentoo.org> + +files/mate-document-viewer-1.6-libsecret.patch, + +mate-document-viewer-1.6.2.ebuild, +metadata.xml: + New ebuild for app-text/mate-document-viewer, Atril document viewer for MATE; + imported from the mate-overlay, reviewed and adjusted. diff --git a/app-text/mate-document-viewer/files/mate-document-viewer-1.6-libsecret.patch b/app-text/mate-document-viewer/files/mate-document-viewer-1.6-libsecret.patch new file mode 100644 index 000000000000..7c5ab06f0ba9 --- /dev/null +++ b/app-text/mate-document-viewer/files/mate-document-viewer-1.6-libsecret.patch @@ -0,0 +1,168 @@ +diff --git a/configure.ac b/configure.ac +index d2a4b87..fd2ec89 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -133,7 +133,7 @@ AC_MSG_RESULT([$with_gtk]) + dnl Specify required versions of dependencies + CAIRO_REQUIRED=1.9.10 + GLIB_REQUIRED=2.25.11 +-KEYRING_REQUIRED=1.1.0 ++LIBSECRET_REQUIRED=0.5 + + case "$with_gtk" in + 2.0) GTK_API_VERSION=2.0 +@@ -268,12 +268,12 @@ if test "$with_gtk_unix_print" = "yes"; then + fi + + # ********************* +-# MATE Keyring support ++# Keyring support + # ********************* + + AC_ARG_WITH(keyring, + [AS_HELP_STRING([--without-keyring], +- [Disable the use of mate-keyring])], ++ [Disable the use of libsecret and keyring])], + [], + [case "$with_platform" in + mate) with_keyring=yes ;; +@@ -283,7 +283,7 @@ AC_ARG_WITH(keyring, + AM_CONDITIONAL([WITH_KEYRING],[test "$with_keyring" = "yes"]) + + if test "$with_keyring" = "yes"; then +- PKG_CHECK_MODULES(KEYRING, mate-keyring-1 >= $KEYRING_REQUIRED) ++ PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= $LIBSECRET_REQUIRED) + AC_DEFINE([WITH_KEYRING],[1],[Define if KEYRING support is enabled]) + fi + +@@ -341,8 +341,8 @@ BACKEND_LIBS="$BACKEND_LIBS -lm" + AC_SUBST(BACKEND_CFLAGS) + AC_SUBST(BACKEND_LIBS) + +-SHELL_CFLAGS="$SHELL_CORE_CFLAGS $KEYRING_CFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE $DEBUG_FLAGS" +-SHELL_LIBS="$SHELL_CORE_LIBS $KEYRING_LIBS -lz -lm" ++SHELL_CFLAGS="$SHELL_CORE_CFLAGS $LIBSECRET_CFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE $DEBUG_FLAGS" ++SHELL_LIBS="$SHELL_CORE_LIBS $LIBSECRET_LIBS -lz -lm" + AC_SUBST(SHELL_CFLAGS) + AC_SUBST(SHELL_LIBS) + +diff --git a/shell/ev-keyring.c b/shell/ev-keyring.c +index ac1d33a..3a9cd4c 100644 +--- a/shell/ev-keyring.c ++++ b/shell/ev-keyring.c +@@ -25,24 +25,25 @@ + #include "ev-keyring.h" + + #ifdef WITH_KEYRING +-#include <mate-keyring.h> ++#include <libsecret/secret.h> + +-static const MateKeyringPasswordSchema doc_password_schema = { +- MATE_KEYRING_ITEM_GENERIC_SECRET, ++static const SecretSchema doc_password_schema = { ++ "org.mate.Atril.Document", ++ SECRET_SCHEMA_DONT_MATCH_NAME, + { +- { "type", MATE_KEYRING_ATTRIBUTE_TYPE_STRING }, +- { "uri", MATE_KEYRING_ATTRIBUTE_TYPE_STRING }, ++ { "type", SECRET_SCHEMA_ATTRIBUTE_STRING }, ++ { "uri", SECRET_SCHEMA_ATTRIBUTE_STRING }, + { NULL, 0 } + } + }; +-const MateKeyringPasswordSchema *EV_DOCUMENT_PASSWORD_SCHEMA = &doc_password_schema; ++const SecretSchema *EV_DOCUMENT_PASSWORD_SCHEMA = &doc_password_schema; + #endif /* WITH_KEYRING */ + + gboolean + ev_keyring_is_available (void) + { + #ifdef WITH_KEYRING +- return mate_keyring_is_available (); ++ return TRUE; + #else + return FALSE; + #endif +@@ -51,31 +52,17 @@ + gchar * + ev_keyring_lookup_password (const gchar *uri) + { +- gchar *retval = NULL; + #ifdef WITH_KEYRING +- MateKeyringResult result; +- gchar *password = NULL; +- + g_return_val_if_fail (uri != NULL, NULL); + +- if (!mate_keyring_is_available ()) +- return NULL; +- +- result = mate_keyring_find_password_sync (EV_DOCUMENT_PASSWORD_SCHEMA, +- &password, +- "type", "document_password", +- "uri", uri, +- NULL); +- if (result != MATE_KEYRING_RESULT_OK || !password) { +- if (password) +- mate_keyring_free_password (password); +- return NULL; +- } +- +- retval = g_strdup (password); +- mate_keyring_free_password (password); ++ return secret_password_lookup_sync (EV_DOCUMENT_PASSWORD_SCHEMA, ++ NULL, NULL, ++ "type", "document_password", ++ "uri", uri, ++ NULL); ++#else ++ return NULL; + #endif /* WITH_KEYRING */ +- return retval; + } + + gboolean +@@ -84,32 +71,29 @@ + GPasswordSave flags) + { + #ifdef WITH_KEYRING +- MateKeyringResult result; +- const gchar *keyring; +- gchar *name; +- gchar *unescaped_uri; ++ const gchar *keyring; ++ gchar *name; ++ gchar *unescaped_uri; ++ gboolean retval; + + g_return_val_if_fail (uri != NULL, FALSE); + +- if (!mate_keyring_is_available ()) +- return FALSE; +- + if (flags == G_PASSWORD_SAVE_NEVER) + return FALSE; + +- keyring = (flags == G_PASSWORD_SAVE_FOR_SESSION) ? "session" : NULL; ++ keyring = (flags == G_PASSWORD_SAVE_FOR_SESSION) ? SECRET_COLLECTION_SESSION : NULL; + unescaped_uri = g_uri_unescape_string (uri, NULL); + name = g_strdup_printf (_("Password for document %s"), unescaped_uri); + g_free (unescaped_uri); + +- result = mate_keyring_store_password_sync (EV_DOCUMENT_PASSWORD_SCHEMA, +- keyring, name, password, +- "type", "document_password", +- "uri", uri, +- NULL); ++ retval = secret_password_store_sync (EV_DOCUMENT_PASSWORD_SCHEMA, keyring, ++ name, password, NULL, NULL, ++ "type", "document_password", ++ "uri", uri, ++ NULL); + g_free (name); + +- return (result == MATE_KEYRING_RESULT_OK); ++ return retval; + #else + return FALSE; + #endif /* WITH_KEYRING */ diff --git a/app-text/mate-document-viewer/mate-document-viewer-1.6.2.ebuild b/app-text/mate-document-viewer/mate-document-viewer-1.6.2.ebuild new file mode 100644 index 000000000000..60dbbf494203 --- /dev/null +++ b/app-text/mate-document-viewer/mate-document-viewer-1.6.2.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/mate-document-viewer/mate-document-viewer-1.6.2.ebuild,v 1.1 2014/03/12 17:22:13 tomwij Exp $ + +EAPI="5" + +ELTCONF="--portage" +GCONF_DEBUG="yes" +GNOME2_LA_PUNT="yes" + +inherit autotools gnome2 versionator + +MATE_BRANCH="$(get_version_component_range 1-2)" + +SRC_URI="http://pub.mate-desktop.org/releases/${MATE_BRANCH}/${P}.tar.xz" +DESCRIPTION="Atril document viewer for MATE" +HOMEPAGE="http://mate-desktop.org" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="caja dbus debug djvu dvi +introspection gnome-keyring +ps t1lib tiff xps" + +RDEPEND=">=app-text/poppler-0.14:0=[cairo] + app-text/rarian:0 + >=dev-libs/glib-2.25.11:2 + >=dev-libs/libxml2-2.5:2 + >=x11-libs/gtk+-2.21.5:2[introspection?] + >=x11-libs/libSM-1:0 + >=x11-libs/cairo-1.9.10:0 + >=x11-themes/mate-icon-theme-1.6:0 + caja? ( >=mate-base/mate-file-manager-1.6:0[introspection?] ) + djvu? ( >=app-text/djvu-3.5.17:0 ) + dvi? ( + virtual/tex-base:0 + t1lib? ( >=media-libs/t1lib-5:5 ) + ) + gnome-keyring? ( >=app-crypt/libsecret-0.5:0 ) + introspection? ( >=dev-libs/gobject-introspection-0.6:0 ) + ps? ( >=app-text/libspectre-0.2:0 ) + tiff? ( >=media-libs/tiff-3.6:0 ) + xps? ( >=app-text/libgxps-0.0.1:0 )" + +DEPEND="${RDEPEND} + app-text/docbook-xml-dtd:4.1.2 + >=app-text/mate-doc-utils-1.6:0 + >=app-text/scrollkeeper-dtd-1:1.0 + >=dev-util/intltool-0.35:* + virtual/pkgconfig:* + sys-devel/gettext:*" + +# Tests use dogtail which is not available on Gentoo. +RESTRICT="test" + +src_prepare() { + # Fix .desktop categories, upstream bug #666346. + sed -e "s:GTK\;Graphics\;VectorGraphics\;Viewer\;:GTK\;Office\;Viewer\;Graphics\;VectorGraphics;:g" -i data/atril.desktop.in.in || die + + epatch "${FILESDIR}"/${PN}-1.6-libsecret.patch + + eautoreconf + + gnome2_src_prepare +} + +src_configure() { + # Passing --disable-help would drop offline help, that would be inconsistent + # with helps of the most of GNOME apps that doesn't require network for that. + gnome2_src_configure \ + --disable-tests \ + --enable-comics \ + --enable-help \ + --enable-pdf \ + --enable-pixbuf \ + --enable-thumbnailer \ + --with-smclient=xsmp \ + --with-platform=mate \ + --with-gtk=2.0 \ + $(use_enable dbus) \ + $(use_enable djvu) \ + $(use_enable dvi) \ + $(use_with gnome-keyring keyring) \ + $(use_enable introspection) \ + $(use_enable caja) \ + $(use_enable ps) \ + $(use_enable t1lib) \ + $(use_enable tiff) \ + $(use_enable xps) +} + +DOCS="AUTHORS NEWS README TODO" diff --git a/app-text/mate-document-viewer/metadata.xml b/app-text/mate-document-viewer/metadata.xml new file mode 100644 index 000000000000..12b09285ce38 --- /dev/null +++ b/app-text/mate-document-viewer/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>TomWij@gentoo.org</email> + <name>Tom Wijsman</name> + </maintainer> + <use> + <flag name="caja">Enable property page extension in + <pkg>mate-base/mate-file-manager</pkg></flag> + <flag name="dvi">Enable build-in DVI viewer</flag> + <flag name="ps">Enable build-in postscript viewer</flag> + <flag name="t1lib">Enable the Type-1 fonts for the build-in DVI viewer + (<pkg>media-libs/t1lib</pkg>)</flag> + <flag name="xps">Enable XPS viewer using + <pkg>app-text/libxps</pkg></flag> + </use> +</pkgmetadata> |