Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2012 12:50:17 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r306671 - head/net-im/hotot
Message-ID:  <201210301250.q9UCoH4R093175@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Tue Oct 30 12:50:16 2012
New Revision: 306671
URL: http://svn.freebsd.org/changeset/ports/306671

Log:
  - Allow to select desired user interface toolkit (GTK+2 and/or Qt4, default
    is to provide both)
  - Fix Qt4-based binary by more accurate patching of hardcoded "Linux" word
    (e.g. it prevented proxy dialog from being displayed)
  - Also note that some changes were submitted by olivierd@ (forgot to mention
    in previous commit)
  
  PR:		ports/156415 (for r306666)
  Feature safe:	yes

Modified:
  head/net-im/hotot/Makefile
  head/net-im/hotot/pkg-plist

Modified: head/net-im/hotot/Makefile
==============================================================================
--- head/net-im/hotot/Makefile	Tue Oct 30 12:17:02 2012	(r306670)
+++ head/net-im/hotot/Makefile	Tue Oct 30 12:50:16 2012	(r306671)
@@ -3,6 +3,7 @@
 
 PORTNAME=	hotot
 PORTVERSION=	0.9.8.8
+PORTREVISION=	1
 CATEGORIES=	net-im www
 DISTNAME=	${GH_ACCOUNT}-${GH_PROJECT}-${GH_COMMIT}
 
@@ -11,9 +12,6 @@ COMMENT=	Lightweight, flexible microblog
 
 LICENSE=	LGPL3
 
-RUN_DEPENDS=	${PYTHON_SITELIBDIR}/webkit/__init__.py:${PORTSDIR}/www/py-webkitgtk \
-		${PYTHON_SITELIBDIR}/keybinder/__init__.py:${PORTSDIR}/x11/keybinder
-
 USE_GITHUB=	yes
 GH_ACCOUNT=	shellex
 GH_PROJECT=	Hotot
@@ -21,20 +19,44 @@ GH_TAGNAME=	master
 GH_COMMIT=	9c8c8a2
 
 USE_CMAKE=	yes
+CMAKE_ARGS=	-DWITH_KDE=off	# untested, please send patches if you want it
 USE_GETTEXT=	yes
 USE_PYTHON=	yes
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
-		corelib gui sql webkit
 USE_GNOME=	intltool
 INSTALLS_ICONS=	yes
 
 CFLAGS+=	-I${LOCALBASE}/include		# does not uphold CPPFLAGS
 
+OPTIONS_DEFINE=	GTK2 QT4
+OPTIONS_DEFAULT=	GTK2 QT4
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MGTK2}
+RUN_DEPENDS=	${PYTHON_SITELIBDIR}/webkit/__init__.py:${PORTSDIR}/www/py-webkitgtk \
+		${PYTHON_SITELIBDIR}/keybinder/__init__.py:${PORTSDIR}/x11/keybinder
+PLIST_SUB+=	GTK2=""
+.else
+CMAKE_ARGS+=	-DWITH_GTK=off
+PLIST_SUB+=	GTK2="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MQT4}
+USE_QT4=	moc_build qmake_build rcc_build uic_build \
+		corelib gui sql webkit
+PLIST_SUB+=	QT4=""
+.else
+CMAKE_ARGS+=	-DWITH_QT=off
+INSTALL_TARGET=	install
+PLIST_SUB+=	QT4="@comment "
+.endif
+
 post-patch:
 # Upstream should probably use platform.system() instead of hardcoding its
-# name in Python code (at least)
+# name (in Python code at least)
 	@${REINPLACE_CMD} -e 's,Linux,${OPSYS},' ${WRKSRC}/data/js/conf.js \
-		${WRKSRC}/data/js/util.js ${WRKSRC}/hotot/view.py
+		${WRKSRC}/data/js/util.js ${WRKSRC}/hotot/view.py \
+		${WRKSRC}/hotot-gir/view.py ${WRKSRC}/qt/mainwindow.cpp
 # Strip shlib versions from the library filenames
 	@${REINPLACE_CMD} -E 's,so\.[0-9]+,so,' ${WRKSRC}/hotot/utils.py
 # Remove `sourceid' parameter from the search string
@@ -44,6 +66,6 @@ post-patch:
 	@${REINPLACE_CMD} -e "/font_list/s/\[.*/['DejaVu Sans', 'Bitstream Vera Sans', 'Droid Sans', 'Verdana', 'Arial', 'Helvetica']/" \
 		${WRKSRC}/data/js/conf.js
 # Remove stale backup files (or they would pollute pkg-plist)
-	@${FIND} ${WRKSRC} -type f -name *.bak -delete
+	@${FIND} ${WRKSRC} -type f -name '*.bak' -delete
 
 .include <bsd.port.mk>

Modified: head/net-im/hotot/pkg-plist
==============================================================================
--- head/net-im/hotot/pkg-plist	Tue Oct 30 12:17:02 2012	(r306670)
+++ head/net-im/hotot/pkg-plist	Tue Oct 30 12:50:16 2012	(r306671)
@@ -1,24 +1,24 @@
-bin/hotot
-bin/hotot-qt
-%%PYTHON_SITELIBDIR%%/hotot/__init__.py
-%%PYTHON_SITELIBDIR%%/hotot/__init__.pyc
-%%PYTHON_SITELIBDIR%%/hotot/agent.py
-%%PYTHON_SITELIBDIR%%/hotot/agent.pyc
-%%PYTHON_SITELIBDIR%%/hotot/config.py
-%%PYTHON_SITELIBDIR%%/hotot/config.pyc
-%%PYTHON_SITELIBDIR%%/hotot/gtknotification.py
-%%PYTHON_SITELIBDIR%%/hotot/gtknotification.pyc
-%%PYTHON_SITELIBDIR%%/hotot/hotot.py
-%%PYTHON_SITELIBDIR%%/hotot/hotot.pyc
-%%PYTHON_SITELIBDIR%%/hotot/i18n.py
-%%PYTHON_SITELIBDIR%%/hotot/i18n.pyc
-%%PYTHON_SITELIBDIR%%/hotot/utils.py
-%%PYTHON_SITELIBDIR%%/hotot/utils.pyc
-%%PYTHON_SITELIBDIR%%/hotot/view.py
-%%PYTHON_SITELIBDIR%%/hotot/view.pyc
-@dirrm %%PYTHON_SITELIBDIR%%/hotot
-share/applications/hotot.desktop
-share/applications/hotot-qt.desktop
+%%GTK2%%bin/hotot
+%%QT4%%bin/hotot-qt
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/__init__.py
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/__init__.pyc
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/agent.py
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/agent.pyc
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/config.py
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/config.pyc
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/gtknotification.py
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/gtknotification.pyc
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/hotot.py
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/hotot.pyc
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/i18n.py
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/i18n.pyc
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/utils.py
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/utils.pyc
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/view.py
+%%GTK2%%%%PYTHON_SITELIBDIR%%/hotot/view.pyc
+%%GTK2%%@dirrm %%PYTHON_SITELIBDIR%%/hotot
+%%GTK2%%share/applications/hotot.desktop
+%%QT4%%share/applications/hotot-qt.desktop
 share/hotot/_locales/bg/messages.json
 share/hotot/_locales/bn/messages.json
 share/hotot/_locales/ca/messages.json



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210301250.q9UCoH4R093175>