public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/, media-gfx/graphite2/files/
@ 2017-04-27  3:15 Ian Stakenvicius
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Stakenvicius @ 2017-04-27  3:15 UTC (permalink / raw
  To: gentoo-commits

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
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/, media-gfx/graphite2/files/
@ 2017-10-08 12:56 Andreas Sturmlechner
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2017-10-08 12:56 UTC (permalink / raw
  To: gentoo-commits

commit:     13cc021ade3a4a769c1ad789fb73f351fbd45a54
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  6 23:34:48 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct  8 12:55:54 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13cc021a

media-gfx/graphite2: Drop old and de-stabilise hppa

Security stabilisation timeout.

Gentoo-bug: 621724
Package-Manager: Portage-2.3.11, Repoman-2.3.3

 media-gfx/graphite2/Manifest                       |   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      | 120 ---------------------
 4 files changed, 165 deletions(-)

diff --git a/media-gfx/graphite2/Manifest b/media-gfx/graphite2/Manifest
index 57d14930ba8..d2054c7aafc 100644
--- a/media-gfx/graphite2/Manifest
+++ b/media-gfx/graphite2/Manifest
@@ -1,2 +1 @@
 DIST graphite2-1.3.10.tgz 3889647 SHA256 90fde3b2f9ea95d68ffb19278d07d9b8a7efa5ba0e413bebcea802ce05cda1ae SHA512 d6d578feaa2d9304dc9bcd3926958070b8c23b27437a9fcb801e08e62f33a5549b7a6aa9636c7f8eb80a2a2c6d5cac97d58050fb30fd102b9fd0f8c558f4252b WHIRLPOOL 8a10ae32a7f02ad9e64982ece9b4b5169355f52160f8b9f00d1a892f785bbe14c2fdde24f5e84f6b8cbd7012edaf91b639beeeba400a3f6432b2436278a5df06
-DIST graphite2-1.3.8.tgz 3885841 SHA256 9f3f25b3a8495ce0782e77f69075c0dd9b7c054847b9bf9ff130bec38f4c8cc2 SHA512 df8a3a7b67b356092fe8d4f62b7cd6d45ee7fe2b614699b0f8b29dc2441e00675021fdaec24cef4629c5294b33d6b269d596bc869fae8257f8f2e935c9db3639 WHIRLPOOL 88420608db053bd4d66b852a54eeb19359910c786ef1785e303e68f0d0d5b840b4a5cdcb7e17ae6c2064563d02b03a7be43ae203184218a8ac4d9dd40c17c56f

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
deleted file mode 100644
index 624442fbb16..00000000000
--- a/media-gfx/graphite2/files/graphite2-1.3.8-rule-length-test-overflow-fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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
deleted file mode 100644
index fdd7e7ec4f0..00000000000
--- a/media-gfx/graphite2/files/graphite2-1.3.9-increase-pDest-reservation.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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
deleted file mode 100644
index 2c5dd10cac5..00000000000
--- a/media-gfx/graphite2/graphite2-1.3.8-r1.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# 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
-		$(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
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/, media-gfx/graphite2/files/
@ 2021-12-29 15:42 Andreas Sturmlechner
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2021-12-29 15:42 UTC (permalink / raw
  To: gentoo-commits

commit:     276052ffa3b61771cd7a07549c24148ff1659789
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 28 16:57:51 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 29 15:41:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=276052ff

media-gfx/graphite2: Add 1.3.14_p20210810 snapshot

The only relevant change is commit 5c181c316ee0399d720efe1e75be702f1ca95b66
but requires further patches to fix tests subsequently, which does involve
at least one binary patch. A snapshot is the cleaner way to to then.

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-gfx/graphite2/Manifest                       |  1 +
 ...e2-1.3.14-fix-inaccurate-slice-range-calc.patch | 34 ----------------------
 ...r2.ebuild => graphite2-1.3.14_p20210810.ebuild} |  9 +++---
 3 files changed, 5 insertions(+), 39 deletions(-)

diff --git a/media-gfx/graphite2/Manifest b/media-gfx/graphite2/Manifest
index ae90df1b9678..c8a6a1cb288e 100644
--- a/media-gfx/graphite2/Manifest
+++ b/media-gfx/graphite2/Manifest
@@ -1 +1,2 @@
 DIST graphite2-1.3.14.tgz 6630061 BLAKE2B 72bf6736aaa8476a89e44ef53c5b6c94f45d815fe1a451ba6b3696bfe023971210975dee4a9c8cb3042f36442e4efecf5baf171ef4230ad2b10694a89865f918 SHA512 14b5eb2ba8158b8b62ffa7fb142100a0af1de0f0c45b2673801b636714a106b46fcd423b05c722d963c9543fafcf10fec811975308211a54f20a3ba322d7b295
+DIST graphite2-1.3.14_p20210810.tar.gz 6656693 BLAKE2B 63a7d96b58f2779d8a4a353e1a986212b884fdf780fedcb83b22dcef2f7678d44c88c14ece2d09dc745df505a4a3825ce61d7c84bd05fd4e98c23d6e86e9326d SHA512 be54c1386578970cf65c1860336a113268181753c1e2a139e37ceeafcfa76e3162086879c54094d70cd0d36ad5852a95390aaa69572d875921e9481f1ae508ff

diff --git a/media-gfx/graphite2/files/graphite2-1.3.14-fix-inaccurate-slice-range-calc.patch b/media-gfx/graphite2/files/graphite2-1.3.14-fix-inaccurate-slice-range-calc.patch
deleted file mode 100644
index 32e01535838f..000000000000
--- a/media-gfx/graphite2/files/graphite2-1.3.14-fix-inaccurate-slice-range-calc.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 5c181c316ee0399d720efe1e75be702f1ca95b66 Mon Sep 17 00:00:00 2001
-From: Martin Hosken <martin_hosken@sil.org>
-Date: Thu, 20 May 2021 13:53:29 +0700
-Subject: [PATCH] Fix inaccurate slice range calculation for bases with
- diacritics
-
----
- src/Pass.cpp | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/src/Pass.cpp b/src/Pass.cpp
-index db31c22d..47ae2064 100644
---- a/src/Pass.cpp
-+++ b/src/Pass.cpp
-@@ -1056,12 +1056,17 @@ float Pass::resolveKern(Segment *seg, Slot *slotFix, GR_MAYBE_UNUSED Slot *start
-     ymin = min(by + bbb.bl.y, ymin);
-     for (nbor = slotFix->next(); nbor; nbor = nbor->next())
-     {
--        if (nbor->isChildOf(base))
--            continue;
-         if (!gc.check(nbor->gid()))
-             return 0.;
-         const Rect &bb = seg->theGlyphBBoxTemporary(nbor->gid());
-         SlotCollision *cNbor = seg->collisionInfo(nbor);
-+        const float nby = nbor->origin().y + cNbor->shift().y;
-+        if (nbor->isChildOf(base))
-+        {
-+            ymax = max(nby + bb.tr.y, ymax);
-+            ymin = min(nby + bb.bl.y, ymin);
-+            continue;
-+        }
-         if ((bb.bl.y == 0.f && bb.tr.y == 0.f) || (cNbor->flags() & SlotCollision::COLL_ISSPACE))
-         {
-             if (m_kernColls == InWord)

diff --git a/media-gfx/graphite2/graphite2-1.3.14-r2.ebuild b/media-gfx/graphite2/graphite2-1.3.14_p20210810.ebuild
similarity index 92%
rename from media-gfx/graphite2/graphite2-1.3.14-r2.ebuild
rename to media-gfx/graphite2/graphite2-1.3.14_p20210810.ebuild
index 5fcd5521f24a..47a0ef22b350 100644
--- a/media-gfx/graphite2/graphite2-1.3.14-r2.ebuild
+++ b/media-gfx/graphite2/graphite2-1.3.14_p20210810.ebuild
@@ -3,13 +3,15 @@
 
 EAPI=8
 
+COMMIT=80c52493ef42e6fe605a69dcddd2a691cd8a1380
 GENTOO_DEPEND_ON_PERL="no"
 PYTHON_COMPAT=( python3_{8..10} )
 inherit perl-module python-any-r1 cmake-multilib
 
 DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
 HOMEPAGE="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_home"
-SRC_URI="mirror://sourceforge/silgraphite/${PN}/${P}.tgz"
+SRC_URI="https://github.com/silnrsi/graphite/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/graphite-${COMMIT}"
 
 LICENSE="LGPL-2.1"
 SLOT="0"
@@ -36,13 +38,10 @@ BDEPEND="
 "
 
 PATCHES=(
-	# downstream:
 	"${FILESDIR}/${PN}-1.3.5-includes-libs-perl.patch"
 	"${FILESDIR}/${PN}-1.35-fix-gcc-linking.patch"
 	"${FILESDIR}/${PN}-1.3.14-fix-cmake-files-libdir.patch"
-	"${FILESDIR}/${P}-no-libtool-file.patch"
-	# git master:
-	"${FILESDIR}/${P}-fix-inaccurate-slice-range-calc.patch"
+	"${FILESDIR}/${PN}-1.3.14-no-libtool-file.patch"
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/, media-gfx/graphite2/files/
@ 2021-12-29 15:42 Andreas Sturmlechner
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2021-12-29 15:42 UTC (permalink / raw
  To: gentoo-commits

commit:     b20f577be5280947b9cfcbf0021b4a4ec715e1b6
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 28 15:43:57 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 29 15:41:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b20f577b

media-gfx/graphite2: python3_10, EAPI-8, cmake function, upstream fix

Closes: https://bugs.gentoo.org/830038
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...e2-1.3.14-fix-inaccurate-slice-range-calc.patch |  34 ++++++
 .../files/graphite2-1.3.14-no-libtool-file.patch   |  68 +++++++++++
 media-gfx/graphite2/graphite2-1.3.14-r2.ebuild     | 124 +++++++++++++++++++++
 3 files changed, 226 insertions(+)

diff --git a/media-gfx/graphite2/files/graphite2-1.3.14-fix-inaccurate-slice-range-calc.patch b/media-gfx/graphite2/files/graphite2-1.3.14-fix-inaccurate-slice-range-calc.patch
new file mode 100644
index 000000000000..32e01535838f
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.3.14-fix-inaccurate-slice-range-calc.patch
@@ -0,0 +1,34 @@
+From 5c181c316ee0399d720efe1e75be702f1ca95b66 Mon Sep 17 00:00:00 2001
+From: Martin Hosken <martin_hosken@sil.org>
+Date: Thu, 20 May 2021 13:53:29 +0700
+Subject: [PATCH] Fix inaccurate slice range calculation for bases with
+ diacritics
+
+---
+ src/Pass.cpp | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/Pass.cpp b/src/Pass.cpp
+index db31c22d..47ae2064 100644
+--- a/src/Pass.cpp
++++ b/src/Pass.cpp
+@@ -1056,12 +1056,17 @@ float Pass::resolveKern(Segment *seg, Slot *slotFix, GR_MAYBE_UNUSED Slot *start
+     ymin = min(by + bbb.bl.y, ymin);
+     for (nbor = slotFix->next(); nbor; nbor = nbor->next())
+     {
+-        if (nbor->isChildOf(base))
+-            continue;
+         if (!gc.check(nbor->gid()))
+             return 0.;
+         const Rect &bb = seg->theGlyphBBoxTemporary(nbor->gid());
+         SlotCollision *cNbor = seg->collisionInfo(nbor);
++        const float nby = nbor->origin().y + cNbor->shift().y;
++        if (nbor->isChildOf(base))
++        {
++            ymax = max(nby + bb.tr.y, ymax);
++            ymin = min(nby + bb.bl.y, ymin);
++            continue;
++        }
+         if ((bb.bl.y == 0.f && bb.tr.y == 0.f) || (cNbor->flags() & SlotCollision::COLL_ISSPACE))
+         {
+             if (m_kernColls == InWord)

diff --git a/media-gfx/graphite2/files/graphite2-1.3.14-no-libtool-file.patch b/media-gfx/graphite2/files/graphite2-1.3.14-no-libtool-file.patch
new file mode 100644
index 000000000000..2f1056be05d8
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.3.14-no-libtool-file.patch
@@ -0,0 +1,68 @@
+From https://github.com/silnrsi/graphite/pull/65
+
+From 3edb88b55c0870989778c670d555aa159a2c3abc Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 31 Aug 2020 20:56:43 +0200
+Subject: [PATCH] don't install a libtool file with static library
+
+Static library is supported since version 1.3.11 and
+https://github.com/silnrsi/graphite/commit/2f143c04da5caa43ddf4dba437b2f2bc26bf4238
+
+However, graphite2 is still installing libgraphite2.la which contains
+incorrect information (i.e. dlname set to libgraphite2.so and
+old_library set to ''):
+
+dlname='libgraphite2.so'
+
+library_names='libgraphite2.so.3.2.1 libgraphite2.so.3 libgraphite2.so'
+
+old_library=''
+
+dependency_libs=''
+
+This will result in the following build failure with any applications
+using this file such as harfbuzz:
+
+arm-linux-g++.br_real: error: /home/buildroot/autobuild/run/instance-3/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgraphite2.so: No such file or directory
+make[5]: *** [main] Error 1
+
+Instead of trying to fix this libtool file, just disable it when
+building a static library as it is not needed
+
+Fixes:
+ - http://autobuild.buildroot.org/results/9ebe1d11e80755d59190ef2aae82bbba5cc45e44
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+
+* asturm 2021-12-28: We don't want those files at all.
+
+---
+ src/CMakeLists.txt | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index b6ac26bf..a7ace040 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -131,7 +131,9 @@ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+         nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
+     endif ()
+     set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
+-    CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
++    if (0)
++        CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
++    endif()
+ endif()
+ 
+ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+@@ -146,7 +148,9 @@ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+     include(Graphite)
+     nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
+     set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
+-    CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
++    if (0)
++        CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
++    endif()
+ endif()
+ 
+ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")

diff --git a/media-gfx/graphite2/graphite2-1.3.14-r2.ebuild b/media-gfx/graphite2/graphite2-1.3.14-r2.ebuild
new file mode 100644
index 000000000000..5fcd5521f24a
--- /dev/null
+++ b/media-gfx/graphite2/graphite2-1.3.14-r2.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+GENTOO_DEPEND_ON_PERL="no"
+PYTHON_COMPAT=( python3_{8..10} )
+inherit perl-module python-any-r1 cmake-multilib
+
+DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
+HOMEPAGE="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_home"
+SRC_URI="mirror://sourceforge/silgraphite/${PN}/${P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="perl test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="perl? ( dev-lang/perl:= )"
+DEPEND="${RDEPEND}
+	test? ( dev-libs/glib:2 )
+"
+BDEPEND="
+	perl? (
+		dev-lang/perl
+		dev-perl/Locale-Maketext-Lexicon
+		dev-perl/Module-Build
+	)
+	test? (
+		${PYTHON_DEPS}
+		$(python_gen_any_dep 'dev-python/fonttools[${PYTHON_USEDEP}]')
+		media-libs/fontconfig
+		perl? ( virtual/perl-Test-Simple )
+	)
+"
+
+PATCHES=(
+	# downstream:
+	"${FILESDIR}/${PN}-1.3.5-includes-libs-perl.patch"
+	"${FILESDIR}/${PN}-1.35-fix-gcc-linking.patch"
+	"${FILESDIR}/${PN}-1.3.14-fix-cmake-files-libdir.patch"
+	"${FILESDIR}/${P}-no-libtool-file.patch"
+	# git master:
+	"${FILESDIR}/${P}-fix-inaccurate-slice-range-calc.patch"
+)
+
+pkg_setup() {
+	use perl && perl_set_version
+	use test && python-any-r1_pkg_setup
+}
+
+python_check_deps() {
+	has_version -b "dev-python/fonttools[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+	cmake_src_prepare
+	use test || cmake_comment_add_subdirectory tests
+}
+
+multilib_src_configure() {
+	local mycmakeargs=(
+		# Renamed VM_MACHINE_TYPE to GRAPHITE2_VM_TYPE
+		-DGRAPHITE2_VM_TYPE=direct
+	)
+	# https://sourceforge.net/p/silgraphite/bugs/49/
+	[[ ${CHOST} == powerpc*-apple* ]] && mycmakeargs+=(
+		-DGRAPHITE2_NSEGCACHE:BOOL=ON
+	)
+
+	if use elibc_musl ; then
+		# bug #829690
+		if use ppc || use x86 ; then
+			sed -e 's:${GRAPHITE_LINK_FLAGS}:-lssp_nonshared &:' \
+				-i "${S}"/src/CMakeLists.txt || die
+		fi
+	fi
+
+	cmake_src_configure
+
+	# fix perl linking
+	if multilib_is_native_abi && use perl; then
+		# we rely on the fact that cmake_src_configure sets BUILD_DIR
+		sed -e "s:@BUILD_DIR@:\"${BUILD_DIR}/src\":" \
+			-i "${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_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
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/, media-gfx/graphite2/files/
@ 2022-01-29 18:49 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2022-01-29 18:49 UTC (permalink / raw
  To: gentoo-commits

commit:     d63c5a3a1240352d4200582d7fd68ae3afb8a5d7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 29 18:48:37 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 29 18:49:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d63c5a3a

media-gfx/graphite2: drop -nodefaultlibs

Breaks build on at least x86/musl. See patch for details.

Closes: https://bugs.gentoo.org/829690
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/graphite2-1.3.14-fix-nodefaultlibs.patch |  45 ++++++++
 .../graphite2/graphite2-1.3.14_p20210810-r1.ebuild | 124 +++++++++++++++++++++
 2 files changed, 169 insertions(+)

diff --git a/media-gfx/graphite2/files/graphite2-1.3.14-fix-nodefaultlibs.patch b/media-gfx/graphite2/files/graphite2-1.3.14-fix-nodefaultlibs.patch
new file mode 100644
index 000000000000..a7e5804319d7
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.3.14-fix-nodefaultlibs.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/829690
+
+See https://github.com/silnrsi/graphite/pull/44.
+
+Drop -nodefaultlibs:
+- graphite is written in C++ which makes avoiding libstdc++ (or libc++) a dubious
+  goal;
+- this ends up breaking e.g. x86/musl because we need to inject -lssp_nonshared,
+  but it wouldn't be surprising if it broke other exotic targets too.
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -105,7 +105,7 @@ set_target_properties(graphite2 PROPERTIES  PUBLIC_HEADER "${GRAPHITE_HEADERS}"
+ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+     set_target_properties(graphite2 PROPERTIES
+         COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden"
+-        LINK_FLAGS      "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
++        LINK_FLAGS      "${GRAPHITE_LINK_FLAGS}"
+         LINKER_LANGUAGE C)
+     if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
+         add_definitions(-mfpmath=sse -msse2)
+@@ -135,7 +135,6 @@ endif()
+ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
+     set_target_properties(graphite2 PROPERTIES
+         COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wimplicit-fallthrough -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden"
+-        LINK_FLAGS      "-nodefaultlibs"
+         LINKER_LANGUAGE C)
+     if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
+         add_definitions(-mfpmath=sse -msse2)
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -47,12 +47,12 @@ else (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+     set_target_properties(graphite2-base PROPERTIES
+         COMPILE_FLAGS       "-Wall -Wextra -Wno-class-memaccess -fno-rtti -fno-exceptions"
+         COMPILE_DEFINITIONS "GRAPHITE2_NTRACING"
+-        LINK_FLAGS          "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
++        LINK_FLAGS          "${GRAPHITE_LINK_FLAGS}"
+         LINKER_LANGUAGE     C)
+     set_target_properties(graphite2-file PROPERTIES
+         COMPILE_FLAGS       "-Wall -Wextra  -Wno-class-memaccess -fno-rtti -fno-exceptions"
+         COMPILE_DEFINITIONS "GRAPHITE2_NTRACING${TELEMETRY}"
+-        LINK_FLAGS          "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
++        LINK_FLAGS          "${GRAPHITE_LINK_FLAGS}"
+         LINKER_LANGUAGE     C)
+ endif()
+ 

diff --git a/media-gfx/graphite2/graphite2-1.3.14_p20210810-r1.ebuild b/media-gfx/graphite2/graphite2-1.3.14_p20210810-r1.ebuild
new file mode 100644
index 000000000000..cdccddf64039
--- /dev/null
+++ b/media-gfx/graphite2/graphite2-1.3.14_p20210810-r1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+COMMIT=80c52493ef42e6fe605a69dcddd2a691cd8a1380
+GENTOO_DEPEND_ON_PERL="no"
+PYTHON_COMPAT=( python3_{8..10} )
+inherit perl-module python-any-r1 cmake-multilib
+
+DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
+HOMEPAGE="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_home"
+SRC_URI="https://github.com/silnrsi/graphite/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/graphite-${COMMIT}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="perl test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="perl? ( dev-lang/perl:= )"
+DEPEND="${RDEPEND}
+	test? ( dev-libs/glib:2 )
+"
+BDEPEND="
+	perl? (
+		dev-lang/perl
+		dev-perl/Locale-Maketext-Lexicon
+		dev-perl/Module-Build
+	)
+	test? (
+		${PYTHON_DEPS}
+		$(python_gen_any_dep 'dev-python/fonttools[${PYTHON_USEDEP}]')
+		media-libs/fontconfig
+		perl? ( virtual/perl-Test-Simple )
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-1.3.5-includes-libs-perl.patch"
+	"${FILESDIR}/${PN}-1.35-fix-gcc-linking.patch"
+	"${FILESDIR}/${PN}-1.3.14-fix-cmake-files-libdir.patch"
+	"${FILESDIR}/${PN}-1.3.14-no-libtool-file.patch"
+	"${FILESDIR}/${PN}-1.3.14-fix-nodefaultlibs.patch"
+)
+
+pkg_setup() {
+	use perl && perl_set_version
+	use test && python-any-r1_pkg_setup
+}
+
+python_check_deps() {
+	has_version -b "dev-python/fonttools[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+	cmake_src_prepare
+	use test || cmake_comment_add_subdirectory tests
+}
+
+multilib_src_configure() {
+	local mycmakeargs=(
+		# Renamed VM_MACHINE_TYPE to GRAPHITE2_VM_TYPE
+		-DGRAPHITE2_VM_TYPE=direct
+	)
+	# https://sourceforge.net/p/silgraphite/bugs/49/
+	[[ ${CHOST} == powerpc*-apple* ]] && mycmakeargs+=(
+		-DGRAPHITE2_NSEGCACHE:BOOL=ON
+	)
+
+	if use elibc_musl ; then
+		# bug #829690
+		if use ppc || use x86 ; then
+			sed -e 's:${GRAPHITE_LINK_FLAGS}:-lssp_nonshared &:' \
+				-i "${S}"/src/CMakeLists.txt || die
+		fi
+	fi
+
+	cmake_src_configure
+
+	# fix perl linking
+	if multilib_is_native_abi && use perl; then
+		# we rely on the fact that cmake_src_configure sets BUILD_DIR
+		sed -e "s:@BUILD_DIR@:\"${BUILD_DIR}/src\":" \
+			-i "${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_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
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/, media-gfx/graphite2/files/
@ 2023-02-03 19:52 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2023-02-03 19:52 UTC (permalink / raw
  To: gentoo-commits

commit:     2802d2b9bdc8e101d3ae64be74f2ab695d3bf967
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  3 19:48:44 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb  3 19:50:33 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2802d2b9

media-gfx/graphite2: include musl patches again

Closes: https://bugs.gentoo.org/890555
Thanks-to: ernsteiswuerfel <erhard_f <AT> mailbox.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/graphite2-1.3.14-fix-nodefaultlibs.patch |  26 +++++
 .../files/graphite2-1.3.5-fix-gcc-linking.patch    |  17 +++
 .../graphite2/graphite2-1.3.14_p20210810-r3.ebuild | 125 +++++++++++++++++++++
 3 files changed, 168 insertions(+)

diff --git a/media-gfx/graphite2/files/graphite2-1.3.14-fix-nodefaultlibs.patch b/media-gfx/graphite2/files/graphite2-1.3.14-fix-nodefaultlibs.patch
new file mode 100644
index 000000000000..c55f67c44f55
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.3.14-fix-nodefaultlibs.patch
@@ -0,0 +1,26 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -125,7 +125,7 @@
+                 LINK_FLAGS      "-nostdlib++ ${GRAPHITE_LINK_FLAGS}")
+         else()
+             set_target_properties(graphite2 PROPERTIES
+-                LINK_FLAGS      "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}")
++                LINK_FLAGS      "${GRAPHITE_LINK_FLAGS}")
+ 
+             if (GRAPHITE2_SANITIZERS)
+                 target_link_libraries(graphite2 c gcc_s)
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -51,9 +51,9 @@
+             LINK_FLAGS      "-nostdlib++ ${GRAPHITE_LINK_FLAGS}")
+     else()
+         set_target_properties(graphite2-base PROPERTIES
+-            LINK_FLAGS      "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}")
++            LINK_FLAGS      "${GRAPHITE_LINK_FLAGS}")
+         set_target_properties(graphite2-file PROPERTIES
+-            LINK_FLAGS      "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}")
++            LINK_FLAGS      "${GRAPHITE_LINK_FLAGS}")
+     endif()
+ 
+     set_target_properties(graphite2-base PROPERTIES
+

diff --git a/media-gfx/graphite2/files/graphite2-1.3.5-fix-gcc-linking.patch b/media-gfx/graphite2/files/graphite2-1.3.5-fix-gcc-linking.patch
new file mode 100644
index 000000000000..e4413d1f9a61
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.3.5-fix-gcc-linking.patch
@@ -0,0 +1,17 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -127,12 +127,7 @@
+             set_target_properties(graphite2 PROPERTIES
+                 LINK_FLAGS      "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}")
+ 
+-            if (GRAPHITE2_SANITIZERS)
+-                target_link_libraries(graphite2 c gcc_s)
+-            else()
+-                target_link_libraries(graphite2 c gcc)
+-            endif()
+-
++            target_link_libraries(graphite2 c gcc_s)
+             if (BUILD_SHARED_LIBS)
+                 nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
+             endif ()
+

diff --git a/media-gfx/graphite2/graphite2-1.3.14_p20210810-r3.ebuild b/media-gfx/graphite2/graphite2-1.3.14_p20210810-r3.ebuild
new file mode 100644
index 000000000000..d666eed59594
--- /dev/null
+++ b/media-gfx/graphite2/graphite2-1.3.14_p20210810-r3.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+COMMIT=80c52493ef42e6fe605a69dcddd2a691cd8a1380
+GENTOO_DEPEND_ON_PERL="no"
+PYTHON_COMPAT=( python3_{9..10} )
+inherit perl-module python-any-r1 cmake-multilib
+
+DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
+HOMEPAGE="https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_home"
+SRC_URI="https://github.com/silnrsi/graphite/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/graphite-${COMMIT}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="perl test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="perl? ( dev-lang/perl:= )"
+DEPEND="${RDEPEND}
+	test? ( dev-libs/glib:2 )
+"
+BDEPEND="
+	perl? (
+		dev-lang/perl
+		dev-perl/Locale-Maketext-Lexicon
+		dev-perl/Module-Build
+	)
+	test? (
+		${PYTHON_DEPS}
+		$(python_gen_any_dep 'dev-python/fonttools[${PYTHON_USEDEP}]')
+		media-libs/fontconfig
+		perl? ( virtual/perl-Test-Simple )
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-1.3.5-includes-libs-perl.patch"
+	"${FILESDIR}/${PN}-1.3.14-fix-cmake-files-libdir.patch"
+	"${FILESDIR}/${PN}-1.3.14-no-libtool-file.patch"
+	"${FILESDIR}/${PN}-1.3.14-fix-nodefaultlibs-deux.patch"
+        "${FILESDIR}/${PN}-1.3.14-fix-nodefaultlibs.patch"
+        "${FILESDIR}/${PN}-1.3.5-fix-gcc-linking.patch"
+)
+
+pkg_setup() {
+	use perl && perl_set_version
+	use test && python-any-r1_pkg_setup
+}
+
+python_check_deps() {
+	has_version -b "dev-python/fonttools[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+	cmake_src_prepare
+	use test || cmake_comment_add_subdirectory tests
+}
+
+multilib_src_configure() {
+	local mycmakeargs=(
+		# Renamed VM_MACHINE_TYPE to GRAPHITE2_VM_TYPE
+		-DGRAPHITE2_VM_TYPE=direct
+	)
+	# https://sourceforge.net/p/silgraphite/bugs/49/
+	[[ ${CHOST} == powerpc*-apple* ]] && mycmakeargs+=(
+		-DGRAPHITE2_NSEGCACHE:BOOL=ON
+	)
+
+	if use elibc_musl ; then
+		# bug #829690
+		if use ppc || use x86 ; then
+			sed -e 's:${GRAPHITE_LINK_FLAGS}:-lssp_nonshared &:' \
+				-i "${S}"/src/CMakeLists.txt || die
+		fi
+	fi
+
+	cmake_src_configure
+
+	# fix perl linking
+	if multilib_is_native_abi && use perl; then
+		# we rely on the fact that cmake_src_configure sets BUILD_DIR
+		sed -e "s:@BUILD_DIR@:\"${BUILD_DIR}/src\":" \
+			-i "${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_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
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/, media-gfx/graphite2/files/
@ 2024-08-03  2:58 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2024-08-03  2:58 UTC (permalink / raw
  To: gentoo-commits

commit:     3db506579f0478f32a6a3acf8036e0473e801a9f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  3 02:56:31 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug  3 02:56:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3db50657

media-gfx/graphite2: fix build w/ gcc-15

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../graphite2/files/graphite2-1.3.14-gcc15.patch   | 29 ++++++++++++++++++++++
 .../graphite2/graphite2-1.3.14_p20210810-r3.ebuild |  1 +
 2 files changed, 30 insertions(+)

diff --git a/media-gfx/graphite2/files/graphite2-1.3.14-gcc15.patch b/media-gfx/graphite2/files/graphite2-1.3.14-gcc15.patch
new file mode 100644
index 000000000000..3eaf56808666
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.3.14-gcc15.patch
@@ -0,0 +1,29 @@
+https://github.com/silnrsi/graphite/pull/91
+
+From fb5e7313802a32783cf0a3f1c28880f11e9588a5 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Fri, 2 Aug 2024 22:31:44 +0100
+Subject: [PATCH] tests/featuremap/featuremaptest.cpp: add missing <stdint.h>
+ include
+
+Without the change `graphite` build fails on upcoming `gcc-15` as:
+
+    tests/featuremap/featuremaptest.cpp:30:15: error: 'uint8_t' was not declared in this scope
+       30 |   std::vector<uint8_t> _ttf;
+          |               ^~~~~~~
+    tests/featuremap/featuremaptest.cpp:16:1: note: 'uint8_t' is defined in header '<cstdint>';
+      this is probably fixable by adding '#include <cstdint>'
+       15 | #include "inc/Face.h"
+      +++ |+#include <cstdint>
+       16 | #include "inc/FeatureMap.h"
+--- a/tests/featuremap/featuremaptest.cpp
++++ b/tests/featuremap/featuremaptest.cpp
+@@ -6,6 +6,7 @@
+ #include <iostream>
+ #include <map>
+ #include <memory>
++#include <stdint.h>
+ #include <string>
+ #include <vector>
+ 
+

diff --git a/media-gfx/graphite2/graphite2-1.3.14_p20210810-r3.ebuild b/media-gfx/graphite2/graphite2-1.3.14_p20210810-r3.ebuild
index 294ba366f782..de205065cc19 100644
--- a/media-gfx/graphite2/graphite2-1.3.14_p20210810-r3.ebuild
+++ b/media-gfx/graphite2/graphite2-1.3.14_p20210810-r3.ebuild
@@ -44,6 +44,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-1.3.14-fix-nodefaultlibs-deux.patch"
 	"${FILESDIR}/${PN}-1.3.14-fix-nodefaultlibs.patch"
 	"${FILESDIR}/${PN}-1.3.5-fix-gcc-linking.patch"
+	"${FILESDIR}/${PN}-1.3.14-gcc15.patch"
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-08-03  2:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-29 15:42 [gentoo-commits] repo/gentoo:master commit in: media-gfx/graphite2/, media-gfx/graphite2/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2024-08-03  2:58 Sam James
2023-02-03 19:52 Sam James
2022-01-29 18:49 Sam James
2021-12-29 15:42 Andreas Sturmlechner
2017-10-08 12:56 Andreas Sturmlechner
2017-04-27  3:15 Ian Stakenvicius

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox