>From 4ccc1fadcb67a0d296bedd51a7f73d911da4680d Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Tue, 29 Dec 2015 15:13:13 +1000 Subject: [PATCH 12/12] gnu: Add ruby-ttfunk. * gnu/packages/ruby.scm (ruby-ttfunk): New variable. --- gnu/packages/ruby.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 338b0c5..b7c2345 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -3210,3 +3210,47 @@ PostScript and Portable Document Format file formats.") (home-page "https://github.com/datawraith/ascii85gem") (license license:expat))) + +(define-public ruby-ttfunk + (package + (name "ruby-ttfunk") + (version "1.4.0") + (source + (origin + (method url-fetch) + ;; fetch from github as the gem does not contain testing code + (uri (string-append + "https://github.com/prawnpdf/ttfunk/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1izq84pnm9niyvkzp8k0vl232q9zj41hwmp9na9fzycfh1pbnsl6")))) + (build-system ruby-build-system) + (arguments + `(#:test-target "spec" + #:phases + (modify-phases %standard-phases + (add-before 'check 'remove-rubocop + (lambda _ + ;; remove rubocop as a dependency as not needed for testing + (substitute* "ttfunk.gemspec" + (("spec.add_development_dependency\\('rubocop'.*") "")) + (substitute* "Rakefile" + (("require 'rubocop/rake_task'") "") + (("Rubocop::RakeTask.new") "")) + #t))))) + (native-inputs + `(("ruby-rspec" ,ruby-rspec) + ("bundler" ,bundler))) + (synopsis "Font Metrics Parser for the Prawn PDF generator") + (description + "TTFunk is a TrueType font parser written in pure ruby. It is used as +part of the Prawn PDF generator.") + (home-page "https://github.com/prawnpdf/ttfunk") + ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE + ;; for details." + (license (list license:gpl2 license:gpl3 + (license:non-copyleft + "file://src/LICENSE" + "See LICENSE in the distribution."))))) -- 2.6.3