summaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorOlivier Duchateau <olivierd@FreeBSD.org>2014-02-22 16:58:05 +0000
committerOlivier Duchateau <olivierd@FreeBSD.org>2014-02-22 16:58:05 +0000
commit02972cd50f2b05ceb99b285c3c1cade7f07aa260 (patch)
tree90f6f42310453ac6d33ef0444edc128eb43cb52d /net-im
parent- Update to version 1.19 (diff)
- Update to 3.0
Notes
Notes: svn path=/head/; revision=345667
Diffstat (limited to 'net-im')
-rw-r--r--net-im/turpial/Makefile83
-rw-r--r--net-im/turpial/distinfo4
-rw-r--r--net-im/turpial/files/extra-patch-argparse-turpial_main.py114
-rw-r--r--net-im/turpial/files/extra-patch-optparse-turpial_main.py13
-rw-r--r--net-im/turpial/files/patch-setup.py15
-rw-r--r--net-im/turpial/files/patch-turpial__singleton.py20
-rw-r--r--net-im/turpial/files/patch-turpial__ui__lang.py13
-rw-r--r--net-im/turpial/files/patch-turpial__ui__qt__worker.py17
-rw-r--r--net-im/turpial/files/patch-turpial__ui__util.py18
-rw-r--r--net-im/turpial/files/patch-turpial_api_interfaces_protocol.py11
-rw-r--r--net-im/turpial/files/patch-turpial_ui_gtk_about.py35
-rw-r--r--net-im/turpial/files/patch-turpial_ui_gtk_statuslist.py129
-rw-r--r--net-im/turpial/pkg-plist267
13 files changed, 113 insertions, 626 deletions
diff --git a/net-im/turpial/Makefile b/net-im/turpial/Makefile
index d4704034b95e..7790e567ce4c 100644
--- a/net-im/turpial/Makefile
+++ b/net-im/turpial/Makefile
@@ -2,67 +2,51 @@
# $FreeBSD$
PORTNAME= turpial
-PORTVERSION= 1.6.9
+PORTVERSION= 3.0
CATEGORIES= net-im python
MASTER_SITES= http://files.turpial.org.ve/sources/stable/
MAINTAINER= ports@FreeBSD.org
-COMMENT= Twitter and Identi.ca client written in Python
+COMMENT= Twitter client written in Python
LICENSE= GPLv3
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Babel>=1.3:${PORTSDIR}/devel/py-babel
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}notify>=0.1.1:${PORTSDIR}/devel/py-notify \
- ${PYTHON_PKGNAMEPREFIX}webkitgtk>=1.1.8:${PORTSDIR}/www/py-webkitgtk \
- ${PYTHON_PKGNAMEPREFIX}setproctitle>=1.1.7:${PORTSDIR}/devel/py-setproctitle \
- ${PYTHON_PKGNAMEPREFIX}xdg>=0.19:${PORTSDIR}/devel/py-xdg
+ ${PYTHON_PKGNAMEPREFIX}setproctitle>=1.1.7:${PORTSDIR}/devel/py-setproctitle \
+ ${PYTHON_PKGNAMEPREFIX}Jinja2>=2.7.1:${PORTSDIR}/devel/py-Jinja2 \
+ ${PYTHON_PKGNAMEPREFIX}libturpial>=1.6.0:${PORTSDIR}/net-im/py-libturpial
USE_PYTHON= 2
-USE_GNOME= pygobject pygtk2
-USE_GSTREAMER= python
+USE_PYDISTUTILS= yes
+PYDISTUTILS_AUTOPLIST= yes
+INSTALLS_ICONS= yes
-REINPLACE_ARGS= -i ""
+PYQT4_PORTS= core gui network phonon webkit
-DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}
-DATADIR= ${PREFIX}/share/${PORTNAME}
+.include "${.CURDIR}/../../devel/py-qt4/bsd.pyqt.mk"
-LOCALES_DIR= ca ca_ES cs de en es es_ES es_VE eu fr gl he hu it nl nn \
- pt pt_BR ru ru_RU sr uk_UA zh_CN zh_TW
+.for component in ${PYQT4_PORTS}
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}qt4-${component}>=0:${PORTSDIR}/${${component}_PORT}
+.endfor
-.include <bsd.port.pre.mk>
+LOCALES_DIR= ca de eo es fr it ja pt_BR pt_PT ru_RU tr
-# Since Python > 2.7, optparse module is deprecated
-.if ${PYTHON_REL} >= 270
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-argparse-turpial_main.py
-.else
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-optparse-turpial_main.py
-.endif
+post-extract:
+# setuptools doesn't exclude these directories
+.for dir in unity gtk
+ @${RM} -Rf ${WRKSRC}/turpial/ui/${dir}
+.endfor
post-patch:
- @${FIND} ${WRKSRC}/turpial -type f -name '*.py' \
- | ${XARGS} ${REINPLACE_CMD} 's|bin/python|bin/env python| ; \
- s|Linux|FreeBSD|g ; \
- s|from turpial\.|from |g ; \
- s|%%PREFIX%%|${PREFIX}|g'
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+ ${WRKSRC}/turpial/ui/lang.py
-do-build:
+post-build:
@cd ${WRKSRC} && \
${PYTHON_CMD} setup.py compile_catalog --directory turpial/i18n
- @${PYTHON_CMD} -m compileall ${WRKSRC}
-
- @${ECHO_CMD} "#!/bin/sh" >> ${WRKDIR}/run.sh
- @${ECHO_CMD} "" >> ${WRKDIR}/run.sh
- @${ECHO_CMD} "cd ${DATADIR} || exit 1" >> ${WRKDIR}/run.sh
- @${ECHO_CMD} "exec ${PYTHON_CMD} main.py" >> ${WRKDIR}/run.sh
-
-pre-install:
- @${FIND} ${WRKSRC} -type f -name '*.orig' \
- | ${XARGS} rm
-
-do-install:
- @${MKDIR} ${STAGEDIR}${PREFIX}/bin
- @${INSTALL_SCRIPT} ${WRKDIR}/run.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+post-install:
.for dir in ${LOCALES_DIR}
@${MKDIR} ${STAGEDIR}${PREFIX}/share/locale/${dir}/LC_MESSAGES
@cd ${WRKSRC}/turpial/i18n && \
@@ -70,23 +54,4 @@ do-install:
${STAGEDIR}${PREFIX}/share/locale/${dir}/LC_MESSAGES
.endfor
-.for dir in ${PORTNAME} pixmaps applications
- @${MKDIR} ${STAGEDIR}${PREFIX}/share/${dir}
-.endfor
- @cd ${WRKSRC} && \
- ${INSTALL_DATA} turpial/data/pixmaps/turpial.png \
- ${STAGEDIR}${PREFIX}/share/pixmaps ; \
- ${INSTALL_DATA} ${PORTNAME}.desktop \
- ${STAGEDIR}${PREFIX}/share/applications
- @${RM} -R ${WRKSRC}/turpial/i18n
- @cd ${WRKSRC}/turpial && \
- ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}
-
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
- @cd ${WRKSRC} && \
- ${INSTALL_DATA} AUTHORS COPYING TRANSLATORS README.rst \
- ${STAGEDIR}${DOCSDIR}
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-im/turpial/distinfo b/net-im/turpial/distinfo
index 553e03d50cd9..9daad06d9ddd 100644
--- a/net-im/turpial/distinfo
+++ b/net-im/turpial/distinfo
@@ -1,2 +1,2 @@
-SHA256 (turpial-1.6.9.tar.gz) = cf059ef3010c400fd57e30081cd2d54daa0a062817c0ab4b08b7c6c7deac0177
-SIZE (turpial-1.6.9.tar.gz) = 760609
+SHA256 (turpial-3.0.tar.gz) = 1da62df141191dbb009e7c36c150c924e5285aca4fac2c8394d1e570df922db8
+SIZE (turpial-3.0.tar.gz) = 910021
diff --git a/net-im/turpial/files/extra-patch-argparse-turpial_main.py b/net-im/turpial/files/extra-patch-argparse-turpial_main.py
deleted file mode 100644
index 652ff5ddab9d..000000000000
--- a/net-im/turpial/files/extra-patch-argparse-turpial_main.py
+++ /dev/null
@@ -1,114 +0,0 @@
---- turpial/main.py.orig 2011-03-23 17:50:07.000000000 +0100
-+++ turpial/main.py 2011-03-27 16:33:05.000000000 +0200
-@@ -12,7 +12,7 @@
- import base64
- import logging
- import getpass
--from optparse import OptionParser
-+import argparse
-
- from turpial.api.servicesapi import HTTPServices
- from turpial.api.turpialapi import TurpialAPI
-@@ -21,8 +21,8 @@
-
- try:
- import ctypes
-- libc = ctypes.CDLL('libc.so.6')
-- libc.prctl(15, 'turpial', 0, 0)
-+ libc = ctypes.CDLL(os.path.join('/usr/lib', 'libc.so'))
-+ libc.setproctitle('turpial')
- except ImportError:
- pass
-
-@@ -44,34 +44,34 @@
- ui_avail = ui_avail[:-1] + ')'
- default_ui = INTERFACES[1] if len(INTERFACES) > 1 else ''
-
-- parser = OptionParser()
-- parser.add_option('-d', '--debug', dest='debug', action='store_true',
-+ parser = argparse.ArgumentParser()
-+ parser.add_argument('-d', '--debug', dest='debug', action='store_true',
- help='show debug info in shell during execution', default=False)
-- parser.add_option('-i', '--interface', dest='interface',
-+ parser.add_argument('-i', '--interface', dest='interface',
- help='select interface to use %s' % ui_avail, default=default_ui)
-- parser.add_option('-c', '--clean', dest='clean', action='store_true',
-+ parser.add_argument('-c', '--clean', dest='clean', action='store_true',
- help='clean all bytecodes', default=False)
-- parser.add_option('-s', '--save-credentials', dest='save', action='store_true',
-+ parser.add_argument('-s', '--save-credentials', dest='save', action='store_true',
- help='save user credentials', default=False)
-- parser.add_option('--version', dest='version', action='store_true',
-+ parser.add_argument('--version', dest='version', action='store_true',
- help='show the version of Turpial and exit', default=False)
-- parser.add_option('--test', dest='test', action='store_true',
-+ parser.add_argument('--test', dest='test', action='store_true',
- help='only load timeline and friends', default=False)
-- parser.add_option('--no-sound', dest='no_sound', action='store_true',
-+ parser.add_argument('--no-sound', dest='no_sound', action='store_true',
- help='disable the sounds module', default=False)
-- parser.add_option('--no-notif', dest='no_notif', action='store_true',
-+ parser.add_argument('--no-notif', dest='no_notif', action='store_true',
- help='disable the notifications module', default=False)
-
-- (options, args) = parser.parse_args()
-+ args = parser.parse_args()
-
- self.config = None
- self.global_cfg = ConfigApp()
- self.protocol_cfg = {}
- self.profile = None
-- self.testmode = options.test
-- self.interface = options.interface
-- self.no_sound = options.no_sound
-- self.no_notif = options.no_notif
-+ self.testmode = args.test
-+ self.interface = args.interface
-+ self.no_sound = args.no_sound
-+ self.no_notif = args.no_notif
- self.httpserv = None
- self.api = None
- self.version = self.global_cfg.read('App', 'version')
-@@ -79,34 +79,34 @@
- for p in PROTOCOLS:
- self.protocol_cfg[p] = ConfigProtocol(p)
-
-- if options.debug or options.clean:
-+ if args.debug or args.clean:
- logging.basicConfig(level=logging.DEBUG)
- else:
- logging.basicConfig(level=logging.INFO)
- self.log = logging.getLogger('Controller')
-
-- if options.clean:
-+ if args.clean:
- self.__clean()
- sys.exit(0)
-
-- if options.version:
-+ if args.version:
- print "Turpial v%s" % self.version
- print "Python v%X" % sys.hexversion
- sys.exit(0)
-
-- if options.save:
-+ if args.save:
- try:
- self.__save_credentials()
- except KeyboardInterrupt:
- self.log.debug('Interceptado Keyboard Interrupt')
- sys.exit(0)
-
-- self.interface = options.interface
-- if options.interface == 'gtk+' and ('gtk+' in INTERFACES):
-+ self.interface = args.interface
-+ if args.interface == 'gtk+' and ('gtk+' in INTERFACES):
- self.ui = _GTK(self, extend=True)
-- elif options.interface == 'gtk' and ('gtk' in INTERFACES):
-+ elif args.interface == 'gtk' and ('gtk' in INTERFACES):
- self.ui = _GTK(self)
-- elif options.interface == 'cmd' and ('cmd' in INTERFACES):
-+ elif args.interface == 'cmd' and ('cmd' in INTERFACES):
- self.ui = _CMD(self, args)
- else:
- print 'No existe una interfaz válida. Las interfaces válidas son: %s' % INTERFACES
diff --git a/net-im/turpial/files/extra-patch-optparse-turpial_main.py b/net-im/turpial/files/extra-patch-optparse-turpial_main.py
deleted file mode 100644
index 430b4e14a0ac..000000000000
--- a/net-im/turpial/files/extra-patch-optparse-turpial_main.py
+++ /dev/null
@@ -1,13 +0,0 @@
---- turpial/main.py.orig 2011-03-23 17:50:07.000000000 +0100
-+++ turpial/main.py 2011-03-27 11:35:32.000000000 +0200
-@@ -21,8 +21,8 @@
-
- try:
- import ctypes
-- libc = ctypes.CDLL('libc.so.6')
-- libc.prctl(15, 'turpial', 0, 0)
-+ libc = ctypes.CDLL(os.path.join('/usr/lib', 'libc.so'))
-+ libc.setproctitle('turpial')
- except ImportError:
- pass
-
diff --git a/net-im/turpial/files/patch-setup.py b/net-im/turpial/files/patch-setup.py
new file mode 100644
index 000000000000..35e2d7a01121
--- /dev/null
+++ b/net-im/turpial/files/patch-setup.py
@@ -0,0 +1,15 @@
+--- ./setup.py.orig 2013-12-19 01:59:57.000000000 +0000
++++ ./setup.py 2014-02-22 15:06:23.000000000 +0000
+@@ -55,10 +55,10 @@
+ "Topic :: Communications"
+ ],
+ include_package_data=True,
+- packages=find_packages(),
++ packages=find_packages(exclude=('turpial.ui.unity', 'turpial.ui.gtk.*', 'turpial.ui.gtk')),
+ package_data={
+ 'turpial': ['data/pixmaps/*', 'data/sounds/*', 'data/fonts/*', 'turpial/ui/qt/*',
+- 'turpial/i18n/*', 'turpial/ui/qt/templates/*'],
++ 'turpial/ui/qt/templates/*'],
+ },
+ entry_points={
+ 'console_scripts': [
diff --git a/net-im/turpial/files/patch-turpial__singleton.py b/net-im/turpial/files/patch-turpial__singleton.py
new file mode 100644
index 000000000000..6bab7267db24
--- /dev/null
+++ b/net-im/turpial/files/patch-turpial__singleton.py
@@ -0,0 +1,20 @@
+--- ./turpial/singleton.py.orig 2013-12-19 01:59:58.000000000 +0000
++++ ./turpial/singleton.py 2014-02-22 11:42:16.000000000 +0000
+@@ -12,7 +12,7 @@
+
+ from libturpial.common.tools import *
+
+-if detect_os() == OS_LINUX:
++if detect_os() == OS_LINUX or detect_os() == OS_FREEBSD or detect_os() == OS_DFLY:
+ import fcntl
+
+ class Singleton:
+@@ -21,7 +21,7 @@
+ self.log = logging.getLogger('Sys')
+ self.filepath = os.path.abspath(os.path.join(tempfile.gettempdir(), pid_name))
+
+- if detect_os() == OS_LINUX:
++ if detect_os() == OS_LINUX or detect_os() == OS_FREEBSD or detect_os() == OS_DFLY:
+ self.fd = open(self.filepath, 'w')
+ try:
+ fcntl.lockf(self.fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
diff --git a/net-im/turpial/files/patch-turpial__ui__lang.py b/net-im/turpial/files/patch-turpial__ui__lang.py
new file mode 100644
index 000000000000..d0a4b4dc2d8d
--- /dev/null
+++ b/net-im/turpial/files/patch-turpial__ui__lang.py
@@ -0,0 +1,13 @@
+--- ./turpial/ui/lang.py.orig 2013-12-19 01:59:58.000000000 +0000
++++ ./turpial/ui/lang.py 2014-02-22 15:28:02.000000000 +0000
+@@ -8,8 +8,8 @@
+ # Initialize gettext
+ gettext_domain = 'turpial'
+ # localedir definition in development mode
+-if os.path.isdir(os.path.join(os.path.dirname(__file__), '..', 'i18n')):
+- localedir = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', 'i18n'))
++if os.path.isdir(os.path.join('%%PREFIX%%', 'share', 'locale')):
++ localedir = os.path.realpath(os.path.join('%%PREFIX%%', 'share', 'locale'))
+ trans = gettext.install(gettext_domain, localedir, unicode=1)
+ else:
+ trans = gettext.install(gettext_domain, unicode=1)
diff --git a/net-im/turpial/files/patch-turpial__ui__qt__worker.py b/net-im/turpial/files/patch-turpial__ui__qt__worker.py
new file mode 100644
index 000000000000..25622acea85a
--- /dev/null
+++ b/net-im/turpial/files/patch-turpial__ui__qt__worker.py
@@ -0,0 +1,17 @@
+Taken from commit 6c26b50205
+
+--- ./turpial/ui/qt/worker.py.orig 2013-12-19 01:59:58.000000000 +0000
++++ ./turpial/ui/qt/worker.py 2014-02-22 14:36:16.000000000 +0000
+@@ -336,10 +336,10 @@
+ # FIXME: Remove this after implement this in libturpial
+ def load_account(self, account_id, trigger_signal=True):
+ if trigger_signal:
+- self.register(self.core.accman.load, (account_id),
++ self.register(self.core.account_manager.load, (account_id),
+ self.__after_load_account)
+ else:
+- self.core.accman.load(account_id)
++ self.core.account_manager.load(account_id)
+ self.__after_load_account()
+
+ def delete_account(self, account_id):
diff --git a/net-im/turpial/files/patch-turpial__ui__util.py b/net-im/turpial/files/patch-turpial__ui__util.py
new file mode 100644
index 000000000000..5b3d22ae7f59
--- /dev/null
+++ b/net-im/turpial/files/patch-turpial__ui__util.py
@@ -0,0 +1,18 @@
+--- ./turpial/ui/util.py.orig 2013-12-19 01:59:58.000000000 +0000
++++ ./turpial/ui/util.py 2014-02-22 11:49:20.000000000 +0000
+@@ -8,10 +8,14 @@
+
+ try:
+ # TODO: Implement this function for other platforms
++ import ctypes
+ if detect_os() == OS_LINUX:
+- import ctypes
+ libc = ctypes.CDLL('libc.so.6')
+ libc.prctl(15, 'turpial', 0, 0)
++ elif detect_os() == OS_FREEBSD or detect_os() == OS_DFLY:
++ import ctypes.util
++ libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
++ libc.setproctitle('turpial')
+ except ImportError, exc:
+ print exc
+
diff --git a/net-im/turpial/files/patch-turpial_api_interfaces_protocol.py b/net-im/turpial/files/patch-turpial_api_interfaces_protocol.py
deleted file mode 100644
index fc29f287b776..000000000000
--- a/net-im/turpial/files/patch-turpial_api_interfaces_protocol.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- turpial/api/interfaces/protocol.py.orig 2011-03-23 17:50:07.000000000 +0100
-+++ turpial/api/interfaces/protocol.py 2011-05-07 22:14:22.000000000 +0200
-@@ -280,7 +280,7 @@
-
- def get_str_time(self, strdate):
- t = self.convert_time(strdate)
-- return time.strftime('%b %d, %I:%M %p', t)
-+ return time.strftime('%Y-%m-%d @ %H:%M', t)
-
- def get_int_time(self, strdate):
- t = self.convert_time(strdate)
diff --git a/net-im/turpial/files/patch-turpial_ui_gtk_about.py b/net-im/turpial/files/patch-turpial_ui_gtk_about.py
deleted file mode 100644
index 9e10547f2371..000000000000
--- a/net-im/turpial/files/patch-turpial_ui_gtk_about.py
+++ /dev/null
@@ -1,35 +0,0 @@
---- turpial/ui/gtk/about.py.orig 2011-01-22 22:05:08.000000000 +0100
-+++ turpial/ui/gtk/about.py 2011-02-18 23:35:39.000000000 +0100
-@@ -22,8 +22,8 @@
- about.set_website('http://turpial.org.ve')
-
- try:
-- path = os.path.realpath(os.path.join(os.path.dirname(__file__),
-- '..', '..', '..', 'COPYING'))
-+ path = os.path.realpath(os.path.join('%%PREFIX%%', 'share', 'doc',
-+ 'turpial', 'COPYING'))
- lic = file(path, 'r')
- license = lic.read()
- lic.close()
-@@ -39,8 +39,8 @@
- about.set_license(license)
- authors = []
- try:
-- path = os.path.realpath(os.path.join(os.path.dirname(__file__),
-- '..', '..', '..', 'AUTHORS'))
-+ path = os.path.realpath(os.path.join('%%PREFIX%%', 'share', 'doc',
-+ 'turpial', 'AUTHORS'))
- f = file(path, 'r')
- for line in f:
- authors.append(line.strip('\n'))
-@@ -51,8 +51,8 @@
-
- translators = ''
- try:
-- path = os.path.realpath(os.path.join(os.path.dirname(__file__),
-- '..', '..', '..', 'TRANSLATORS'))
-+ path = os.path.realpath(os.path.join('%%PREFIX%%', 'share', 'doc',
-+ 'turpial', 'TRANSLATORS'))
- f = file(path, 'r')
- translators = f.read()
- f.close()
diff --git a/net-im/turpial/files/patch-turpial_ui_gtk_statuslist.py b/net-im/turpial/files/patch-turpial_ui_gtk_statuslist.py
deleted file mode 100644
index 4e43fc88e91d..000000000000
--- a/net-im/turpial/files/patch-turpial_ui_gtk_statuslist.py
+++ /dev/null
@@ -1,129 +0,0 @@
---- turpial/ui/gtk/statuslist.py.orig 2011-05-08 05:01:09.000000000 +0200
-+++ turpial/ui/gtk/statuslist.py 2011-06-12 19:55:15.000000000 +0200
-@@ -5,6 +5,7 @@
- # Author: Wil Alvarez (aka Satanas)
- # Jun 25, 2009
-
-+import sys
- import gtk
- import pango
- import gobject
-@@ -81,14 +82,14 @@
- if len(hashtags) == 0: return text
-
- for h in hashtags:
-- torep = '%s' % h
-+ torep = u'%s' % h
- try:
-- cad = '<span foreground="%s">%s</span>' % (
-+ cad = u'<span foreground="%s">%s</span>' % (
- self.mainwin.link_color, h
- )
- text = text.replace(torep, cad)
- except:
-- log.debug('Problemas para resaltar el hashtag: %s' % h)
-+ log.debug(u'Problemas para resaltar el hashtag: %s' % h)
- return text
-
- def __highlight_groups(self, text):
-@@ -99,14 +100,14 @@
- if len(groups) == 0: return text
-
- for h in groups:
-- torep = '%s' % h
-+ torep = u'%s' % h
- try:
-- cad = '<span foreground="%s">%s</span>' % (
-+ cad = u'<span foreground="%s">%s</span>' % (
- self.mainwin.link_color, h
- )
- text = text.replace(torep, cad)
- except:
-- log.debug('Problemas para resaltar el grupo: %s' % h)
-+ log.debug(u'Problemas para resaltar el grupo: %s' % h)
- return text
-
- def __highlight_mentions(self, text):
-@@ -117,8 +118,8 @@
- for h in mentions:
- if len(h) == 1:
- continue
-- torep = '%s' % h
-- cad = '<span foreground="%s">%s</span>' % (
-+ torep = u'%s' % h
-+ cad = u'<span foreground="%s">%s</span>' % (
- self.mainwin.link_color, h
- )
- text = text.replace(torep, cad)
-@@ -128,7 +129,7 @@
- #if len(urls) == 0: return text
-
- for u in urls:
-- cad = '<span foreground="%s">%s</span>' % (
-+ cad = u'<span foreground="%s">%s</span>' % (
- self.mainwin.link_color, u
- )
- text = text.replace(u, cad)
-@@ -180,8 +181,17 @@
- amarillo = gtk.gdk.Color(253 * 257, 255 * 257, 229 * 257)
- naranja = gtk.gdk.Color(255 * 257, 240 * 257, 229 * 257)
- '''
-- me = '@'+self.mainwin.me.lower()
-- mention = True if msg.lower().find(me) >= 0 else False
-+ me = unichr(64) + self.mainwin.me.lower()
-+ if sys.getfilesystemencoding() != 'UTF-8':
-+ if msg.startswith(me):
-+ mention = True
-+ else:
-+ mention = False
-+ else:
-+ if msg.lower().startswith(me):
-+ mention = True
-+ else:
-+ mention = False
-
- if new:
- color = self.mainwin.get_gdk_color_from_base('unread')
-@@ -206,15 +216,15 @@
- pango_twt = util.unescape_text(status.text)
- pango_twt = gobject.markup_escape_text(pango_twt)
-
-- user = '<span size="9000" foreground="%s"><b>%s</b></span> ' % (
-+ user = u'<span size="9000" foreground="%s"><b>%s</b></span> ' % (
- self.mainwin.link_color, status.username
- )
-- pango_twt = '<span size="9000">%s</span>' % pango_twt
-+ pango_twt = u'<span size="9000">%s</span>' % pango_twt
- pango_twt = self.__highlight_hashtags(pango_twt)
- pango_twt = self.__highlight_groups(pango_twt)
- pango_twt = self.__highlight_mentions(pango_twt)
- pango_twt = self.__highlight_urls(urls, pango_twt)
-- pango_twt += '<span size="2000">\n\n</span>'
-+ pango_twt += u'<span size="2000">\n\n</span>'
-
- try:
- pango_twt = user + pango_twt
-@@ -227,17 +237,17 @@
- except UnicodeDecodeError:
- invalid_chars.append(c)
- clear_txt += '?'
-- log.debug('Problema con caracteres inválidos en un tweet: %s' % invalid_chars)
-+ log.debug(u'Problema con caracteres inválidos en un tweet: %s' % invalid_chars)
- pango_twt = clear_txt
-
-- footer = '<span size="small" foreground="#999">%s' % status.datetime
-+ footer = u'<span size="small" foreground="#999">%s' % status.datetime
- if status.source:
-- footer += ' %s %s' % (_('from'), status.source)
-+ footer += u' %s %s' % (_('from'), status.source)
- if status.in_reply_to_user:
-- footer += ' %s %s' % (_('in reply to'), status.in_reply_to_user)
-+ footer += u' %s %s' % (_('in reply to'), status.in_reply_to_user)
- if status.retweet_by:
-- footer += '\n%s %s' % (_('Retweeted by'), status.retweet_by)
-- footer += '</span>'
-+ footer += u'\n%s %s' % (_('Retweeted by'), status.retweet_by)
-+ footer += u'</span>'
- pango_twt += footer
-
- return pango_twt
diff --git a/net-im/turpial/pkg-plist b/net-im/turpial/pkg-plist
index f97215aa18ed..2b733b482227 100644
--- a/net-im/turpial/pkg-plist
+++ b/net-im/turpial/pkg-plist
@@ -1,272 +1,13 @@
-bin/turpial
-share/applications/turpial.desktop
-%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
-%%PORTDOCS%%%%DOCSDIR%%/COPYING
-%%PORTDOCS%%%%DOCSDIR%%/README.rst
-%%PORTDOCS%%%%DOCSDIR%%/TRANSLATORS
share/locale/ca/LC_MESSAGES/turpial.mo
-share/locale/ca_ES/LC_MESSAGES/turpial.mo
-share/locale/cs/LC_MESSAGES/turpial.mo
share/locale/de/LC_MESSAGES/turpial.mo
-share/locale/en/LC_MESSAGES/turpial.mo
+share/locale/eo/LC_MESSAGES/turpial.mo
share/locale/es/LC_MESSAGES/turpial.mo
-share/locale/es_ES/LC_MESSAGES/turpial.mo
-share/locale/es_VE/LC_MESSAGES/turpial.mo
-share/locale/eu/LC_MESSAGES/turpial.mo
share/locale/fr/LC_MESSAGES/turpial.mo
-share/locale/gl/LC_MESSAGES/turpial.mo
-share/locale/he/LC_MESSAGES/turpial.mo
-share/locale/hu/LC_MESSAGES/turpial.mo
share/locale/it/LC_MESSAGES/turpial.mo
-share/locale/nl/LC_MESSAGES/turpial.mo
-share/locale/nn/LC_MESSAGES/turpial.mo
-share/locale/pt/LC_MESSAGES/turpial.mo
+share/locale/ja/LC_MESSAGES/turpial.mo
share/locale/pt_BR/LC_MESSAGES/turpial.mo
-share/locale/ru/LC_MESSAGES/turpial.mo
+share/locale/pt_PT/LC_MESSAGES/turpial.mo
share/locale/ru_RU/LC_MESSAGES/turpial.mo
-share/locale/sr/LC_MESSAGES/turpial.mo
-share/locale/uk_UA/LC_MESSAGES/turpial.mo
-share/locale/zh_CN/LC_MESSAGES/turpial.mo
-share/locale/zh_TW/LC_MESSAGES/turpial.mo
-share/pixmaps/turpial.png
-%%DATADIR%%/__init__.py
-%%DATADIR%%/__init__.pyc
-%%DATADIR%%/api/__init__.py
-%%DATADIR%%/api/__init__.pyc
-%%DATADIR%%/api/interfaces/__init__.py
-%%DATADIR%%/api/interfaces/__init__.pyc
-%%DATADIR%%/api/interfaces/http.py
-%%DATADIR%%/api/interfaces/http.pyc
-%%DATADIR%%/api/interfaces/post.py
-%%DATADIR%%/api/interfaces/post.pyc
-%%DATADIR%%/api/interfaces/protocol.py
-%%DATADIR%%/api/interfaces/protocol.pyc
-%%DATADIR%%/api/interfaces/service.py
-%%DATADIR%%/api/interfaces/service.pyc
-%%DATADIR%%/api/protocols/__init__.py
-%%DATADIR%%/api/protocols/__init__.pyc
-%%DATADIR%%/api/protocols/identica/__init__.py
-%%DATADIR%%/api/protocols/identica/__init__.pyc
-%%DATADIR%%/api/protocols/identica/globals.py
-%%DATADIR%%/api/protocols/identica/globals.pyc
-%%DATADIR%%/api/protocols/identica/http.py
-%%DATADIR%%/api/protocols/identica/http.pyc
-%%DATADIR%%/api/protocols/identica/identica.py
-%%DATADIR%%/api/protocols/identica/identica.pyc
-%%DATADIR%%/api/protocols/twitter/__init__.py
-%%DATADIR%%/api/protocols/twitter/__init__.pyc
-%%DATADIR%%/api/protocols/twitter/globals.py
-%%DATADIR%%/api/protocols/twitter/globals.pyc
-%%DATADIR%%/api/protocols/twitter/http.py
-%%DATADIR%%/api/protocols/twitter/http.pyc
-%%DATADIR%%/api/protocols/twitter/oauth.py
-%%DATADIR%%/api/protocols/twitter/oauth.pyc
-%%DATADIR%%/api/protocols/twitter/twitter.py
-%%DATADIR%%/api/protocols/twitter/twitter.pyc
-%%DATADIR%%/api/services/__init__.py
-%%DATADIR%%/api/services/__init__.pyc
-%%DATADIR%%/api/services/shorturl/__init__.py
-%%DATADIR%%/api/services/shorturl/__init__.pyc
-%%DATADIR%%/api/services/shorturl/bitly.py
-%%DATADIR%%/api/services/shorturl/bitly.pyc
-%%DATADIR%%/api/services/shorturl/cligs.py
-%%DATADIR%%/api/services/shorturl/cligs.pyc
-%%DATADIR%%/api/services/shorturl/googl.py
-%%DATADIR%%/api/services/shorturl/googl.pyc
-%%DATADIR%%/api/services/shorturl/isgd.py
-%%DATADIR%%/api/services/shorturl/isgd.pyc
-%%DATADIR%%/api/services/shorturl/smlkes.py
-%%DATADIR%%/api/services/shorturl/smlkes.pyc
-%%DATADIR%%/api/services/shorturl/supr.py
-%%DATADIR%%/api/services/shorturl/supr.pyc
-%%DATADIR%%/api/services/shorturl/tinyurl.py
-%%DATADIR%%/api/services/shorturl/tinyurl.pyc
-%%DATADIR%%/api/services/shorturl/trim.py
-%%DATADIR%%/api/services/shorturl/trim.pyc
-%%DATADIR%%/api/services/shorturl/unu.py
-%%DATADIR%%/api/services/shorturl/unu.pyc
-%%DATADIR%%/api/services/shorturl/ur1ca.py
-%%DATADIR%%/api/services/shorturl/ur1ca.pyc
-%%DATADIR%%/api/services/shorturl/zima.py
-%%DATADIR%%/api/services/shorturl/zima.pyc
-%%DATADIR%%/api/services/uploadpic/__init__.py
-%%DATADIR%%/api/services/uploadpic/__init__.pyc
-%%DATADIR%%/api/services/uploadpic/imgly.py
-%%DATADIR%%/api/services/uploadpic/imgly.pyc
-%%DATADIR%%/api/services/uploadpic/imgur.py
-%%DATADIR%%/api/services/uploadpic/imgur.pyc
-%%DATADIR%%/api/services/uploadpic/mobypicture.py
-%%DATADIR%%/api/services/uploadpic/mobypicture.pyc
-%%DATADIR%%/api/services/uploadpic/posterous.py
-%%DATADIR%%/api/services/uploadpic/posterous.pyc
-%%DATADIR%%/api/services/uploadpic/pyTweetPhoto.py
-%%DATADIR%%/api/services/uploadpic/pyTweetPhoto.pyc
-%%DATADIR%%/api/services/uploadpic/tweetphoto.py
-%%DATADIR%%/api/services/uploadpic/tweetphoto.pyc
-%%DATADIR%%/api/services/uploadpic/twitgoo.py
-%%DATADIR%%/api/services/uploadpic/twitgoo.pyc
-%%DATADIR%%/api/services/uploadpic/twitpic.py
-%%DATADIR%%/api/services/uploadpic/twitpic.pyc
-%%DATADIR%%/api/services/uploadpic/yfrog.py
-%%DATADIR%%/api/services/uploadpic/yfrog.pyc
-%%DATADIR%%/api/servicesapi.py
-%%DATADIR%%/api/servicesapi.pyc
-%%DATADIR%%/api/turpialapi.py
-%%DATADIR%%/api/turpialapi.pyc
-%%DATADIR%%/certs/cacert.pem
-%%DATADIR%%/config.py
-%%DATADIR%%/config.pyc
-%%DATADIR%%/data/pixmaps/action-add-friends.png
-%%DATADIR%%/data/pixmaps/action-autoscroll.png
-%%DATADIR%%/data/pixmaps/action-clear.png
-%%DATADIR%%/data/pixmaps/action-mark-all.png
-%%DATADIR%%/data/pixmaps/action-refresh.png
-%%DATADIR%%/data/pixmaps/dock-about.png
-%%DATADIR%%/data/pixmaps/dock-favorites.png
-%%DATADIR%%/data/pixmaps/dock-follow.png
-%%DATADIR%%/data/pixmaps/dock-home.png
-%%DATADIR%%/data/pixmaps/dock-profile.png
-%%DATADIR%%/data/pixmaps/dock-settings.png
-%%DATADIR%%/data/pixmaps/dock-update.png
-%%DATADIR%%/data/pixmaps/dock-uploadpic.png
-%%DATADIR%%/data/pixmaps/identica.png
-%%DATADIR%%/data/pixmaps/logo2.png
-%%DATADIR%%/data/pixmaps/turpial-notification.png
-%%DATADIR%%/data/pixmaps/turpial-tray-update.png
-%%DATADIR%%/data/pixmaps/turpial-tray.png
-%%DATADIR%%/data/pixmaps/turpial.png
-%%DATADIR%%/data/pixmaps/twitter.png
-%%DATADIR%%/data/pixmaps/unknown.png
-%%DATADIR%%/data/pixmaps/wait-error.png
-%%DATADIR%%/data/pixmaps/wait10.png
-%%DATADIR%%/data/pixmaps/wait11.png
-%%DATADIR%%/data/pixmaps/wait12.png
-%%DATADIR%%/data/pixmaps/wait13.png
-%%DATADIR%%/data/pixmaps/wait14.png
-%%DATADIR%%/data/pixmaps/wait15.png
-%%DATADIR%%/data/pixmaps/wait16.png
-%%DATADIR%%/data/pixmaps/wait17.png
-%%DATADIR%%/data/pixmaps/wait18.png
-%%DATADIR%%/data/pixmaps/wait19.png
-%%DATADIR%%/data/pixmaps/wait2.png
-%%DATADIR%%/data/pixmaps/wait20.png
-%%DATADIR%%/data/pixmaps/wait21.png
-%%DATADIR%%/data/pixmaps/wait22.png
-%%DATADIR%%/data/pixmaps/wait23.png
-%%DATADIR%%/data/pixmaps/wait24.png
-%%DATADIR%%/data/pixmaps/wait25.png
-%%DATADIR%%/data/pixmaps/wait26.png
-%%DATADIR%%/data/pixmaps/wait27.png
-%%DATADIR%%/data/pixmaps/wait28.png
-%%DATADIR%%/data/pixmaps/wait29.png
-%%DATADIR%%/data/pixmaps/wait3.png
-%%DATADIR%%/data/pixmaps/wait30.png
-%%DATADIR%%/data/pixmaps/wait31.png
-%%DATADIR%%/data/pixmaps/wait32.png
-%%DATADIR%%/data/pixmaps/wait4.png
-%%DATADIR%%/data/pixmaps/wait5.png
-%%DATADIR%%/data/pixmaps/wait6.png
-%%DATADIR%%/data/pixmaps/wait7.png
-%%DATADIR%%/data/pixmaps/wait8.png
-%%DATADIR%%/data/pixmaps/wait9.png
-%%DATADIR%%/data/sounds/cambur_pinton.ogg
-%%DATADIR%%/data/sounds/mencion.ogg
-%%DATADIR%%/data/sounds/mencion2.ogg
-%%DATADIR%%/data/sounds/mencion3.ogg
-%%DATADIR%%/data/sounds/turpial.ogg
-%%DATADIR%%/data/themes/default/style.css
-%%DATADIR%%/data/themes/default/tweet.html
-%%DATADIR%%/data/themes/default/tweet_template.html
-%%DATADIR%%/main.py
-%%DATADIR%%/main.pyc
-%%DATADIR%%/notification.py
-%%DATADIR%%/notification.pyc
-%%DATADIR%%/sound.py
-%%DATADIR%%/sound.pyc
-%%DATADIR%%/ui/__init__.py
-%%DATADIR%%/ui/__init__.pyc
-%%DATADIR%%/ui/base_ui.py
-%%DATADIR%%/ui/base_ui.pyc
-%%DATADIR%%/ui/cmd/__init__.py
-%%DATADIR%%/ui/cmd/__init__.pyc
-%%DATADIR%%/ui/cmd/main.py
-%%DATADIR%%/ui/cmd/main.pyc
-%%DATADIR%%/ui/gtk/__init__.py
-%%DATADIR%%/ui/gtk/__init__.pyc
-%%DATADIR%%/ui/gtk/about.py
-%%DATADIR%%/ui/gtk/about.pyc
-%%DATADIR%%/ui/gtk/button.py
-%%DATADIR%%/ui/gtk/button.pyc
-%%DATADIR%%/ui/gtk/columns.py
-%%DATADIR%%/ui/gtk/columns.pyc
-%%DATADIR%%/ui/gtk/conversation.py
-%%DATADIR%%/ui/gtk/conversation.pyc
-%%DATADIR%%/ui/gtk/dock.py
-%%DATADIR%%/ui/gtk/dock.pyc
-%%DATADIR%%/ui/gtk/errorbox.py
-%%DATADIR%%/ui/gtk/errorbox.pyc
-%%DATADIR%%/ui/gtk/follow.py
-%%DATADIR%%/ui/gtk/follow.pyc
-%%DATADIR%%/ui/gtk/friendwin.py
-%%DATADIR%%/ui/gtk/friendwin.pyc
-%%DATADIR%%/ui/gtk/home.py
-%%DATADIR%%/ui/gtk/home.pyc
-%%DATADIR%%/ui/gtk/indicator.py
-%%DATADIR%%/ui/gtk/indicator.pyc
-%%DATADIR%%/ui/gtk/login.py
-%%DATADIR%%/ui/gtk/login.pyc
-%%DATADIR%%/ui/gtk/loginlabel.py
-%%DATADIR%%/ui/gtk/loginlabel.pyc
-%%DATADIR%%/ui/gtk/main.py
-%%DATADIR%%/ui/gtk/main.pyc
-%%DATADIR%%/ui/gtk/menu.py
-%%DATADIR%%/ui/gtk/menu.pyc
-%%DATADIR%%/ui/gtk/oauthwin.py
-%%DATADIR%%/ui/gtk/oauthwin.pyc
-%%DATADIR%%/ui/gtk/preferences.py
-%%DATADIR%%/ui/gtk/preferences.pyc
-%%DATADIR%%/ui/gtk/profile.py
-%%DATADIR%%/ui/gtk/profile.pyc
-%%DATADIR%%/ui/gtk/statuslist.py
-%%DATADIR%%/ui/gtk/statuslist.pyc
-%%DATADIR%%/ui/gtk/tweetslistwk.py
-%%DATADIR%%/ui/gtk/tweetslistwk.pyc
-%%DATADIR%%/ui/gtk/updatebox.py
-%%DATADIR%%/ui/gtk/updatebox.pyc
-%%DATADIR%%/ui/gtk/uploadpicbox.py
-%%DATADIR%%/ui/gtk/uploadpicbox.pyc
-%%DATADIR%%/ui/gtk/userform.py
-%%DATADIR%%/ui/gtk/userform.pyc
-%%DATADIR%%/ui/gtk/waiting.py
-%%DATADIR%%/ui/gtk/waiting.pyc
-%%DATADIR%%/ui/gtk/wrapper.py
-%%DATADIR%%/ui/gtk/wrapper.pyc
-%%DATADIR%%/ui/util.py
-%%DATADIR%%/ui/util.pyc
-@dirrm %%DATADIR%%/ui/gtk
-@dirrm %%DATADIR%%/ui/cmd
-@dirrm %%DATADIR%%/ui
-@dirrm %%DATADIR%%/data/themes/default
-@dirrm %%DATADIR%%/data/themes
-@dirrm %%DATADIR%%/data/sounds
-@dirrm %%DATADIR%%/data/pixmaps
-@dirrm %%DATADIR%%/data
-@dirrm %%DATADIR%%/certs
-@dirrm %%DATADIR%%/api/services/uploadpic
-@dirrm %%DATADIR%%/api/services/shorturl
-@dirrm %%DATADIR%%/api/services
-@dirrm %%DATADIR%%/api/protocols/twitter
-@dirrm %%DATADIR%%/api/protocols/identica
-@dirrm %%DATADIR%%/api/protocols
-@dirrm %%DATADIR%%/api/interfaces
-@dirrm %%DATADIR%%/api
-@dirrm %%DATADIR%%
-@dirrmtry share/locale/uk_UA/LC_MESSAGES
-@dirrmtry share/locale/uk_UA
+share/locale/tr/LC_MESSAGES/turpial.mo
@dirrmtry share/locale/ru_RU/LC_MESSAGES
@dirrmtry share/locale/ru_RU
-@dirrmtry share/locale/es_VE/LC_MESSAGES
-@dirrmtry share/locale/es_VE
-@dirrmtry share/locale/ca_ES/LC_MESSAGES
-@dirrmtry share/locale/ca_ES
-%%PORTDOCS%%@dirrm %%DOCSDIR%%