/[gentoo-x86]/net-misc/vnc/vnc-4.1.3-r1.ebuild
Gentoo

Contents of /net-misc/vnc/vnc-4.1.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Thu Apr 16 07:53:50 2009 UTC (9 years, 4 months ago) by armin76
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
ia64/sh stable wrt #264897
(Portage version: 2.1.6.7/cvs/Linux ia64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/vnc/vnc-4.1.3-r1.ebuild,v 1.5 2009/04/13 21:06:31 ranger Exp $
4
5 EAPI="1"
6
7 inherit eutils toolchain-funcs multilib autotools
8
9 OPENGL_DIR="xorg-x11"
10 XSERVER_VERSION="1.5.3"
11 PATCH="${PN}-4.1.2-r5-patches-0.1"
12
13 MY_P="vnc-4_1_3-unixsrc"
14 DESCRIPTION="Remote desktop viewer display system"
15 HOMEPAGE="http://www.realvnc.com/"
16 SRC_URI="http://ltsp.mirrors.tds.net/pub/ltsp/tarballs/${MY_P}.tar.gz
17 http://ftp.plusline.de/FreeBSD/distfiles/xc/${MY_P}.tar.gz
18 mirror://gentoo/${PATCH}.tar.bz2
19 server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.bz2 )"
20
21 LICENSE="GPL-2"
22 SLOT="0"
23 KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
24 IUSE="server +xorgmodule"
25
26 RDEPEND="sys-libs/zlib
27 media-libs/freetype
28 x11-libs/libSM
29 x11-libs/libXtst
30 app-admin/eselect-opengl
31 server? (
32 x11-libs/libXi
33 x11-libs/libXfont
34 x11-libs/libXmu
35 x11-libs/libxkbfile
36 x11-libs/libXrender
37 x11-apps/xauth
38 x11-apps/xsetroot
39 media-fonts/font-adobe-100dpi
40 media-fonts/font-adobe-75dpi
41 media-fonts/font-alias
42 media-fonts/font-cursor-misc
43 media-fonts/font-misc-misc
44 xorgmodule? ( ~x11-base/xorg-server-${XSERVER_VERSION} )
45 )
46 !net-misc/tightvnc
47 !net-misc/xf4vnc"
48 DEPEND="${RDEPEND}
49 x11-proto/inputproto
50 x11-proto/xextproto
51 server? (
52 x11-proto/bigreqsproto
53 x11-proto/compositeproto
54 x11-proto/damageproto
55 x11-proto/fixesproto
56 x11-proto/fontsproto
57 x11-proto/randrproto
58 x11-proto/resourceproto
59 x11-proto/scrnsaverproto
60 x11-proto/trapproto
61 x11-proto/videoproto
62 x11-proto/xcmiscproto
63 x11-proto/xineramaproto
64 x11-proto/xf86bigfontproto
65 x11-proto/xf86dgaproto
66 x11-proto/xf86miscproto
67 x11-proto/xf86vidmodeproto
68 >=media-libs/mesa-7.1
69 >=x11-proto/renderproto-0.9.3
70 x11-libs/libpciaccess
71 )"
72
73 S=${WORKDIR}/${MY_P}
74
75 pkg_setup() {
76 if ! use server ; then
77 echo
78 einfo "The 'server' USE flag will build vnc's server."
79 einfo "If '-server' is chosen only the client is built to save space."
80 einfo "Stop the build now if you need to add 'server' to USE flags.\n"
81 ebeep
82 epause 5
83 else
84 ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
85 OLD_IMPLEM="$(eselect opengl show)"
86 eselect opengl set --impl-headers ${OPENGL_DIR}
87 fi
88 }
89
90 switch_opengl_implem() {
91 # Switch to the xorg implementation.
92 # Use new opengl-update that will not reset user selected
93 # OpenGL interface ...
94 echo
95 eselect opengl set ${OLD_IMPLEM}
96 }
97
98 src_unpack() {
99 unpack ${A}
100 cd "${S}"
101
102 if use server ; then
103 mv "${WORKDIR}"/xorg-server-${XSERVER_VERSION} unix/xorg-x11-server-source
104 else
105 rm -f "${WORKDIR}"/patch/*vnc-server*
106 fi
107
108 if use server ; then
109 cd unix
110 mkdir xorg-x11-server-source/hw/vnc
111 cp -RPp xc/programs/Xserver/vnc/Xvnc/xvnc.cc \
112 xc/programs/Xserver/Xvnc.man \
113 xc/programs/Xserver/vnc/*.{h,cc} \
114 xorg-x11-server-source/hw/vnc
115 cp -RPp xorg-x11-server-source/{cfb/cfb.h,hw/vnc}
116 cp -RPp xorg-x11-server-source/{fb/fb.h,hw/vnc}
117 cp -RPp xorg-x11-server-source/{fb/fbrop.h,hw/vnc}
118 sed -i -e 's,xor,c_xor,' -e 's,and,c_and,' \
119 xorg-x11-server-source/hw/vnc/{cfb,fb,fbrop}.h
120 fi
121
122 cd "${S}"
123
124 EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
125 epatch "${FILESDIR}"/${PN}-4.1.2-freebsd.patch
126
127 cd common
128 eautoreconf
129 cd ../unix
130 eautoreconf
131 if use server; then
132 cd xorg-x11-server-source
133 eautoreconf
134 fi
135 }
136
137 src_compile() {
138 cd common
139 econf || die "econf failed"
140 emake || die "emake failed"
141 cd ../unix
142 econf || die "econf failed"
143 emake || die "emake failed"
144
145 if use server ; then
146 cd xorg-x11-server-source
147 econf \
148 --disable-xorg \
149 --disable-xnest --disable-xvfb --disable-dmx \
150 --disable-xwin --disable-xephyr --disable-kdrive \
151 --with-pic \
152 --disable-xorgcfg \
153 --disable-xprint \
154 --disable-static \
155 --disable-composite \
156 --disable-xtrap \
157 --enable-xcsecurity \
158 --with-xkb-output=/usr/share/X11/xkb \
159 --with-rgb-path=/usr/share/X11/rgb.txt \
160 --disable-xevie \
161 --disable-dri2 \
162 --enable-glx \
163 --disable-config-dbus \
164 --disable-config-hal \
165 --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \
166 || die "econf server failed"
167 emake || die "emake server failed"
168 fi
169 }
170
171 src_install() {
172 cd common
173 emake DESTDIR="${D}" install || die "emake install failed"
174 cd ../unix
175 emake DESTDIR="${D}" install || die "emake install failed"
176 newman vncviewer/vncviewer.man vncviewer.1
177 cd ..
178 dodoc README
179
180 doicon "${FILESDIR}"/vncviewer.png
181 make_desktop_entry vncviewer vncviewer vncviewer Network
182
183 if use server ; then
184 cd unix
185 dobin vncserver || die "dobin failed"
186 for f in vncviewer/vncviewer vncpasswd/vncpasswd \
187 vncconfig/vncconfig vncserver x0vncserver/x0vncserver; do
188 mv $f.man $f.1
189 doman $f.1
190 done
191
192 cd xorg-x11-server-source/hw/vnc
193 emake DESTDIR="${D}" install || die "emake install failed"
194 ! use xorgmodule && rm -rf "${D}"/usr/$(get_libdir)/xorg
195
196 newman Xvnc.man Xvnc.1
197 newconfd "${FILESDIR}"/vnc.confd vnc
198 newinitd "${FILESDIR}"/vnc.initd vnc
199
200 rm "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la
201 else
202 cd "${D}"
203 rm usr/bin/x0vncserver
204 rm usr/bin/vncpasswd
205 rm usr/bin/vncconfig
206 fi
207
208 rm "${D}"/usr/$(get_libdir)/librfb.{a,la,so}
209 }
210
211 pkg_postinst() {
212 use server && switch_opengl_implem
213 }

  ViewVC Help
Powered by ViewVC 1.1.20