From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] gnu: Add TuxGuitar. Date: Mon, 20 Apr 2015 06:34:32 +0200 Message-ID: <874mob2zaf.fsf@mango.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yk3Pw-00013S-9z for guix-devel@gnu.org; Mon, 20 Apr 2015 00:34:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yk3Pr-00011O-No for guix-devel@gnu.org; Mon, 20 Apr 2015 00:34:44 -0400 Received: from sender1.zohomail.com ([74.201.84.162]:52846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yk3Pr-00010W-Cr for guix-devel@gnu.org; Mon, 20 Apr 2015 00:34:39 -0400 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-Add-SWT.patch >From 717af487b3f0924b39c8a19e25453f20859b62bf Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 19 Apr 2015 18:42:16 +0200 Subject: [PATCH 1/2] gnu: Add SWT. * gnu/packages/java.scm (swt): New variable. --- gnu/packages/java.scm | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 2a8cd99..a77d171 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -32,6 +32,7 @@ #:use-module (gnu packages fontutils) #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) + #:use-module (gnu packages gl) #:use-module (gnu packages gnuzilla) ;nss #:use-module (gnu packages ghostscript) ;lcms #:use-module (gnu packages gnome) @@ -47,6 +48,88 @@ #:use-module (gnu packages zip) #:use-module (gnu packages texinfo)) +(define-public swt + (package + (name "swt") + (version "4.4.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://ftp-stud.fht-esslingen.de/pub/Mirrors/" + "eclipse/eclipse/downloads/drops4/R-" version + "-201502041700/swt-" version "-gtk-linux-x86.zip")) + (sha256 + (base32 + "0lzyqr8k2zm5s8fmnrx5kxpslxfs0i73y26fwfms483x45izzwj8")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags '("-f" "make_linux.mak") + #:tests? #f ; no "check" target + #:phases + (alist-replace + 'unpack + (lambda _ + (and (mkdir "swt") + (zero? (system* "unzip" (assoc-ref %build-inputs "source") "-d" "swt")) + (chdir "swt") + (mkdir "src") + (zero? (system* "unzip" "src.zip" "-d" "src")) + (chdir "src"))) + (alist-replace + 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) + (setenv "JAVA_HOME" (assoc-ref inputs "icedtea6")) + + ;; Build shared libraries. Users of SWT have to set the system + ;; property swt.library.path to the "lib" directory of this + ;; package output. + (mkdir-p lib) + (setenv "OUTPUT_DIR" lib) + (zero? (system* "bash" "build.sh")) + + ;; build jar + (mkdir "build") + (for-each (lambda (file) + (format #t "Compiling ~s\n" file) + (system* "javac" "-d" "build" file)) + (find-files "." "\\.java")) + (zero? (system* "jar" "cvf" "swt.jar" "-C" "build" ".")))) + (alist-cons-after + 'install 'install-java-files + (lambda* (#:key outputs #:allow-other-keys) + (let ((java (string-append (assoc-ref outputs "out") + "/share/java"))) + (mkdir-p java) + (copy-file "swt.jar" (string-append java "/swt.jar"))) #t) + (alist-delete 'configure %standard-phases)))))) + (inputs + `(("xulrunner" ,icecat) + ("gtk" ,gtk+-2) + ("libxtst" ,libxtst) + ("libxt" ,libxt) + ("mesa" ,mesa) + ("glu" ,glu))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("unzip" ,unzip) + ("icedtea6" ,icedtea6 "jdk"))) + (home-page "https://www.eclipse.org/swt/") + (synopsis "Widget toolkit for Java") + (description + "SWT is a widget toolkit for Java designed to provide efficient, portable +access to the user-interface facilities of the operating systems on which it +is implemented.") + ;; SWT code is licensed under EPL1.0 + ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1 + ;; Cairo bindings contain code under MPL1.1 + ;; XULRunner 1.9 bindings contain code under MPL2.0 + (license (list + license:epl1.0 + license:mpl1.1 + license:mpl2.0 + license:lgpl2.1+)))) + (define-public ant (package (name "ant") -- 2.1.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-Add-TuxGuitar.patch >From 8893511249d828d443d1b215dbcd6669da216e63 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 19 Apr 2015 18:39:25 +0200 Subject: [PATCH 2/2] gnu: Add TuxGuitar. * gnu/packages/music.scm (tuxguitar): New variable. --- gnu/packages/music.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 0c83b0b..5795ecb 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -29,6 +29,7 @@ #:use-module (gnu packages flex) #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gnome) @@ -36,6 +37,7 @@ #:use-module (gnu packages guile) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) + #:use-module (gnu packages java) #:use-module (gnu packages linux) ; for alsa-utils #:use-module (gnu packages man) #:use-module (gnu packages mp3) @@ -221,3 +223,54 @@ features a statistics overview so you can monitor your progress across several sessions. Solfege is also designed to be extensible so you can easily write your own lessons.") (license license:gpl3+))) + +(define-public tuxguitar + (package + (name "tuxguitar") + (version "1.2") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/tuxguitar/TuxGuitar/TuxGuitar-" + version "/tuxguitar-src-" version ".tar.gz")) + (sha256 + (base32 + "1g1yf2gd06fzdhqb8kb8dmdcmr602s9y24f01kyl4940wimgr944")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + (string-append "PREFIX=" + (assoc-ref %outputs "out")) + (string-append "SWT_PATH=" + (assoc-ref %build-inputs "swt") + "/share/java/swt.jar")) + #:tests? #f ;no "check" target + #:parallel-build? #f ;not supported + #:phases + (alist-cons-before + 'build 'enter-dir-set-path-and-pass-ldflags + (lambda* (#:key inputs #:allow-other-keys) + (chdir "TuxGuitar") + (substitute* "GNUmakefile" + (("PROPERTIES\\?=") + (string-append "PROPERTIES?= -Dswt.library.path=" + (assoc-ref inputs "swt") "/lib")) + (("\\$\\(GCJ\\) -o") "$(GCJ) $(LDFLAGS) -o")) + #t) + (alist-delete 'configure %standard-phases)))) + (inputs + `(("swt" ,swt))) + (native-inputs + `(("gcj" ,gcj-4.8) + ("pkg-config" ,pkg-config))) + (home-page "http://tuxguitar.com.ar") + (synopsis "Multitrack tablature editor and player") + (description + "TuxGuitar is a guitar tablature editor with player support through midi. +It can display scores and multitrack tabs. TuxGuitar provides various +additional features, including autoscrolling while playing, note duration +management, bend/slide/vibrato/hammer-on/pull-off effects, support for +tuplets, time signature management, tempo management, gp3/gp4/gp5 import and +export.") + (license license:lgpl2.1+))) -- 2.1.0 --=-=-=--