ports/155263: [NEW PORT] net-im/py-hotot, Twitter and Identi.ca microblogging client written in Python

Olivier Duchateau duchateau.olivier at gmail.com
Fri Mar 4 12:10:12 UTC 2011


>Number:         155263
>Category:       ports
>Synopsis:       [NEW PORT] net-im/py-hotot, Twitter and Identi.ca microblogging client written in Python
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 04 12:10:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Olivier Duchateau
>Release:        FreeBSD 8.2-RELEASE
>Organization:
>Environment:
FreeBSD bornem.errements.net 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     root at almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Hotot is a lightweight microblogging client, written in Python and JavaScript.

Patches:
- delete Linux code
- enhance Xfce and webbrowsers support


Note: This port was tested successfully with Python2.6 and Python2.7.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	py-hotot/
#	py-hotot/files
#	py-hotot/files/patch-hotot_hotot.py
#	py-hotot/files/patch-hotot_utils.py
#	py-hotot/files/patch-data_ui_css_style.css
#	py-hotot/files/patch-data_ui_js_ui.context_menu.js
#	py-hotot/pkg-plist
#	py-hotot/pkg-descr
#	py-hotot/distinfo
#	py-hotot/Makefile
#
echo c - py-hotot/
mkdir -p py-hotot/ > /dev/null 2>&1
echo c - py-hotot/files
mkdir -p py-hotot/files > /dev/null 2>&1
echo x - py-hotot/files/patch-hotot_hotot.py
sed 's/^X//' >py-hotot/files/patch-hotot_hotot.py << '8790ab91c1088cdec1052d715864d3a9'
X--- hotot/hotot.py.orig	2010-11-08 10:54:08.000000000 +0100
X+++ hotot/hotot.py	2011-02-21 21:48:31.000000000 +0100
X@@ -277,9 +277,15 @@
X #    if not config.get('use_ubuntu_indicator'):
X #        HAS_INDICATOR = False
X     try:
X-        import dl
X-        libc = dl.open('/lib/libc.so.6')
X-        libc.call('prctl', 15, 'hotot', 0, 0, 0)
X+        import ctypes
X+        import platform
X+        import os
X+
X+        # change process name
X+        if platform.system().lower() == "freebsd":
X+            # e.g. symbolic link /usr/lib/libc.so -> /lib/libc.so.7
X+            libc = ctypes.CDLL(os.path.join('/usr/lib', 'libc.so'))
X+            libc.setproctitle('hotot')
X     except:
X         pass
X     agent.init_notify()
8790ab91c1088cdec1052d715864d3a9
echo x - py-hotot/files/patch-hotot_utils.py
sed 's/^X//' >py-hotot/files/patch-hotot_utils.py << '99b9d0bd27ba92c73e080fb1d83899f4'
X--- hotot/utils.py.orig	2010-11-08 10:54:08.000000000 +0100
X+++ hotot/utils.py	2011-02-21 20:37:30.000000000 +0100
X@@ -38,14 +38,12 @@
X         return 'gnome'
X     elif window_manager_name in 'compiz':
X         return 'gnome'
X-    elif window_manager_name in 'awesome':
X-        return 'awesome'
X-    elif window_manager_name in 'openbox':
X-        return 'openbox'
X-    elif '= "xfce4"' in subprocess.Popen(['xprop', '-root', '_DT_SAVE_MODE'],
X-            stdout = subprocess.PIPE).stdout.read():
X+    elif 'xfce' in desktop_session_name:
X         return 'xfce'
X-    return ''
X+    elif window_manager_name in 'xfwm4':
X+        return 'xfce'
X+    else:
X+        return ''
X 
X def get_system_default_browser():
X     global _browser
X@@ -53,15 +51,17 @@
X         return _browser
X     desktop = get_desktop_environment_name()
X     tryfirst = []
X-    if desktop == 'awesome':
X-        tryfirst = ['opera']
X-    elif desktop == 'openbox':
X-        tryfirst = ['firefox']
X+    if desktop == 'xfce':
X+        tryfirst = ['exo-open']
X+    elif desktop == 'kde':
X+        tryfirst = ['kfmclient']
X     elif desktop == 'win':
X         tryfirst = ['start']
X     elif desktop == 'gnome':
X         tryfirst = ['gnome-open']
X-    for trycmd in tryfirst + ['xdg-open', 'google-chrome', 'chromium-browser', 'firefox', 'x-www-browser']:
X+    else:
X+        tryfirst = ['xdg-open']
X+    for trycmd in tryfirst.extend(['chrome', 'x-www-browser']):
X         if is_command(trycmd):
X             _browser = trycmd
X             return _browser
X@@ -70,10 +70,7 @@
X def open_webbrowser(uri):
X     '''open a URI in the registered default application
X     '''
X-    ## for proxychains
X-    os.environ['LD_PRELOAD'] = ' '.join(
X-            [ ld for ld in os.environ.get('LD_PRELOAD', '').split(' ') if 'libproxychains.so' not in ld ]
X-        )
X+
X     browser = 'xdg-open'
X     if sys.platform[:3] == "win":
X         browser = 'start'
99b9d0bd27ba92c73e080fb1d83899f4
echo x - py-hotot/files/patch-data_ui_css_style.css
sed 's/^X//' >py-hotot/files/patch-data_ui_css_style.css << 'b7187672c3913f240a2b76e6b8a956ed'
X--- data/ui/css/style.css.orig	2010-11-08 10:54:08.000000000 +0100
X+++ data/ui/css/style.css	2011-03-04 11:34:09.000000000 +0100
X@@ -19,7 +19,7 @@
X body {
X     background: None repeat-x scroll left top #fff;
X     color: #333;
X-    font-family: Droid Sans Fallback, WenQuanYi Micro Hei, Sans, Microsoft Yahei, Simhei, Simsun;
X+    font-family: "DejaVu Sans", Verdana, sans-serif;
X }
X 
X a {
X@@ -547,7 +547,7 @@
X }
X 
X #console_out {
X-    font-family: Monaco, Consolas,'Courier New',Courier, monospace;
X+    font-family: "Courier New", Courier, monospace;
X     margin: 0 10px;
X     height: 250px;
X     overflow: auto;
b7187672c3913f240a2b76e6b8a956ed
echo x - py-hotot/files/patch-data_ui_js_ui.context_menu.js
sed 's/^X//' >py-hotot/files/patch-data_ui_js_ui.context_menu.js << '5447c47c65993861b76ab9cf2e9e7640'
X--- data/ui/js/ui.context_menu.js.orig	2010-09-29 14:06:00.000000000 +0200
X+++ data/ui/js/ui.context_menu.js	2011-03-04 12:04:19.000000000 +0100
X@@ -7,7 +7,7 @@
X function init() {
X     $('#context_menuitem_web_search').click(
X     function (event) {
X-        navigate_action('http://google.com/search?sourceid=chrome&ie=UTF-8&q='+ui.ContextMenu.selected_string);
X+        navigate_action('http://google.com/search?q='+ui.ContextMenu.selected_string);
X     });
X 
X     $('#context_menuitem_twitter_search').click(
5447c47c65993861b76ab9cf2e9e7640
echo x - py-hotot/pkg-plist
sed 's/^X//' >py-hotot/pkg-plist << 'd835e5f79ef1abec6e4cdba1f23f22e4'
Xbin/hotot
X%%PYTHON_SITELIBDIR%%/hotot/__init__.py
X%%PYTHON_SITELIBDIR%%/hotot/__init__.pyc
X%%PYTHON_SITELIBDIR%%/hotot/__init__.pyo
X%%PYTHON_SITELIBDIR%%/hotot/agent.py
X%%PYTHON_SITELIBDIR%%/hotot/agent.pyc
X%%PYTHON_SITELIBDIR%%/hotot/agent.pyo
X%%PYTHON_SITELIBDIR%%/hotot/config.py
X%%PYTHON_SITELIBDIR%%/hotot/config.pyc
X%%PYTHON_SITELIBDIR%%/hotot/config.pyo
X%%PYTHON_SITELIBDIR%%/hotot/hotot.py
X%%PYTHON_SITELIBDIR%%/hotot/hotot.pyc
X%%PYTHON_SITELIBDIR%%/hotot/hotot.pyo
X%%PYTHON_SITELIBDIR%%/hotot/i18n.py
X%%PYTHON_SITELIBDIR%%/hotot/i18n.pyc
X%%PYTHON_SITELIBDIR%%/hotot/i18n.pyo
X%%PYTHON_SITELIBDIR%%/hotot/utils.py
X%%PYTHON_SITELIBDIR%%/hotot/utils.pyc
X%%PYTHON_SITELIBDIR%%/hotot/utils.pyo
X%%PYTHON_SITELIBDIR%%/hotot/view.py
X%%PYTHON_SITELIBDIR%%/hotot/view.pyc
X%%PYTHON_SITELIBDIR%%/hotot/view.pyo
Xshare/applications/hotot.desktop
X%%DATADIR%%/ext/ext.js
X%%DATADIR%%/ext/org.hotot.gmap/entry.js
X%%DATADIR%%/ext/org.hotot.gmap/ic16_marker.png
X%%DATADIR%%/ext/org.hotot.gmap/icon.png
X%%DATADIR%%/ext/org.hotot.imagepreview/entry.js
X%%DATADIR%%/ext/org.hotot.imagepreview/icon.png
X%%DATADIR%%/ext/org.hotot.imageupload/entry.js
X%%DATADIR%%/ext/org.hotot.imageupload/ic16_upload.png
X%%DATADIR%%/ext/org.hotot.imageupload/icon.png
X%%DATADIR%%/ext/org.hotot.sample/entry.js
X%%DATADIR%%/ext/org.hotot.shorturl/entry.js
X%%DATADIR%%/ext/org.hotot.shorturl/icon.png
X%%DATADIR%%/ext/org.hotot.translate/entry.js
X%%DATADIR%%/ext/org.hotot.translate/ic16_translate.png
X%%DATADIR%%/ext/org.hotot.translate/icon.png
X%%DATADIR%%/ext/org.hotot.videopreview/entry.js
X%%DATADIR%%/ext/org.hotot.videopreview/icon.png
X%%DATADIR%%/sound/notify.wav
X%%DATADIR%%/ui/css/style.css
X%%DATADIR%%/ui/imgs/avator_hlight.png
X%%DATADIR%%/ui/imgs/body_bg.png
X%%DATADIR%%/ui/imgs/expand.png
X%%DATADIR%%/ui/imgs/fold.png
X%%DATADIR%%/ui/imgs/ic128_hotot.png
X%%DATADIR%%/ui/imgs/ic16_close.png
X%%DATADIR%%/ui/imgs/ic16_del.png
X%%DATADIR%%/ui/imgs/ic16_dm.png
X%%DATADIR%%/ui/imgs/ic16_fav.png
X%%DATADIR%%/ui/imgs/ic16_identica.png
X%%DATADIR%%/ui/imgs/ic16_link.png
X%%DATADIR%%/ui/imgs/ic16_more.png
X%%DATADIR%%/ui/imgs/ic16_reply.png
X%%DATADIR%%/ui/imgs/ic16_reply_all.png
X%%DATADIR%%/ui/imgs/ic16_retweet.png
X%%DATADIR%%/ui/imgs/ic16_retweet_light.png
X%%DATADIR%%/ui/imgs/ic16_retweeted.png
X%%DATADIR%%/ui/imgs/ic16_rt.png
X%%DATADIR%%/ui/imgs/ic16_twitter.png
X%%DATADIR%%/ui/imgs/ic16_unfav.png
X%%DATADIR%%/ui/imgs/ic24_hotot.png
X%%DATADIR%%/ui/imgs/ic24_hotot_mono_dark.svg
X%%DATADIR%%/ui/imgs/ic24_hotot_mono_light.svg
X%%DATADIR%%/ui/imgs/ic24_wall.png
X%%DATADIR%%/ui/imgs/ic32_hotot.png
X%%DATADIR%%/ui/imgs/ic32_hotot_classics.png
X%%DATADIR%%/ui/imgs/ic32_profile_add.png
X%%DATADIR%%/ui/imgs/ic32_profile_identica.png
X%%DATADIR%%/ui/imgs/ic32_profile_twitter.png
X%%DATADIR%%/ui/imgs/ic48_loading.gif
X%%DATADIR%%/ui/imgs/ic48_lock.png
X%%DATADIR%%/ui/imgs/ic48_profile_image.png
X%%DATADIR%%/ui/imgs/ic64_hotot.png
X%%DATADIR%%/ui/imgs/ic64_hotot_classics.png
X%%DATADIR%%/ui/imgs/ic_dm.png
X%%DATADIR%%/ui/imgs/ic_fav.png
X%%DATADIR%%/ui/imgs/ic_home.png
X%%DATADIR%%/ui/imgs/ic_mention.png
X%%DATADIR%%/ui/imgs/ic_people.png
X%%DATADIR%%/ui/imgs/ic_retweet.png
X%%DATADIR%%/ui/imgs/ic_search.png
X%%DATADIR%%/ui/imgs/menu_b.png
X%%DATADIR%%/ui/imgs/menu_h.png
X%%DATADIR%%/ui/imgs/plus-in_b.png
X%%DATADIR%%/ui/imgs/plus-in_h.png
X%%DATADIR%%/ui/imgs/refresh_b.png
X%%DATADIR%%/ui/imgs/refresh_h.png
X%%DATADIR%%/ui/imgs/tweet_fav_indicator.png
X%%DATADIR%%/ui/imgs/welcome_bg.png
X%%DATADIR%%/ui/index.html
X%%DATADIR%%/ui/js/base64.js
X%%DATADIR%%/ui/js/daemon.updater.js
X%%DATADIR%%/ui/js/jquery.ajax-queue.js
X%%DATADIR%%/ui/js/jquery.js
X%%DATADIR%%/ui/js/jquery.layout.js
X%%DATADIR%%/ui/js/js-oauth.js
X%%DATADIR%%/ui/js/lib.network.js
X%%DATADIR%%/ui/js/lib.twitterapi.js
X%%DATADIR%%/ui/js/sha1.js
X%%DATADIR%%/ui/js/ui.about_dlg.js
X%%DATADIR%%/ui/js/ui.action_menu.js
X%%DATADIR%%/ui/js/ui.common_dlg.js
X%%DATADIR%%/ui/js/ui.context_menu.js
X%%DATADIR%%/ui/js/ui.dialog_helper.js
X%%DATADIR%%/ui/js/ui.dm_tabs.js
X%%DATADIR%%/ui/js/ui.exts_dlg.js
X%%DATADIR%%/ui/js/ui.filter.js
X%%DATADIR%%/ui/js/ui.form_checker.js
X%%DATADIR%%/ui/js/ui.header.js
X%%DATADIR%%/ui/js/ui.main.js
X%%DATADIR%%/ui/js/ui.message_dlg.js
X%%DATADIR%%/ui/js/ui.notification.js
X%%DATADIR%%/ui/js/ui.pin_dlg.js
X%%DATADIR%%/ui/js/ui.prefs_dlg.js
X%%DATADIR%%/ui/js/ui.profile_dlg.js
X%%DATADIR%%/ui/js/ui.retweet_tabs.js
X%%DATADIR%%/ui/js/ui.sidebar.js
X%%DATADIR%%/ui/js/ui.slider.js
X%%DATADIR%%/ui/js/ui.status_box.js
X%%DATADIR%%/ui/js/ui.template.js
X%%DATADIR%%/ui/js/ui.welcome.js
X%%DATADIR%%/ui/js/utility.console.js
X%%DATADIR%%/ui/js/utility.db.js
Xshare/locale/de/LC_MESSAGES/hotot.mo
Xshare/locale/es_MX/LC_MESSAGES/hotot.mo
Xshare/locale/it/LC_MESSAGES/hotot.mo
Xshare/locale/pt_BR/LC_MESSAGES/hotot.mo
Xshare/locale/pt_PT/LC_MESSAGES/hotot.mo
Xshare/locale/tr/LC_MESSAGES/hotot.mo
Xshare/locale/zh_CN/LC_MESSAGES/hotot.mo
Xshare/pixmaps/hotot.png
X at exec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true
X at unexec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true
X at dirrm %%DATADIR%%/ui/js
X at dirrm %%DATADIR%%/ui/imgs
X at dirrm %%DATADIR%%/ui/css
X at dirrm %%DATADIR%%/ui
X at dirrm %%DATADIR%%/sound
X at dirrm %%DATADIR%%/ext/org.hotot.videopreview
X at dirrm %%DATADIR%%/ext/org.hotot.translate
X at dirrm %%DATADIR%%/ext/org.hotot.shorturl
X at dirrm %%DATADIR%%/ext/org.hotot.sample
X at dirrm %%DATADIR%%/ext/org.hotot.imageupload
X at dirrm %%DATADIR%%/ext/org.hotot.imagepreview
X at dirrm %%DATADIR%%/ext/org.hotot.gmap
X at dirrm %%DATADIR%%/ext
X at dirrm %%DATADIR%%
X at dirrm %%PYTHON_SITELIBDIR%%/hotot
d835e5f79ef1abec6e4cdba1f23f22e4
echo x - py-hotot/pkg-descr
sed 's/^X//' >py-hotot/pkg-descr << 'cbb309333f5b50a0fae666e1a34396a2'
XHotot is a lightweight microblogging client, written in Python.
X
XWWW:	http://www.hotot.org/
cbb309333f5b50a0fae666e1a34396a2
echo x - py-hotot/distinfo
sed 's/^X//' >py-hotot/distinfo << 'c1b70617d02bbff0bec1950ff86965ca'
XSHA256 (hotot-0.9.5_hg~20101108.531.7z) = 86bcace95f333efe3d9708e2f1747c4bca7ef0b47bbef79fb6ea0155a2b9da76
XSIZE (hotot-0.9.5_hg~20101108.531.7z) = 377275
c1b70617d02bbff0bec1950ff86965ca
echo x - py-hotot/Makefile
sed 's/^X//' >py-hotot/Makefile << '04bcc7dc9fc0d5844445d9325da97a4c'
X# New ports collection makefile for: py-hotot
X# Date created:		2011-02-21
X# Whom:		Olivier Duchateau <duchateau.olivier at gmail.com>
X#
X# $FreeBSD: $
X#
X
XPORTNAME=	hotot
XPORTVERSION=	0.9.5
XCATEGORIES=	net-im python
XMASTER_SITES=	GOOGLE_CODE
XPKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
XDISTFILES=	${PORTNAME}-${PORTVERSION}_hg~20101108.531.7z
X
XMAINTAINER=	duchateau.olivier at gmail.com
XCOMMENT=	Twitter and Identi.ca microblogging client
X
XLICENSE=	LGPL3
X
XBUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}distutils-extra>=2.23:${PORTSDIR}/devel/py-distutils-extra
XRUN_DEPENDS=	7z:${PORTSDIR}/archivers/p7zip \
X		${PYTHON_SITELIBDIR}/setproctitle.so:${PORTSDIR}/devel/py-setproctitle \
X		${PYTHON_SITELIBDIR}/keybinder/__init__.py:${PORTSDIR}/x11/keybinder \
X		${LOCALBASE}/libdata/pkgconfig/pywebkitgtk-1.0.pc:${PORTSDIR}/www/py-webkitgtk \
X		${LOCALBASE}/libdata/pkgconfig/notify-python.pc:${PORTSDIR}/devel/py-notify \
X		${LOCALBASE}/lib/X11/fonts/dejavu/DejaVuSans.ttf:${PORTSDIR}/x11-fonts/dejavu
X
XWRKSRC=	${WRKDIR}/${PORTNAME}
X
XUSE_PYTHON=	yes
XUSE_PYDISTUTILS=	yes
XUSE_GNOME=	desktopfileutils
XINSTALL_ICONS=	yes
X
Xdo-extract:
X	@${MKDIR} ${WRKDIR}
X	@cd ${WRKDIR} && \
X		${LOCALBASE}/bin/7z x -y ${DISTDIR}/${DISTFILES}
X
Xpost-patch:
X.for LOCALE in de it tr
X	${MV} ${WRKSRC}/po/${LOCALE}_* ${WRKSRC}/po/${LOCALE}.po
X.endfor
X
Xdo-build:
X	@cd ${WRKSRC} && \
X		${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} build_i18n -m ; \
X		${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} build
X
Xpost-build:
X	@cd ${WRKSRC}/data/ui && \
X		${FIND} . -type f -regex '.*\.orig' -exec ${RM} -f {} \;
X
Xpost-install:
X	@-update-desktop-database
X
X.include <bsd.port.mk>
04bcc7dc9fc0d5844445d9325da97a4c
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list