Contents of /branches/R11-stable/extras/tigervnc/tigervnc-1.3.0-r3.smage2
Parent Directory | Revision Log
Revision 21862 -
(show annotations)
(download)
Mon Jul 21 10:28:48 2014 UTC (10 years, 2 months ago) by niro
File size: 9784 byte(s)
Mon Jul 21 10:28:48 2014 UTC (10 years, 2 months ago) by niro
File size: 9784 byte(s)
-release branches/R11-stable
1 | # $Id$ |
2 | |
3 | PNAME="tigervnc" |
4 | PVER="1.3.0" |
5 | PBUILD="r3" |
6 | |
7 | SPLIT_PACKAGES="tigervnc-common tigervnc-server tigervnc-xserver-module tigervnc-server-applet tigervnc" |
8 | |
9 | PCAT="net-misc" |
10 | HOMEPAGE="http://www.tigervnc.com/" |
11 | |
12 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
13 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
14 | |
15 | XORG_PVER="1.15.0" |
16 | XORG="xorg-server-${XORG_PVER}.tar.bz2" |
17 | XORGSDIR="${BUILDDIR}/xorg-server-${XORG_PVER}" |
18 | XORGDDIR="${SRCDIR}/unix/xserver" |
19 | |
20 | COMMON_DEPEND=">= x11-libs/libX11-1.6 |
21 | >= x11-libs/libXext-1.3 |
22 | >= x11-libs/libSM-1.2 |
23 | >= x11-libs/libXtst-1.2 |
24 | >= x11-libs/libXi-1.7 |
25 | >= x11-libs/fltk-1.3 |
26 | >= sys-libs/zlib-1.2.5 |
27 | >= sys-libs/libstdc++-4.8 |
28 | >= app-crypt/gnutls-3.2" |
29 | |
30 | COMMON_FONTS_DEPEND=">= media-fonts/font-adobe-100dpi-1 |
31 | >= media-fonts/font-adobe-75dpi-1 |
32 | >= media-fonts/font-alias-1 |
33 | >= media-fonts/font-cursor-misc-1 |
34 | >= media-fonts/font-misc-misc-1" |
35 | |
36 | SERVER_DEPEND=">= x11-libs/libXfont-1.4 |
37 | >= x11-libs/libxkbfile-1.0.8 |
38 | >= x11-libs/pixman-0.32 |
39 | >= media-libs/freetype-2.5 |
40 | >= x11-apps/xauth-1.0.7 |
41 | >= x11-apps/xsetroot-1.1 |
42 | >= x11-misc/xkeyboard-config-2.8 |
43 | >= sys-fs/udev-208" |
44 | |
45 | MODULE_DEPEND=">= virtual/X-ABI-EXTENSION-8 |
46 | >= virtual/X-ABI-VIDEODRV-15 |
47 | >= virtual/X-ABI-XINPUT-20" |
48 | |
49 | APPLET_DEPEND=">= virtual/java" |
50 | |
51 | SDEPEND="${COMMON_DEPEND} |
52 | ${COMMON_FONTS_DEPEND} |
53 | ${SERVER_DEPEND} |
54 | ${MODULE_DEPEND} |
55 | ${APPLET_DEPEND} |
56 | >= dev-util/desktop-file-utils-0.15 |
57 | >= dev-lang/nasm-2 |
58 | == x11-proto/xorg-protos-7.7.${XORG_PVER} |
59 | >= x11-libs/libpciaccess-0.13 |
60 | >= virtual/java-jdk |
61 | >= gnome-base/librsvg-2.40 |
62 | >= media-gfx/imagemagick-6.8" |
63 | |
64 | msetfeature "!check" |
65 | sminclude cmake xorg xdg mtools cleanutils |
66 | |
67 | SRC_URI=( |
68 | sourceforge://${PNAME}/${SRCFILE} |
69 | mirror://${PNAME}/${SRCFILE} |
70 | http://ftp.x.org/pub/individual/xserver/${XORG} |
71 | mirror://xorg-server/${XORG} |
72 | mirror://${PNAME}/tigervnc_48.png |
73 | mirror://${PNAME}/${PNAME}-1.0.90-cookie.patch |
74 | mirror://${PNAME}/${PNAME}-1.0.90-ldnow.patch |
75 | mirror://${PNAME}/${PNAME}-1.1.0-gethomedir.patch |
76 | mirror://${PNAME}/${PNAME}-1.1.0-rh692048.patch |
77 | mirror://${PNAME}/${PNAME}-${PVER}-inetd-nowait.patch |
78 | mirror://${PNAME}/${PNAME}-${PVER}-setcursor-crash.patch |
79 | mirror://${PNAME}/${PNAME}-${PVER}-manpages.patch |
80 | mirror://${PNAME}/${PNAME}-${PVER}-getmaster.patch |
81 | mirror://${PNAME}/${PNAME}-${PVER}-shebang.patch |
82 | mirror://${PNAME}/${PNAME}-${PVER}-key_is_down.patch |
83 | mirror://${PNAME}/${PNAME}-${PVER}-xorg115.patch |
84 | ) |
85 | |
86 | UP2DATE="updatecmd_sourceforge ${PNAME}" |
87 | |
88 | split_info_tigervnc-common() |
89 | { |
90 | DESCRIPTION="Common TigerVNC libs and utils." |
91 | DEPEND="${COMMON_DEPEND}" |
92 | PROVIDE="virtual/vnc-client" |
93 | } |
94 | |
95 | split_info_tigervnc-server() |
96 | { |
97 | DESCRIPTION="TigerVNC VNC server." |
98 | DEPEND="== net-misc/tigervnc-common-${PVER} |
99 | ${COMMON_DEPEND} |
100 | ${COMMON_FONTS_DEPEND} |
101 | ${SERVER_DEPEND}" |
102 | PROVIDE="virtual/vnc" |
103 | } |
104 | |
105 | split_info_tigervnc-xserver-module() |
106 | { |
107 | DESCRIPTION="TigerVNC Xorg server module." |
108 | DEPEND="== net-misc/tigervnc-common-${PVER} |
109 | ${COMMON_FONTS_DEPEND} |
110 | ${MODULE_DEPEND}" |
111 | PROVIDE="virtual/vnc-x11" |
112 | } |
113 | |
114 | split_info_tigervnc-server-applet() |
115 | { |
116 | DESCRIPTION="TigerVNC VNC server." |
117 | DEPEND="${APPLET_DEPEND}" |
118 | PROVIDE="virtual/vnc-java" |
119 | } |
120 | |
121 | split_info_tigervnc() |
122 | { |
123 | DESCRIPTION="TigerVNC is a suite of VNC servers and clients that have a focus on performance and remote display functionality." |
124 | DEPEND="== net-misc/tigervnc-common-${PVER} |
125 | == net-misc/tigervnc-server-${PVER} |
126 | == net-misc/tigervnc-xserver-module-${PVER} |
127 | == net-misc/tigervnc-server-applet-${PVER}" |
128 | |
129 | PKGTYPE="virtual" |
130 | |
131 | # drop everything we don't need in the meta package: |
132 | INHERITS="" |
133 | SPECIAL_VARS="" |
134 | SPECIAL_FUNCTIONS="" |
135 | SDEPEND="" |
136 | PROVIDE="" |
137 | unset -f preinstall |
138 | unset -f postinstall |
139 | unset -f preremove |
140 | unset -f postremove |
141 | } |
142 | |
143 | src_prepare() |
144 | { |
145 | munpack ${SRCFILE} || die |
146 | munpack ${XORG} || die |
147 | cp -r ${XORGSDIR}/* ${XORGDDIR} || die |
148 | cd ${SRCDIR} |
149 | |
150 | # patchwork |
151 | # create X server cookie via mcookie |
152 | mpatch ${PNAME}-1.0.90-cookie.patch || die |
153 | # link libvnc.so "now" to catch "undefined symbol" errors during Xorg startup |
154 | mpatch ${PNAME}-1.0.90-ldnow.patch || die |
155 | mpatch ${PNAME}-1.1.0-gethomedir.patch || die |
156 | mpatch ${PNAME}-1.1.0-rh692048.patch || die |
157 | |
158 | # fix busy loop when run from inetd in nowait mode |
159 | mpatch ${PNAME}-${PVER}-inetd-nowait.patch || die |
160 | |
161 | # fix a crash wit setcursor |
162 | mpatch ${PNAME}-${PVER}-setcursor-crash.patch || die |
163 | |
164 | # synchronise manpages and --help output |
165 | mpatch ${PNAME}-${PVER}-manpages.patch || die |
166 | |
167 | # libvnc.so: don't use unexported GetMaster function |
168 | mpatch ${PNAME}-${PVER}-getmaster.patch || die |
169 | |
170 | # don't use shebang in vncserver script. |
171 | mpatch ${PNAME}-${PVER}-shebang.patch || die |
172 | |
173 | # libvnc.so: don't use unexported key_is_down function |
174 | mpatch ${PNAME}-${PVER}-key_is_down.patch || die |
175 | |
176 | # apply the included xorg patch |
177 | cd ${XORGDDIR} |
178 | # local xorg_patch_ver="${XORG_PVER%.*}" |
179 | # xorg_patch_ver="${xorg_patch_ver//.}" |
180 | # patch -Np1 -i ../xserver${xorg_patch_ver}.patch || die |
181 | patch -Np1 -i ../xserver114.patch || die |
182 | |
183 | # allow build against xorg-server-1.15 |
184 | mpatch ${PNAME}-${PVER}-xorg115.patch || die |
185 | |
186 | # reconfigure xorg |
187 | cd ${XORGDDIR} |
188 | mautoreconf || die |
189 | } |
190 | |
191 | src_compile() |
192 | { |
193 | cd ${SRCDIR} |
194 | cmake_configure || die |
195 | mmake || die |
196 | |
197 | # build the x11 module |
198 | cd ${XORGDDIR} |
199 | mconfigure \ |
200 | --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \ |
201 | --with-fontdir=/usr/share/fonts \ |
202 | --with-rgb-path=/usr/share/X11/rgb.txt \ |
203 | --with-xkb-output=/usr/share/X11/xkb \ |
204 | --with-module-dir=/usr/$(mlibdir)/xorg/modules \ |
205 | --with-dri-driver-path=/usr/$(mlibdir)/dri \ |
206 | --with-pic \ |
207 | --without-dtrace \ |
208 | --disable-xorg \ |
209 | --disable-composite \ |
210 | --enable-xtrap \ |
211 | --disable-xinerama \ |
212 | --enable-glx \ |
213 | --disable-xnest \ |
214 | --disable-xvfb \ |
215 | --disable-dmx \ |
216 | --disable-xwin \ |
217 | --disable-xephyr \ |
218 | --disable-kdrive \ |
219 | --disable-static \ |
220 | --disable-dri \ |
221 | --enable-dri2 \ |
222 | --disable-dri3 \ |
223 | --disable-present \ |
224 | --disable-config-dbus \ |
225 | --disable-config-hal \ |
226 | --disable-config-udev \ |
227 | --enable-install-libxf86config \ |
228 | --disable-unit-tests \ |
229 | --disable-devel-docs \ |
230 | --disable-selective-werror \ |
231 | || die |
232 | |
233 | mmake || die |
234 | |
235 | # build icons |
236 | cd ${SRCDIR}/media |
237 | mmake -j1 || die |
238 | |
239 | # build the java applet |
240 | cd ${SRCDIR}/java |
241 | |
242 | # cmake_configure does not work because of LIBDIR definition |
243 | cmake \ |
244 | -DCMAKE_VERBOSE_MAKEFILE=ON \ |
245 | -DCMAKE_BUILD_TYPE=Release \ |
246 | -DCMAKE_INSTALL_PREFIX=/usr \ |
247 | ${SRCDIR}/java \ |
248 | || die |
249 | |
250 | mmake -j1 || die |
251 | } |
252 | |
253 | src_install_tigervnc-common() |
254 | { |
255 | cd ${SRCDIR} |
256 | mmake DESTDIR=${BINDIR} install || die |
257 | |
258 | # cleanup |
259 | zapmost ${BINDIR} usr/bin/vncpasswd usr/bin/vncviewer usr/share/locale || die |
260 | |
261 | # install man pages |
262 | cp ${SRCDIR}/vncviewer/vncviewer.{man,1} || die |
263 | cp ${SRCDIR}/unix/vncpasswd/vncpasswd.{man,1} || die |
264 | minstallman ${SRCDIR}/vncviewer/vncviewer.1 || die |
265 | minstallman ${SRCDIR}/unix/vncpasswd/vncpasswd.1 || die |
266 | |
267 | # desktop icon |
268 | minstallpixmap media/icons/tigervnc_48.png vncviewer.png || die |
269 | minstall_desktop_icon \ |
270 | --name "TigerVNC Viewer" \ |
271 | --file "vncviewer" \ |
272 | --comment "Connect to VNC server and display remote desktop" \ |
273 | --exec /usr/bin/vncviewer \ |
274 | --icon vncviewer.png \ |
275 | --categories "Application,Network" \ |
276 | || die |
277 | |
278 | # docs |
279 | minstalldocs README LICENCE.TXT || die |
280 | } |
281 | |
282 | src_install_tigervnc-server() |
283 | { |
284 | cd ${SRCDIR} |
285 | mmake DESTDIR=${BINDIR} install || die |
286 | |
287 | # install server module and binaries |
288 | cd ${XORGDDIR}/hw/vnc |
289 | mmake DESTDIR=${BINDIR} install || die |
290 | |
291 | # cleanup |
292 | rm ${BINDIR}/usr/bin/vncpasswd || die |
293 | rm ${BINDIR}/usr/bin/vncviewer || die |
294 | rm -r ${BINDIR}/usr/share/man || die |
295 | rm -r ${BINDIR}/usr/$(mlibdir) || die |
296 | |
297 | # install man pages |
298 | cp ${SRCDIR}/unix/vncconfig/vncconfig.{man,1} || die |
299 | cp ${SRCDIR}/unix/vncserver.{man,1} || die |
300 | cp ${SRCDIR}/unix/x0vncserver/x0vncserver.{man,1} || die |
301 | cp ${XORGDDIR}/hw/vnc/Xvnc.{man,1} || die |
302 | minstallman ${SRCDIR}/unix/vncconfig/vncconfig.1 || die |
303 | minstallman ${SRCDIR}/unix/vncserver.1 || die |
304 | minstallman ${SRCDIR}/unix/x0vncserver/x0vncserver.1 || die |
305 | minstallman ${XORGDDIR}/hw/vnc/Xvnc.1 || die |
306 | } |
307 | |
308 | src_install_tigervnc-xserver-module() |
309 | { |
310 | # install server module and binaries |
311 | cd ${XORGDDIR}/hw/vnc |
312 | mmake DESTDIR=${BINDIR} install || die |
313 | |
314 | # cleanup |
315 | zapmost ${BINDIR} usr/$(mlibdir) || die |
316 | |
317 | # not needed |
318 | rm ${BINDIR}/usr/$(mlibdir)/xorg/modules/extensions/libvnc.la || die |
319 | |
320 | # create a example config |
321 | minstalldir /etc/X11/xorg.conf.d || die |
322 | MCONFIG=/etc/X11/xorg.conf.d/20-vnc.conf |
323 | mclearconfig |
324 | maddconfig '# Example vnc module configuration' |
325 | maddconfig '# Uncomment these entries and set a password with the vncpasswd program' |
326 | maddconfig |
327 | maddconfig 'Section "Module"' |
328 | maddconfig ' Load "vnc"' |
329 | maddconfig 'EndSection' |
330 | maddconfig |
331 | maddconfig 'Section "Screen"' |
332 | maddconfig ' Identifier "Screen0"' |
333 | maddconfig ' Option "SecurityTypes" "VncAuth"' |
334 | maddconfig ' Option "UserPasswdVerifier" "VncAuth"' |
335 | maddconfig ' Option "PasswordFile" "/root/.vnc/passwd"' |
336 | maddconfig 'EndSection' |
337 | } |
338 | |
339 | src_install_tigervnc-server-applet() |
340 | { |
341 | cd ${SRCDIR}/java |
342 | minstalldir /usr/share/vnc/classes || die |
343 | minstallexec VncViewer.jar /usr/share/vnc/classes || die |
344 | minstallfile com/tigervnc/vncviewer/index.vnc /usr/share/vnc/classes || die |
345 | } |
346 | |
347 | postinstall_tigervnc-xserver-module() |
348 | { |
349 | echo |
350 | echo 'Add following to /etc/X11/xorg.conf.d/20-vnc.conf for native X display support:' |
351 | echo ' Section "Module"' |
352 | echo ' ...' |
353 | echo ' Load "vnc"' |
354 | echo ' EndSection' |
355 | echo |
356 | echo 'To enable VNC password authentification use the vncpasswd program:' |
357 | echo ' "vncpasswd"' |
358 | echo |
359 | echo 'You will also need to tell the VNC module where the password is stored:' |
360 | echo ' Section "Screen"' |
361 | echo ' ...' |
362 | echo ' Option "SecurityTypes" "VncAuth"' |
363 | echo ' Option "UserPasswdVerifier" "VncAuth"' |
364 | echo ' Option "PasswordFile" "/root/.vnc/passwd"' |
365 | echo ' EndSection' |
366 | echo |
367 | } |