mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
app-editors/editra: Add support from wxpython-3 from Debian (#601088)
Package-Manager: Portage-2.3.6, Repoman-2.3.2
This commit is contained in:
54
app-editors/editra/editra-0.7.20-r2.ebuild
Normal file
54
app-editors/editra/editra-0.7.20-r2.ebuild
Normal file
@@ -0,0 +1,54 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit eutils distutils-r1 fdo-mime
|
||||
|
||||
MY_PN=${PN/e/E}
|
||||
|
||||
DESCRIPTION="Multi-platform text editor supporting over 50 programming languages"
|
||||
HOMEPAGE="http://editra.org https://pypi.python.org/pypi/Editra"
|
||||
SRC_URI="http://editra.org/uploads/src/${MY_PN}-${PV}.tar.gz"
|
||||
|
||||
LICENSE="wxWinLL-3.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="spell"
|
||||
|
||||
DEPEND="
|
||||
dev-python/wxpython:3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/setuptools-0.6[${PYTHON_USEDEP}]"
|
||||
# setuptools is RDEPEND because it's used by the runtime for installing plugins
|
||||
RDEPEND="${DEPEND}
|
||||
spell? ( dev-python/pyenchant[${PYTHON_USEDEP}] )"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${P}-wx30.patch" )
|
||||
|
||||
S="${WORKDIR}"/${MY_PN}-${PV}
|
||||
|
||||
python_compile() {
|
||||
# https://code.google.com/p/editra/issues/detail?id=481
|
||||
distutils-r1_python_compile --no-clean
|
||||
}
|
||||
|
||||
python_install() {
|
||||
distutils-r1_python_install --no-clean
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
|
||||
doicon "${S}"/pixmaps/editra.png
|
||||
make_desktop_entry editra Editra editra "Utility;TextEditor"
|
||||
dodoc FAQ THANKS
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
fdo-mime_desktop_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
fdo-mime_desktop_database_update
|
||||
}
|
||||
44
app-editors/editra/files/editra-0.7.20-wx30.patch
Normal file
44
app-editors/editra/files/editra-0.7.20-wx30.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
Description: Updates for better wxPython 3.0 compatibility
|
||||
Author: Olly Betts <olly@survex.com>
|
||||
Bug-Debian: https://bugs.debian.org/758947
|
||||
Forwarded: no
|
||||
Last-Update: 2014-08-30
|
||||
|
||||
--- editra-0.7.20+dfsg.1.orig/src/ed_main.py
|
||||
+++ editra-0.7.20+dfsg.1/src/ed_main.py
|
||||
@@ -432,7 +432,7 @@ class MainWindow(wx.Frame, viewmgr.Persp
|
||||
|
||||
dlg = wx.FileDialog(self, _("Editra: Open"), fdir, "",
|
||||
''.join(syntax.GenFileFilters()),
|
||||
- wx.OPEN | wx.MULTIPLE | wx.CHANGE_DIR)
|
||||
+ wx.FD_OPEN | wx.FD_MULTIPLE | wx.FD_CHANGE_DIR)
|
||||
dlg.SetFilterIndex(_PGET('FFILTER', 'int', 0))
|
||||
|
||||
if ebmlib.LockCall(self._mlock, dlg.ShowModal) == wx.ID_OK:
|
||||
@@ -680,7 +680,7 @@ class MainWindow(wx.Frame, viewmgr.Persp
|
||||
os.path.dirname(sdir),
|
||||
title.lstrip(u"*"),
|
||||
u''.join(syntax.GenFileFilters()),
|
||||
- wx.SAVE | wx.OVERWRITE_PROMPT)
|
||||
+ wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
|
||||
|
||||
if ebmlib.LockCall(self._mlock, dlg.ShowModal) == wx.ID_OK:
|
||||
path = dlg.GetPath()
|
||||
@@ -713,7 +713,7 @@ class MainWindow(wx.Frame, viewmgr.Persp
|
||||
dlg = wx.FileDialog(self, _("Where to Save Profile?"), \
|
||||
CONFIG['PROFILE_DIR'], "default.ppb", \
|
||||
_("Profile") + " (*.ppb)|*.ppb",
|
||||
- wx.SAVE | wx.OVERWRITE_PROMPT)
|
||||
+ wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
|
||||
|
||||
if ebmlib.LockCall(self._mlock, dlg.ShowModal) == wx.ID_OK:
|
||||
profiler.TheProfile.Write(dlg.GetPath())
|
||||
@@ -732,7 +732,7 @@ class MainWindow(wx.Frame, viewmgr.Persp
|
||||
if evt.Id == ID_LOAD_PROFILE:
|
||||
dlg = wx.FileDialog(self, _("Load a Custom Profile"),
|
||||
CONFIG['PROFILE_DIR'], "default.ppb",
|
||||
- _("Profile") + " (*.ppb)|*.ppb", wx.OPEN)
|
||||
+ _("Profile") + " (*.ppb)|*.ppb", wx.FD_OPEN)
|
||||
|
||||
if ebmlib.LockCall(self._mlock, dlg.ShowModal) == wx.ID_OK:
|
||||
profiler.TheProfile.Load(dlg.GetPath())
|
||||
Reference in New Issue
Block a user