summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2023-07-20 12:49:09 +0200
committerHans de Graaff <graaff@gentoo.org>2023-07-20 12:50:52 +0200
commitdbe7ee9152104d0f7509da990f24ebf285e456ba (patch)
treeefa0aea0ea3f975838194c58877e8317e904f368
parentdev-ruby/lockfile: enable ruby32 (diff)
downloadgentoo-dbe7ee9152104d0f7509da990f24ebf285e456ba.tar.gz
gentoo-dbe7ee9152104d0f7509da990f24ebf285e456ba.tar.bz2
gentoo-dbe7ee9152104d0f7509da990f24ebf285e456ba.zip
dev-ruby/rbpdf-font: build ttf2ufm from included src archive
Closes: https://bugs.gentoo.org/831456 Closes: https://bugs.gentoo.org/910533 Closes: https://bugs.gentoo.org/910534 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
-rw-r--r--dev-ruby/rbpdf-font/Manifest1
-rw-r--r--dev-ruby/rbpdf-font/rbpdf-font-1.19.1-r2.ebuild50
2 files changed, 51 insertions, 0 deletions
diff --git a/dev-ruby/rbpdf-font/Manifest b/dev-ruby/rbpdf-font/Manifest
index 7cc2dbe5d1a0..74e68c2b2ef4 100644
--- a/dev-ruby/rbpdf-font/Manifest
+++ b/dev-ruby/rbpdf-font/Manifest
@@ -1 +1,2 @@
DIST rbpdf-font-1.19.1.gem 9571840 BLAKE2B 6e362148514e2c4f5794e81b01bd725ffc5c89dbaec30b053979e87206a137151aabfb7a577344144cbd225ece695e49e8b43595b6e5a89eaca300d468ae96bc SHA512 e678df3b58f32f6670bd79e8ebed0856a5fdbab766c32c8667c80358f899625445e9f6829652f13b64d4c79c5af15dd3dde9849dfe86c4f14e45b8750e71e3b7
+DIST rbpdf-font-1.19.1.tar.gz 12021768 BLAKE2B edc3a9a88300bcd89c7fe30f19081cfe478897aa6aced2b94dcd55cfd4fa29ba72ce8c582579f90cc8e1d66017ea2f163a6aa9e06d50476be77b09a686900683 SHA512 a3f137f937c2a33c68c7dd9990215a64762b5bdd736dec8c3208c285719aa5bc79d2ea5687c5b224e950b95ed4772ce0ebde0d883fb3c911ad7fa442c4f18e7b
diff --git a/dev-ruby/rbpdf-font/rbpdf-font-1.19.1-r2.ebuild b/dev-ruby/rbpdf-font/rbpdf-font-1.19.1-r2.ebuild
new file mode 100644
index 000000000000..0d6e19246029
--- /dev/null
+++ b/dev-ruby/rbpdf-font/rbpdf-font-1.19.1-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# This gem bundles dejavu fonts, freefonts
+
+USE_RUBY="ruby30 ruby31 ruby32"
+
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG"
+RUBY_FAKEGEM_GEMSPEC="rbpdf-font.gemspec"
+
+inherit ruby-fakegem toolchain-funcs
+
+DESCRIPTION="Font files for the Ruby on Rails RBPDF plugin"
+HOMEPAGE="https://github.com/naitoh/rbpdf"
+SRC_URI="https://github.com/naitoh/rbpdf/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+RUBY_S="rbpdf-${PV}/rbpdf-font"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+ruby_add_bdepend ">=dev-ruby/test-unit-3:2"
+
+all_ruby_prepare() {
+ sed -i -e "/bundler/d" Rakefile || die
+ sed -i -e '2igem "test-unit", "~>3.0"' test/test_helper.rb || die
+
+ pushd lib/fonts/src || die
+ tar xf ttf2ufm-src.tar.gz || die
+ emake -C ttf2ufm-src clean
+ sed -i -e '/^CFLAGS_SYS=/ s/-O/$(CFLAGS)/' -e '/CFLAGS.*LIBS/ s/CFLAGS/LDFLAGS/' ttf2ufm-src/Makefile || die
+ popd || die
+}
+
+each_ruby_prepare() {
+ rm -rf lib/fonts/src || die
+}
+
+all_ruby_compile() {
+ emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" -C lib/fonts/src/ttf2ufm-src
+}
+
+each_ruby_install() {
+ cp "${WORKDIR}/all/${RUBY_S}/lib/fonts/src/ttf2ufm-src/ttf2pt1" lib/fonts/ttf2ufm/ttf2ufm || die
+
+ each_fakegem_install
+}