From 98e2ab304ef345178ab1caad27d6e4412d19c476 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 4 Jun 2015 10:01:11 +0200 Subject: [PATCH 6/6] gnu: Add powertabeditor. * gnu/packages/music.scm (powertabeditor): New variable. --- gnu/packages/music.scm | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 5795ecb..a35a113 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -22,9 +22,15 @@ #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) + #:use-module (guix build-system cmake) #:use-module (gnu packages) #:use-module (gnu packages audio) + #:use-module (gnu packages base) ;libbdf + #:use-module (gnu packages boost) #:use-module (gnu packages bison) + #:use-module (gnu packages code) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) #:use-module (gnu packages docbook) #:use-module (gnu packages flex) #:use-module (gnu packages fonts) @@ -45,9 +51,11 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages qt) #:use-module (gnu packages rsync) #:use-module (gnu packages texinfo) #:use-module (gnu packages texlive) + #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (gnu packages xiph) #:use-module (gnu packages zip)) @@ -224,6 +232,94 @@ sessions. Solfege is also designed to be extensible so you can easily write your own lessons.") (license license:gpl3+))) +(define-public powertabeditor + (package + (name "powertabeditor") + (version "2.0.0-alpha7") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/powertab/powertabeditor/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1yp6ck2r72c2pfq31z1kpw1j639rndrifj85l3cbj2kdf8rdzhkk")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; no "check" target + #:modules ((guix build cmake-build-system) + (guix build utils) + (ice-9 match)) + #:configure-flags + (list (string-append "-DCMAKE_INSTALL_RPATH='" + (string-join (map (match-lambda + ((name . directory) + (string-append directory "/lib"))) + %build-inputs) + ";") + "'")) + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'remove-third-party-libs + (lambda _ + (substitute* "CMakeLists.txt" + (("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") "") + ;; TODO: tests cannot be built: + ;; test/test_main.cpp:28:12: error: ‘Session’ is not a member of ‘Catch’ + (("add_subdirectory\\(test\\)") "") + (("add_subdirectory\\(external\\)") "")) + (substitute* "source/CMakeLists.txt" + (("target_link_libraries\\(powertabeditor") + (string-append "target_link_libraries(powertabeditor " + (assoc-ref %build-inputs "binutils") + "/lib/libbfd.a " + (assoc-ref %build-inputs "gcc") + "/lib/libiberty.a " + "dl"))) + (substitute* "test/CMakeLists.txt" + (("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") "") + (("target_link_libraries\\(pte_tests") + (string-append "target_link_libraries(pte_tests " + (assoc-ref %build-inputs "binutils") + "/lib/libbfd.a " + (assoc-ref %build-inputs "gcc") + "/lib/libiberty.a " + "dl"))) + (delete-file-recursively "external") + #t)) + (add-after + 'unpack 'add-install-target + (lambda _ + (substitute* "source/CMakeLists.txt" + (("qt5_use_modules") + "install(TARGETS powertabeditor RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +install(FILES data/tunings.json DESTINATION ${CMAKE_INSTALL_PREFIX}/share/powertabeditor/) +qt5_use_modules")) + #t))))) + (inputs + `(("boost" ,boost) + ("alsa-lib" ,alsa-lib) + ("qt" ,qt) + ("withershins" ,withershins) + ("gcc" ,gcc-4.8 "lib") ;for libiberty.a (for withershins) + ("binutils" ,binutils) ;for -lbfd and -liberty (for withershins) + ("timidity" ,timidity++) + ("pugixml" ,pugixml) + ("rtmidi" ,rtmidi) + ("rapidjson" ,rapidjson) + ("zlib" ,zlib))) + (native-inputs + `(("catch" ,catch-framework) + ("pkg-config" ,pkg-config))) + (home-page "http://powertabs.net") + (synopsis "Guitar tablature editor") + (description + "PTE2.0 is the successor to the famous Power Tab Editor. It is +compatible with PTE1.7 and Guitar Pro.") + (license license:gpl3+))) + (define-public tuxguitar (package (name "tuxguitar") -- 2.2.1