From: "Ian Stakenvicius" <axs@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/, media-gfx/graphite2/files/
Date: Thu, 27 Apr 2017 03:15:28 +0000 (UTC) [thread overview]
Message-ID: <1493262920.0608e06d87b35052fb08d47652a3016c4756c435.axs@gentoo> (raw)
commit: 0608e06d87b35052fb08d47652a3016c4756c435
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 27 02:26:43 2017 +0000
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Thu Apr 27 03:15:20 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0608e06d
media-gfx/graphite2: patch and revbump for security bug 616034
Applied the two patches mozilla backported to fix MFSA-2017-11 to 1.3.8-r1,
and 1.3.9-r1 as applicable.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
...hite2-1.3.8-rule-length-test-overflow-fix.patch | 22 ++++
...raphite2-1.3.9-increase-pDest-reservation.patch | 22 ++++
media-gfx/graphite2/graphite2-1.3.8-r1.ebuild | 121 +++++++++++++++++++++
media-gfx/graphite2/graphite2-1.3.9-r1.ebuild | 120 ++++++++++++++++++++
4 files changed, 285 insertions(+)
diff --git a/media-gfx/graphite2/files/graphite2-1.3.8-rule-length-test-overflow-fix.patch b/media-gfx/graphite2/files/graphite2-1.3.8-rule-length-test-overflow-fix.patch
new file mode 100644
index 00000000000..624442fbb16
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.3.8-rule-length-test-overflow-fix.patch
@@ -0,0 +1,22 @@
+From 56157cf9845d13452068c297205f96b946126cc2 Mon Sep 17 00:00:00 2001
+From: Martin Hosken <martin_hosken@sil.org>
+Date: Mon, 4 Apr 2016 16:04:16 +0700
+Subject: [PATCH] Resolve rule length test overflow
+
+---
+ src/Pass.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Pass.cpp b/src/Pass.cpp
+index 7289406..1c9c73c 100644
+--- a/src/Pass.cpp
++++ b/src/Pass.cpp
+@@ -635,7 +635,7 @@ bool Pass::testPassConstraint(Machine & m) const
+ bool Pass::testConstraint(const Rule & r, Machine & m) const
+ {
+ const uint16 curr_context = m.slotMap().context();
+- if (unsigned(r.sort - r.preContext) > m.slotMap().size() - curr_context
++ if (unsigned(r.sort + curr_context - r.preContext) > m.slotMap().size()
+ || curr_context - r.preContext < 0) return false;
+
+ vm::slotref * map = m.slotMap().begin() + curr_context - r.preContext;
diff --git a/media-gfx/graphite2/files/graphite2-1.3.9-increase-pDest-reservation.patch b/media-gfx/graphite2/files/graphite2-1.3.9-increase-pDest-reservation.patch
new file mode 100644
index 00000000000..fdd7e7ec4f0
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.3.9-increase-pDest-reservation.patch
@@ -0,0 +1,22 @@
+From 1ce331d5548b98ed8b818532b2556d6f2c7a3b83 Mon Sep 17 00:00:00 2001
+From: Martin Hosken <martin_hosken@sil.org>
+Date: Thu, 9 Mar 2017 22:04:04 +0000
+Subject: [PATCH] Ensure features have enough space. Fix from Mozilla
+
+---
+ src/FeatureMap.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/FeatureMap.cpp b/src/FeatureMap.cpp
+index b8c8405..83bd5f6 100644
+--- a/src/FeatureMap.cpp
++++ b/src/FeatureMap.cpp
+@@ -275,7 +275,7 @@ bool FeatureRef::applyValToFeature(uint32 val, Features & pDest) const
+ else
+ if (pDest.m_pMap!=&m_pFace->theSill().theFeatureMap())
+ return false; //incompatible
+- pDest.reserve(m_index);
++ pDest.reserve(m_index+1);
+ pDest[m_index] &= ~m_mask;
+ pDest[m_index] |= (uint32(val) << m_bits);
+ return true;
diff --git a/media-gfx/graphite2/graphite2-1.3.8-r1.ebuild b/media-gfx/graphite2/graphite2-1.3.8-r1.ebuild
new file mode 100644
index 00000000000..d72cda42264
--- /dev/null
+++ b/media-gfx/graphite2/graphite2-1.3.8-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+GENTOO_DEPEND_ON_PERL="no"
+inherit eutils perl-module python-any-r1 cmake-multilib
+
+DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
+HOMEPAGE="http://graphite.sil.org/"
+SRC_URI="mirror://sourceforge/silgraphite/${PN}/${P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="perl test"
+
+RDEPEND="
+ perl? ( dev-lang/perl:= )
+"
+DEPEND="${RDEPEND}
+ perl? (
+ dev-perl/Module-Build
+ dev-perl/Locale-Maketext-Lexicon
+ )
+ test? (
+ dev-libs/glib:2
+ media-libs/fontconfig
+ media-libs/silgraphite
+ $(python_gen_any_dep '
+ dev-python/fonttools[${PYTHON_USEDEP}]
+ ')
+ ${PYTHON_DEPS}
+ perl? ( virtual/perl-Test-Simple )
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.3.5-includes-libs-perl.patch"
+ "${FILESDIR}/${PN}-1.3.8-rule-length-test-overflow-fix.patch"
+ "${FILESDIR}/${PN}-1.3.9-increase-pDest-reservation.patch"
+)
+
+pkg_setup() {
+ use perl && perl_set_version
+ use test && python-any-r1_pkg_setup
+}
+
+python_check_deps() {
+ has_version "dev-python/fonttools[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # make tests optional
+ if ! use test; then
+ sed -i \
+ -e '/tests/d' \
+ CMakeLists.txt || die
+ fi
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ "-DVM_MACHINE_TYPE=direct"
+ # https://sourceforge.net/p/silgraphite/bugs/49/
+ $([[ ${CHOST} == powerpc*-apple* ]] && \
+ echo "-DGRAPHITE2_NSEGCACHE:BOOL=ON")
+ )
+
+ cmake-utils_src_configure
+
+ # fix perl linking
+ if multilib_is_native_abi && use perl; then
+ # we rely on the fact that cmake-utils_src_configure sets BUILD_DIR
+ sed -i \
+ -e "s:@BUILD_DIR@:\"${BUILD_DIR}/src\":" \
+ "${S}"/contrib/perl/Build.PL || die
+ fi
+}
+
+src_compile() {
+ cmake-multilib_src_compile
+ if use perl; then
+ cd contrib/perl || die
+ perl-module_src_configure
+ perl-module_src_compile
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi; then
+ cmake-utils_src_test
+ else
+ einfo Cannot test since python is not multilib.
+ fi
+}
+
+src_test() {
+ cmake-multilib_src_test
+ if use perl; then
+ cd contrib/perl || die
+ # SRC_TEST=do
+ # Perl tests fail due to missing POD coverage...
+ perl-module_src_test
+ fi
+}
+
+src_install() {
+ cmake-multilib_src_install
+ if use perl; then
+ cd contrib/perl || die
+ perl-module_src_install
+ perl_delete_localpod
+ fi
+
+ prune_libtool_files --all
+}
diff --git a/media-gfx/graphite2/graphite2-1.3.9-r1.ebuild b/media-gfx/graphite2/graphite2-1.3.9-r1.ebuild
new file mode 100644
index 00000000000..731a6db5070
--- /dev/null
+++ b/media-gfx/graphite2/graphite2-1.3.9-r1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+GENTOO_DEPEND_ON_PERL="no"
+inherit eutils perl-module python-any-r1 cmake-multilib
+
+DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
+HOMEPAGE="http://graphite.sil.org/"
+SRC_URI="mirror://sourceforge/silgraphite/${PN}/${P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="perl test"
+
+RDEPEND="
+ perl? ( dev-lang/perl:= )
+"
+DEPEND="${RDEPEND}
+ perl? (
+ dev-perl/Module-Build
+ dev-perl/Locale-Maketext-Lexicon
+ )
+ test? (
+ dev-libs/glib:2
+ media-libs/fontconfig
+ media-libs/silgraphite
+ $(python_gen_any_dep '
+ dev-python/fonttools[${PYTHON_USEDEP}]
+ ')
+ ${PYTHON_DEPS}
+ perl? ( virtual/perl-Test-Simple )
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.3.5-includes-libs-perl.patch"
+ "${FILESDIR}/${PN}-1.3.9-increase-pDest-reservation.patch"
+)
+
+pkg_setup() {
+ use perl && perl_set_version
+ use test && python-any-r1_pkg_setup
+}
+
+python_check_deps() {
+ has_version "dev-python/fonttools[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # make tests optional
+ if ! use test; then
+ sed -i \
+ -e '/tests/d' \
+ CMakeLists.txt || die
+ fi
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ "-DVM_MACHINE_TYPE=direct"
+ # https://sourceforge.net/p/silgraphite/bugs/49/
+ $([[ ${CHOST} == powerpc*-apple* ]] && \
+ echo "-DGRAPHITE2_NSEGCACHE:BOOL=ON")
+ )
+
+ cmake-utils_src_configure
+
+ # fix perl linking
+ if multilib_is_native_abi && use perl; then
+ # we rely on the fact that cmake-utils_src_configure sets BUILD_DIR
+ sed -i \
+ -e "s:@BUILD_DIR@:\"${BUILD_DIR}/src\":" \
+ "${S}"/contrib/perl/Build.PL || die
+ fi
+}
+
+src_compile() {
+ cmake-multilib_src_compile
+ if use perl; then
+ cd contrib/perl || die
+ perl-module_src_configure
+ perl-module_src_compile
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi; then
+ cmake-utils_src_test
+ else
+ einfo Cannot test since python is not multilib.
+ fi
+}
+
+src_test() {
+ cmake-multilib_src_test
+ if use perl; then
+ # Perl tests fail due to missing POD coverage...
+ perl_rm_files "contrib/perl/t/pod.t" "contrib/perl/t/pod-coverage.t"
+ cd contrib/perl || die
+ perl-module_src_test
+ fi
+}
+
+src_install() {
+ cmake-multilib_src_install
+ if use perl; then
+ cd contrib/perl || die
+ perl-module_src_install
+ perl_delete_localpod
+ fi
+
+ prune_libtool_files --all
+}
next reply other threads:[~2017-04-27 3:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 3:15 Ian Stakenvicius [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-10-08 12:56 [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/, media-gfx/graphite2/files/ Andreas Sturmlechner
2021-12-29 15:42 Andreas Sturmlechner
2021-12-29 15:42 Andreas Sturmlechner
2022-01-29 18:49 Sam James
2023-02-03 19:52 Sam James
2024-08-03 2:58 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1493262920.0608e06d87b35052fb08d47652a3016c4756c435.axs@gentoo \
--to=axs@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox