Magellan Linux

Contents of /branches/magellan-next/extras/tigervnc/tigervnc-1.0.90_svn4323-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8005 - (show annotations) (download)
Tue Jun 28 18:08:42 2011 UTC (12 years, 11 months ago) by niro
File size: 9813 byte(s)
auto added: ver bump to 1.0.90_svn4323-r1
1 # $Id$
2
3 PNAME="tigervnc"
4 PVER="1.0.90_svn4323"
5 PBUILD="r1"
6
7 PCATEGORIE="net-misc"
8 STATE="unstable"
9
10 DESCRIPTION="TigerVNC is a suite of VNC servers and clients that have a focus on performance and remote display functionality."
11 HOMEPAGE="http://www.tigervnc.com/"
12
13 SRCFILE="${PNAME}-${PVER}.tar.bz2"
14 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
15
16 XORG_PVER="1.10.2"
17 XORG="xorg-server-${XORG_PVER}.tar.bz2"
18 XORGSDIR="${BUILDDIR}/xorg-server-${XORG_PVER}"
19 XORGDDIR="${SRCDIR}/unix/xserver"
20
21 SDEPEND=">= x11-libs/libX11-1.4
22 >= x11-libs/libXext-1.3
23 >= x11-libs/libSM-1.2
24 >= x11-libs/libXtst-1.2
25 >= x11-libs/libXi-1.4
26 >= x11-libs/libXfont-1.4
27 >= x11-libs/libxkbfile-1.0.7
28 >= x11-libs/pixman-0.22
29 >= sys-libs/zlib-1.2.5
30 >= media-libs/freetype-2.4
31 >= x11-apps/xauth-1.0.6
32 >= x11-apps/xsetroot-1.1
33 >= x11-misc/xkeyboard-config-2.2
34 >= media-fonts/font-adobe-100dpi-1
35 >= media-fonts/font-adobe-75dpi-1
36 >= media-fonts/font-alias-1
37 >= media-fonts/font-cursor-misc-1
38 >= media-fonts/font-misc-misc-1
39 == x11-base/xorg-server-${XORG_PVER}
40 >= app-crypt/gnutls-2.8
41 >= sys-fs/udev-171"
42
43 SDEPEND+="
44 >= dev-util/desktop-file-utils-0.15
45 >= dev-lang/nasm-2
46 >= x11-proto/xextproto-7.2
47 >= x11-proto/inputproto-2
48 >= x11-proto/bigreqsproto-1.1
49 >= x11-proto/compositeproto-0.4
50 >= x11-proto/damageproto-1.2
51 >= x11-proto/dri2proto-2.3
52 >= x11-proto/fixesproto-5
53 >= x11-proto/fontsproto-2.1
54 >= x11-proto/randrproto-1.3
55 >= x11-proto/resourceproto-1.2
56 >= x11-proto/scrnsaverproto-1.2
57 >= x11-proto/videoproto-2.3
58 >= x11-proto/xcmiscproto-1.2
59 >= x11-proto/xineramaproto-1.2
60 >= x11-proto/xf86bigfontproto-1.2
61 >= x11-proto/xf86dgaproto-2.1
62 >= x11-proto/xf86driproto-2.1
63 >= x11-proto/xf86miscproto-0.9.3
64 >= x11-proto/xf86vidmodeproto-2.3
65 >= x11-proto/glproto-1.4.12
66 >= x11-proto/renderproto-0.11
67 >= x11-libs/libpciaccess-0.12
68 >= virtual/java-jdk"
69
70 sminclude xorg xdg mtools cleanutils
71
72 SPLIT_PACKAGES="tigervnc-common tigervnc-server tigervnc-xserver-module tigervnc-server-applet tigervnc"
73
74 SRC_URI=(
75 sourceforge://${PNAME}/${SRCFILE}
76 mirror://${PNAME}/${SRCFILE}
77 http://ftp.x.org/pub/individual/xserver/${XORG}
78 mirror://xorg-server/${XORG}
79 mirror://${PNAME}/tigervnc_48.png
80 mirror://${PNAME}/${PNAME}-1.0.90-102434.patch
81 mirror://${PNAME}/${PNAME}-1.0.90-cookie.patch
82 mirror://${PNAME}/${PNAME}-0.0.90-viewer-reparent.patch
83 mirror://${PNAME}/${PNAME}-1.0.90-ldnow.patch
84 mirror://${PNAME}/${PNAME}-${PVER}-xserver110-patch-fix.patch
85 mirror://${PNAME}/${PNAME}-${PVER}-xserver110-patch-missing-miext_sync_ldadd.patch
86 )
87
88 UP2DATE="updatecmd_sourceforge ${PNAME}"
89
90 split_info_tigervnc-common()
91 {
92 DESCRIPTION="Common TigerVNC libs and utils."
93 DEPEND=">= x11-libs/libX11-1.3
94 >= x11-libs/libXext-1.1
95 >= x11-libs/libSM-1.1.0
96 >= x11-libs/libXtst-1.0.3
97 >= x11-libs/libXi-1.2.1
98 >= sys-libs/zlib-1.2.3
99 >= app-crypt/gnutls-2.8"
100 unset -f postinstall
101 }
102
103 split_info_tigervnc-server()
104 {
105 DESCRIPTION="TigerVNC VNC server."
106 DEPEND="== net-misc/tigervnc-common-${PVER}
107 >= x11-libs/libX11-1.3
108 >= x11-libs/libXext-1.1
109 >= x11-libs/libSM-1.1.0
110 >= x11-libs/libXtst-1.0.3
111 >= x11-libs/libXi-1.2.1
112 >= x11-libs/libXfont-1.4.0
113 >= x11-libs/pixman-0.18.0
114 >= sys-libs/zlib-1.2.3
115 >= media-libs/freetype-2.3.9
116 >= x11-apps/xauth-1.0.3
117 >= x11-apps/xsetroot-1.0.2
118 >= x11-misc/xkeyboard-config-1.8
119 >= media-fonts/font-adobe-100dpi-1
120 >= media-fonts/font-adobe-75dpi-1
121 >= media-fonts/font-alias-1
122 >= media-fonts/font-cursor-misc-1
123 >= media-fonts/font-misc-misc-1
124 >= app-crypt/gnutls-2.8
125 >= sys-fs/udev-151"
126
127 unset -f postinstall
128 }
129
130 split_info_tigervnc-xserver-module()
131 {
132 DESCRIPTION="TigerVNC Xorg server module."
133 DEPEND="== net-misc/tigervnc-common-${PVER}
134 >= media-fonts/font-adobe-100dpi-1
135 >= media-fonts/font-adobe-75dpi-1
136 >= media-fonts/font-alias-1
137 >= media-fonts/font-cursor-misc-1
138 >= media-fonts/font-misc-misc-1
139 == x11-base/xorg-server-${XORG_PVER}"
140
141 postinstall()
142 {
143 echo
144 echo "Add following to /etc/X11/xorg.conf for native X display support:"
145 echo ' Section "Module"'
146 echo " ..."
147 echo ' Load "vnc"'
148 echo " EndSection"
149 echo
150 echo "To enable VNC password authentification use the vncpasswd program:"
151 echo " 'vncpasswd'"
152 echo
153 echo "You will also need to tell the VNC module where the password is stored:"
154 echo ' Section "Screen"'
155 echo " ..."
156 echo ' Option "SecurityTypes" "VncAuth"'
157 echo ' Option "UserPasswdVerifier" "VncAuth"'
158 echo ' Option "PasswordFile" "/root/.vnc/passwd"'
159 echo " EndSection"
160 echo
161 }
162 }
163
164 split_info_tigervnc-server-applet()
165 {
166 DESCRIPTION="TigerVNC VNC server."
167 DEPEND=">= virtual/java"
168 unset -f postinstall
169 }
170
171 split_info_tigervnc()
172 {
173 DESCRIPTION="TigerVNC is a suite of VNC servers and clients that have a focus on performance and remote display functionality."
174 DEPEND="== net-misc/tigervnc-common-${PVER}
175 == net-misc/tigervnc-server-${PVER}
176 == net-misc/tigervnc-xserver-module-${PVER}
177 == net-misc/tigervnc-server-applet-${PVER}"
178
179 PKGTYPE="virtual"
180 NOPKGBUILD="true"
181
182 # drop everything we don't need in the meta package:
183 INHERITS=""
184 SPECIAL_VARS=""
185 SPECIAL_FUNCTIONS=""
186 SDEPEND=""
187 PROVIDE=""
188 unset -f preinstall
189 unset -f postinstall
190 unset -f preremove
191 unset -f postremove
192 }
193
194 src_prepare()
195 {
196 munpack ${SRCFILE} || die
197 munpack ${XORG} || die
198 cp -r ${XORGSDIR}/* ${XORGDDIR} || die
199 cd ${SRCDIR}
200
201 # patchwork
202 # force vncviewer to read password from stdin
203 mpatch ${PNAME}-1.0.90-102434.patch || die
204 # create X server cookie via mcookie
205 mpatch ${PNAME}-1.0.90-cookie.patch || die
206 # add reparent support for x window
207 mpatch ${PNAME}-0.0.90-viewer-reparent.patch || die
208 # link libvnc.so "now" to catch "undefined symbol" errors during Xorg startup
209 mpatch ${PNAME}-1.0.90-ldnow.patch || die
210 cd ${SRCDIR}/unix
211 # fix the included patch to work with xorg-server-1.10.0 final
212 mpatch ${PNAME}-${PVER}-xserver110-patch-fix.patch || die
213 # fix some missing ldflags to successfully build Xvnc against xorg-server-1.10.0 final
214 mpatch ${PNAME}-${PVER}-xserver110-patch-missing-miext_sync_ldadd.patch || die
215
216 # apply the included xorg patch
217 cd ${XORGDDIR}
218 local xorg_patch_ver="${XORG_PVER%.*}"
219 xorg_patch_ver="${xorg_patch_ver//.}"
220 patch -Np1 -i ../xserver${xorg_patch_ver}.patch || die
221
222 # reconfigure everything
223 cd ${XORGDDIR}
224 libtoolize --copy --force || die
225 autoreconf --verbose --install --force || die
226
227 cd ${SRCDIR}
228 libtoolize --copy --force || die
229 autoreconf --verbose --install --force || die
230 }
231
232 src_compile()
233 {
234 cd ${SRCDIR}
235 mconfigure --disable-static || die
236 # only build neccessary things
237 mmake -j1 -C common || die
238 mmake -j1 -C unix/vncpasswd || die
239
240 # fix build issues
241 export CFLAGS="$(pkg-config --cflags libdrm)"
242
243 # build the x11 module
244 cd ${XORGDDIR}
245 mconfigure \
246 --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \
247 --with-rgb-path=/usr/share/X11/rgb.txt \
248 --with-xkb-output=/usr/share/X11/xkb \
249 --with-module-dir=/usr/$(mlibdir)/xorg/modules \
250 --with-pic \
251 --disable-xorg \
252 --disable-composite \
253 --enable-xtrap \
254 --enable-glx \
255 --disable-xnest \
256 --disable-xvfb \
257 --disable-dmx \
258 --disable-xwin \
259 --disable-xephyr \
260 --disable-kdrive \
261 --disable-xorgcfg \
262 --disable-xprint \
263 --disable-static \
264 --disable-xevie \
265 --disable-dri \
266 --disable-dri2 \
267 --disable-config-dbus \
268 --disable-config-hal \
269 --enable-install-libxf86config \
270 --disable-shave \
271 || die
272
273 mmake || die
274
275 # build the java applet
276 cd ${SRCDIR}/java/src/com/tigervnc/vncviewer
277 mmake -j1 || die
278 }
279
280 src_install_tigervnc-common()
281 {
282 cd ${SRCDIR}
283 mmake DESTDIR=${BINDIR} install || die
284
285 # cleanup
286 zapmost ${BINDIR} usr/bin/vncpasswd usr/bin/vncviewer usr/share/locale || die
287
288 # install man pages
289 cp ${SRCDIR}/unix/vncviewer/vncviewer.{man,1} || die
290 cp ${SRCDIR}/unix/vncpasswd/vncpasswd.{man,1} || die
291 minstallman ${SRCDIR}/unix/vncviewer/vncviewer.1 || die
292 minstallman ${SRCDIR}/unix/vncpasswd/vncpasswd.1 || die
293
294 # desktop icon
295 minstallpixmap tigervnc_48.png vncviewer.png || die
296 minstall_desktop_icon \
297 --name "TigerVNC Viewer" \
298 --file "vncviewer" \
299 --comment "Connect to VNC server and display remote desktop" \
300 --exec /usr/bin/vncviewer \
301 --icon vncviewer.png \
302 --categories "Application,Network" \
303 || die
304
305 # docs
306 minstalldocs README LICENCE.TXT || die
307 }
308
309 src_install_tigervnc-server()
310 {
311 cd ${SRCDIR}
312 mmake -C unix/vncpasswd DESTDIR=${BINDIR} install || die
313
314 # install server module and binaries
315 cd ${XORGDDIR}/hw/vnc
316 mmake DESTDIR=${BINDIR} install || die
317
318 # cleanup
319 rm ${BINDIR}/usr/bin/vncpasswd || die
320 rm ${BINDIR}/usr/bin/vncviewer || die
321 rm -r ${BINDIR}/usr/share/locale || die
322 rm -r ${BINDIR}/usr/share/man || die
323 rm -r ${BINDIR}/usr/$(mlibdir) || die
324
325 # install man pages
326 cp ${SRCDIR}/unix/vncconfig/vncconfig.{man,1} || die
327 cp ${SRCDIR}/unix/vncserver.{man,1} || die
328 cp ${SRCDIR}/unix/x0vncserver/x0vncserver.{man,1} || die
329 cp ${XORGDDIR}/hw/vnc/Xvnc.{man,1} || die
330 minstallman ${SRCDIR}/unix/vncconfig/vncconfig.1 || die
331 minstallman ${SRCDIR}/unix/vncserver.1 || die
332 minstallman ${SRCDIR}/unix/x0vncserver/x0vncserver.1 || die
333 minstallman ${XORGDDIR}/hw/vnc/Xvnc.1 || die
334 }
335
336 src_install_tigervnc-xserver-module()
337 {
338 # install server module and binaries
339 cd ${XORGDDIR}/hw/vnc
340 mmake DESTDIR=${BINDIR} install || die
341
342 # cleanup
343 zapmost ${BINDIR} usr/$(mlibdir) || die
344
345 # not needed
346 rm ${BINDIR}/usr/$(mlibdir)/xorg/modules/extensions/libvnc.la || die
347 }
348
349 src_install_tightvnc-server-applet()
350 {
351 cd ${SRCDIR}/java/src/com/tigervnc/vncviewer
352 minstalldir ${BINDIR}/usr/share/vnc/classes || die
353 minstallexec VncViewer.jar ${BINDIR}/usr/share/vnc/classes || die
354 minstallfile index.vnc ${BINDIR}/usr/share/vnc/classes || die
355 }