1 |
commit: 2d973620cb82aaf824d062a3baaf0f56f18512f2 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 15 04:36:24 2016 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 15 04:36:24 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d973620 |
7 |
|
8 |
net-misc/tightvnc: add arm64/ppc64 support |
9 |
|
10 |
patches borrow from debian |
11 |
arm64 tested, and keyword was added |
12 |
|
13 |
Package-Manager: portage-2.3.0_rc1 |
14 |
|
15 |
.../tightvnc/files/tightvnc-1.3.10-aarch64.patch | 39 ++++++ |
16 |
.../files/tightvnc-1.3.10-more-arm64-fixes.patch | 51 ++++++++ |
17 |
.../files/tightvnc-1.3.10-ppc64el-support.patch | 99 +++++++++++++++ |
18 |
net-misc/tightvnc/tightvnc-1.3.10-r3.ebuild | 137 +++++++++++++++++++++ |
19 |
4 files changed, 326 insertions(+) |
20 |
|
21 |
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.10-aarch64.patch b/net-misc/tightvnc/files/tightvnc-1.3.10-aarch64.patch |
22 |
new file mode 100644 |
23 |
index 0000000..fa96b7d |
24 |
--- /dev/null |
25 |
+++ b/net-misc/tightvnc/files/tightvnc-1.3.10-aarch64.patch |
26 |
@@ -0,0 +1,39 @@ |
27 |
+Description: Add aarch64 (arm64) support |
28 |
+Author: Colin Watson <cjwatson@××××××.com> |
29 |
+Forwarded: no |
30 |
+Last-Update: 2014-03-18 |
31 |
+ |
32 |
+Index: b/Xvnc/config/cf/Imake.cf |
33 |
+=================================================================== |
34 |
+--- a/Xvnc/config/cf/Imake.cf |
35 |
++++ b/Xvnc/config/cf/Imake.cf |
36 |
+@@ -700,6 +700,10 @@ |
37 |
+ # define s390Architecture |
38 |
+ # undef __s390__ |
39 |
+ # endif /* s390 */ |
40 |
++# ifdef __aarch64__ |
41 |
++# define AArch64Architecture |
42 |
++# undef __aarch64__ |
43 |
++# endif /* __arch64__ */ |
44 |
+ # ifdef __alpha |
45 |
+ # define AlphaArchitecture |
46 |
+ # undef __alpha |
47 |
+Index: b/Xvnc/config/cf/linux.cf |
48 |
+=================================================================== |
49 |
+--- a/Xvnc/config/cf/linux.cf |
50 |
++++ b/Xvnc/config/cf/linux.cf |
51 |
+@@ -305,6 +305,14 @@ |
52 |
+ #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines |
53 |
+ #endif /* PowerPCArchitecture */ |
54 |
+ |
55 |
++#ifdef AArch64Architecture |
56 |
++#define DefaultCCOptions -fsigned-char |
57 |
++#define OptimizedCDebugFlags -O2 |
58 |
++#define LinuxMachineDefines -D__aarch64__ |
59 |
++#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET |
60 |
++#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 |
61 |
++#endif /* AArch64Architecture */ |
62 |
++ |
63 |
+ #ifdef ArmArchitecture |
64 |
+ #define DefaultCCOptions -fsigned-char |
65 |
+ #define OptimizedCDebugFlags -O2 |
66 |
|
67 |
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.10-more-arm64-fixes.patch b/net-misc/tightvnc/files/tightvnc-1.3.10-more-arm64-fixes.patch |
68 |
new file mode 100644 |
69 |
index 0000000..9dc275f |
70 |
--- /dev/null |
71 |
+++ b/net-misc/tightvnc/files/tightvnc-1.3.10-more-arm64-fixes.patch |
72 |
@@ -0,0 +1,51 @@ |
73 |
+Description: more arm64 fixes |
74 |
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=37;bug=769364;filename=debian_arm64.patch;att=1 |
75 |
+Bug-Debian: http://bugs.debian.org/769364 |
76 |
+Bug-Ubuntu: http://bugs.launchpad.net/bugs/1429198 |
77 |
+Author: Riku Voipio <riku.voipio@××××××.org> |
78 |
+Last-Update: 2016-03-23 |
79 |
+ |
80 |
+Index: tightvnc-1.3.9/Xvnc/include/Xmd.h |
81 |
+=================================================================== |
82 |
+--- tightvnc-1.3.9.orig/Xvnc/include/Xmd.h |
83 |
++++ tightvnc-1.3.9/Xvnc/include/Xmd.h |
84 |
+@@ -59,7 +59,7 @@ SOFTWARE. |
85 |
+ #ifdef CRAY |
86 |
+ #define WORD64 /* 64-bit architecture */ |
87 |
+ #endif |
88 |
+-#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) || defined(__powerpc64__) |
89 |
++#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) || defined(__powerpc64__) || defined(__aarch64__) |
90 |
+ #define LONG64 /* 32/64-bit architecture */ |
91 |
+ #endif |
92 |
+ #ifdef __sgi |
93 |
+Index: tightvnc-1.3.9/Xvnc/programs/Xserver/include/servermd.h |
94 |
+=================================================================== |
95 |
+--- tightvnc-1.3.9.orig/Xvnc/programs/Xserver/include/servermd.h |
96 |
++++ tightvnc-1.3.9/Xvnc/programs/Xserver/include/servermd.h |
97 |
+@@ -405,6 +405,26 @@ SOFTWARE. |
98 |
+ |
99 |
+ #endif /* linux/m68k */ |
100 |
+ |
101 |
++#if defined (linux) && defined(__aarch64__) |
102 |
++# define BITMAP_SCANLINE_UNIT 64 |
103 |
++# define BITMAP_SCANLINE_PAD 64 |
104 |
++# define LOG2_BITMAP_PAD 6 |
105 |
++# define LOG2_BYTES_PER_SCANLINE_PAD 3 |
106 |
++ |
107 |
++/* Add for handling protocol XPutImage and XGetImage; see comment in |
108 |
++ * Alpha section. |
109 |
++ */ |
110 |
++#define INTERNAL_VS_EXTERNAL_PADDING |
111 |
++#define BITMAP_SCANLINE_UNIT_PROTO 32 |
112 |
++ |
113 |
++#define BITMAP_SCANLINE_PAD_PROTO 32 |
114 |
++#define LOG2_BITMAP_PAD_PROTO 5 |
115 |
++#define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2 |
116 |
++#define GLYPHPADBYTES 4 |
117 |
++#define GETLEFTBITS_ALIGNMENT 1 |
118 |
++ |
119 |
++#endif /* linux/aarch64 */ |
120 |
++ |
121 |
+ #if defined (linux) && defined(__powerpc__) |
122 |
+ |
123 |
+ #ifdef __powerpc64__ |
124 |
|
125 |
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.10-ppc64el-support.patch b/net-misc/tightvnc/files/tightvnc-1.3.10-ppc64el-support.patch |
126 |
new file mode 100644 |
127 |
index 0000000..e05e5bc |
128 |
--- /dev/null |
129 |
+++ b/net-misc/tightvnc/files/tightvnc-1.3.10-ppc64el-support.patch |
130 |
@@ -0,0 +1,99 @@ |
131 |
+From 25adb1614419b72a986c229cb01870c1b3e38c0b Mon Sep 17 00:00:00 2001 |
132 |
+From: Lauri Kasanen <cand@×××.com> |
133 |
+Date: Fri, 5 Jun 2015 07:45:09 -0300 |
134 |
+Subject: [PATCH 2/2] Add ppc64el support |
135 |
+ |
136 |
+Signed-off-by: Lauri Kasanen <cand@×××.com> |
137 |
+--- |
138 |
+ Xvnc/config/cf/Imake.cf | 4 ++++ |
139 |
+ Xvnc/config/cf/linux.cf | 8 +++++++- |
140 |
+ Xvnc/include/Xmd.h | 2 +- |
141 |
+ Xvnc/programs/Xserver/include/servermd.h | 23 +++++++++++++++++++++++ |
142 |
+ 4 files changed, 35 insertions(+), 2 deletions(-) |
143 |
+ |
144 |
+diff --git a/Xvnc/config/cf/Imake.cf b/Xvnc/config/cf/Imake.cf |
145 |
+index f1f6724..cbe9ef3 100644 |
146 |
+--- a/Xvnc/config/cf/Imake.cf |
147 |
++++ b/Xvnc/config/cf/Imake.cf |
148 |
+@@ -720,6 +720,10 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686 |
149 |
+ # define Mc68020Architecture |
150 |
+ # undef mc68000 |
151 |
+ # endif /* mc68000 */ |
152 |
++# ifdef __powerpc64__ |
153 |
++# define Ppc64Architecture |
154 |
++# undef __powerpc64__ |
155 |
++# endif |
156 |
+ # ifdef powerpc |
157 |
+ # define PpcArchitecture |
158 |
+ # undef powerpc |
159 |
+diff --git a/Xvnc/config/cf/linux.cf b/Xvnc/config/cf/linux.cf |
160 |
+index c0e2586..e5f1f2f 100644 |
161 |
+--- a/Xvnc/config/cf/linux.cf |
162 |
++++ b/Xvnc/config/cf/linux.cf |
163 |
+@@ -289,7 +289,13 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) |
164 |
+ #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines |
165 |
+ #endif /* s390xArchitecture */ |
166 |
+ |
167 |
+-#ifdef PowerPCArchitecture |
168 |
++#ifdef Ppc64Architecture |
169 |
++#define DefaultCCOptions -fsigned-char |
170 |
++#define OptimizedCDebugFlags -O2 |
171 |
++#define LinuxMachineDefines -D__powerpc64__ |
172 |
++#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET |
173 |
++#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 |
174 |
++#elif defined(PowerPCArchitecture) |
175 |
+ #define DefaultCCOptions -fsigned-char |
176 |
+ #define OptimizedCDebugFlags -O2 |
177 |
+ #define LinuxMachineDefines -D__powerpc__ |
178 |
+diff --git a/Xvnc/include/Xmd.h b/Xvnc/include/Xmd.h |
179 |
+index 3cf9db1..704d252 100644 |
180 |
+--- a/Xvnc/include/Xmd.h |
181 |
++++ b/Xvnc/include/Xmd.h |
182 |
+@@ -59,7 +59,7 @@ SOFTWARE. |
183 |
+ #ifdef CRAY |
184 |
+ #define WORD64 /* 64-bit architecture */ |
185 |
+ #endif |
186 |
+-#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) |
187 |
++#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) || defined(__powerpc64__) |
188 |
+ #define LONG64 /* 32/64-bit architecture */ |
189 |
+ #endif |
190 |
+ #ifdef __sgi |
191 |
+diff --git a/Xvnc/programs/Xserver/include/servermd.h b/Xvnc/programs/Xserver/include/servermd.h |
192 |
+index 5066c1d..cc9f485 100644 |
193 |
+--- a/Xvnc/programs/Xserver/include/servermd.h |
194 |
++++ b/Xvnc/programs/Xserver/include/servermd.h |
195 |
+@@ -407,8 +407,31 @@ SOFTWARE. |
196 |
+ |
197 |
+ #if defined (linux) && defined(__powerpc__) |
198 |
+ |
199 |
++#ifdef __powerpc64__ |
200 |
++# define BITMAP_SCANLINE_UNIT 64 |
201 |
++# define BITMAP_SCANLINE_PAD 64 |
202 |
++# define LOG2_BITMAP_PAD 6 |
203 |
++# define LOG2_BYTES_PER_SCANLINE_PAD 3 |
204 |
++ |
205 |
++/* Add for handling protocol XPutImage and XGetImage; see comment in |
206 |
++ * Alpha section. |
207 |
++ */ |
208 |
++#define INTERNAL_VS_EXTERNAL_PADDING |
209 |
++#define BITMAP_SCANLINE_UNIT_PROTO 32 |
210 |
++ |
211 |
++#define BITMAP_SCANLINE_PAD_PROTO 32 |
212 |
++#define LOG2_BITMAP_PAD_PROTO 5 |
213 |
++#define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2 |
214 |
++#endif /* linux/ppc64 */ |
215 |
++ |
216 |
++#if defined(__LITTLE_ENDIAN__) |
217 |
++#define IMAGE_BYTE_ORDER LSBFirst |
218 |
++#define BITMAP_BIT_ORDER LSBFirst |
219 |
++#else |
220 |
+ #define IMAGE_BYTE_ORDER MSBFirst |
221 |
+ #define BITMAP_BIT_ORDER MSBFirst |
222 |
++#endif |
223 |
++ |
224 |
+ #define GLYPHPADBYTES 4 |
225 |
+ #define GETLEFTBITS_ALIGNMENT 1 |
226 |
+ |
227 |
+-- |
228 |
+2.1.4 |
229 |
+ |
230 |
|
231 |
diff --git a/net-misc/tightvnc/tightvnc-1.3.10-r3.ebuild b/net-misc/tightvnc/tightvnc-1.3.10-r3.ebuild |
232 |
new file mode 100644 |
233 |
index 0000000..a79912e |
234 |
--- /dev/null |
235 |
+++ b/net-misc/tightvnc/tightvnc-1.3.10-r3.ebuild |
236 |
@@ -0,0 +1,137 @@ |
237 |
+# Copyright 1999-2016 Gentoo Foundation |
238 |
+# Distributed under the terms of the GNU General Public License v2 |
239 |
+# $Id$ |
240 |
+ |
241 |
+EAPI="5" |
242 |
+ |
243 |
+inherit eutils toolchain-funcs java-pkg-opt-2 |
244 |
+ |
245 |
+IUSE="java tcpd server" |
246 |
+ |
247 |
+S="${WORKDIR}/vnc_unixsrc" |
248 |
+DESCRIPTION="A great client/server software package allowing remote network access to graphical desktops" |
249 |
+SRC_URI="mirror://sourceforge/vnc-tight/${P}_unixsrc.tar.bz2 |
250 |
+ mirror://gentoo/${PN}.png |
251 |
+ java? ( mirror://sourceforge/vnc-tight/${P}_javasrc.tar.gz )" |
252 |
+HOMEPAGE="http://www.tightvnc.com/" |
253 |
+ |
254 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~sh ~sparc ~x86 ~x86-fbsd ~arm-linux ~x86-linux" |
255 |
+LICENSE="GPL-2" |
256 |
+SLOT="0" |
257 |
+ |
258 |
+CDEPEND="media-fonts/font-misc-misc |
259 |
+ virtual/jpeg |
260 |
+ server? ( |
261 |
+ media-fonts/font-cursor-misc |
262 |
+ x11-apps/rgb |
263 |
+ x11-apps/xauth |
264 |
+ x11-apps/xsetroot |
265 |
+ ) |
266 |
+ x11-libs/libX11 |
267 |
+ x11-libs/libXaw |
268 |
+ x11-libs/libXmu |
269 |
+ x11-libs/libXp |
270 |
+ x11-libs/libXt |
271 |
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )" |
272 |
+RDEPEND="${CDEPEND} |
273 |
+ java? ( >=virtual/jre-1.4 )" |
274 |
+DEPEND="${CDEPEND} |
275 |
+ java? ( >=virtual/jdk-1.4 ) |
276 |
+ x11-proto/xextproto |
277 |
+ x11-proto/xproto |
278 |
+ server? ( |
279 |
+ x11-proto/inputproto |
280 |
+ x11-proto/kbproto |
281 |
+ x11-proto/printproto |
282 |
+ ) |
283 |
+ >=x11-misc/imake-1 |
284 |
+ x11-misc/gccmakedep |
285 |
+ x11-misc/makedepend |
286 |
+ !net-misc/tigervnc" |
287 |
+ |
288 |
+pkg_setup() { |
289 |
+ if ! use server; |
290 |
+ then |
291 |
+ echo |
292 |
+ einfo "The 'server' USE flag will build tightvnc's server." |
293 |
+ einfo "If '-server' is chosen only the client is built to save space." |
294 |
+ einfo "Stop the build now if you need to add 'server' to USE flags.\n" |
295 |
+ fi |
296 |
+} |
297 |
+ |
298 |
+src_prepare() { |
299 |
+ epatch "${FILESDIR}/${PN}-1.3.10-pathfixes.patch" # fixes bug 78385 and 146099 |
300 |
+ epatch "${FILESDIR}/${PN}-1.3.8-imake-tmpdir.patch" # fixes bug 23483 |
301 |
+ epatch "${FILESDIR}/${PN}-1.3.8-darwin.patch" # fixes bug 89908 |
302 |
+ epatch "${FILESDIR}/${PN}-1.3.8-mips.patch" |
303 |
+ epatch "${FILESDIR}"/server-CVE-2007-1003.patch |
304 |
+ epatch "${FILESDIR}"/server-CVE-2007-1351-1352.patch |
305 |
+ epatch "${FILESDIR}"/1.3.9-fbsd.patch |
306 |
+ epatch "${FILESDIR}"/1.3.9-arm.patch |
307 |
+ epatch "${FILESDIR}"/1.3.9-sh.patch |
308 |
+ epatch "${FILESDIR}"/${P}-ppc64el-support.patch |
309 |
+ epatch "${FILESDIR}"/${P}-aarch64.patch |
310 |
+ epatch "${FILESDIR}"/${P}-more-arm64-fixes.patch |
311 |
+ |
312 |
+ sed -e "s:\\(/etc/\\|/usr/share/\\):${EPREFIX}\\1:g" -i vncserver || die |
313 |
+ |
314 |
+ if use java; then |
315 |
+ cd "${WORKDIR}" |
316 |
+ epatch "${FILESDIR}/${PN}-1.3.10-java-build.patch" |
317 |
+ fi |
318 |
+} |
319 |
+ |
320 |
+src_compile() { |
321 |
+ xmkmf -a || die "xmkmf failed" |
322 |
+ |
323 |
+ emake -j1 CDEBUGFLAGS="${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}" World |
324 |
+ |
325 |
+ if use server; then |
326 |
+ cd Xvnc || die |
327 |
+ econf |
328 |
+ |
329 |
+ if use tcpd; then |
330 |
+ local myextra="-lwrap" |
331 |
+ emake -j1 EXTRA_LIBRARIES="${myextra}" \ |
332 |
+ CDEBUGFLAGS="${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}" \ |
333 |
+ EXTRA_DEFINES="-DUSE_LIBWRAP=1" |
334 |
+ else |
335 |
+ emake -j1 CDEBUGFLAGS="${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}" |
336 |
+ fi |
337 |
+ fi |
338 |
+ |
339 |
+ if use java; then |
340 |
+ cd "${WORKDIR}/vnc_javasrc" || die |
341 |
+ emake -j1 JAVACFLAGS="$(java-pkg_javac-args)" all |
342 |
+ fi |
343 |
+ |
344 |
+} |
345 |
+ |
346 |
+src_install() { |
347 |
+ # the web based interface and the java viewer need the java class files |
348 |
+ if use java; then |
349 |
+ java-pkg_newjar "${WORKDIR}/vnc_javasrc/VncViewer.jar" |
350 |
+ java-pkg_dolauncher "${PN}-java" |
351 |
+ insinto /usr/share/${PN}/classes |
352 |
+ doins "${WORKDIR}"/vnc_javasrc/*.vnc || die |
353 |
+ dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/${PN}/classes/VncViewer.jar |
354 |
+ fi |
355 |
+ |
356 |
+ dodir /usr/share/man/man1 /usr/bin |
357 |
+ ./vncinstall "${ED}"/usr/bin "${ED}"/usr/share/man || die "vncinstall failed" |
358 |
+ |
359 |
+ if use server; then |
360 |
+ newconfd "${FILESDIR}"/tightvnc.confd vnc |
361 |
+ newinitd "${FILESDIR}"/tightvnc.initd vnc |
362 |
+ else |
363 |
+ rm -f "${ED}"/usr/bin/vncserver || die |
364 |
+ rm -f "${ED}"/usr/share/man/man1/{Xvnc,vncserver}* || die |
365 |
+ fi |
366 |
+ |
367 |
+ newicon "${DISTDIR}"/tightvnc.png vncviewer.png |
368 |
+ make_desktop_entry vncviewer vncviewer vncviewer Network |
369 |
+ |
370 |
+ dodoc ChangeLog README WhatsNew |
371 |
+ use java && dodoc "${FILESDIR}"/README.JavaViewer |
372 |
+ newdoc vncviewer/README README.vncviewer |
373 |
+} |