Browse Source

gnu: Add powertabeditor.

* gnu/packages/music.scm (powertabeditor): New variable.
Ricardo Wurmus 6 years ago
1 changed files with 98 additions and 0 deletions
  1. +98

+ 98
- 0
gnu/packages/music.scm View File

@ -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,96 @@ sessions. Solfege is also designed to be extensible so you can easily write
your own lessons.")
(license license:gpl3+)))
(define-public powertabeditor
(name "powertabeditor")
(version "2.0.0-alpha7")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(modules '((guix build utils)))
;; Remove bundled sources for external libraries
(delete-file-recursively "external")
(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* "test/CMakeLists.txt"
(("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") ""))
;; Add install target
(substitute* "source/CMakeLists.txt"
"install(TARGETS powertabeditor "
"install(FILES data/tunings.json DESTINATION "
(build-system cmake-build-system)
`(#:tests? #f ; no "check" target
#:modules ((guix build cmake-build-system)
(guix build utils)
(ice-9 match))
;; CMake appears to lose the RUNPATH for some reason, so it has to be
;; explicitly set with CMAKE_INSTALL_RPATH.
(list (string-append "-DCMAKE_INSTALL_RPATH="
(string-join (map (match-lambda
((name . directory)
(string-append directory "/lib")))
%build-inputs) ";")))
(modify-phases %standard-phases
'configure 'remove-third-party-libs
(lambda* (#:key inputs #:allow-other-keys)
;; Link with required static libraries, because we're not
;; using the bundled version of withershins.
(substitute* '("source/CMakeLists.txt"
(("target_link_libraries\\((powertabeditor)" _ target)
(string-append "target_link_libraries(" target " "
(assoc-ref inputs "binutils")
"/lib/libbfd.a "
(assoc-ref inputs "gcc")
"/lib/libiberty.a "
`(("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)))
`(("catch" ,catch-framework)
("pkg-config" ,pkg-config)))
(home-page "")
(synopsis "Guitar tablature editor")
"Power Tab Editor 2.0 is the successor to the famous original Power Tab
Editor. It is compatible with Power Tab Editor 1.7 and Guitar Pro.")
(license license:gpl3+)))
(define-public tuxguitar
(name "tuxguitar")