Annotation of /trunk/extras/tigervnc/tigervnc-1.8.0-r2.smage2
Parent Directory | Revision Log
Revision 31272 -
(hide annotations)
(download)
Tue Jun 19 11:45:26 2018 UTC (6 years, 3 months ago) by niro
File size: 9396 byte(s)
Tue Jun 19 11:45:26 2018 UTC (6 years, 3 months ago) by niro
File size: 9396 byte(s)
-rebuild for xorg-server-1.20
1 | niro | 30203 | # $Id$ |
2 | |||
3 | PNAME="tigervnc" | ||
4 | PVER="1.8.0" | ||
5 | PBUILD="r2" | ||
6 | |||
7 | # enable java=1, disable java=0 | ||
8 | niro | 30204 | ENABLE_JAVA_APPLET=0 |
9 | niro | 30203 | |
10 | SPLIT_PACKAGES="tigervnc-common tigervnc-server tigervnc-xserver-module" | ||
11 | if [[ ${ENABLE_JAVA_APPLET} = 1 ]] | ||
12 | then | ||
13 | SPLIT_PACKAGES+=" tigervnc-server-applet" | ||
14 | fi | ||
15 | SPLIT_PACKAGES+=" tigervnc" | ||
16 | |||
17 | PCAT="net-misc" | ||
18 | HOMEPAGE="http://www.tigervnc.com/" | ||
19 | |||
20 | SRCFILE="v${PVER}.tar.gz" | ||
21 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
22 | |||
23 | XORG_PVER="1.19.5" | ||
24 | XORG="xorg-server-${XORG_PVER}.tar.bz2" | ||
25 | XORGSDIR="${BUILDDIR}/xorg-server-${XORG_PVER}" | ||
26 | XORGDDIR="${SRCDIR}/unix/xserver" | ||
27 | |||
28 | COMMON_DEPEND=">= x11-libs/libX11-1.6 | ||
29 | >= x11-libs/libXext-1.3 | ||
30 | >= x11-libs/libSM-1.2 | ||
31 | >= x11-libs/libXtst-1.2 | ||
32 | >= x11-libs/libXi-1.7 | ||
33 | >= x11-libs/fltk-1.3 | ||
34 | >= sys-libs/zlib-1.2.5 | ||
35 | >= sys-libs/libstdc++-6.3 | ||
36 | >= virtual/libjpeg | ||
37 | >= app-crypt/gnutls-3.6" | ||
38 | |||
39 | COMMON_FONTS_DEPEND=">= media-fonts/font-adobe-100dpi-1 | ||
40 | >= media-fonts/font-adobe-75dpi-1 | ||
41 | >= media-fonts/font-alias-1 | ||
42 | >= media-fonts/font-cursor-misc-1 | ||
43 | >= media-fonts/font-misc-misc-1" | ||
44 | |||
45 | SERVER_DEPEND=">= x11-libs/libXfont-1.4 | ||
46 | >= x11-libs/libxkbfile-1.0.8 | ||
47 | >= x11-libs/pixman-0.34 | ||
48 | >= media-libs/freetype-2.7 | ||
49 | >= x11-apps/xauth-1.0.7 | ||
50 | >= x11-apps/xsetroot-1.1 | ||
51 | >= x11-misc/xkeyboard-config-2.8 | ||
52 | >= sys-fs/udev-230" | ||
53 | |||
54 | MODULE_DEPEND=">= virtual/X-ABI-EXTENSION-10.0 | ||
55 | >= virtual/X-ABI-VIDEODRV-23 | ||
56 | >= virtual/X-ABI-XINPUT-24.1" | ||
57 | |||
58 | if [[ ${ENABLE_JAVA_APPLET} = 1 ]] | ||
59 | then | ||
60 | APPLET_DEPEND=">= virtual/java" | ||
61 | else | ||
62 | APPLET_DEPEND="" | ||
63 | fi | ||
64 | |||
65 | SDEPEND="${COMMON_DEPEND} | ||
66 | ${COMMON_FONTS_DEPEND} | ||
67 | ${SERVER_DEPEND} | ||
68 | ${MODULE_DEPEND} | ||
69 | ${APPLET_DEPEND} | ||
70 | >= dev-util/desktop-file-utils-0.15 | ||
71 | >= dev-lang/nasm-2 | ||
72 | == x11-proto/xorg-protos-7.7.${XORG_PVER} | ||
73 | >= x11-libs/libpciaccess-0.13 | ||
74 | >= media-fonts/font-util-1.3 | ||
75 | >= virtual/java-jdk | ||
76 | >= gnome-base/librsvg-2.40 | ||
77 | >= media-gfx/imagemagick-7" | ||
78 | |||
79 | msetfeature "!check" | ||
80 | sminclude cmake xorg xdg mtools cleanutils | ||
81 | |||
82 | SRC_URI=( | ||
83 | https://github.com/TigerVNC/${PNAME}/archive/${SRCFILE} | ||
84 | mirror://${PNAME}/${SRCFILE} | ||
85 | http://xorg.freedesktop.org/archive/individual/xserver/${XORG} | ||
86 | mirror://xorg-server/${XORG} | ||
87 | mirror://${PNAME}/tigervnc_48.png | ||
88 | mirror://${PNAME}/${PNAME}-1.1.0-gethomedir.patch | ||
89 | mirror://${PNAME}/${PNAME}-1.3.0-shebang.patch | ||
90 | mirror://${PNAME}/${PNAME}-1.4.2-getmaster.patch | ||
91 | ) | ||
92 | |||
93 | UP2SEPERATOR="v" | ||
94 | UP2DATE="updatecmd https://github.com/TigerVNC/${PNAME}/releases | highesttarball gz" | ||
95 | |||
96 | split_info_tigervnc-common() | ||
97 | { | ||
98 | DESCRIPTION="Common TigerVNC libs and utils." | ||
99 | DEPEND="${COMMON_DEPEND}" | ||
100 | PROVIDE="virtual/vnc-client" | ||
101 | } | ||
102 | |||
103 | split_info_tigervnc-server() | ||
104 | { | ||
105 | DESCRIPTION="TigerVNC VNC server." | ||
106 | DEPEND="== net-misc/tigervnc-common-${PVER} | ||
107 | ${COMMON_DEPEND} | ||
108 | ${COMMON_FONTS_DEPEND} | ||
109 | ${SERVER_DEPEND}" | ||
110 | PROVIDE="virtual/vnc" | ||
111 | } | ||
112 | |||
113 | split_info_tigervnc-xserver-module() | ||
114 | { | ||
115 | DESCRIPTION="TigerVNC Xorg server module." | ||
116 | DEPEND="== net-misc/tigervnc-common-${PVER} | ||
117 | ${COMMON_FONTS_DEPEND} | ||
118 | ${MODULE_DEPEND}" | ||
119 | PROVIDE="virtual/vnc-x11" | ||
120 | } | ||
121 | |||
122 | split_info_tigervnc-server-applet() | ||
123 | { | ||
124 | DESCRIPTION="TigerVNC VNC server." | ||
125 | DEPEND="${APPLET_DEPEND}" | ||
126 | PROVIDE="virtual/vnc-java" | ||
127 | } | ||
128 | |||
129 | split_info_tigervnc() | ||
130 | { | ||
131 | DESCRIPTION="TigerVNC is a suite of VNC servers and clients that have a focus on performance and remote display functionality." | ||
132 | DEPEND="== net-misc/tigervnc-common-${PVER} | ||
133 | == net-misc/tigervnc-server-${PVER} | ||
134 | == net-misc/tigervnc-xserver-module-${PVER}" | ||
135 | if [[ ${ENABLE_JAVA_APPLET} = 1 ]] | ||
136 | then | ||
137 | DEPEND="${DEPEND} | ||
138 | == net-misc/tigervnc-server-applet-${PVER}" | ||
139 | fi | ||
140 | |||
141 | PKGTYPE="virtual" | ||
142 | |||
143 | # drop everything we don't need in the meta package: | ||
144 | INHERITS="" | ||
145 | SPECIAL_VARS="" | ||
146 | SPECIAL_FUNCTIONS="" | ||
147 | SDEPEND="" | ||
148 | PROVIDE="" | ||
149 | unset -f preinstall | ||
150 | unset -f postinstall | ||
151 | unset -f preremove | ||
152 | unset -f postremove | ||
153 | } | ||
154 | |||
155 | src_prepare() | ||
156 | { | ||
157 | # munpack needs a suffix | ||
158 | tar xvf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${BUILDDIR} || die | ||
159 | munpack ${XORG} || die | ||
160 | cp -r ${XORGSDIR}/* ${XORGDDIR} || die | ||
161 | cd ${SRCDIR} | ||
162 | |||
163 | # patchwork | ||
164 | # create X server cookie via mcookie | ||
165 | #mpatch ${PNAME}-1.1.0-gethomedir.patch || die | ||
166 | |||
167 | # libvnc.so: don't use unexported GetMaster function | ||
168 | #mpatch ${PNAME}-1.4.2-getmaster.patch || die | ||
169 | |||
170 | # don't use shebang in vncserver script. | ||
171 | mpatch ${PNAME}-1.3.0-shebang.patch || die | ||
172 | |||
173 | # apply the included xorg patch | ||
174 | cd ${XORGDDIR} | ||
175 | local xorg_patch_ver="${XORG_PVER%.*}" | ||
176 | xorg_patch_ver="${xorg_patch_ver//.}" | ||
177 | patch -Np1 -i ../xserver${xorg_patch_ver}.patch || die | ||
178 | |||
179 | # reconfigure xorg | ||
180 | cd ${XORGDDIR} | ||
181 | mautoreconf || die | ||
182 | } | ||
183 | |||
184 | src_compile() | ||
185 | { | ||
186 | cd ${SRCDIR} | ||
187 | cmake_configure || die | ||
188 | mmake || die | ||
189 | |||
190 | # build the x11 module | ||
191 | niro | 31272 | # do not disable xcomposite with xorg-server 1.19.6 onwards! |
192 | # patch https://cgit.freedesktop.org/xorg/xserver/commit/?h=server-1.19-branch&id=c64bd21d7a732b6b8de0f8f636e93b1d1bb46135 | ||
193 | # is causing this | ||
194 | #--disable-composite | ||
195 | niro | 30203 | cd ${XORGDDIR} |
196 | mconfigure \ | ||
197 | --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \ | ||
198 | --with-fontdir=/usr/share/fonts \ | ||
199 | --with-rgb-path=/usr/share/X11/rgb.txt \ | ||
200 | --with-xkb-output=/usr/share/X11/xkb \ | ||
201 | --with-module-dir=/usr/$(mlibdir)/xorg/modules \ | ||
202 | --with-dri-driver-path=/usr/$(mlibdir)/dri \ | ||
203 | --with-pic \ | ||
204 | --without-dtrace \ | ||
205 | --disable-xorg \ | ||
206 | --enable-xtrap \ | ||
207 | --disable-xinerama \ | ||
208 | --enable-glx \ | ||
209 | --disable-xnest \ | ||
210 | --disable-xvfb \ | ||
211 | --disable-dmx \ | ||
212 | --disable-xwin \ | ||
213 | --disable-xephyr \ | ||
214 | --disable-kdrive \ | ||
215 | --disable-xwayland \ | ||
216 | --disable-static \ | ||
217 | --disable-dri \ | ||
218 | --enable-dri2 \ | ||
219 | --enable-dri3 \ | ||
220 | --disable-present \ | ||
221 | --disable-config-dbus \ | ||
222 | --disable-config-hal \ | ||
223 | --disable-config-udev \ | ||
224 | --enable-install-libxf86config \ | ||
225 | --disable-unit-tests \ | ||
226 | --disable-devel-docs \ | ||
227 | --disable-selective-werror \ | ||
228 | || die | ||
229 | |||
230 | mmake || die | ||
231 | |||
232 | # build icons | ||
233 | cd ${SRCDIR}/media | ||
234 | mmake -j1 || die | ||
235 | |||
236 | if [[ ${ENABLE_JAVA_APPLET} = 1 ]] | ||
237 | then | ||
238 | # build the java applet | ||
239 | cd ${SRCDIR}/java | ||
240 | |||
241 | # cmake_configure does not work because of LIBDIR definition | ||
242 | cmake \ | ||
243 | -DCMAKE_VERBOSE_MAKEFILE=ON \ | ||
244 | -DCMAKE_BUILD_TYPE=Release \ | ||
245 | -DCMAKE_INSTALL_PREFIX=/usr \ | ||
246 | ${SRCDIR}/java \ | ||
247 | || die | ||
248 | |||
249 | mmake -j1 || die | ||
250 | fi | ||
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 | } |