diff options
author | Raúl Porcel <armin76@gentoo.org> | 2015-02-12 12:03:33 +0000 |
---|---|---|
committer | Raúl Porcel <armin76@gentoo.org> | 2015-02-12 12:03:33 +0000 |
commit | 7222279c10c67737fa054458985bc4e875e09f9b (patch) | |
tree | 811dc784c05479a90283ea435d4f83c9fe8af241 /net-misc | |
parent | Version bump (diff) | |
download | historical-7222279c10c67737fa054458985bc4e875e09f9b.tar.gz historical-7222279c10c67737fa054458985bc4e875e09f9b.tar.bz2 historical-7222279c10c67737fa054458985bc4e875e09f9b.zip |
Add revision bump with security patch for bug #534714
Package-Manager: portage-2.2.14/cvs/Linux ia64
Manifest-Sign-Key: 0xF6AD3240
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/tigervnc/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/tigervnc/Manifest | 25 | ||||
-rw-r--r-- | net-misc/tigervnc/files/1.3.1-CVE-2014-8240.patch | 78 | ||||
-rw-r--r-- | net-misc/tigervnc/tigervnc-1.3.1-r3.ebuild | 201 | ||||
-rw-r--r-- | net-misc/tigervnc/tigervnc-1.3.1-r4.ebuild | 201 |
5 files changed, 496 insertions, 18 deletions
diff --git a/net-misc/tigervnc/ChangeLog b/net-misc/tigervnc/ChangeLog index 3a8514b3c3fe..da55dd403412 100644 --- a/net-misc/tigervnc/ChangeLog +++ b/net-misc/tigervnc/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/tigervnc # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/tigervnc/ChangeLog,v 1.198 2015/02/10 10:37:07 chithanh Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/tigervnc/ChangeLog,v 1.199 2015/02/12 12:03:26 armin76 Exp $ + +*tigervnc-1.3.1-r4 (12 Feb 2015) +*tigervnc-1.3.1-r3 (12 Feb 2015) + + 12 Feb 2015; Raúl Porcel <armin76@gentoo.org> +tigervnc-1.3.1-r3.ebuild, + +tigervnc-1.3.1-r4.ebuild, +files/1.3.1-CVE-2014-8240.patch: + Add revision bump with security patch for bug #534714 10 Feb 2015; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> -files/1.1.0-export_missing_symbol.patch, -files/1.1.0-gethomedir.patch, diff --git a/net-misc/tigervnc/Manifest b/net-misc/tigervnc/Manifest index 0494f9b852ed..976b3e465959 100644 --- a/net-misc/tigervnc/Manifest +++ b/net-misc/tigervnc/Manifest @@ -1,6 +1,7 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX 1.3.1-CVE-2014-8240.patch 2541 SHA256 7df6e5e361f90c9f07fc9aa0fa1e2f930e99672bda8be4ef7e8d73d1c5cb3d4a SHA512 ce968df98d3ecf443ffd16463db7e906b56eb625bc70252377797478a0277d6ec09c2e38f68f5406c5cd434471df5b9186987a469f350cc5e0a1d32706a428cf WHIRLPOOL a065aa26340cced6e9367ccd9731ef6f88a6fc4e7f79e2604adfb533bc58d3be22ad2ab79d30f471c1e8a34a541201043b814dd8df1cde50d19355cd2cbb2a32 AUX tigervnc.confd 346 SHA256 48b6ae4f3e9e528b3cd4bc1349ceed3cd1a403ab0f3a2a8dd57a4769f88ceafc SHA512 204ab170de8b76d72d6fd2c3fcfab19cb2750eca231956f53cdfc81270baaef9ae31b08ce53b103a737045ccca8ce0b7f9649fb7cbd582ee0acff437ff5c85b4 WHIRLPOOL 9911713196cb57057b2200c0303b832fe7708520453cbf4ca1b9ed945738c734afff3f4d1f96e361e487e59b39f3ef44ac939234e1ea56e2e9e4e612cd5d70ee AUX tigervnc.initd 2083 SHA256 3971df255bc3f0aa52b6b66a3ba71290a3114244e8c2193962ddbcead75fda46 SHA512 7e074e98c668a75f96ffb02cfe8f34100b478e2d311fc5964ad704823292d5602a5533d13fa7103ee81da79beb210165ef9bcd70eb73e1ad0f57bd6997090bc0 WHIRLPOOL 066b0b6ed598c9b8ca856381eb2f7d6b607759c7771097550d706fdb6387aada7210dcb0212b52515dad81626e48d7c68b27e07efb7e7346bf82b7dae16f4393 DIST tigervnc-1.3.0-patches-0.2.tar.bz2 8130 SHA256 9cf7ca0e3fe56f99c3ca1b88ddccca0952d86a722a3c3da4585aac4b7882245d SHA512 defb37a4f0aa5b7c2dd71aaf404b048c058adf3181235721607a3cac7e8a4fec7751b081ccb1704e51a68ada84147d408328cdf969c64359dd9460916671be90 WHIRLPOOL 67db5fc1c1b8bea6dc4394d360e5261f52f160627d9bcf5a4fee221c38600c0415a0f10170a960f91cf0cf94a401f9d625d790aba3af17fc3326aae6cb2b899c @@ -11,24 +12,14 @@ DIST xorg-server-1.15.0.tar.bz2 5546579 SHA256 613b2f2e7ee2a06d2f8e862c836dc70d3 DIST xorg-server-1.16.0.tar.bz2 5832944 SHA256 38330a03c5f7a38745a3f9816cf069db5b8844eebb358fd39dbabf61f32cd06b SHA512 eab298e3728aa79ff2ba3f5c12637c4db0f9bbca49ed00b673b2bfedf605f33a69d8eb946bed98e3d28afd9bfaf62e21ce2e8606d84cae9906506d90c26f1662 WHIRLPOOL bd9817cf93587e2b33d63438942c75d49b04f4fc2a4544654dfcc116deaf88abcccd0fa2496fb58848d5a007d2e32177cdbcd3f44237efd8b7882a0abc5b8d56 EBUILD tigervnc-1.3.1-r1.ebuild 4910 SHA256 8f2cbdd86a94ab4773b59798beb307eed3849f90d8582055946f389011e263f2 SHA512 2b0871972c59fceafb0acc9d088d0a0dd56ea8555372eeedb4733614dc50d8ba754fd3ba494bc260567a7f1dc8b932fd85efd79be7266f89c548aef1a8e3ae75 WHIRLPOOL bdccbf04091ce1ce95339ab1f8e0de5641ea901ffe0ae21367e829db7c505ae40cb8115f287bea5080de7179aa1e4916b413a4f5660a6cdd60b76ac7a8abe773 EBUILD tigervnc-1.3.1-r2.ebuild 4986 SHA256 7c5b32d499c75670abc5b16c16de833f56c22fd3009576aa82a33d9c996c852b SHA512 ed2163993fbc338d3a062533d2c50be4cfe4968e47768405db51f0586115121cbc85d51aab77de20b6417c59cc56dcf66f624089ba1dad38e4a7bd4a4cd3d968 WHIRLPOOL f367e9eae116d83834bea4e167ac7ecd864dbf9b412cac49570b530f52357b6c1b9dd66ef917742e380e77589d1da9e630b081786fd5e6cabcd410a2cc16ca55 -MISC ChangeLog 26740 SHA256 7c6a0ad344ab443b0f689501daeb4ddce3f5e2906bc197550fbcc5bee02fb8e5 SHA512 d876346be70a27a981d49c1e702610a0cc69433ea9588e42e59f622c254ca31a381ddd92ad6473e3c808d5cbc5018ea8a3e6a344620d21d01e41b732da12cd4b WHIRLPOOL 271c50e1f788183661230914bd55ae50ae402e16d4ef5115e2e489f24dad23e6588e38e34b696d889f2fadc44658dc70c617376b770d3acfbd43607610d9aa01 +EBUILD tigervnc-1.3.1-r3.ebuild 4972 SHA256 64c051f1084696cfccf4f56405c9643d73aa012f7694c13120104cc6e94d223c SHA512 771a92d670329e79e802d4c95bb5001ce0d6ca145cff20ceed11e3d4d5e289a021bfc1eac2827f393fecb8e868dc83db62a339b6d50b02f5f47ade8e6b09906b WHIRLPOOL 2cc9b53ba0f097fd740a91055136b930b9143353bd9de0c32e4edffbaa5949358e83bf810c2920645b6144b51f1b2b507dcb49a7cd218d95753a8a5d6202ba6e +EBUILD tigervnc-1.3.1-r4.ebuild 5035 SHA256 6e403940d09c3d843bfc3f46b7b0987fe36bd46bc906f9779558486cbcf9084a SHA512 38352c46de953d531e2490c9800becad49041cd2264cd7a92f0bb92ad2552a42aaf9a63c7eb2d2556f585087b21281f70f58ba2f7c55904b7940c97048a82e96 WHIRLPOOL 2b6db82fc505be5c87dd49ed0f5ce548a962761861a02a04238f79581c8dd85f6aa532c7687772957e9adb6a0402cf4281d8efae8a34d52cd36d7339e4f69124 +MISC ChangeLog 27002 SHA256 e489643ae21bb47cff573c02b066679a84c0fef489f8367e2e80d163b34c08b4 SHA512 99351f85b73c0b8c41ba5d60c8ee3e6de1b6fc25082b7a446e59366279a5f2801ea11360b9a2a74ae35ab05e358e3254b888513348cd33360a297a0631e53d7c WHIRLPOOL bc0e350b9db76358a290c31ab2b1686013d8dfec90e381dbd50cef1976be4abdb235a2a795c5715dd337e09e34f51b3018d265ccd9a0736b0cb1e84e7dea9770 MISC metadata.xml 335 SHA256 821ea06553b929fa98b219ad2f17ca84dda361965182f46e030ddd3b2d950209 SHA512 206ccc0af085090fd0381f6e088a82a4084fe5e97a64ff6bea9f2ceb7b209e42acdff2c779621e3be77c56dad978afcf498b8bf1b16e9ff1bea447110ad39e83 WHIRLPOOL 8bc100612b6eadbf295f8cd008c67b587cea0e852f6f8d6dd61f9476fef560d9c2393b206239fb26c88cb20840e4c0e6222bffadecfd31ba8fd934d0437619e2 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0 +Version: GnuPG v2 -iQJ8BAEBCABmBQJU2d9kXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w -ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RDFCODdDQUUxMkUwNkJCNjUyMDMxOEIy -MzI0RTdCNTY2REYyNjExAAoJECMk57Vm3yYRPW0P/18xkclTlUmC+p80DW1tSWSE -2J6UBDYpFRidbkIhSQsZxoIw4VTwAOOqgt92n8PjDpAEWngZvue/GH5DhEZup93V -gkB/7bCFxH6NQacIHHooLmWodVQ+b/mkGu4qCBnUr0pnnfJwsVyHoUd1TzS5Q7QN -xdjN8u9MZJXXHHhaj8NpmuVCv/qNp1l2H4iwOeWo1QkH8h3/3ne/B7sOlF8nFq+Z -v3XgkcI6fM5XZ5WrFS3mMYsHrm2nCw59LfTl0i447MlevSANpwMiO8MOJLZdCsDE -kpDxcHxHT646tw4MiHy+1DwVRsaLp9LoOZca6KqyVRVreehDQkKt6RFFG5EPHjSj -gib2CSqjDj1KSFCZ8qupwcuZqX13kLcSOKGLcjaNCtRn09QGJqhW8oSS666BISm7 -cCGgXv5w4xhTC0TYHRPZ3IIbGIJA/G5Clmec2z3mNXVxFjszf7bKlIMMtQapNFad -uv8HkARrWie+1N64BZiaY3vDY6nNhG9pR6FGbIpo/WFkdmfVY7CmAvScicp+04Vn -ZsF7etfJKRxi+q5jn7129u9lhZCIGnaCYgHebyrPQPGlmjKJ26T/vq30Z6+Br9ZB -+loQqDlqFJN13VzO/x/VqpE+w7dQw8nZg1awxVaxZfmv0Qd+X1v61ZDTvrkSlCvu -HSEWfjkheYeq1ii7UuLT -=eKPX +iEYEAREIAAYFAlTclpAACgkQuQc30/atMkA+IgCgwJQg7MIWcveS1aAeOfdhuzEo +inYAn2bDx52p/Tbe7G7qVptlMYC9TvjG +=4j/7 -----END PGP SIGNATURE----- diff --git a/net-misc/tigervnc/files/1.3.1-CVE-2014-8240.patch b/net-misc/tigervnc/files/1.3.1-CVE-2014-8240.patch new file mode 100644 index 000000000000..dd2707394870 --- /dev/null +++ b/net-misc/tigervnc/files/1.3.1-CVE-2014-8240.patch @@ -0,0 +1,78 @@ +Patch-Mainline: To be upstreamed +References: bnc#900896 CVE-2014-8240 +Signed-off-by: Michal Srb <msrb@suse.com> + +Index: tigervnc-1.4.1/unix/x0vncserver/Image.cxx +=================================================================== +--- tigervnc-1.4.1.orig/unix/x0vncserver/Image.cxx ++++ tigervnc-1.4.1/unix/x0vncserver/Image.cxx +@@ -80,6 +80,14 @@ void Image::Init(int width, int height) + xim = XCreateImage(dpy, vis, DefaultDepth(dpy, DefaultScreen(dpy)), + ZPixmap, 0, 0, width, height, BitmapPad(dpy), 0); + ++ if (xim->bytes_per_line <= 0 || ++ xim->height <= 0 || ++ xim->height >= INT_MAX / xim->bytes_per_line) { ++ vlog.error("Invalid display size"); ++ XDestroyImage(xim); ++ exit(1); ++ } ++ + xim->data = (char *)malloc(xim->bytes_per_line * xim->height); + if (xim->data == NULL) { + vlog.error("malloc() failed"); +@@ -254,6 +262,17 @@ void ShmImage::Init(int width, int heigh + delete shminfo; + shminfo = NULL; + return; ++ } ++ ++ if (xim->bytes_per_line <= 0 || ++ xim->height <= 0 || ++ xim->height >= INT_MAX / xim->bytes_per_line) { ++ vlog.error("Invalid display size"); ++ XDestroyImage(xim); ++ xim = NULL; ++ delete shminfo; ++ shminfo = NULL; ++ return; + } + + shminfo->shmid = shmget(IPC_PRIVATE, +Index: tigervnc-1.4.1/vncviewer/X11PixelBuffer.cxx +=================================================================== +--- tigervnc-1.4.1.orig/vncviewer/X11PixelBuffer.cxx ++++ tigervnc-1.4.1/vncviewer/X11PixelBuffer.cxx +@@ -106,6 +106,15 @@ X11PixelBuffer::X11PixelBuffer(int width + if (!xim) + throw rfb::Exception(_("Could not create framebuffer image")); + ++ if (xim->bytes_per_line <= 0 || ++ xim->height <= 0 || ++ xim->height >= INT_MAX / xim->bytes_per_line) { ++ if (xim) ++ XDestroyImage(xim); ++ xim = NULL; ++ throw rfb::Exception("Invalid display size"); ++ } ++ + xim->data = (char*)malloc(xim->bytes_per_line * xim->height); + if (!xim->data) + throw rfb::Exception(_("Not enough memory for framebuffer")); +@@ -172,6 +181,16 @@ int X11PixelBuffer::setupShm() + if (!xim) + goto free_shminfo; + ++ if (xim->bytes_per_line <= 0 || ++ xim->height <= 0 || ++ xim->height >= INT_MAX / xim->bytes_per_line) { ++ XDestroyImage(xim); ++ xim = NULL; ++ delete shminfo; ++ shminfo = NULL; ++ throw rfb::Exception("Invalid display size"); ++ } ++ + shminfo->shmid = shmget(IPC_PRIVATE, + xim->bytes_per_line * xim->height, + IPC_CREAT|0777); diff --git a/net-misc/tigervnc/tigervnc-1.3.1-r3.ebuild b/net-misc/tigervnc/tigervnc-1.3.1-r3.ebuild new file mode 100644 index 000000000000..649b77ac052b --- /dev/null +++ b/net-misc/tigervnc/tigervnc-1.3.1-r3.ebuild @@ -0,0 +1,201 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tigervnc/tigervnc-1.3.1-r3.ebuild,v 1.1 2015/02/12 12:03:26 armin76 Exp $ + +EAPI="4" + +inherit eutils cmake-utils autotools java-pkg-opt-2 flag-o-matic + +PATCHVER="0.2" +XSERVER_VERSION="1.15.0" +OPENGL_DIR="xorg-x11" +#MY_P="${PN}-1.2.80-20130314svn5065" +#S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Remote desktop viewer display system" +HOMEPAGE="http://www.tigervnc.org" +SRC_URI="mirror://sourceforge/tigervnc/${P}.tar.gz + mirror://gentoo/${PN}.png + mirror://gentoo/${PN}-1.3.0-patches-${PATCHVER}.tar.bz2 + http://dev.gentoo.org/~armin76/dist/${PN}-1.3.0-patches-${PATCHVER}.tar.bz2 + server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.bz2 )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="gnutls java nptl +opengl pam server +xorgmodule" + +RDEPEND="virtual/jpeg:0 + sys-libs/zlib + >=x11-libs/libXtst-1.0.99.2 + >=x11-libs/fltk-1.3.1 + gnutls? ( net-libs/gnutls ) + java? ( >=virtual/jre-1.5 ) + pam? ( virtual/pam ) + server? ( + dev-lang/perl + >=x11-libs/libXi-1.2.99.1 + >=x11-libs/libXfont-1.4.2 + >=x11-libs/libxkbfile-1.0.4 + x11-libs/libXrender + >=x11-libs/pixman-0.27.2 + >=x11-apps/xauth-1.0.3 + x11-apps/xsetroot + >=x11-misc/xkeyboard-config-2.4.1-r3 + opengl? ( >=app-admin/eselect-opengl-1.0.8 ) + xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* ) + ) + !net-misc/vnc + !net-misc/tightvnc + !net-misc/xf4vnc" +DEPEND="${RDEPEND} + amd64? ( dev-lang/nasm ) + x86? ( dev-lang/nasm ) + >=x11-proto/inputproto-2.2.99.1 + >=x11-proto/xextproto-7.2.99.901 + >=x11-proto/xproto-7.0.22 + java? ( >=virtual/jdk-1.5 ) + server? ( + virtual/pkgconfig + media-fonts/font-util + x11-misc/util-macros + >=x11-proto/bigreqsproto-1.1.0 + >=x11-proto/compositeproto-0.4 + >=x11-proto/damageproto-1.1 + >=x11-proto/fixesproto-5.0 + >=x11-proto/fontsproto-2.0.2 + >=x11-proto/glproto-1.4.17 + >=x11-proto/randrproto-1.4.0 + >=x11-proto/renderproto-0.11 + >=x11-proto/resourceproto-1.2.0 + >=x11-proto/scrnsaverproto-1.1 + >=x11-proto/videoproto-2.2.2 + >=x11-proto/xcmiscproto-1.2.0 + >=x11-proto/xineramaproto-1.1.3 + >=x11-libs/xtrans-1.3.2 + >=x11-proto/dri2proto-2.8 + opengl? ( >=media-libs/mesa-7.8_rc[nptl=] ) + )" + +CMAKE_IN_SOURCE_BUILD=1 + +pkg_setup() { + if ! use server ; then + echo + einfo "The 'server' USE flag will build tigervnc'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" + else + ewarn "Forcing on xorg-x11 for new enough glxtokens.h..." + OLD_IMPLEM="$(eselect opengl show)" + eselect opengl set ${OPENGL_DIR} + fi +} + +switch_opengl_implem() { + # Switch to the xorg implementation. + # Use new opengl-update that will not reset user selected + # OpenGL interface ... + echo + eselect opengl set ${OLD_IMPLEM} +} + +src_prepare() { + if use server ; then + cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/* unix/xserver + else + rm "${WORKDIR}"/patches/*_server_* + fi + + EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" \ + EPATCH_FORCE="yes" epatch + + epatch "${FILESDIR}"/1.3.1-CVE-2014-8240.patch + + if use server ; then + cd unix/xserver + epatch ../xserver114.patch + eautoreconf + fi +} + +src_configure() { + + use arm || use hppa && append-flags "-fPIC" + + mycmakeargs=( + -G "Unix Makefiles" + $(cmake-utils_use_enable gnutls GNUTLS) + $(cmake-utils_use_enable pam PAM) + $(cmake-utils_use_build java JAVA) + ) + + cmake-utils_src_configure + + if use server; then + cd unix/xserver + econf \ + $(use_enable nptl glx-tls) \ + $(use_enable opengl glx) \ + --disable-config-dbus \ + --disable-config-hal \ + --disable-config-udev \ + --disable-devel-docs \ + --disable-dmx \ + --disable-dri \ + --disable-dri3 \ + --disable-kdrive \ + --disable-selective-werror \ + --disable-silent-rules \ + --disable-static \ + --disable-unit-tests \ + --disable-xephyr \ + --disable-xinerama \ + --disable-xnest \ + --disable-xorg \ + --disable-xvfb \ + --disable-xwin \ + --enable-dri2 \ + --with-pic \ + --without-dtrace \ + --disable-present \ + --disable-unit-tests + fi +} + +src_compile() { + cmake-utils_src_compile + + if use server ; then + cd unix/xserver + emake + fi +} + +src_install() { + cmake-utils_src_install + + newicon "${DISTDIR}"/tigervnc.png vncviewer.png + make_desktop_entry vncviewer vncviewer vncviewer Network + + if use server ; then + cd unix/xserver/hw/vnc + emake DESTDIR="${D}" install + ! use xorgmodule && rm -rf "${D}"/usr/$(get_libdir)/xorg + + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} + + rm "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la + else + cd "${D}" + for f in vncserver vncpasswd x0vncserver vncconfig; do + rm usr/bin/$f + rm usr/share/man/man1/$f.1 + done + fi +} + +pkg_postinst() { + use server && switch_opengl_implem +} diff --git a/net-misc/tigervnc/tigervnc-1.3.1-r4.ebuild b/net-misc/tigervnc/tigervnc-1.3.1-r4.ebuild new file mode 100644 index 000000000000..31a43fcc79b0 --- /dev/null +++ b/net-misc/tigervnc/tigervnc-1.3.1-r4.ebuild @@ -0,0 +1,201 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tigervnc/tigervnc-1.3.1-r4.ebuild,v 1.1 2015/02/12 12:03:26 armin76 Exp $ + +EAPI="4" + +inherit eutils cmake-utils autotools java-pkg-opt-2 flag-o-matic + +PATCHVER="0.1" +XSERVER_VERSION="1.16.0" +OPENGL_DIR="xorg-x11" +#MY_P="${PN}-1.2.80-20130314svn5065" +#S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Remote desktop viewer display system" +HOMEPAGE="http://www.tigervnc.org" +SRC_URI="mirror://sourceforge/tigervnc/${P}.tar.gz + mirror://gentoo/${PN}.png + mirror://gentoo/${PN}-1.3.1-patches-${PATCHVER}.tar.bz2 + http://dev.gentoo.org/~armin76/dist/${PN}-1.3.1-patches-${PATCHVER}.tar.bz2 + server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.bz2 )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="gnutls java nptl +opengl pam server +xorgmodule" + +RDEPEND="virtual/jpeg:0 + sys-libs/zlib + >=x11-libs/libXtst-1.0.99.2 + >=x11-libs/fltk-1.3.1 + gnutls? ( net-libs/gnutls ) + java? ( >=virtual/jre-1.5 ) + pam? ( virtual/pam ) + server? ( + dev-lang/perl + >=x11-libs/libXi-1.2.99.1 + >=x11-libs/libXfont-1.4.2 + >=x11-libs/libxkbfile-1.0.4 + x11-libs/libXrender + >=x11-libs/pixman-0.27.2 + >=x11-apps/xauth-1.0.3 + x11-apps/xsetroot + >=x11-misc/xkeyboard-config-2.4.1-r3 + opengl? ( >=app-admin/eselect-opengl-1.0.8 ) + xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* ) + ) + !net-misc/vnc + !net-misc/tightvnc + !net-misc/xf4vnc" +DEPEND="${RDEPEND} + amd64? ( dev-lang/nasm ) + x86? ( dev-lang/nasm ) + >=x11-proto/inputproto-2.2.99.1 + >=x11-proto/xextproto-7.2.99.901 + >=x11-proto/xproto-7.0.26 + java? ( >=virtual/jdk-1.5 ) + server? ( + virtual/pkgconfig + media-fonts/font-util + x11-misc/util-macros + >=x11-proto/bigreqsproto-1.1.0 + >=x11-proto/compositeproto-0.4 + >=x11-proto/damageproto-1.1 + >=x11-proto/fixesproto-5.0 + >=x11-proto/fontsproto-2.1.3 + >=x11-proto/glproto-1.4.17 + >=x11-proto/randrproto-1.4.0 + >=x11-proto/renderproto-0.11 + >=x11-proto/resourceproto-1.2.0 + >=x11-proto/scrnsaverproto-1.1 + >=x11-proto/videoproto-2.2.2 + >=x11-proto/xcmiscproto-1.2.0 + >=x11-proto/xineramaproto-1.1.3 + >=x11-libs/xtrans-1.3.3 + >=x11-proto/dri2proto-2.8 + opengl? ( >=media-libs/mesa-7.8_rc[nptl=] ) + )" + +CMAKE_IN_SOURCE_BUILD=1 + +pkg_setup() { + if ! use server ; then + echo + einfo "The 'server' USE flag will build tigervnc'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" + else + ewarn "Forcing on xorg-x11 for new enough glxtokens.h..." + OLD_IMPLEM="$(eselect opengl show)" + eselect opengl set ${OPENGL_DIR} + fi +} + +switch_opengl_implem() { + # Switch to the xorg implementation. + # Use new opengl-update that will not reset user selected + # OpenGL interface ... + echo + eselect opengl set ${OLD_IMPLEM} +} + +src_prepare() { + if use server ; then + cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/* unix/xserver + else + rm "${WORKDIR}"/patches/*_server_* + fi + + EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" EPATCH_EXCLUDE="*999*" \ + EPATCH_FORCE="yes" epatch + + epatch "${FILESDIR}"/1.3.1-CVE-2014-8240.patch + + if use server ; then + cd unix/xserver + epatch "${WORKDIR}"/patches/0999_server_xserver-1.14-rebased.patch + eautoreconf + fi +} + +src_configure() { + + use arm || use hppa && append-flags "-fPIC" + + mycmakeargs=( + -G "Unix Makefiles" + $(cmake-utils_use_enable gnutls GNUTLS) + $(cmake-utils_use_enable pam PAM) + $(cmake-utils_use_build java JAVA) + ) + + cmake-utils_src_configure + + if use server; then + cd unix/xserver + econf \ + $(use_enable nptl glx-tls) \ + $(use_enable opengl glx) \ + --disable-config-dbus \ + --disable-config-hal \ + --disable-config-udev \ + --disable-devel-docs \ + --disable-dmx \ + --disable-dri \ + --disable-dri3 \ + --disable-kdrive \ + --disable-selective-werror \ + --disable-silent-rules \ + --disable-static \ + --disable-unit-tests \ + --disable-xephyr \ + --disable-xinerama \ + --disable-xnest \ + --disable-xorg \ + --disable-xvfb \ + --disable-xwin \ + --enable-dri2 \ + --with-pic \ + --without-dtrace \ + --disable-present \ + --disable-unit-tests + fi +} + +src_compile() { + cmake-utils_src_compile + + if use server ; then + cd unix/xserver + emake + fi +} + +src_install() { + cmake-utils_src_install + + newicon "${DISTDIR}"/tigervnc.png vncviewer.png + make_desktop_entry vncviewer vncviewer vncviewer Network + + if use server ; then + cd unix/xserver/hw/vnc + emake DESTDIR="${D}" install + ! use xorgmodule && rm -rf "${D}"/usr/$(get_libdir)/xorg + + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} + + rm "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la + else + cd "${D}" + for f in vncserver vncpasswd x0vncserver vncconfig; do + rm usr/bin/$f + rm usr/share/man/man1/$f.1 + done + fi +} + +pkg_postinst() { + use server && switch_opengl_implem +} |