From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: [PATCH] python-kivy and Adobe source-code-pro font Date: Wed, 10 Aug 2016 14:42:51 -0400 Message-ID: <87ziokv51w.fsf@netris.org> References: <20160805193516.18edfdd9@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXYT8-0007Ui-Bf for guix-devel@gnu.org; Wed, 10 Aug 2016 14:43:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXYT3-000283-9k for guix-devel@gnu.org; Wed, 10 Aug 2016 14:43:09 -0400 Received: from world.peace.net ([50.252.239.5]:42232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXYT3-00027z-4S for guix-devel@gnu.org; Wed, 10 Aug 2016 14:43:05 -0400 In-Reply-To: <20160805193516.18edfdd9@openmailbox.org> (Dylan Jeffers's message of "Fri, 5 Aug 2016 19:35:16 -0700") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Dylan Jeffers Cc: guix-devel@gnu.org Hi, Dylan Jeffers writes: > First patch to guix-devel; tried my best to conform to the guidelines. > Couldn't fix some "abiguous package" issues with > font-adobe-source-code-pro package. Let me know if someone finds a > solution. > > More packages to come! > Dylan > > From db8338214f57249f7f513d9b27b6f31ae6cea345 Mon Sep 17 00:00:00 2001 > From: Dylan Jeffers > Date: Fri, 5 Aug 2016 18:37:34 -0700 > Subject: [PATCH] Add python-kivy and adobe source-code-pro font > > --- This commit needs to be split up into two commits, and they need proper commit logs in accordance with our conventions. See section 8.5 (Submitting Patches) in the manual for details. I also recommend looking in the existing commit logs for examples. > gnu/packages/fonts.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ > gnu/packages/python.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 102 insertions(+) > > diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm > index 9b2281a..fa8420e 100644 > --- a/gnu/packages/fonts.scm > +++ b/gnu/packages/fonts.scm > @@ -414,6 +414,55 @@ The Liberation Fonts are sponsored by Red Hat.") > for long (8 and more hours per day) work with computers.") > (license license:silofl1.1))) > > +(define-public font-adobe-source-code-pro Please add your copyright notice at the top of files that you make non-trivial changes to. > + (package > + (name "font-adobe-source-code-pro") > + (version "2.030") > + (source (origin > + (method url-fetch) > + (uri (string-append > + "https://github.com/adobe-fonts/source-code-pro/archive/" > + version "R-ro/1.050R-it.tar.gz")) Please add a 'file-name' field to this 'origin', because otherwise the filename in the store will be -1.050R-it.tar.gz which is a bit confusing. Search for 'file-name' in gnu/packages/*.scm for examples. > + (sha256 > + (base32 > + "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54")))) > + (build-system trivial-build-system) > + (arguments > + `(#:modules ((guix build utils)) > + #:builder > + (begin > + (use-modules (guix build utils)) > + (let ((tar (string-append (assoc-ref %build-inputs > + "tar") > + "/bin/tar")) > + (PATH (string-append (assoc-ref %build-inputs > + "gzip") > + "/bin")) > + (font-dir (string-append > + %output "/share/fonts/truetype"))) > + (setenv "PATH" PATH) > + (system* tar "xvf" (assoc-ref %build-inputs "source")) > + (mkdir-p font-dir) > + (chdir (string-append "source-code-pro-" ,version > + "R-ro-1.050R-it/TTF/")) > + (for-each (lambda (ttf) > + (copy-file ttf > + (string-append font-dir "/" > + (basename ttf)))) > + (find-files "." "\\.ttf$")))))) > + (native-inputs > + `(("gzip" ,gzip) > + ("tar" ,tar))) > + (home-page "https://adobe-fonts.github.io/source-code-pro/") > + (synopsis "Source-Code-Pro fonts") > + (description > + "Source Code Pro is a set of OpenType fonts that have been designed > +to work well in user interface (UI) environments. In addition to a > +functional OpenType font, this open source project provides all of the > +source files that were used to build this OpenType font by using the > +AFDKO makeotf tool.") The question of whether AFDKO is a free software project is unclear. Even just downloading AFDKO from Adobe requires first accepting a EULA: http://www.adobe.com/devnet/opentype/afdko.html There is a github project with some code in it, but it's not clear to me whether it can be built and made functional without using non-free development tools. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762252#25 https://github.com/adobe-type-tools/afdko/issues/41 That said, this needn't be a blocker for including the built OTF files in Guix, as long as the license permits all users to copy and redistribute them for commercial and non-commercial purposes, as these fonts are considered non-functional data. See: http://www.gnu.org/distros/free-system-distribution-guidelines.html#non-functional-data > + (license license:silofl1.1))) > + > (define-public font-adobe-source-han-sans > (package > (name "font-adobe-source-han-sans") > @@ -865,3 +914,5 @@ powerline support.") > (license (license:x11-style > "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md" > "Hack Open Font License v2.0")))) > + > + Please remove this hunk of the patch. > diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm > index 470bad8..2cdc398 100644 > --- a/gnu/packages/python.scm > +++ b/gnu/packages/python.scm > @@ -88,10 +88,15 @@ > #:use-module (gnu packages tcl) > #:use-module (gnu packages bdw-gc) > #:use-module (gnu packages pcre) > + #:use-module (gnu packages gstreamer) > + #:use-module (gnu packages gl) > + #:use-module (gnu packages sdl) > + #:use-module (gnu packages video) > #:use-module (guix packages) > #:use-module (guix download) > #:use-module (guix git-download) > #:use-module (guix utils) > + #:use-module (guix build utils) Is (guix build utils) really needed here? If so, why? Also, please add your copyright notice to the job of this file. > #:use-module (guix build-system gnu) > #:use-module (guix build-system cmake) > #:use-module (guix build-system python) > @@ -9808,3 +9813,49 @@ etc.") > (package > (inherit base) > (name "ptpython2")))) > + > + > +(define-public python-kivy > + (package > + (name "python-kivy") > + (version "1.9.1") > + (source > + (origin > + (method url-fetch) > + (uri (pypi-uri "kivy" version)) > + (sha256 > + (base32 > + "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19")))) > + (build-system python-build-system) > + (arguments > + `(#:tests? #f ; tests require many more packages > + #:phases #:phases should be lined up with #:tests?. The emacs package within Guix includes a patch that fixes its Scheme mode to auto-indent this properly, or see https://www.netris.org/~mhw/scheme-indent-function.el, (or just fix it up manually). > + (modify-phases > + %standard-phases > + (add-after 'patch-generated-file-shebangs 'set-sdl-paths > + (lambda* (#:key inputs #:allow-other-keys) > + (setenv "KIVY_SDL2_PATH" > + (string-append (assoc-ref inputs "sdl-union") > + "/include/SDL2"))))))) Please add #t after the (setenv ...) call, as phase procedures are expected to return a boolean indicating whether it succeeded, whereas the return value of 'setenv' is unspecified. > + (native-inputs > + `(("pkg-config" ,pkg-config))) > + (inputs > + `( > + ("python-cython" ,python-cython) Please combine the above two lines into one line. > + ("gstreamer" ,gstreamer) > + ("mesa" ,mesa) > + ("sdl-union" > + ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))) > + (home-page "http://kivy.org") > + (synopsis > + "Open-source multitouch application framework") We avoid the term "open-source", preferring the term "free software" instead, but since all software in Guix is free, there's no need to mention this at all. So how about just "Multitouch application framework"? > + (description > + "A software library for rapid development of > +hardware-accelerated multitouch applications.") > + (license bsd-3))) > + > +(define-public python2-kivy > + (let ((base (package-with-python2 (strip-python2-variant python-kivy)))) > + (package > + (inherit base) > + (name "python2-kivy")))) Can you post an updated pair of patches, in two separate emails? Thanks! Mark