xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #2242: xpra-2.5.ebuild

File xpra-2.5.ebuild, 4.0 KB (added by Alex Guzman, 2 years ago)

xpra 2.5 ebuild

Line 
1# Copyright 1999-2019 Gentoo Authors
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6# PyCObject_Check and PyCObject_AsVoidPtr vanished with python 3.3
7PYTHON_COMPAT=( python2_7 )
8inherit xdg distutils-r1 eutils flag-o-matic user tmpfiles prefix
9
10DESCRIPTION="X Persistent Remote Apps (xpra) and Partitioning WM (parti) based on wimpiggy"
11HOMEPAGE="http://xpra.org/ http://xpra.org/src/"
12SRC_URI="http://xpra.org/src/${P}.tar.xz"
13
14LICENSE="GPL-2 BSD"
15SLOT="0"
16KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
17IUSE="+client +clipboard csc cups dbus dec_avcodec2 enc_ffmpeg enc_x264 enc_x265 jpeg libav +lz4 lzo opengl pillow pulseaudio server sound test vpx webcam webp"
18
19REQUIRED_USE="${PYTHON_REQUIRED_USE}
20        clipboard? ( || ( server client ) )
21        cups? ( dbus )
22        opengl? ( client )
23        || ( client server )
24        client? ( enc_x264? ( dec_avcodec2 ) enc_x265? ( dec_avcodec2 ) )"
25
26COMMON_DEPEND="${PYTHON_DEPS}
27        dev-python/pygobject:2[${PYTHON_USEDEP}]
28        dev-python/pygtk:2[${PYTHON_USEDEP}]
29        x11-libs/gtk+:2
30        x11-libs/libX11
31        x11-libs/libXcomposite
32        x11-libs/libXdamage
33        x11-libs/libXfixes
34        x11-libs/libXrandr
35        x11-libs/libXtst
36        x11-libs/libxkbfile
37        csc? (
38                !libav? ( >=media-video/ffmpeg-1.2.2:0= )
39                libav? ( media-video/libav:0= )
40        )
41        dec_avcodec2? (
42                !libav? ( >=media-video/ffmpeg-2:0=[x264,x265] )
43                libav? ( media-video/libav:0=[x264,x265] )
44        )
45        enc_ffmpeg? (
46                !libav? ( >=media-video/ffmpeg-3.2.2:0= )
47                libav? ( media-video/libav:0= )
48        )
49        enc_x264? ( media-libs/x264
50                !libav? ( >=media-video/ffmpeg-1.0.4:0=[x264] )
51                libav? ( media-video/libav:0=[x264] )
52        )
53        enc_x265? ( media-libs/x265
54                !libav? ( >=media-video/ffmpeg-2:0=[x264] )
55                libav? ( media-video/libav:0=[x264] ) )
56        jpeg? ( media-libs/libjpeg-turbo )
57        opengl? ( dev-python/pygtkglext )
58        pulseaudio? ( media-sound/pulseaudio )
59        sound? ( media-libs/gstreamer:1.0
60                media-libs/gst-plugins-base:1.0
61                dev-python/gst-python:1.0 )
62        vpx? ( media-libs/libvpx virtual/ffmpeg )
63        webp? ( media-libs/libwebp )"
64
65RDEPEND="${COMMON_DEPEND}
66        dev-python/netifaces[${PYTHON_USEDEP}]
67        dev-python/rencode[${PYTHON_USEDEP}]
68        virtual/ssh
69        x11-apps/xmodmap
70        cups? ( dev-python/pycups[${PYTHON_USEDEP}] )
71        dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
72        lz4? ( dev-python/lz4[${PYTHON_USEDEP}] )
73        lzo? ( >=dev-python/python-lzo-0.7.0[${PYTHON_USEDEP}] )
74        opengl? (
75                client? ( dev-python/pyopengl_accelerate[${PYTHON_USEDEP}] )
76        )
77        pillow? ( dev-python/pillow[${PYTHON_USEDEP}] )
78        server? ( x11-base/xorg-server[-minimal,xvfb]
79                x11-drivers/xf86-input-void
80        )
81        webcam? ( dev-python/numpy[${PYTHON_USEDEP}]
82                media-libs/opencv[python]
83                dev-python/pyinotify[${PYTHON_USEDEP}] )"
84DEPEND="${COMMON_DEPEND}
85        virtual/pkgconfig
86        >=dev-python/cython-0.16[${PYTHON_USEDEP}]"
87
88PATCHES=( "${FILESDIR}"/${PN}-0.13.1-ignore-gentoo-no-compile.patch
89        "${FILESDIR}"/${PN}-2.0-suid-warning.patch )
90
91pkg_postinst() {
92        enewgroup ${PN}
93        tmpfiles_process /usr/lib/tmpfiles.d/xpra.conf
94
95        xdg_pkg_postinst
96}
97
98python_prepare_all() {
99        hprefixify -w '/os.path/' setup.py
100        hprefixify tmpfiles.d/xpra.conf xpra/server/{server,socket}_util.py \
101                xpra/platform{/xposix,}/paths.py xpra/scripts/server.py
102
103        distutils-r1_python_prepare_all
104}
105
106python_configure_all() {
107        sed -e "/'pulseaudio'/s:DEFAULT_PULSEAUDIO:$(usex pulseaudio True False):" \
108                -i setup.py || die
109
110        mydistutilsargs=(
111                --without-PIC
112                --without-Xdummy
113                $(use_with client)
114                $(use_with clipboard)
115                $(use_with csc csc_swscale)
116                --without-csc_libyuv
117                $(use_with cups printing)
118                --without-debug
119                $(use_with dbus)
120                $(use_with dec_avcodec2)
121                $(use_with enc_ffmpeg)
122                $(use_with enc_x264)
123                $(use_with enc_x265)
124                --with-gtk2
125                --without-gtk3
126                --without-html5
127                $(use_with jpeg jpeg_encoder)
128                $(use_with jpeg jpeg_decoder)
129                --without-mdns
130                --without-minify
131                $(use_with opengl)
132                $(use_with server shadow)
133                $(use_with server)
134                $(use_with sound)
135                --with-strict
136                $(use_with vpx)
137                --with-warn
138                $(use_with webcam)
139                $(use_with webp)
140                --with-x11
141        )
142
143        # see https://www.xpra.org/trac/ticket/1080
144        # and http://trac.cython.org/ticket/395
145        append-cflags -fno-strict-aliasing
146
147        export XPRA_SOCKET_DIRS="${EPREFIX}/run/xpra"
148}