From 327885f1f90fed5f18251ec4f576b58af21de2e3 Mon Sep 17 00:00:00 2001 From: swills Date: Sun, 22 Dec 2013 03:31:32 +0000 Subject: - Improve DEPENDS [1] - Correct USE_XORG [1] - Install config files [1] - Patch server to use glib [1] - Use space, not tab for xpra [1] - Add license - Support staging PR: ports/181482 [1] Submitted by: Andrew Childs [1] --- x11/xpra/Makefile | 30 +++++++++++++++------------ x11/xpra/files/patch-setup.py | 17 +++++++++++++-- x11/xpra/files/patch-xpra__scripts__server.py | 19 +++++++++++++++++ x11/xpra/pkg-descr | 2 +- x11/xpra/pkg-plist | 11 +++++++--- 5 files changed, 60 insertions(+), 19 deletions(-) create mode 100644 x11/xpra/files/patch-xpra__scripts__server.py (limited to 'x11/xpra') diff --git a/x11/xpra/Makefile b/x11/xpra/Makefile index 01afc0250648..b327e2e93cb2 100644 --- a/x11/xpra/Makefile +++ b/x11/xpra/Makefile @@ -3,35 +3,39 @@ PORTNAME= xpra PORTVERSION= 0.10.10 +PORTREVISION= 1 CATEGORIES= x11 MASTER_SITES= http://xpra.org/src/ MAINTAINER= swills@FreeBSD.org COMMENT= Xpra gives you persistent remote applications for X +LICENSE= GPLv2 + BUILD_DEPENDS= cython:${PORTSDIR}/lang/cython \ - ipython:${PORTSDIR}/devel/ipython \ ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/__init__.py:${PORTSDIR}/x11-toolkits/py-gtk2 -RUN_DEPENDS= cython:${PORTSDIR}/lang/cython \ - ipython:${PORTSDIR}/devel/ipython \ - ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/__init__.py:${PORTSDIR}/x11-toolkits/py-gtk2 \ +RUN_DEPENDS= ${PYTHON_SITELIBDIR}/gtk-2.0/gtk/__init__.py:${PORTSDIR}/x11-toolkits/py-gtk2 \ + ${PYTHON_SITELIBDIR}/dbus/__init__.py:${PORTSDIR}/devel/py-dbus \ ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \ - py*-notify>=0:${PORTSDIR}/devel/py-notify \ - Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver - -LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg - -MANCOMPRESSED= no -MAN1= xpra.1 xpra_launcher.1 + Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver \ + xauth:${PORTSDIR}/x11/xauth \ + setxkbmap:${PORTSDIR}/x11/setxkbmap \ + pulseaudio:${PORTSDIR}/audio/pulseaudio +LIB_DEPENDS= libx264.so:${PORTSDIR}/multimedia/x264 \ + libavcodec.so:${PORTSDIR}/multimedia/ffmpeg \ + libvpx.so:${PORTSDIR}/multimedia/libvpx USES= pkgconfig USE_BZIP2= yes USE_PYTHON= yes -USE_XORG= x11 xext xtst xfixes xcomposite xdamage +USE_XORG= x11 xtst xfixes xcomposite xdamage xrandr USES= pkgconfig USE_PYDISTUTILS= yes PYDISTUTILS_PKGNAME= xpra_all -NO_STAGE= yes +post-install: + ${INSTALL_DATA} ${WRKSRC}/etc/xpra/Xvfb/xpra.conf ${STAGEDIR}/${ETCDIR}/xpra.conf.sample + ${INSTALL_DATA} ${WRKSRC}/etc/xpra/xorg.conf ${STAGEDIR}/${ETCDIR}/xorg.conf.sample + .include diff --git a/x11/xpra/files/patch-setup.py b/x11/xpra/files/patch-setup.py index 98d4aabdd2ea..4d9afa1025ec 100644 --- a/x11/xpra/files/patch-setup.py +++ b/x11/xpra/files/patch-setup.py @@ -1,5 +1,5 @@ ---- ./setup.py.orig 2013-12-20 21:07:29.448820756 +0000 -+++ ./setup.py 2013-12-20 21:07:38.485819828 +0000 +--- ./setup.py.orig 2013-12-19 09:14:12.000000000 +0000 ++++ ./setup.py 2013-12-21 21:13:18.689932655 +0000 @@ -862,7 +862,7 @@ scripts = ["scripts/xpra", "scripts/xpra_launcher"] man_pages = ["man/xpra.1", "man/xpra_launcher.1"] @@ -9,3 +9,16 @@ ("share/xpra", ["README", "COPYING"]), ("share/xpra/icons", glob.glob("icons/*")), ("share/applications", ["xdg/xpra_launcher.desktop", "xdg/xpra.desktop"]), +@@ -910,7 +910,11 @@ + if not use_Xdummy_wrapper and "scripts/xpra_Xdummy" in scripts: + #if we're not using the wrapper, don't install it + scripts.remove("scripts/xpra_Xdummy") +- etc_files.append(xorg_conf) ++ ## FreeBSD ports: we want to install this as xpra.conf.sample ++ ## Prevent it here, handle in post-install target ++ #etc_files.append(xorg_conf) ++ ## FreeBSD ports: override etc_prefix ++ etc_prefix='etc/xpra' + data_files.append((etc_prefix, etc_files)) + setup_options["scripts"] = scripts + diff --git a/x11/xpra/files/patch-xpra__scripts__server.py b/x11/xpra/files/patch-xpra__scripts__server.py new file mode 100644 index 000000000000..a021e53c608f --- /dev/null +++ b/x11/xpra/files/patch-xpra__scripts__server.py @@ -0,0 +1,19 @@ +--- ./xpra/scripts/server.py.orig 2013-08-21 11:46:11.000000000 +0000 ++++ ./xpra/scripts/server.py 2013-12-21 21:11:14.279941696 +0000 +@@ -9,6 +9,7 @@ + # http://lists.partiwm.org/pipermail/parti-discuss/2008-September/000042.html + # (also do not import anything that imports gtk) + import gobject ++import glib + import subprocess + import sys + import os.path +@@ -451,7 +452,7 @@ + # Now we can safely load gtk and connect: + assert "gtk" not in sys.modules + import gtk.gdk #@Reimport +- gtk.gdk.threads_init() ++ glib.threads_init() + display = gtk.gdk.Display(display_name) + manager = gtk.gdk.display_manager_get() + default_display = manager.get_default_display() diff --git a/x11/xpra/pkg-descr b/x11/xpra/pkg-descr index 432defebcca9..37e1e661f3fd 100644 --- a/x11/xpra/pkg-descr +++ b/x11/xpra/pkg-descr @@ -1,4 +1,4 @@ Xpra gives you persistent remote applications for X. So basically it's screen for remote X apps. -WWW: http://xpra.org/ +WWW: http://xpra.org/ diff --git a/x11/xpra/pkg-plist b/x11/xpra/pkg-plist index 62a3e033531c..e57eb5308011 100644 --- a/x11/xpra/pkg-plist +++ b/x11/xpra/pkg-plist @@ -23,8 +23,12 @@ %%DATADIR%%/icons/unticked-small.png %%DATADIR%%/icons/xpra.png %%DATADIR%%/webm/LICENSE -%%LOCALBASE%%/%%ETCDIR%%/xorg.conf -%%LOCALBASE%%/%%ETCDIR%%/xpra.conf +@unexec if cmp -s %D/etc/xpra/xpra.conf.sample %D/etc/xpra/xpra.conf ; then rm -f %D/etc/xpra/xpra.conf; fi +@unexec if cmp -s %D/etc/xpra/xorg.conf.sample %D/etc/xpra/xorg.conf ; then rm -f %D/etc/xpra/xorg.conf; fi +%%ETCDIR%%/xpra.conf.sample +@exec if [ ! -f %D/etc/xpra/xpra.conf ]; then cp -p %D/%F %B/xpra.conf; fi +%%ETCDIR%%/xorg.conf.sample +@exec if [ ! -f %D/etc/xpra/xorg.conf ]; then cp -p %D/%F %B/xorg.conf; fi %%PYTHON_LIBDIR%%/site-packages/xpra/__init__.py %%PYTHON_LIBDIR%%/site-packages/xpra/__init__.pyc %%PYTHON_LIBDIR%%/site-packages/xpra/__init__.pyo @@ -583,8 +587,9 @@ bin/xpra_launcher share/applications/xpra.desktop share/applications/xpra_launcher.desktop share/icons/xpra.png +man/man1/xpra.1.gz +man/man1/xpra_launcher.1.gz @dirrm share/icons -@dirrm share/applications @dirrm %%PYTHON_LIBDIR%%/site-packages/xpra/x11/gtk_x11 @dirrm %%PYTHON_LIBDIR%%/site-packages/xpra/x11/bindings @dirrm %%PYTHON_LIBDIR%%/site-packages/xpra/x11 -- cgit