diff options
author | Yixun Lan <dlan@gentoo.org> | 2016-07-15 12:36:24 +0800 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2016-07-15 12:36:24 +0800 |
commit | 2d973620cb82aaf824d062a3baaf0f56f18512f2 (patch) | |
tree | 6c1931102534e4fee48600234bc7abd9849f0009 /net-misc | |
parent | app-arch/p7zip: bup for bug 582832 (diff) | |
download | gentoo-2d973620cb82aaf824d062a3baaf0f56f18512f2.tar.gz gentoo-2d973620cb82aaf824d062a3baaf0f56f18512f2.tar.bz2 gentoo-2d973620cb82aaf824d062a3baaf0f56f18512f2.zip |
net-misc/tightvnc: add arm64/ppc64 support
patches borrow from debian
arm64 tested, and keyword was added
Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'net-misc')
4 files changed, 326 insertions, 0 deletions
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.10-aarch64.patch b/net-misc/tightvnc/files/tightvnc-1.3.10-aarch64.patch new file mode 100644 index 000000000000..fa96b7d61478 --- /dev/null +++ b/net-misc/tightvnc/files/tightvnc-1.3.10-aarch64.patch @@ -0,0 +1,39 @@ +Description: Add aarch64 (arm64) support +Author: Colin Watson <cjwatson@ubuntu.com> +Forwarded: no +Last-Update: 2014-03-18 + +Index: b/Xvnc/config/cf/Imake.cf +=================================================================== +--- a/Xvnc/config/cf/Imake.cf ++++ b/Xvnc/config/cf/Imake.cf +@@ -700,6 +700,10 @@ + # define s390Architecture + # undef __s390__ + # endif /* s390 */ ++# ifdef __aarch64__ ++# define AArch64Architecture ++# undef __aarch64__ ++# endif /* __arch64__ */ + # ifdef __alpha + # define AlphaArchitecture + # undef __alpha +Index: b/Xvnc/config/cf/linux.cf +=================================================================== +--- a/Xvnc/config/cf/linux.cf ++++ b/Xvnc/config/cf/linux.cf +@@ -305,6 +305,14 @@ + #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines + #endif /* PowerPCArchitecture */ + ++#ifdef AArch64Architecture ++#define DefaultCCOptions -fsigned-char ++#define OptimizedCDebugFlags -O2 ++#define LinuxMachineDefines -D__aarch64__ ++#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET ++#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 ++#endif /* AArch64Architecture */ ++ + #ifdef ArmArchitecture + #define DefaultCCOptions -fsigned-char + #define OptimizedCDebugFlags -O2 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 new file mode 100644 index 000000000000..9dc275f1e675 --- /dev/null +++ b/net-misc/tightvnc/files/tightvnc-1.3.10-more-arm64-fixes.patch @@ -0,0 +1,51 @@ +Description: more arm64 fixes +Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=37;bug=769364;filename=debian_arm64.patch;att=1 +Bug-Debian: http://bugs.debian.org/769364 +Bug-Ubuntu: http://bugs.launchpad.net/bugs/1429198 +Author: Riku Voipio <riku.voipio@linaro.org> +Last-Update: 2016-03-23 + +Index: tightvnc-1.3.9/Xvnc/include/Xmd.h +=================================================================== +--- tightvnc-1.3.9.orig/Xvnc/include/Xmd.h ++++ tightvnc-1.3.9/Xvnc/include/Xmd.h +@@ -59,7 +59,7 @@ SOFTWARE. + #ifdef CRAY + #define WORD64 /* 64-bit architecture */ + #endif +-#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) || defined(__powerpc64__) ++#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) || defined(__powerpc64__) || defined(__aarch64__) + #define LONG64 /* 32/64-bit architecture */ + #endif + #ifdef __sgi +Index: tightvnc-1.3.9/Xvnc/programs/Xserver/include/servermd.h +=================================================================== +--- tightvnc-1.3.9.orig/Xvnc/programs/Xserver/include/servermd.h ++++ tightvnc-1.3.9/Xvnc/programs/Xserver/include/servermd.h +@@ -405,6 +405,26 @@ SOFTWARE. + + #endif /* linux/m68k */ + ++#if defined (linux) && defined(__aarch64__) ++# define BITMAP_SCANLINE_UNIT 64 ++# define BITMAP_SCANLINE_PAD 64 ++# define LOG2_BITMAP_PAD 6 ++# define LOG2_BYTES_PER_SCANLINE_PAD 3 ++ ++/* Add for handling protocol XPutImage and XGetImage; see comment in ++ * Alpha section. ++ */ ++#define INTERNAL_VS_EXTERNAL_PADDING ++#define BITMAP_SCANLINE_UNIT_PROTO 32 ++ ++#define BITMAP_SCANLINE_PAD_PROTO 32 ++#define LOG2_BITMAP_PAD_PROTO 5 ++#define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2 ++#define GLYPHPADBYTES 4 ++#define GETLEFTBITS_ALIGNMENT 1 ++ ++#endif /* linux/aarch64 */ ++ + #if defined (linux) && defined(__powerpc__) + + #ifdef __powerpc64__ 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 new file mode 100644 index 000000000000..e05e5bc6af7b --- /dev/null +++ b/net-misc/tightvnc/files/tightvnc-1.3.10-ppc64el-support.patch @@ -0,0 +1,99 @@ +From 25adb1614419b72a986c229cb01870c1b3e38c0b Mon Sep 17 00:00:00 2001 +From: Lauri Kasanen <cand@gmx.com> +Date: Fri, 5 Jun 2015 07:45:09 -0300 +Subject: [PATCH 2/2] Add ppc64el support + +Signed-off-by: Lauri Kasanen <cand@gmx.com> +--- + Xvnc/config/cf/Imake.cf | 4 ++++ + Xvnc/config/cf/linux.cf | 8 +++++++- + Xvnc/include/Xmd.h | 2 +- + Xvnc/programs/Xserver/include/servermd.h | 23 +++++++++++++++++++++++ + 4 files changed, 35 insertions(+), 2 deletions(-) + +diff --git a/Xvnc/config/cf/Imake.cf b/Xvnc/config/cf/Imake.cf +index f1f6724..cbe9ef3 100644 +--- a/Xvnc/config/cf/Imake.cf ++++ b/Xvnc/config/cf/Imake.cf +@@ -720,6 +720,10 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686 + # define Mc68020Architecture + # undef mc68000 + # endif /* mc68000 */ ++# ifdef __powerpc64__ ++# define Ppc64Architecture ++# undef __powerpc64__ ++# endif + # ifdef powerpc + # define PpcArchitecture + # undef powerpc +diff --git a/Xvnc/config/cf/linux.cf b/Xvnc/config/cf/linux.cf +index c0e2586..e5f1f2f 100644 +--- a/Xvnc/config/cf/linux.cf ++++ b/Xvnc/config/cf/linux.cf +@@ -289,7 +289,13 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) + #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines + #endif /* s390xArchitecture */ + +-#ifdef PowerPCArchitecture ++#ifdef Ppc64Architecture ++#define DefaultCCOptions -fsigned-char ++#define OptimizedCDebugFlags -O2 ++#define LinuxMachineDefines -D__powerpc64__ ++#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET ++#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 ++#elif defined(PowerPCArchitecture) + #define DefaultCCOptions -fsigned-char + #define OptimizedCDebugFlags -O2 + #define LinuxMachineDefines -D__powerpc__ +diff --git a/Xvnc/include/Xmd.h b/Xvnc/include/Xmd.h +index 3cf9db1..704d252 100644 +--- a/Xvnc/include/Xmd.h ++++ b/Xvnc/include/Xmd.h +@@ -59,7 +59,7 @@ SOFTWARE. + #ifdef CRAY + #define WORD64 /* 64-bit architecture */ + #endif +-#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) ++#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) || defined(__powerpc64__) + #define LONG64 /* 32/64-bit architecture */ + #endif + #ifdef __sgi +diff --git a/Xvnc/programs/Xserver/include/servermd.h b/Xvnc/programs/Xserver/include/servermd.h +index 5066c1d..cc9f485 100644 +--- a/Xvnc/programs/Xserver/include/servermd.h ++++ b/Xvnc/programs/Xserver/include/servermd.h +@@ -407,8 +407,31 @@ SOFTWARE. + + #if defined (linux) && defined(__powerpc__) + ++#ifdef __powerpc64__ ++# define BITMAP_SCANLINE_UNIT 64 ++# define BITMAP_SCANLINE_PAD 64 ++# define LOG2_BITMAP_PAD 6 ++# define LOG2_BYTES_PER_SCANLINE_PAD 3 ++ ++/* Add for handling protocol XPutImage and XGetImage; see comment in ++ * Alpha section. ++ */ ++#define INTERNAL_VS_EXTERNAL_PADDING ++#define BITMAP_SCANLINE_UNIT_PROTO 32 ++ ++#define BITMAP_SCANLINE_PAD_PROTO 32 ++#define LOG2_BITMAP_PAD_PROTO 5 ++#define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2 ++#endif /* linux/ppc64 */ ++ ++#if defined(__LITTLE_ENDIAN__) ++#define IMAGE_BYTE_ORDER LSBFirst ++#define BITMAP_BIT_ORDER LSBFirst ++#else + #define IMAGE_BYTE_ORDER MSBFirst + #define BITMAP_BIT_ORDER MSBFirst ++#endif ++ + #define GLYPHPADBYTES 4 + #define GETLEFTBITS_ALIGNMENT 1 + +-- +2.1.4 + diff --git a/net-misc/tightvnc/tightvnc-1.3.10-r3.ebuild b/net-misc/tightvnc/tightvnc-1.3.10-r3.ebuild new file mode 100644 index 000000000000..a79912e165c2 --- /dev/null +++ b/net-misc/tightvnc/tightvnc-1.3.10-r3.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils toolchain-funcs java-pkg-opt-2 + +IUSE="java tcpd server" + +S="${WORKDIR}/vnc_unixsrc" +DESCRIPTION="A great client/server software package allowing remote network access to graphical desktops" +SRC_URI="mirror://sourceforge/vnc-tight/${P}_unixsrc.tar.bz2 + mirror://gentoo/${PN}.png + java? ( mirror://sourceforge/vnc-tight/${P}_javasrc.tar.gz )" +HOMEPAGE="http://www.tightvnc.com/" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~sh ~sparc ~x86 ~x86-fbsd ~arm-linux ~x86-linux" +LICENSE="GPL-2" +SLOT="0" + +CDEPEND="media-fonts/font-misc-misc + virtual/jpeg + server? ( + media-fonts/font-cursor-misc + x11-apps/rgb + x11-apps/xauth + x11-apps/xsetroot + ) + x11-libs/libX11 + x11-libs/libXaw + x11-libs/libXmu + x11-libs/libXp + x11-libs/libXt + tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )" +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-1.4 )" +DEPEND="${CDEPEND} + java? ( >=virtual/jdk-1.4 ) + x11-proto/xextproto + x11-proto/xproto + server? ( + x11-proto/inputproto + x11-proto/kbproto + x11-proto/printproto + ) + >=x11-misc/imake-1 + x11-misc/gccmakedep + x11-misc/makedepend + !net-misc/tigervnc" + +pkg_setup() { + if ! use server; + then + echo + einfo "The 'server' USE flag will build tightvnc's server." + einfo "If '-server' is chosen only the client is built to save space." + einfo "Stop the build now if you need to add 'server' to USE flags.\n" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-1.3.10-pathfixes.patch" # fixes bug 78385 and 146099 + epatch "${FILESDIR}/${PN}-1.3.8-imake-tmpdir.patch" # fixes bug 23483 + epatch "${FILESDIR}/${PN}-1.3.8-darwin.patch" # fixes bug 89908 + epatch "${FILESDIR}/${PN}-1.3.8-mips.patch" + epatch "${FILESDIR}"/server-CVE-2007-1003.patch + epatch "${FILESDIR}"/server-CVE-2007-1351-1352.patch + epatch "${FILESDIR}"/1.3.9-fbsd.patch + epatch "${FILESDIR}"/1.3.9-arm.patch + epatch "${FILESDIR}"/1.3.9-sh.patch + epatch "${FILESDIR}"/${P}-ppc64el-support.patch + epatch "${FILESDIR}"/${P}-aarch64.patch + epatch "${FILESDIR}"/${P}-more-arm64-fixes.patch + + sed -e "s:\\(/etc/\\|/usr/share/\\):${EPREFIX}\\1:g" -i vncserver || die + + if use java; then + cd "${WORKDIR}" + epatch "${FILESDIR}/${PN}-1.3.10-java-build.patch" + fi +} + +src_compile() { + xmkmf -a || die "xmkmf failed" + + emake -j1 CDEBUGFLAGS="${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}" World + + if use server; then + cd Xvnc || die + econf + + if use tcpd; then + local myextra="-lwrap" + emake -j1 EXTRA_LIBRARIES="${myextra}" \ + CDEBUGFLAGS="${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}" \ + EXTRA_DEFINES="-DUSE_LIBWRAP=1" + else + emake -j1 CDEBUGFLAGS="${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}" + fi + fi + + if use java; then + cd "${WORKDIR}/vnc_javasrc" || die + emake -j1 JAVACFLAGS="$(java-pkg_javac-args)" all + fi + +} + +src_install() { + # the web based interface and the java viewer need the java class files + if use java; then + java-pkg_newjar "${WORKDIR}/vnc_javasrc/VncViewer.jar" + java-pkg_dolauncher "${PN}-java" + insinto /usr/share/${PN}/classes + doins "${WORKDIR}"/vnc_javasrc/*.vnc || die + dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/${PN}/classes/VncViewer.jar + fi + + dodir /usr/share/man/man1 /usr/bin + ./vncinstall "${ED}"/usr/bin "${ED}"/usr/share/man || die "vncinstall failed" + + if use server; then + newconfd "${FILESDIR}"/tightvnc.confd vnc + newinitd "${FILESDIR}"/tightvnc.initd vnc + else + rm -f "${ED}"/usr/bin/vncserver || die + rm -f "${ED}"/usr/share/man/man1/{Xvnc,vncserver}* || die + fi + + newicon "${DISTDIR}"/tightvnc.png vncviewer.png + make_desktop_entry vncviewer vncviewer vncviewer Network + + dodoc ChangeLog README WhatsNew + use java && dodoc "${FILESDIR}"/README.JavaViewer + newdoc vncviewer/README README.vncviewer +} |