Magellan Linux

Annotation of /branches/R11-stable/extras/tigervnc/tigervnc-1.3.0-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20935 - (hide annotations) (download)
Mon Feb 17 11:02:36 2014 UTC (10 years, 4 months ago) by niro
Original Path: trunk/extras/tigervnc/tigervnc-1.3.0-r3.smage2
File size: 9743 byte(s)
-hardcode xserver114 patch
1 niro 20934 # $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 niro 20935 # 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 niro 20934
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-config-dbus \
223     --disable-config-hal \
224     --disable-config-udev \
225     --enable-install-libxf86config \
226     --disable-unit-tests \
227     --disable-devel-docs \
228     --disable-selective-werror \
229     || die
230    
231     mmake || die
232    
233     # build icons
234     cd ${SRCDIR}/media
235     mmake -j1 || die
236    
237     # build the java applet
238     cd ${SRCDIR}/java
239    
240     # cmake_configure does not work because of LIBDIR definition
241     cmake \
242     -DCMAKE_VERBOSE_MAKEFILE=ON \
243     -DCMAKE_BUILD_TYPE=Release \
244     -DCMAKE_INSTALL_PREFIX=/usr \
245     ${SRCDIR}/java \
246     || die
247    
248     mmake -j1 || die
249     }
250    
251     src_install_tigervnc-common()
252     {
253     cd ${SRCDIR}
254     mmake DESTDIR=${BINDIR} install || die
255    
256     # cleanup
257     zapmost ${BINDIR} usr/bin/vncpasswd usr/bin/vncviewer usr/share/locale || die
258    
259     # install man pages
260     cp ${SRCDIR}/vncviewer/vncviewer.{man,1} || die
261     cp ${SRCDIR}/unix/vncpasswd/vncpasswd.{man,1} || die
262     minstallman ${SRCDIR}/vncviewer/vncviewer.1 || die
263     minstallman ${SRCDIR}/unix/vncpasswd/vncpasswd.1 || die
264    
265     # desktop icon
266     minstallpixmap media/icons/tigervnc_48.png vncviewer.png || die
267     minstall_desktop_icon \
268     --name "TigerVNC Viewer" \
269     --file "vncviewer" \
270     --comment "Connect to VNC server and display remote desktop" \
271     --exec /usr/bin/vncviewer \
272     --icon vncviewer.png \
273     --categories "Application,Network" \
274     || die
275    
276     # docs
277     minstalldocs README LICENCE.TXT || die
278     }
279    
280     src_install_tigervnc-server()
281     {
282     cd ${SRCDIR}
283     mmake DESTDIR=${BINDIR} install || die
284    
285     # install server module and binaries
286     cd ${XORGDDIR}/hw/vnc
287     mmake DESTDIR=${BINDIR} install || die
288    
289     # cleanup
290     rm ${BINDIR}/usr/bin/vncpasswd || die
291     rm ${BINDIR}/usr/bin/vncviewer || die
292     rm -r ${BINDIR}/usr/share/man || die
293     rm -r ${BINDIR}/usr/$(mlibdir) || die
294    
295     # install man pages
296     cp ${SRCDIR}/unix/vncconfig/vncconfig.{man,1} || die
297     cp ${SRCDIR}/unix/vncserver.{man,1} || die
298     cp ${SRCDIR}/unix/x0vncserver/x0vncserver.{man,1} || die
299     cp ${XORGDDIR}/hw/vnc/Xvnc.{man,1} || die
300     minstallman ${SRCDIR}/unix/vncconfig/vncconfig.1 || die
301     minstallman ${SRCDIR}/unix/vncserver.1 || die
302     minstallman ${SRCDIR}/unix/x0vncserver/x0vncserver.1 || die
303     minstallman ${XORGDDIR}/hw/vnc/Xvnc.1 || die
304     }
305    
306     src_install_tigervnc-xserver-module()
307     {
308     # install server module and binaries
309     cd ${XORGDDIR}/hw/vnc
310     mmake DESTDIR=${BINDIR} install || die
311    
312     # cleanup
313     zapmost ${BINDIR} usr/$(mlibdir) || die
314    
315     # not needed
316     rm ${BINDIR}/usr/$(mlibdir)/xorg/modules/extensions/libvnc.la || die
317    
318     # create a example config
319     minstalldir /etc/X11/xorg.conf.d || die
320     MCONFIG=/etc/X11/xorg.conf.d/20-vnc.conf
321     mclearconfig
322     maddconfig '# Example vnc module configuration'
323     maddconfig '# Uncomment these entries and set a password with the vncpasswd program'
324     maddconfig
325     maddconfig 'Section "Module"'
326     maddconfig ' Load "vnc"'
327     maddconfig 'EndSection'
328     maddconfig
329     maddconfig 'Section "Screen"'
330     maddconfig ' Identifier "Screen0"'
331     maddconfig ' Option "SecurityTypes" "VncAuth"'
332     maddconfig ' Option "UserPasswdVerifier" "VncAuth"'
333     maddconfig ' Option "PasswordFile" "/root/.vnc/passwd"'
334     maddconfig 'EndSection'
335     }
336    
337     src_install_tigervnc-server-applet()
338     {
339     cd ${SRCDIR}/java
340     minstalldir /usr/share/vnc/classes || die
341     minstallexec VncViewer.jar /usr/share/vnc/classes || die
342     minstallfile com/tigervnc/vncviewer/index.vnc /usr/share/vnc/classes || die
343     }
344    
345     postinstall_tigervnc-xserver-module()
346     {
347     echo
348     echo 'Add following to /etc/X11/xorg.conf.d/20-vnc.conf for native X display support:'
349     echo ' Section "Module"'
350     echo ' ...'
351     echo ' Load "vnc"'
352     echo ' EndSection'
353     echo
354     echo 'To enable VNC password authentification use the vncpasswd program:'
355     echo ' "vncpasswd"'
356     echo
357     echo 'You will also need to tell the VNC module where the password is stored:'
358     echo ' Section "Screen"'
359     echo ' ...'
360     echo ' Option "SecurityTypes" "VncAuth"'
361     echo ' Option "UserPasswdVerifier" "VncAuth"'
362     echo ' Option "PasswordFile" "/root/.vnc/passwd"'
363     echo ' EndSection'
364     echo
365     }