aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-07-18 19:09:22 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-07-18 19:09:22 -0400
commit5b4d7a8b9b2e2255616109717b139d43b52ba4bb (patch)
tree2745a3c3837a56e912f7e9444842bdc73cd95e06 /x11-libs/vte
parentgnome-base/gnome-keyring: add missing <sys/select.h> (diff)
downloadmusl-5b4d7a8b9b2e2255616109717b139d43b52ba4bb.tar.gz
musl-5b4d7a8b9b2e2255616109717b139d43b52ba4bb.tar.bz2
musl-5b4d7a8b9b2e2255616109717b139d43b52ba4bb.zip
x11-libs/vte: fix 0.28.2. Bug #554416.
Diffstat (limited to 'x11-libs/vte')
-rw-r--r--x11-libs/vte/Manifest8
-rw-r--r--x11-libs/vte/files/vte-0.28.2-GNU_SOURCE-for-ptsname_r.patch10
-rw-r--r--x11-libs/vte/files/vte-0.28.2-add_HAVE_ROUND.patch13
-rw-r--r--x11-libs/vte/files/vte-0.28.2-interix.patch51
-rw-r--r--x11-libs/vte/files/vte-0.28.2-limit-arguments.patch40
-rw-r--r--x11-libs/vte/files/vte-0.30.1-alt-meta.patch74
-rw-r--r--x11-libs/vte/metadata.xml8
-rw-r--r--x11-libs/vte/vte-0.28.2-r207.ebuild126
8 files changed, 330 insertions, 0 deletions
diff --git a/x11-libs/vte/Manifest b/x11-libs/vte/Manifest
new file mode 100644
index 0000000..141b71f
--- /dev/null
+++ b/x11-libs/vte/Manifest
@@ -0,0 +1,8 @@
+AUX vte-0.28.2-GNU_SOURCE-for-ptsname_r.patch 161 SHA256 bb8bfcb6d88f40dba0025e9ec95f579219db7e80654371a1c926fa39a38134b2 SHA512 bf8174189fe842d171c04633ce1f8b920f3a515108db48bfe1fff7e537960a88f7439a55b283b6ade6ebfe78ab8ff2473f3be2d062dc00aa74b93a13624b4d3c WHIRLPOOL 1df51a3ff3bd9e9bd76ddbf856236cb3872659c4a4771473409668a6214dd5ebe51d8bed77829b7075736ebf06aaccb6fc3863f260f630bd666af0fce3fa1b83
+AUX vte-0.28.2-add_HAVE_ROUND.patch 430 SHA256 0af936b79e7ecbee4fa14a7dd8853f261aeac82625c87aedeee32f260526e440 SHA512 ffef2c472c955bbab37fc068e842fd7c6ef8a98271c3a71cb26855ea0647e2d356c59e614ae13f66ccd884af269e24f0242ebbf5c94702e43839f9f568a2af5c WHIRLPOOL 73c8b43ab70ce8af6d6d32f72d52b0e8d403fd3fcf0afbbf7476ce17738551142121d54438e9f85bb42e7769fffc5637eacc5783c0506ad3cbde752afe5e497b
+AUX vte-0.28.2-interix.patch 1566 SHA256 0c3bd451d2a48dd38b375fc7d72b675bbfcbcda66f6fbcdd20eeee315727d518 SHA512 f02574f96355c6cedde05d0877d3bf50e7777d210484a80b6e95e597b0bb225f5968649e67f67d7f112f50302ae6566e4f3d8c59d7a5b65fc95601cac00868d7 WHIRLPOOL cd444a499735517fd523e358fa0ad39f9bd8771911da18f06ddb453cdabace3cdb20e2f9aa13428efb1e6b1227ff9e10b56eb3d27616714ac873eb2a64796ae4
+AUX vte-0.28.2-limit-arguments.patch 1477 SHA256 164af2b6756329f1ceb0cac77b5e6bc47d486e1bb0b4e5d3a6fc284e4e7f0ae9 SHA512 e5639d94fd455195c354d03cab04bbb73eff98bc540c813cccf4ab5eb793f4c8ae645fcf2bd502924ed4d38412101341deaf2d28ea8aaea3530a98ffbba8256d WHIRLPOOL a0d9b077d9748c4cfe26ea03c16d9b29ed7c62e994639ae6510b7b50c4cd91c5215337da9310297dbf2bd105fabe85c45453e998c0aa34445cdcdd7192307739
+AUX vte-0.30.1-alt-meta.patch 2490 SHA256 31a46fee8fe59bd1d6df54bc502b608fe80da57bf3786e2dc6e9856a4e793ed6 SHA512 69ed3038f3dcbbd09709667caff5692e4e11e30926bc7692cdbbdef2bb1ae4584ef64b824b5afcb3c57c237a3c0db4d9588ec36778d0994a546b1e6f74c2e430 WHIRLPOOL bc51d9467bb13d627e7355872db5777e3d39ca07753dda9237110f8857d16bca5f8bc4334f9d97df54a2fcbc9234f123247ec8f40508e8120f00ffc46ff0a570
+DIST vte-0.28.2.tar.xz 962340 SHA256 86cf0b81aa023fa93ed415653d51c96767f20b2d7334c893caba71e42654b0ae SHA512 d6a50481aaa8946cca3779e0b328fef551be534d70366a75385d1f8ead3fcddec57bed85c7d4bc2d9f34546532129e63083aafa33cbb0efcbc7dc9d66e7c45f6 WHIRLPOOL cf491b80cdfbdda6163ec7562f922f1c449e6e927845de28ad8e0b06b47bbbf092f735fc4b72f6131797d17c02c6172888d4db37a520973118d2bfbacd374c2c
+EBUILD vte-0.28.2-r207.ebuild 3022 SHA256 bfe8faf003e9f10f9a70b27a15e822265bf44fc375b060f7c3735a5c74fcf5a5 SHA512 0546a2af39f62a676328de3942dbc4182d406407ab34b72eeeafd29aa90c4f365e3bc5908dac9ba078d5bb8cecda5f8fbb995dceb455fb24c2d5d53b7de9e4d0 WHIRLPOOL 3905df734234be357499767eedc473e3028d5671eff9d4c62bb7200d2da28e661729e5d2e9f24a19c2313998e7d03a3d703e4d3b6d1cb4b9abd697c7d12ff5a4
+MISC metadata.xml 250 SHA256 86cd2180b3599ddb2bef78131a9c86a37fa1ee7247aa3245e11e7ff6a239e2e0 SHA512 78b3c7ca8d3e9b51aa7901579627ec33ab3754a16b1e86b108d35b6feca57d5565dcba04e5948d52284c212f5a2f6134bbe0912a2a121822ed07d004c7cdd209 WHIRLPOOL c7ad250c312d9537b3b810984fcebab430a9bb9a87c5639ede513b1523e447a98ce2509e208217afbdc3c3cdaf1a9f0a491ea27e2c09efae77cf933e26bde022
diff --git a/x11-libs/vte/files/vte-0.28.2-GNU_SOURCE-for-ptsname_r.patch b/x11-libs/vte/files/vte-0.28.2-GNU_SOURCE-for-ptsname_r.patch
new file mode 100644
index 0000000..3ca3983
--- /dev/null
+++ b/x11-libs/vte/files/vte-0.28.2-GNU_SOURCE-for-ptsname_r.patch
@@ -0,0 +1,10 @@
+--- vte-0.28.2.orig/src/pty.c
++++ vte-0.28.2/src/pty.c
+@@ -28,6 +28,7 @@
+ * Since: 0.26
+ */
+
++#define _GNU_SOURCE
+ #include <config.h>
+
+ #include "vtepty.h"
diff --git a/x11-libs/vte/files/vte-0.28.2-add_HAVE_ROUND.patch b/x11-libs/vte/files/vte-0.28.2-add_HAVE_ROUND.patch
new file mode 100644
index 0000000..a0ebd51
--- /dev/null
+++ b/x11-libs/vte/files/vte-0.28.2-add_HAVE_ROUND.patch
@@ -0,0 +1,13 @@
+diff -ur a/vte-0.28.2/config.h.in b/vte-0.28.2/config.h.in
+--- a/vte-0.28.2/config.h.in 2015-07-10 20:49:18.179999269 -0200
++++ b/vte-0.28.2/config.h.in 2011-08-28 23:33:19.000000000 -0200
+@@ -82,6 +82,9 @@
+ /* Define if you have the recvmsg function. */
+ #undef HAVE_RECVMSG
+
++/* Define to 1 if you have the `round' function. */
++#undef HAVE_ROUND
++
+ /* Define to 1 if you have the `setpgid' function. */
+ #undef HAVE_SETPGID
+
diff --git a/x11-libs/vte/files/vte-0.28.2-interix.patch b/x11-libs/vte/files/vte-0.28.2-interix.patch
new file mode 100644
index 0000000..c54d46e
--- /dev/null
+++ b/x11-libs/vte/files/vte-0.28.2-interix.patch
@@ -0,0 +1,51 @@
+reported upstream: https://bugzilla.gnome.org/show_bug.cgi?id=652290
+
+diff -ru vte-0.26.2.orig/configure.in vte-0.26.2/configure.in
+--- vte-0.26.2.orig/configure.in 2011-08-17 08:30:55 +0200
++++ vte-0.26.2/configure.in 2011-08-17 08:35:42 +0200
+@@ -362,7 +362,11 @@
+ AC_DEFINE(HAVE_RECVMSG,1,[Define if you have the recvmsg function.])
+ fi
+ AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=["$LIBS -lm"]))
+-AC_CHECK_FUNCS([ceil floor])
++dnl if the first check didn't find floor, it caches the "no" value,
++dnl and doesn't recheck. this makes the below check fail always on
++dnl systems with floor in -lm. thus we unset the chached result.
++unset ac_cv_func_floor
++AC_CHECK_FUNCS([ceil floor round])
+
+ # Look for tgetent
+
+--- vte-0.26.2.orig/configure 2012-04-30 20:02:55.000000000 +0200
++++ vte-0.26.2/configure 2012-04-30 20:03:16.000000000 +0200
+@@ -13277,7 +13277,7 @@
+
+ fi
+
+-for ac_func in ceil floor
++for ac_func in ceil floor round
+ do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+diff -ru vte-0.26.2.orig/src/vte.c vte-0.26.2/src/vte.c
+--- vte-0.26.2.orig/src/vte.c 2011-08-17 08:30:58 +0200
++++ vte-0.26.2/src/vte.c 2011-08-17 08:38:09 +0200
+@@ -63,6 +63,18 @@
+ #include <locale.h>
+ #endif
+
++#ifndef HAVE_ROUND
++# if defined(HAVE_CEIL) && defined(HAVE_FLOOR)
++static inline double round(double x) {
++ if(x - floor(x) < 0.5) {
++ return floor(x);
++ } else {
++ return ceil(x);
++ }
++}
++# endif
++#endif
++
+ #if GTK_CHECK_VERSION (2, 90, 7)
+ #define GDK_KEY(symbol) GDK_KEY_##symbol
+ #else
diff --git a/x11-libs/vte/files/vte-0.28.2-limit-arguments.patch b/x11-libs/vte/files/vte-0.28.2-limit-arguments.patch
new file mode 100644
index 0000000..fd45407
--- /dev/null
+++ b/x11-libs/vte/files/vte-0.28.2-limit-arguments.patch
@@ -0,0 +1,40 @@
+From feeee4b5832b17641e505b7083e0d299fdae318e Mon Sep 17 00:00:00 2001
+From: Christian Persch <chpe@gnome.org>
+Date: Sat, 19 May 2012 17:36:09 +0000
+Subject: emulation: Limit integer arguments to 65535
+
+To guard against malicious sequences containing excessively big numbers,
+limit all parsed numbers to 16 bit range. Doing this here in the parsing
+routine is a catch-all guard; this doesn't preclude enforcing
+more stringent limits in the handlers themselves.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=676090
+---
+diff --git a/src/table.c b/src/table.c
+index 140e8c8..85cf631 100644
+--- a/src/table.c
++++ b/src/table.c
+@@ -550,7 +550,7 @@ _vte_table_extract_numbers(GValueArray **array,
+ if (G_UNLIKELY (*array == NULL)) {
+ *array = g_value_array_new(1);
+ }
+- g_value_set_long(&value, total);
++ g_value_set_long(&value, CLAMP (total, 0, G_MAXUSHORT));
+ g_value_array_append(*array, &value);
+ } while (i++ < arginfo->length);
+ g_value_unset(&value);
+diff --git a/src/vteseq.c b/src/vteseq.c
+index 457c06a..46def5b 100644
+--- a/src/vteseq.c
++++ b/src/vteseq.c
+@@ -557,7 +557,7 @@ vte_sequence_handler_multiple(VteTerminal *terminal,
+ GValueArray *params,
+ VteTerminalSequenceHandler handler)
+ {
+- vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXLONG);
++ vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXUSHORT);
+ }
+
+ static void
+--
+cgit v0.9.0.2
diff --git a/x11-libs/vte/files/vte-0.30.1-alt-meta.patch b/x11-libs/vte/files/vte-0.30.1-alt-meta.patch
new file mode 100644
index 0000000..bd364be
--- /dev/null
+++ b/x11-libs/vte/files/vte-0.30.1-alt-meta.patch
@@ -0,0 +1,74 @@
+From 180dcc578e13c6096e277fb853e7162db640f207 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Tue, 15 Nov 2011 03:06:40 -0500
+Subject: [PATCH] Map both gdk's Meta and Alt to vte's Meta for >=gtk+-3.2.2
+ compatibility
+
+Also, since VTE_META_MASK is now a mask with multiple bits set, code that
+compares gdk key modifiers to VTE_META_MASK by numerical equality is no
+longer guaranteed to work. Therefore, for such comparisons a new function,
+vte_keymap_fixup_modifiers, is introduced; it ensures that if any bits
+matching matching VTE_META_MASK are set, then all are set.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=663779
+---
+ src/keymap.c | 15 +++++++++++++--
+ src/keymap.h | 2 +-
+ 2 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/src/keymap.c b/src/keymap.c
+index 9a21669..95b4c5b 100644
+--- a/src/keymap.c
++++ b/src/keymap.c
+@@ -990,6 +990,17 @@ static const struct _vte_keymap_group {
+ {GDK_KEY (F35), _vte_keymap_GDK_F35},
+ };
+
++/* Restrict modifiers to the specified mask and ensure that VTE_META_MASK,
++ * despite being a compound mask, is treated as indivisible. */
++GdkModifierType
++_vte_keymap_fixup_modifiers(GdkModifierType modifiers,
++ GdkModifierType mask)
++{
++ if (modifiers & VTE_META_MASK)
++ modifiers |= VTE_META_MASK;
++ return modifiers & mask;
++}
++
+ /* Map the specified keyval/modifier setup, dependent on the mode, to either
+ * a literal string or a capability name. */
+ void
+@@ -1104,7 +1115,7 @@ _vte_keymap_map(guint keyval,
+ } else {
+ fkey_mode = fkey_default;
+ }
+- modifiers &= (GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK | VTE_NUMLOCK_MASK);
++ modifiers = _vte_keymap_fixup_modifiers(modifiers, GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK | VTE_NUMLOCK_MASK);
+
+ /* Search for the conditions. */
+ for (i = 0; entries[i].normal_length || entries[i].special[0]; i++)
+@@ -1375,7 +1386,7 @@ _vte_keymap_key_add_key_modifiers(guint keyval,
+ return;
+ }
+
+- switch (modifiers & significant_modifiers) {
++ switch (_vte_keymap_fixup_modifiers(modifiers, significant_modifiers)) {
+ case 0:
+ modifier = 0;
+ break;
+diff --git a/src/keymap.h b/src/keymap.h
+index 243e22e..21d9b8e 100644
+--- a/src/keymap.h
++++ b/src/keymap.h
+@@ -27,7 +27,7 @@
+
+ G_BEGIN_DECLS
+
+-#define VTE_META_MASK GDK_META_MASK
++#define VTE_META_MASK (GDK_META_MASK | GDK_MOD1_MASK)
+ #define VTE_NUMLOCK_MASK GDK_MOD2_MASK
+
+ /* Map the specified keyval/modifier setup, dependent on the mode, to either
+--
+1.7.8.rc3
+
diff --git a/x11-libs/vte/metadata.xml b/x11-libs/vte/metadata.xml
new file mode 100644
index 0000000..84c40c2
--- /dev/null
+++ b/x11-libs/vte/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+<use>
+ <flag name='glade'>Provide integration with <pkg>dev-util/glade</pkg>.</flag>
+</use>
+</pkgmetadata>
diff --git a/x11-libs/vte/vte-0.28.2-r207.ebuild b/x11-libs/vte/vte-0.28.2-r207.ebuild
new file mode 100644
index 0000000..4d80f53
--- /dev/null
+++ b/x11-libs/vte/vte-0.28.2-r207.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/vte/vte-0.28.2-r207.ebuild,v 1.7 2015/07/17 15:43:48 ago Exp $
+
+EAPI="5"
+GCONF_DEBUG="no"
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils gnome2 python-r1
+
+DESCRIPTION="GNOME terminal widget"
+HOMEPAGE="https://wiki.gnome.org/Apps/Terminal/VTE"
+
+LICENSE="LGPL-2+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ia64 ~mips ~ppc ppc64 ~sh ~sparc x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~x64-solaris ~x86-solaris"
+IUSE="debug +introspection python"
+
+RDEPEND="
+ >=dev-libs/glib-2.26:2
+ >=x11-libs/gtk+-2.20:2[introspection?]
+ >=x11-libs/pango-1.22.0
+
+ sys-libs/ncurses
+ x11-libs/libX11
+ x11-libs/libXft
+
+ introspection? ( >=dev-libs/gobject-introspection-0.9.0:= )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ >=dev-util/intltool-0.35
+ virtual/pkgconfig
+ sys-devel/gettext
+"
+PDEPEND="x11-libs/gnome-pty-helper"
+
+src_prepare() {
+ DOCS="AUTHORS ChangeLog HACKING NEWS README"
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=663779
+ epatch "${FILESDIR}/${PN}-0.30.1-alt-meta.patch"
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=652290
+ epatch "${FILESDIR}"/${PN}-0.28.2-interix.patch
+
+ # Fix CVE-2012-2738, upstream bug #676090
+ epatch "${FILESDIR}"/${PN}-0.28.2-limit-arguments.patch
+
+ # Fix musl issues, bug #554416
+ epatch "${FILESDIR}"/${PN}-0.28.2-add_HAVE_ROUND.patch
+ epatch "${FILESDIR}"/${PN}-0.28.2-GNU_SOURCE-for-ptsname_r.patch
+
+ prepare_python() {
+ mkdir -p "${BUILD_DIR}" || die
+ }
+ if use python; then
+ python_foreach_impl prepare_python
+ fi
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ configure_python() {
+ ECONF_SOURCE="${S}" gnome2_src_configure --enable-python
+ }
+
+ if use python; then
+ python_foreach_impl run_in_build_dir configure_python
+ fi
+
+ local myconf=""
+
+ if [[ ${CHOST} == *-interix* ]]; then
+ myconf="${myconf} --disable-Bsymbolic"
+
+ # interix stropts.h is empty...
+ export ac_cv_header_stropts_h=no
+ fi
+
+ # Do not disable gnome-pty-helper, bug #401389
+ gnome2_src_configure --disable-python \
+ --disable-deprecation \
+ --disable-glade-catalogue \
+ --disable-static \
+ $(use_enable debug) \
+ $(use_enable introspection) \
+ --with-gtk=2.0 \
+ ${myconf}
+}
+
+src_compile() {
+ gnome2_src_compile
+
+ compile_python() {
+ cd "${BUILD_DIR}"/python || die
+ ln -s "${S}"/src/libvte.la "${BUILD_DIR}"/src/ || die
+ mkdir -p "${BUILD_DIR}"/src/.libs || die
+ ln -s "${S}"/src/.libs/libvte.so "${BUILD_DIR}"/src/.libs/ || die
+ emake CPPFLAGS="${CPPFLAGS} -I${S}/src"
+ }
+
+ if use python; then
+ python_foreach_impl run_in_build_dir compile_python
+ fi
+}
+
+src_install() {
+ gnome2_src_install
+
+ install_python() {
+ cd "${BUILD_DIR}"/python || die
+ emake install DESTDIR="${D}" \
+ CPPFLAGS="${CPPFLAGS} -I${S}/src"
+ }
+ if use python; then
+ python_foreach_impl run_in_build_dir install_python
+ fi
+
+ rm -v "${ED}usr/libexec/gnome-pty-helper" || die
+}