diff options
author | 2013-07-08 05:19:47 +0000 | |
---|---|---|
committer | 2013-07-08 05:19:47 +0000 | |
commit | 0857f58bc6b210c57edc43df5ca227e046a4888e (patch) | |
tree | 358b44581171afd9c33619ed5b43de0f7561d3bc /media-gfx | |
parent | Bump (diff) | |
download | gentoo-2-0857f58bc6b210c57edc43df5ca227e046a4888e.tar.gz gentoo-2-0857f58bc6b210c57edc43df5ca227e046a4888e.tar.bz2 gentoo-2-0857f58bc6b210c57edc43df5ca227e046a4888e.zip |
Stop installing comicthumb for bug #471532. It's a leftover from comix and
has never actually worked properly here. Change imaging dep to virtual. If
you encounter blockers then try uninstalling dev-python/imaging first. Remove
old.
Signed-off-by: Ryan Hill <dirtyepic@gentoo.org>
(Portage version: 2.2.0_alpha187/cvs/Linux x86_64, signed Manifest commit with key 957A8463)
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/mcomix/ChangeLog | 11 | ||||
-rw-r--r-- | media-gfx/mcomix/files/mcomix-0.99-auto-rotate.patch | 188 | ||||
-rw-r--r-- | media-gfx/mcomix/mcomix-0.99-r1.ebuild | 57 | ||||
-rw-r--r-- | media-gfx/mcomix/mcomix-1.00-r1.ebuild | 48 |
4 files changed, 58 insertions, 246 deletions
diff --git a/media-gfx/mcomix/ChangeLog b/media-gfx/mcomix/ChangeLog index ac6527b47ddf..7a34a8b79ec2 100644 --- a/media-gfx/mcomix/ChangeLog +++ b/media-gfx/mcomix/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for media-gfx/mcomix # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/mcomix/ChangeLog,v 1.15 2013/05/26 07:19:54 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/mcomix/ChangeLog,v 1.16 2013/07/08 05:19:47 dirtyepic Exp $ + +*mcomix-1.00-r1 (08 Jul 2013) + + 08 Jul 2013; Ryan Hill <dirtyepic@gentoo.org> -mcomix-0.99-r1.ebuild, + +mcomix-1.00-r1.ebuild, -files/mcomix-0.99-auto-rotate.patch: + Stop installing comicthumb for bug #471532. It's a leftover from comix and + has never actually worked properly here. Change imaging dep to virtual. If + you encounter blockers then try uninstalling dev-python/imaging first. Remove + old. *mcomix-1.00 (26 May 2013) diff --git a/media-gfx/mcomix/files/mcomix-0.99-auto-rotate.patch b/media-gfx/mcomix/files/mcomix-0.99-auto-rotate.patch deleted file mode 100644 index c1783f57dd99..000000000000 --- a/media-gfx/mcomix/files/mcomix-0.99-auto-rotate.patch +++ /dev/null @@ -1,188 +0,0 @@ -http://sourceforge.net/tracker/?func=detail&aid=3548642&group_id=341051&atid=1427791 -http://mcomix.svn.sourceforge.net/viewvc/mcomix?view=revision&revision=781 - - Add option for auto-rotating images based on size. - - This doesn't work for double-page mode, as it would kind of defeat - the purpose of placing two images next to each other. - - ---- mcomix/preferences.py -+++ mcomix/preferences.py -@@ -63,6 +63,7 @@ - 'show thumbnails': True, - 'rotation': 0, - 'auto rotate from exif': True, -+ 'auto rotate depending on size': constants.AUTOROTATE_NEVER, - 'vertical flip': False, - 'horizontal flip': False, - 'keep transformation': False, ---- mcomix/constants.py -+++ mcomix/constants.py -@@ -31,6 +31,8 @@ - ZIP, RAR, TAR, GZIP, BZIP2, PDF, SEVENZIP, LHA = range(8) - NORMAL_CURSOR, GRAB_CURSOR, WAIT_CURSOR, NO_CURSOR = range(4) - LIBRARY_DRAG_EXTERNAL_ID, LIBRARY_DRAG_BOOK_ID, LIBRARY_DRAG_COLLECTION_ID = range(3) -+AUTOROTATE_NEVER, AUTOROTATE_WIDTH_90, AUTOROTATE_WIDTH_270, \ -+ AUTOROTATE_HEIGHT_90, AUTOROTATE_HEIGHT_270 = range(5) - - RESPONSE_REVERT_TO_DEFAULT = 3 - RESPONSE_REMOVE = 4 ---- mcomix/ui.py -+++ mcomix/ui.py -@@ -13,6 +13,7 @@ - from mcomix import constants - from mcomix import status - from mcomix import file_chooser_main_dialog -+from mcomix.preferences import prefs - from mcomix.library import main_dialog as library_main_dialog - - class MainUI(gtk.UIManager): -@@ -97,6 +98,9 @@ - ('menu_tools', None, _('_Tools')), - ('menu_help', None, _('_Help')), - ('menu_transform', 'mcomix-transform', _('_Transform image')), -+ ('menu_autorotate', None, _('_Auto-rotate image')), -+ ('menu_autorotate_width', None, _('...when width exceeds height')), -+ ('menu_autorotate_height', None, _('...when height exceeds width')), - ('expander', None, None, None, None, None)]) - - self._actiongroup.add_toggle_actions([ -@@ -146,6 +150,20 @@ - 'a', _('Manual zoom mode'), constants.ZOOM_MODE_MANUAL)], - 3, window.change_zoom_mode) - -+ # Automatically rotate image if width>height or height>width -+ self._actiongroup.add_radio_actions([ -+ ('no_autorotation', None, _('Never'), -+ None, None, constants.AUTOROTATE_NEVER), -+ ('rotate_90_width', 'mcomix-rotate-90', _('_Rotate 90 degrees CW'), -+ None, None, constants.AUTOROTATE_WIDTH_90), -+ ('rotate_270_width', 'mcomix-rotate-270', _('Rotat_e 90 degrees CCW'), -+ None, None, constants.AUTOROTATE_WIDTH_270), -+ ('rotate_90_height', 'mcomix-rotate-90', _('_Rotate 90 degrees CW'), -+ None, None, constants.AUTOROTATE_HEIGHT_90), -+ ('rotate_270_height', 'mcomix-rotate-270', _('Rotat_e 90 degrees CCW'), -+ None, None, constants.AUTOROTATE_HEIGHT_270)], -+ prefs['auto rotate depending on size'], window.change_autorotation) -+ - self._actiongroup.add_actions([ - ('about', gtk.STOCK_ABOUT, _('_About'), - None, None, dialog_handler.open_dialog)], (window, 'about-dialog')) -@@ -280,6 +298,20 @@ - <menuitem action="rotate_270" /> - <menuitem action="rotate_180" /> - <separator /> -+ <menu action="menu_autorotate"> -+ <menuitem action="no_autorotation" /> -+ <separator /> -+ <menuitem action="menu_autorotate_height" /> -+ <separator /> -+ <menuitem action="rotate_90_height" /> -+ <menuitem action="rotate_270_height" /> -+ <separator /> -+ <menuitem action="menu_autorotate_width" /> -+ <separator /> -+ <menuitem action="rotate_90_width" /> -+ <menuitem action="rotate_270_width" /> -+ </menu> -+ <separator /> - <menuitem action="flip_horiz" /> - <menuitem action="flip_vert" /> - <separator /> ---- mcomix/main.py -+++ mcomix/main.py -@@ -203,6 +203,9 @@ - prefs['vertical flip'] = False - prefs['horizontal flip'] = False - -+ self.actiongroup.get_action('menu_autorotate_width').set_sensitive(False) -+ self.actiongroup.get_action('menu_autorotate_height').set_sensitive(False) -+ - self.add(table) - table.show() - self._main_layout.show() -@@ -305,15 +308,9 @@ - right_unscaled_x = right_pixbuf.get_width() - right_unscaled_y = right_pixbuf.get_height() - -- left_rotation = prefs['rotation'] -- right_rotation = prefs['rotation'] -+ left_rotation = self._get_pixbuf_rotation(left_pixbuf, True) -+ right_rotation = self._get_pixbuf_rotation(right_pixbuf, True) - -- if prefs['auto rotate from exif']: -- left_rotation += image_tools.get_implied_rotation(left_pixbuf) -- left_rotation = left_rotation % 360 -- right_rotation += image_tools.get_implied_rotation(right_pixbuf) -- right_rotation = right_rotation % 360 -- - if left_rotation in (90, 270): - total_width = left_unscaled_y - total_height = left_unscaled_x -@@ -385,11 +382,7 @@ - pixbuf = self.imagehandler.get_pixbufs(single=True)[ 0 ] - width, height = pixbuf.get_width(), pixbuf.get_height() - -- rotation = prefs['rotation'] -- if prefs['auto rotate from exif']: -- rotation += image_tools.get_implied_rotation(pixbuf) -- rotation = rotation % 360 -- -+ rotation = self._get_pixbuf_rotation(pixbuf) - if rotation in (90, 270): - width, height = height, width - -@@ -502,6 +495,37 @@ - self.statusbar.update() - self.update_title() - -+ def _get_pixbuf_rotation(self, pixbuf, no_autorotation=False): -+ """ Determines if a pixbuf must be rotated before being displayed. -+ Returns the degree of rotation (0, 90, 180, 270). """ -+ -+ width, height = pixbuf.get_width(), pixbuf.get_height() -+ rotation = prefs['rotation'] -+ if prefs['auto rotate from exif']: -+ rotation += image_tools.get_implied_rotation(pixbuf) -+ rotation = rotation % 360 -+ -+ if (height > width and -+ not no_autorotation and -+ prefs['auto rotate depending on size'] in -+ (constants.AUTOROTATE_HEIGHT_90, constants.AUTOROTATE_HEIGHT_270)): -+ -+ if prefs['auto rotate depending on size'] == constants.AUTOROTATE_HEIGHT_90: -+ rotation = 90 -+ else: -+ rotation = 270 -+ elif (width > height and -+ not no_autorotation and -+ prefs['auto rotate depending on size'] in -+ (constants.AUTOROTATE_WIDTH_90, constants.AUTOROTATE_WIDTH_270)): -+ -+ if prefs['auto rotate depending on size'] == constants.AUTOROTATE_WIDTH_90: -+ rotation = 90 -+ else: -+ rotation = 270 -+ -+ return rotation -+ - def _page_available(self, page): - """ Called whenever a new page is ready for displaying. """ - # Refresh display when currently opened page becomes available. -@@ -623,6 +647,14 @@ - fitmode.set_scale_up(prefs['stretch']) - self.zoom.set_fit_mode(fitmode) - -+ def change_autorotation(self, radioaction=None, *args): -+ """ Switches between automatic rotation modes, depending on which -+ radiobutton is currently activated. """ -+ if radioaction: -+ prefs['auto rotate depending on size'] = radioaction.get_current_value() -+ -+ self.draw_image() -+ - def change_stretch(self, toggleaction, *args): - """ Toggles stretching small images. """ - prefs['stretch'] = toggleaction.get_active() diff --git a/media-gfx/mcomix/mcomix-0.99-r1.ebuild b/media-gfx/mcomix/mcomix-0.99-r1.ebuild deleted file mode 100644 index 1897059fa936..000000000000 --- a/media-gfx/mcomix/mcomix-0.99-r1.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/mcomix/mcomix-0.99-r1.ebuild,v 1.1 2013/01/01 03:04:56 dirtyepic Exp $ - -EAPI="3" - -SUPPORT_PYTHON_ABIS=1 -PYTHON_USE_WITH="sqlite" -RESTRICT_PYTHON_ABIS="3.* *-jython" - -inherit distutils eutils fdo-mime python - -DESCRIPTION="A fork of comix, a GTK image viewer for comic book archives." -HOMEPAGE="http://mcomix.sourceforge.net" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="dev-python/setuptools" -RDEPEND="${DEPEND} - app-arch/unrar - >=dev-python/imaging-1.1.5 - >=dev-python/pygtk-2.14 - virtual/jpeg - x11-libs/gdk-pixbuf - !media-gfx/comix" - -src_prepare() { - epatch "${FILESDIR}"/${P}-auto-rotate.patch -} - -src_install() { - distutils_src_install - insinto /etc/gconf/schemas/ - doins "${S}"/mime/comicbook.schemas || die - dobin "${S}"/mime/comicthumb || die - dodoc ChangeLog README || die -} - -pkg_postinst() { - distutils_pkg_postinst - fdo-mime_mime_database_update - fdo-mime_desktop_database_update - echo - elog "You can optionally add support for 7z or LHA archives by installing" - elog "app-arch/p7zip or app-arch/lha." - echo -} - -pkg_postrm() { - distutils_pkg_postrm - fdo-mime_mime_database_update - fdo-mime_desktop_database_update -} diff --git a/media-gfx/mcomix/mcomix-1.00-r1.ebuild b/media-gfx/mcomix/mcomix-1.00-r1.ebuild new file mode 100644 index 000000000000..d73cd3705b98 --- /dev/null +++ b/media-gfx/mcomix/mcomix-1.00-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/mcomix/mcomix-1.00-r1.ebuild,v 1.1 2013/07/08 05:19:47 dirtyepic Exp $ + +EAPI="5" + +PYTHON_COMPAT=( python{2_6,2_7} ) +PYTHON_REQ_USE="sqlite" + +inherit distutils-r1 eutils fdo-mime + +DESCRIPTION="A fork of comix, a GTK image viewer for comic book archives." +HOMEPAGE="http://mcomix.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND} + >=dev-python/pygtk-2.14[${PYTHON_USEDEP}] + virtual/jpeg + virtual/python-imaging[${PYTHON_USEDEP}] + x11-libs/gdk-pixbuf + !media-gfx/comix" + +DOCS=( ChangeLog README ) + +pkg_postinst() { + fdo-mime_mime_database_update + fdo-mime_desktop_database_update + echo + elog "Additional packages are required to open most common comic files:" + elog + elog " cbr: app-arch/unrar" + elog " cbz: app-arch/unzip" + elog + elog "You can also add support for 7z or LHA archives by installing" + elog "app-arch/p7zip or app-arch/lha." + echo +} + +pkg_postrm() { + fdo-mime_mime_database_update + fdo-mime_desktop_database_update +} |