From 5af110868cf3460da705242370eeb652bd1c5646 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 30 Apr 2020 17:50:16 -0400 Subject: gnu: VLC: Update to 3.0.10. * gnu/packages/patches/vlc-fix-test_libvlc_slaves.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/video.scm (vlc): Update to 3.0.10. [source]: Remove obsolete patch. [arguments]: Remove obsolete workarounds for libssh and fribidi compatibility issues in 'patch-source' phase. --- gnu/local.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9426ee30a0..26d26ee215 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1519,7 +1519,6 @@ dist_patch_DATA = \ %D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \ %D%/packages/patches/virglrenderer-CVE-2017-6386.patch \ - %D%/packages/patches/vlc-fix-test_libvlc_slaves.patch \ %D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch \ %D%/packages/patches/vorbis-tools-CVE-2014-9640.patch \ %D%/packages/patches/vorbis-tools-CVE-2015-6749.patch \ -- cgit v1.2.3 From 15c6e4260b60135025029a5e2695206e798c9dd6 Mon Sep 17 00:00:00 2001 From: Jan Wielkiewicz Date: Sat, 2 May 2020 03:14:36 +0200 Subject: gnu: telephony: Move Jami and its dependencies to jami.scm. Jami is a massive package and its developers modify many libraries. Keeping them in a single file makes maintenance easier. * gnu/packages/telephony.scm (%jami-version, jami-source, pjproject-jami, libring, libringclient, jami, jami-client-gnome): Move to ... * gnu/packages/jami.scm: ... this new file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Mathieu Othacehe --- gnu/local.mk | 2 + gnu/packages/jami.scm | 352 +++++++++++++++++++++++++++++++++++++++++++++ gnu/packages/telephony.scm | 291 ------------------------------------- 3 files changed, 354 insertions(+), 291 deletions(-) create mode 100644 gnu/packages/jami.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 26d26ee215..812253b192 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -33,6 +33,7 @@ # Copyright © 2020 Michael Rohleder # Copyright © 2020 Felix Gruber # Copyright © 2020 Ryan Prior +# Copyright © 2020 Jan Wielkiewicz # # This file is part of GNU Guix. # @@ -278,6 +279,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/ipfs.scm \ %D%/packages/irc.scm \ %D%/packages/iso-codes.scm \ + %D%/packages/jami.scm \ %D%/packages/java.scm \ %D%/packages/java-compression.scm \ %D%/packages/java-graphics.scm \ diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm new file mode 100644 index 0000000000..050f8cf9f6 --- /dev/null +++ b/gnu/packages/jami.scm @@ -0,0 +1,352 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Pierre Neidhardt +;;; Copyright © 2020 Vincent Legoll +;;; Copyright © 2019, 2020 Jan Wielkiewicz +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages jami) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages aidc) + #:use-module (gnu packages audio) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (gnu packages boost) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages crypto) + #:use-module (gnu packages documentation) + #:use-module (gnu packages gettext) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gtk) + #:use-module (gnu packages libcanberra) + #:use-module (gnu packages linux) + #:use-module (gnu packages multiprecision) + #:use-module (gnu packages networking) + #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages python) + #:use-module (gnu packages qt) + #:use-module (gnu packages serialization) + #:use-module (gnu packages sqlite) + #:use-module (gnu packages telephony) + #:use-module (gnu packages tls) + #:use-module (gnu packages upnp) + #:use-module (gnu packages video) + #:use-module (gnu packages webkit) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xorg) + #:use-module (gnu packages) + #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix utils)) + +(define %jami-version "20191101.3.67671e7") + +(define* (jami-source #:key without-daemon) + (origin + (method url-fetch) + (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_" + %jami-version + ".tar.gz")) + (modules '((guix build utils))) + (snippet + (if without-daemon + '(begin + (delete-file-recursively "daemon/contrib")) + #f)) + (sha256 + (base32 + "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0")))) + +(define-public pjproject-jami + (package + (inherit pjproject) + (name "pjproject-jami") + (native-inputs + `(("savoir-faire-linux-patches" ,(jami-source)) + ,@(package-native-inputs pjproject))) + (arguments + `(#:tests? #f + ;; See ring-project/daemon/contrib/src/pjproject/rules.mak. + #:configure-flags + (list "--disable-oss" + "--disable-sound" + "--disable-video" + "--enable-ext-sound" + "--disable-speex-aec" + "--disable-g711-codec" + "--disable-l16-codec" + "--disable-gsm-codec" + "--disable-g722-codec" + "--disable-g7221-codec" + "--disable-speex-codec" + "--disable-ilbc-codec" + "--disable-opencore-amr" + "--disable-silk" + "--disable-sdl" + "--disable-ffmpeg" + "--disable-v4l2" + "--disable-openh264" + "--disable-resample" + "--disable-libwebrtc" + "--with-gnutls" + "--with-external-srtp" + ;; We need -fPIC or else we get the following error when linking + ;; against pjproject-jami: + ;; relocation R_X86_64_32S against `.rodata' can not be used when + ;; making a shared object; + "CFLAGS=-fPIC" + "CXXFLAGS=-fPIC") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'make-git-checkout-writable + (lambda _ + (for-each make-file-writable (find-files ".")) + #t)) + (add-after 'unpack 'apply-patches + (lambda* (#:key inputs #:allow-other-keys) + (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches") + ;; Comes from + ;; "ring-project/daemon/contrib/src/pjproject/rules.mak". + ;; WARNING: These amount for huge changes in pjproject. + (savoir-faire-linux-patches + '("fix_turn_alloc_failure" + "rfc2466" + "ipv6" + "multiple_listeners" + "pj_ice_sess" + "fix_turn_fallback" + "fix_ioqueue_ipv6_sendto" + "add_dtls_transport" + "rfc6544" + "ice_config" + "sip_config" + "fix_first_packet_turn_tcp" + "fix_ebusy_turn" + "ignore_ipv6_on_transport_check" + "fix_turn_connection_failure" + ;; "uwp_vs" ; for windows + "disable_local_resolution"))) + (mkdir-p savoir-faire-linux-patches-directory) + (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches") + "-C" savoir-faire-linux-patches-directory + "--strip-components=5" + "ring-project/daemon/contrib/src/pjproject") + (for-each + (lambda (file) + (invoke "patch" "--force" "-p1" "-i" + (string-append savoir-faire-linux-patches-directory "/" + file ".patch"))) + savoir-faire-linux-patches)) + #t)) + ;; TODO: We could use substitute-keyword-arguments instead of + ;; repeating the phases from pjproject, but somehow it does + ;; not work. + (add-before 'build 'build-dep + (lambda _ (invoke "make" "dep"))) + (add-before 'patch-source-shebangs 'autoconf + (lambda _ + (invoke "autoconf" "-v" "-f" "-i" "-o" + "aconfigure" "aconfigure.ac"))) + (add-before 'autoconf 'disable-some-tests + ;; Three of the six test programs fail due to missing network + ;; access. + (lambda _ + (substitute* "Makefile" + (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test") + "selftest: pjlib-test pjlib-util-test pjmedia-test")) + #t))))))) + +(define-public libring + (package + (name "libring") + (version %jami-version) + (source (jami-source #:without-daemon #t)) + (build-system gnu-build-system) + (inputs + ;; Missing (optional?) dep: libnatpmp. + `(("alsa-lib" ,alsa-lib) + ("boost" ,boost) + ("dbus-c++" ,dbus-c++) + ("eudev" ,eudev) + ("ffmpeg" ,ffmpeg) + ("flac" ,flac) + ("gmp" ,gmp) + ("gsm" ,gsm) + ("jack" ,jack-1) + ("jsoncpp" ,jsoncpp) + ("libogg" ,libogg) + ("libva" ,libva) + ("opendht" ,opendht) + ("opus" ,opus) + ("pcre" ,pcre) + ("pulseaudio" ,pulseaudio) + ("libsamplerate" ,libsamplerate) + ("libsndfile" ,libsndfile) + ("speex" ,speex) + ("speexdsp" ,speexdsp) + ("libupnp" ,libupnp) + ("libvorbis" ,libvorbis) + ("libx264" ,libx264) + ("libvdpau" ,libvdpau) + ("yaml-cpp" ,yaml-cpp) + ("zlib" ,zlib) + ("openssl" ,openssl) + ("libsecp256k1" ,libsecp256k1) + ("python" ,python) + ("python-wrapper" ,python-wrapper) + ("restinio" ,restinio) + ("libx11" ,libx11) + ("asio" ,asio) + ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version. + ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24. + ("pjproject" ,pjproject-jami))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config) + ("which" ,which) + ("cppunit" ,cppunit) + ("perl" ,perl))) ; Needed for documentation. + (arguments + `(#:tests? #f ; The tests fail to compile due to missing headers. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ + (chdir "daemon") + #t)) + (add-before 'build 'add-lib-dir + (lambda _ + (mkdir-p "src/lib") + #t))))) + (synopsis "Distributed multimedia communications platform") + (description "Jami (formerly GNU Ring) is a secure and distributed voice, +video and chat communication platform that requires no centralized server and +leaves the power of privacy in the hands of the user. It supports the SIP and +IAX protocols, as well as decentralized calling using P2P-DHT. + +This package provides a library and daemon implementing the Jami core +functionality.") + (home-page "https://jami.net/") + (license license:gpl3+))) + +(define-public libringclient + (package + (inherit libring) + (name "libringclient") + (build-system cmake-build-system) + (propagated-inputs + `(("libring" ,libring) ; For 'dring'. + ("qtbase" ,qtbase) ; Qt is included in several installed headers. + ("qttools" ,qttools))) + (arguments + `(#:tests? #f ; There is no testsuite. + #:configure-flags + (list (string-append "-DRING_BUILD_DIR=" + (assoc-ref %build-inputs "libring") "/include")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ + (chdir "lrc") + #t)) + (add-before 'configure 'fix-dbus-interfaces-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix) + (string-append (assoc-ref inputs "libring") + dbus-interfaces-path-suffix)))))))) + (synopsis "Distributed multimedia communications platform") + (description "Jami (formerly GNU Ring) is a secure and distributed voice, +video and chat communication platform that requires no centralized server and +leaves the power of privacy in the hands of the user. It supports the SIP and +IAX protocols, as well as decentralized calling using P2P-DHT. + +This package provides a library common to all Jami clients.") + (home-page "https://jami.net") + (license license:gpl3+))) + +(define-public jami + (package + (inherit libring) + (name "jami") + (build-system cmake-build-system) + (inputs + `(("libringclient" ,libringclient) + ("gtk+" ,gtk+) + ("qrencode" ,qrencode) + ("libnotify" ,libnotify) + ("clutter" ,clutter) + ("clutter-gtk" ,clutter-gtk) + ("gettext" ,gnu-gettext) + ("libcanberra" ,libcanberra) + ("webkitgtk" ,webkitgtk) + ;; TODO: We must wrap ring-client-gnome to force using the + ;; `sqlite-with-column-metadata' package instead of `sqlite' or else it + ;; fails with: + ;; + ;; /gnu/store/...-qtbase-5.11.2/lib/qt5/plugins/sqldrivers/libqsqlite.so: + ;; undefined symbol: sqlite3_column_table_name16 + ;; + ;; qtbase is built against sqlite-with-column-metadata but somehow + ;; jami-client-gnome ends up with both `sqlite' and + ;; `sqlite-with-column-metadata' as inputs and it seems that + ;; libqsqlite.so gets confused. + ("sqlite" ,sqlite-with-column-metadata))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("glib:bin" ,glib "bin") + ("doxygen" ,doxygen))) + (propagated-inputs + `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus. + ("adwaita-icon-theme" ,adwaita-icon-theme) + ("evolution-data-server" ,evolution-data-server))) + (arguments + `(#:tests? #f ; There is no testsuite. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ + (chdir "client-gnome") + #t)) + (add-after 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (path (string-append (assoc-ref inputs "sqlite") "/lib"))) + (wrap-program (string-append out "/bin/jami-gnome") + `("LD_LIBRARY_PATH" ":" prefix (,path)))) + #t))))) + (synopsis "Distributed, privacy-respecting communication program") + (description "Jami (formerly GNU Ring) is a secure and distributed voice, +video and chat communication platform that requires no centralized server and +leaves the power of privacy in the hands of the user. It supports the SIP and +IAX protocols, as well as decentralized calling using P2P-DHT. + +This package provides the Jami client for the GNOME desktop.") + (home-page "https://jami.net") + (license license:gpl3+))) + +(define-public jami-client-gnome + (deprecated-package "jami-client-gnome" jami)) diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index 7b20954120..747b0d75a1 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -734,297 +734,6 @@ calls and messages") Initiation Protocol (SIP) and a multimedia framework.") (license license:gpl2+))) -(define %jami-version "20191101.3.67671e7") - -(define* (jami-source #:key without-daemon) - (origin - (method url-fetch) - (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_" - %jami-version - ".tar.gz")) - (modules '((guix build utils))) - (snippet - (if without-daemon - '(begin - (delete-file-recursively "daemon/contrib")) - #f)) - (sha256 - (base32 - "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0")))) - -(define-public pjproject-jami - (package - (inherit pjproject) - (name "pjproject-jami") - (native-inputs - `(("savoir-faire-linux-patches" ,(jami-source)) - ,@(package-native-inputs pjproject))) - (arguments - `(#:tests? #f - ;; See ring-project/daemon/contrib/src/pjproject/rules.mak. - #:configure-flags - (list "--disable-oss" - "--disable-sound" - "--disable-video" - "--enable-ext-sound" - "--disable-speex-aec" - "--disable-g711-codec" - "--disable-l16-codec" - "--disable-gsm-codec" - "--disable-g722-codec" - "--disable-g7221-codec" - "--disable-speex-codec" - "--disable-ilbc-codec" - "--disable-opencore-amr" - "--disable-silk" - "--disable-sdl" - "--disable-ffmpeg" - "--disable-v4l2" - "--disable-openh264" - "--disable-resample" - "--disable-libwebrtc" - "--with-gnutls" - "--with-external-srtp" - ;; We need -fPIC or else we get the following error when linking - ;; against pjproject-jami: - ;; relocation R_X86_64_32S against `.rodata' can not be used when - ;; making a shared object; - "CFLAGS=-fPIC" - "CXXFLAGS=-fPIC") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'make-git-checkout-writable - (lambda _ - (for-each make-file-writable (find-files ".")) - #t)) - (add-after 'unpack 'apply-patches - (lambda* (#:key inputs #:allow-other-keys) - (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches") - ;; Comes from - ;; "ring-project/daemon/contrib/src/pjproject/rules.mak". - ;; WARNING: These amount for huge changes in pjproject. - (savoir-faire-linux-patches - '("fix_turn_alloc_failure" - "rfc2466" - "ipv6" - "multiple_listeners" - "pj_ice_sess" - "fix_turn_fallback" - "fix_ioqueue_ipv6_sendto" - "add_dtls_transport" - "rfc6544" - "ice_config" - "sip_config" - "fix_first_packet_turn_tcp" - "fix_ebusy_turn" - "ignore_ipv6_on_transport_check" - "fix_turn_connection_failure" - ;; "uwp_vs" ; for windows - "disable_local_resolution"))) - (mkdir-p savoir-faire-linux-patches-directory) - (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches") - "-C" savoir-faire-linux-patches-directory - "--strip-components=5" - "ring-project/daemon/contrib/src/pjproject") - (for-each - (lambda (file) - (invoke "patch" "--force" "-p1" "-i" - (string-append savoir-faire-linux-patches-directory "/" - file ".patch"))) - savoir-faire-linux-patches)) - #t)) - ;; TODO: We could use substitute-keyword-arguments instead of - ;; repeating the phases from pjproject, but somehow it does - ;; not work. - (add-before 'build 'build-dep - (lambda _ (invoke "make" "dep"))) - (add-before 'patch-source-shebangs 'autoconf - (lambda _ - (invoke "autoconf" "-v" "-f" "-i" "-o" - "aconfigure" "aconfigure.ac"))) - (add-before 'autoconf 'disable-some-tests - ;; Three of the six test programs fail due to missing network - ;; access. - (lambda _ - (substitute* "Makefile" - (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test") - "selftest: pjlib-test pjlib-util-test pjmedia-test")) - #t))))))) - -(define-public libring - (package - (name "libring") - (version %jami-version) - (source (jami-source #:without-daemon #t)) - (build-system gnu-build-system) - (inputs - ;; Missing (optional?) dep: libnatpmp. - `(("alsa-lib" ,alsa-lib) - ("boost" ,boost) - ("dbus-c++" ,dbus-c++) - ("eudev" ,eudev) - ("ffmpeg" ,ffmpeg) - ("flac" ,flac) - ("gmp" ,gmp) - ("gsm" ,gsm) - ("jack" ,jack-1) - ("jsoncpp" ,jsoncpp) - ("libogg" ,libogg) - ("libva" ,libva) - ("opendht" ,opendht) - ("opus" ,opus) - ("pcre" ,pcre) - ("pulseaudio" ,pulseaudio) - ("libsamplerate" ,libsamplerate) - ("libsndfile" ,libsndfile) - ("speex" ,speex) - ("speexdsp" ,speexdsp) - ("libupnp" ,libupnp) - ("libvorbis" ,libvorbis) - ("libx264" ,libx264) - ("libvdpau" ,libvdpau) - ("yaml-cpp" ,yaml-cpp) - ("zlib" ,zlib) - ("openssl" ,openssl) - ("libsecp256k1" ,libsecp256k1) - ("python" ,python) - ("python-wrapper" ,python-wrapper) - ("restinio" ,restinio) - ("libx11" ,libx11) - ("asio" ,asio) - ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version. - ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24. - ("pjproject" ,pjproject-jami))) - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("libtool" ,libtool) - ("pkg-config" ,pkg-config) - ("which" ,which) - ("cppunit" ,cppunit) - ("perl" ,perl))) ; Needed for documentation. - (arguments - `(#:tests? #f ; The tests fail to compile due to missing headers. - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'change-directory - (lambda _ - (chdir "daemon") - #t)) - (add-before 'build 'add-lib-dir - (lambda _ - (mkdir-p "src/lib") - #t))))) - (synopsis "Distributed multimedia communications platform") - (description "Jami (formerly GNU Ring) is a secure and distributed voice, -video and chat communication platform that requires no centralized server and -leaves the power of privacy in the hands of the user. It supports the SIP and -IAX protocols, as well as decentralized calling using P2P-DHT. - -This package provides a library and daemon implementing the Jami core -functionality.") - (home-page "https://jami.net/") - (license license:gpl3+))) - -(define-public libringclient - (package - (inherit libring) - (name "libringclient") - (build-system cmake-build-system) - (propagated-inputs - `(("libring" ,libring) ; For 'dring'. - ("qtbase" ,qtbase) ; Qt is included in several installed headers. - ("qttools" ,qttools))) - (arguments - `(#:tests? #f ; There is no testsuite. - #:configure-flags - (list (string-append "-DRING_BUILD_DIR=" - (assoc-ref %build-inputs "libring") "/include")) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'change-directory - (lambda _ - (chdir "lrc") - #t)) - (add-before 'configure 'fix-dbus-interfaces-path - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "CMakeLists.txt" - (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix) - (string-append (assoc-ref inputs "libring") - dbus-interfaces-path-suffix)))))))) - (synopsis "Distributed multimedia communications platform") - (description "Jami (formerly GNU Ring) is a secure and distributed voice, -video and chat communication platform that requires no centralized server and -leaves the power of privacy in the hands of the user. It supports the SIP and -IAX protocols, as well as decentralized calling using P2P-DHT. - -This package provides a library common to all Jami clients.") - (home-page "https://jami.net") - (license license:gpl3+))) - -(define-public jami - (package - (inherit libring) - (name "jami") - (build-system cmake-build-system) - (inputs - `(("libringclient" ,libringclient) - ("gtk+" ,gtk+) - ("qrencode" ,qrencode) - ("libnotify" ,libnotify) - ("clutter" ,clutter) - ("clutter-gtk" ,clutter-gtk) - ("libcanberra" ,libcanberra) - ("webkitgtk" ,webkitgtk) - ;; TODO: We must wrap ring-client-gnome to force using the - ;; `sqlite-with-column-metadata' package instead of `sqlite' or else it - ;; fails with: - ;; - ;; /gnu/store/...-qtbase-5.11.2/lib/qt5/plugins/sqldrivers/libqsqlite.so: - ;; undefined symbol: sqlite3_column_table_name16 - ;; - ;; qtbase is built against sqlite-with-column-metadata but somehow - ;; jami-client-gnome ends up with both `sqlite' and - ;; `sqlite-with-column-metadata' as inputs and it seems that - ;; libqsqlite.so gets confused. - ("sqlite" ,sqlite-with-column-metadata))) - (native-inputs - `(("pkg-config" ,pkg-config) - ("gettext" ,gettext-minimal) - ("glib:bin" ,glib "bin") - ("doxygen" ,doxygen))) - (propagated-inputs - `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus. - ("adwaita-icon-theme" ,adwaita-icon-theme) - ("evolution-data-server" ,evolution-data-server))) - (arguments - `(#:tests? #f ; There is no testsuite. - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'change-directory - (lambda _ - (chdir "client-gnome") - #t)) - (add-after 'install 'wrap - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (path (string-append (assoc-ref inputs "sqlite") "/lib"))) - (wrap-program (string-append out "/bin/jami-gnome") - `("LD_LIBRARY_PATH" ":" prefix (,path)))) - #t))))) - (synopsis "Distributed, privacy-respecting communication program") - (description "Jami (formerly GNU Ring) is a secure and distributed voice, -video and chat communication platform that requires no centralized server and -leaves the power of privacy in the hands of the user. It supports the SIP and -IAX protocols, as well as decentralized calling using P2P-DHT. - -This package provides the Jami client for the GNOME desktop.") - (home-page "https://jami.net") - (license license:gpl3+))) - -(define-public jami-client-gnome - (deprecated-package "jami-client-gnome" jami)) - (define-public libtgvoip (package (name "libtgvoip") -- cgit v1.2.3 From 39f1806ca1d04b9aee70e897e06466aadbbee152 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Thu, 9 Apr 2020 15:56:42 +0200 Subject: gnu: Add warsow-qfusion. * gnu/local.mk (warsow-qfusion): New variable. --- gnu/local.mk | 1 + gnu/packages/game-development.scm | 78 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 812253b192..461102ebdd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1527,6 +1527,7 @@ dist_patch_DATA = \ %D%/packages/patches/vsearch-unbundle-cityhash.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ + %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ %D%/packages/patches/weasyprint-library-paths.patch \ %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index d4b2fdcab2..d2df5d864a 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -38,6 +38,7 @@ (define-module (gnu packages game-development) #:use-module (srfi srfi-1) + #:use-module (ice-9 match) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) @@ -2225,3 +2226,80 @@ rigid body physics library written in C.") developers providing an advanced true color console, input, and lots of other utilities frequently used in roguelikes.") (license license:bsd-3))) + +(define-public warsow-qfusion + ;; As of 2020-04-09, the latest stable version 2.1.0 is deprecated. + ;; The 2.5 beta as published on the homepage is commit + ;; c4de15df559410aff0ca6643724e24cddb0ecbbd + (let ((commit "c4de15df559410aff0ca6643724e24cddb0ecbbd") + (arch (match (or (%current-target-system) + (%current-system)) + ("x86_64-linux" "x86_64") + ("i686-linux" "i386") + (_ "")))) + (package + (name "warsow-qfusion") + (version (git-version "2.5" "1" commit)) ; 2.5-beta + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Warsow/qfusion/") + (commit commit) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0xv2yycr43p3xmq7lm6j6zb3cpcr6w00x7qg918faq0mw9j7v48g")) + ;; Issue reported here: https://github.com/Warsow/qfusion/issues/46 + (patches (search-patches "warsow-qfusion-fix-bool-return-type.patch")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; No tests. + #:configure-flags '("-DQFUSION_GAME=Warsow") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'change-to-build-dir + (lambda _ + (chdir "source") + #t)) + (add-after 'install 'really-install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (install-file (string-append "../source/build/basewsw/libgame_" + ,arch ".so") + (string-append out "/lib/")) + (install-file (string-append "../source/build/libui_" ,arch ".so") + (string-append out "/lib/")) + (for-each + (lambda (file) + (install-file file (string-append out "/bin/"))) + (append (find-files "../source/build" "warsow") + (find-files "../source/build" "wsw_server.")))) + #t))))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("curl" ,curl) + ("freetype" ,freetype) + ("ffmpeg" ,ffmpeg) + ("libjpeg" ,libjpeg) + ("libogg" ,libogg) + ("libpng" ,libpng) + ("libtheora" ,libtheora) + ("libvorbis" ,libvorbis) + ("mesa" ,mesa) + ("openal" ,openal) + ("pulseaudio" ,pulseaudio) + ("qtbase" ,qtbase) + ("qtdeclarative" ,qtdeclarative) + ("sdl2" ,sdl2) + ("uuid.h" ,util-linux) + ("zlib" ,zlib))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "https://github.com/Warsow/qfusion") + (synopsis "Warsow's fork of qfusion, the id Tech 2 derived game engine") + (supported-systems '("i686-linux" "x86_64-linux")) + (description + "This package contains Warsow's fork of qfusion, the id Tech 2 derived +game engine. id Tech 2 is the engine originally behind Quake 2.") + (license license:gpl2+)))) -- cgit v1.2.3 From 2515968f4985b7b72f3152c2d3265bcd8900a182 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 2 May 2020 16:44:55 +0200 Subject: Revert "gnu: Add warsow-qfusion." 'warsow-qfusion-fix-bool-return-type.patch' is missing. This reverts commit 39f1806ca1d04b9aee70e897e06466aadbbee152. --- gnu/local.mk | 1 - gnu/packages/game-development.scm | 78 --------------------------------------- 2 files changed, 79 deletions(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 461102ebdd..812253b192 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1527,7 +1527,6 @@ dist_patch_DATA = \ %D%/packages/patches/vsearch-unbundle-cityhash.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ - %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ %D%/packages/patches/weasyprint-library-paths.patch \ %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index d2df5d864a..d4b2fdcab2 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -38,7 +38,6 @@ (define-module (gnu packages game-development) #:use-module (srfi srfi-1) - #:use-module (ice-9 match) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) @@ -2226,80 +2225,3 @@ rigid body physics library written in C.") developers providing an advanced true color console, input, and lots of other utilities frequently used in roguelikes.") (license license:bsd-3))) - -(define-public warsow-qfusion - ;; As of 2020-04-09, the latest stable version 2.1.0 is deprecated. - ;; The 2.5 beta as published on the homepage is commit - ;; c4de15df559410aff0ca6643724e24cddb0ecbbd - (let ((commit "c4de15df559410aff0ca6643724e24cddb0ecbbd") - (arch (match (or (%current-target-system) - (%current-system)) - ("x86_64-linux" "x86_64") - ("i686-linux" "i386") - (_ "")))) - (package - (name "warsow-qfusion") - (version (git-version "2.5" "1" commit)) ; 2.5-beta - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/Warsow/qfusion/") - (commit commit) - (recursive? #t))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0xv2yycr43p3xmq7lm6j6zb3cpcr6w00x7qg918faq0mw9j7v48g")) - ;; Issue reported here: https://github.com/Warsow/qfusion/issues/46 - (patches (search-patches "warsow-qfusion-fix-bool-return-type.patch")))) - (build-system cmake-build-system) - (arguments - `(#:tests? #f ; No tests. - #:configure-flags '("-DQFUSION_GAME=Warsow") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'change-to-build-dir - (lambda _ - (chdir "source") - #t)) - (add-after 'install 'really-install - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (install-file (string-append "../source/build/basewsw/libgame_" - ,arch ".so") - (string-append out "/lib/")) - (install-file (string-append "../source/build/libui_" ,arch ".so") - (string-append out "/lib/")) - (for-each - (lambda (file) - (install-file file (string-append out "/bin/"))) - (append (find-files "../source/build" "warsow") - (find-files "../source/build" "wsw_server.")))) - #t))))) - (inputs - `(("alsa-lib" ,alsa-lib) - ("curl" ,curl) - ("freetype" ,freetype) - ("ffmpeg" ,ffmpeg) - ("libjpeg" ,libjpeg) - ("libogg" ,libogg) - ("libpng" ,libpng) - ("libtheora" ,libtheora) - ("libvorbis" ,libvorbis) - ("mesa" ,mesa) - ("openal" ,openal) - ("pulseaudio" ,pulseaudio) - ("qtbase" ,qtbase) - ("qtdeclarative" ,qtdeclarative) - ("sdl2" ,sdl2) - ("uuid.h" ,util-linux) - ("zlib" ,zlib))) - (native-inputs - `(("pkg-config" ,pkg-config))) - (home-page "https://github.com/Warsow/qfusion") - (synopsis "Warsow's fork of qfusion, the id Tech 2 derived game engine") - (supported-systems '("i686-linux" "x86_64-linux")) - (description - "This package contains Warsow's fork of qfusion, the id Tech 2 derived -game engine. id Tech 2 is the engine originally behind Quake 2.") - (license license:gpl2+)))) -- cgit v1.2.3 From b1cb8b5d83dc92734840e9243d084c1c2a604321 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Mon, 20 Apr 2020 23:56:13 +0200 Subject: gnu: llvm-for-extempore: Update to 3.8. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/llvm.scm (llvm-for-extempore): Update to 3.8. [source]: Use upstream patched source. * gnu/packages/patches/llvm-for-extempore.patch: Delete due to source being already patched. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 - gnu/packages/llvm.scm | 11 ++- gnu/packages/patches/llvm-for-extempore.patch | 118 -------------------------- 3 files changed, 8 insertions(+), 122 deletions(-) delete mode 100644 gnu/packages/patches/llvm-for-extempore.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 812253b192..3c6c98a284 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1184,7 +1184,6 @@ dist_patch_DATA = \ %D%/packages/patches/lirc-localstatedir.patch \ %D%/packages/patches/lirc-reproducible-build.patch \ %D%/packages/patches/llvm-3.5-fix-clang-build-with-gcc5.patch \ - %D%/packages/patches/llvm-for-extempore.patch \ %D%/packages/patches/lm-sensors-hwmon-attrs.patch \ %D%/packages/patches/lrcalc-includes.patch \ %D%/packages/patches/lrzip-CVE-2017-8842.patch \ diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index d6c519bcbd..33d863ae11 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2019 Arm Ltd ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2020 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -627,12 +628,16 @@ output), and Binutils.") #:patches '("clang-3.5-libc-search-path.patch"))) (define-public llvm-for-extempore - (package (inherit llvm-3.7) + (package (inherit llvm-3.8) (name "llvm-for-extempore") (source (origin - (inherit (package-source llvm-3.7)) - (patches (list (search-patch "llvm-for-extempore.patch"))))) + (method url-fetch) + (uri (string-append "http://extempore.moso.com.au/extras/" + "llvm-3.8.0.src-patched-for-extempore.tar.xz")) + (sha256 + (base32 + "1svdl6fxn8l01ni8mpm0bd5h856ahv3h9sdzgmymr6fayckjvqzs")))) ;; Extempore refuses to build on architectures other than x86_64 (supported-systems '("x86_64-linux")))) diff --git a/gnu/packages/patches/llvm-for-extempore.patch b/gnu/packages/patches/llvm-for-extempore.patch deleted file mode 100644 index 614682c6cb..0000000000 --- a/gnu/packages/patches/llvm-for-extempore.patch +++ /dev/null @@ -1,118 +0,0 @@ -This patch to LLVM is required by the developers of the Extempore language. -The following explanation was posted to the extemporelang@googlegroups.com -mailing list: - -"There is an assumption in the parser that all definitions occur within the -same compilation unit - i.e. the parser has local state about what has been -parsed in this unit of work. Extempore obviously does lots of little units -rather than one big unit and this causes problems for named types that were -defined in another unit - which they always are. The patch simply checks the -current module to see if the type has been previously defined, and intervenes -appropriately if it has." - -Message-ID: - ---- llvm-3.7.1.src/include/llvm/MC/MCSectionCOFF.h 2015-04-11 12:11:45.000000000 +1000 -+++ llvm-3.7.1.src/include/llvm/MC/MCSectionCOFF.h 2015-09-14 09:22:56.000000000 +1000 -@@ -16,7 +16,6 @@ - - #include "llvm/ADT/StringRef.h" - #include "llvm/MC/MCSection.h" --#include "llvm/Support/COFF.h" - - namespace llvm { - class MCSymbol; - ---- llvm-3.7.1.src/lib/AsmParser/LLParser.cpp 2015-07-11 20:30:36.000000000 +1000 -+++ llvm-3.7.1.src/lib/AsmParser/LLParser.cpp 2015-09-14 09:20:57.000000000 +1000 -@@ -1754,8 +1754,14 @@ - // If the type hasn't been defined yet, create a forward definition and - // remember where that forward def'n was seen (in case it never is defined). - if (!Entry.first) { -- Entry.first = StructType::create(Context, Lex.getStrVal()); -- Entry.second = Lex.getLoc(); -+ // this here for extempore -+ if (M->getTypeByName(Lex.getStrVal())) { -+ Entry.first = M->getTypeByName(Lex.getStrVal()); -+ Entry.second = SMLoc(); -+ } else { -+ Entry.first = StructType::create(Context, Lex.getStrVal()); -+ Entry.second = Lex.getLoc(); -+ } - } - Result = Entry.first; - Lex.Lex(); - ---- llvm-3.7.1.src/lib/CodeGen/TargetLoweringObjectFileImpl.cpp 2015-07-01 05:10:31.000000000 +1000 -+++ llvm-3.7.1.src/lib/CodeGen/TargetLoweringObjectFileImpl.cpp 2015-09-14 09:23:40.000000000 +1000 -@@ -32,6 +32,7 @@ - #include "llvm/MC/MCStreamer.h" - #include "llvm/MC/MCSymbolELF.h" - #include "llvm/MC/MCValue.h" -+#include "llvm/Support/COFF.h" - #include "llvm/Support/Dwarf.h" - #include "llvm/Support/ELF.h" - #include "llvm/Support/ErrorHandling.h" - ---- llvm-3.7.1.src/lib/ExecutionEngine/MCJIT/MCJIT.cpp 2015-07-31 02:31:16.000000000 +1000 -+++ llvm-3.7.1.src/lib/ExecutionEngine/MCJIT/MCJIT.cpp 2015-09-14 09:21:28.000000000 +1000 -@@ -524,6 +524,17 @@ - rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue())); - return rv; - } -+ if (FTy->getNumParams() == 1 && -+ RetTy->isVoidTy() && -+ FTy->getParamType(0)->isPointerTy()) { -+ GenericValue rv; -+ //void (*PF)(char *) = (void(*)(char *))(intptr_t)FPtr; -+ //printf("are symbols available: %d\n",isSymbolSearchingDisabled()); -+ void (*PF)(char *) = (void(*)(char *))FPtr; -+ char* mzone = (char*) GVTOP(ArgValues[0]); -+ PF(mzone); -+ return rv; -+ } - break; - } - } - ---- llvm-3.7.1.src/lib/MC/MCContext.cpp 2015-06-23 21:31:32.000000000 +1000 -+++ llvm-3.7.1.src/lib/MC/MCContext.cpp 2015-09-14 09:24:01.000000000 +1000 -@@ -23,6 +23,7 @@ - #include "llvm/MC/MCSymbolCOFF.h" - #include "llvm/MC/MCSymbolELF.h" - #include "llvm/MC/MCSymbolMachO.h" -+#include "llvm/Support/COFF.h" - #include "llvm/Support/ELF.h" - #include "llvm/Support/ErrorHandling.h" - #include "llvm/Support/FileSystem.h" - ---- llvm-3.7.1.src/lib/MC/MCObjectFileInfo.cpp 2015-06-25 10:28:42.000000000 +1000 -+++ llvm-3.7.1.src/lib/MC/MCObjectFileInfo.cpp 2015-09-14 09:24:17.000000000 +1000 -@@ -16,6 +16,7 @@ - #include "llvm/MC/MCSectionCOFF.h" - #include "llvm/MC/MCSectionELF.h" - #include "llvm/MC/MCSectionMachO.h" -+#include "llvm/Support/COFF.h" - using namespace llvm; - - static bool useCompactUnwind(const Triple &T) { - ---- llvm-3.7.1.src/lib/MC/MCSectionCOFF.cpp 2015-06-09 10:31:39.000000000 +1000 -+++ llvm-3.7.1.src/lib/MC/MCSectionCOFF.cpp 2015-09-14 09:24:25.000000000 +1000 -@@ -11,6 +11,7 @@ - #include "llvm/MC/MCAsmInfo.h" - #include "llvm/MC/MCContext.h" - #include "llvm/MC/MCSymbol.h" -+#include "llvm/Support/COFF.h" - #include "llvm/Support/raw_ostream.h" - using namespace llvm; - ---- llvm-3.7.1.src/lib/Target/X86/X86TargetObjectFile.cpp 2015-06-27 04:55:48.000000000 +1000 -+++ llvm-3.7.1.src/lib/Target/X86/X86TargetObjectFile.cpp 2015-09-14 09:25:03.000000000 +1000 -@@ -16,6 +16,7 @@ - #include "llvm/MC/MCSectionCOFF.h" - #include "llvm/MC/MCSectionELF.h" - #include "llvm/MC/MCValue.h" -+#include "llvm/Support/COFF.h" - #include "llvm/Support/Dwarf.h" - #include "llvm/Target/TargetLowering.h" -- cgit v1.2.3 From 3ff2d2708cbece9985ee34b73e4b4d4be81eeafb Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Mon, 20 Apr 2020 23:56:16 +0200 Subject: gnu: extempore: Update to 0.8.6. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/music.scm (extempore): Update to 0.8.6. [snippets]: Delete bundled dependencies. [patches]: Add it. * gnu/packages/patches/extempore-unbundle-external-dependencies.patch: Patch CMakeLists.txt to use system libraries. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/music.scm | 87 +++++++------ .../extempore-unbundle-external-dependencies.patch | 140 +++++++++++++++++++++ 3 files changed, 188 insertions(+), 40 deletions(-) create mode 100644 gnu/packages/patches/extempore-unbundle-external-dependencies.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3c6c98a284..9eb64b47b3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -879,6 +879,7 @@ dist_patch_DATA = \ %D%/packages/patches/evolution-data-server-libical-compat.patch \ %D%/packages/patches/exiv2-CVE-2017-14860.patch \ %D%/packages/patches/exiv2-CVE-2017-14859-14862-14864.patch \ + %D%/packages/patches/extempore-unbundle-external-dependencies.patch \ %D%/packages/patches/extundelete-e2fsprogs-1.44.patch \ %D%/packages/patches/fastcap-mulGlobal.patch \ %D%/packages/patches/fastcap-mulSetup.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 5227f450aa..1e56154854 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -27,6 +27,7 @@ ;;; Copyright © 2019, 2020 Alexandros Theodotou ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Lars-Dominik Braun +;;; Copyright © 2020 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -625,63 +626,73 @@ MusePack, Monkey's Audio, and WavPack files.") (define-public extempore (package (name "extempore") - (version "0.7.0") + (version "0.8.6") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/digego/extempore.git") - (commit version))) + (commit (string-append "v" version)))) (sha256 (base32 - "12fsp7zkfxb9kykwq46l88kcbbici9arczrrsl4qn87m6vm5349l")) - (file-name (string-append name "-" version "-checkout")))) + "182jy23qv115dipny7kglwbn21z55dp253w1ykm0kh8n6vkgs7gp")) + (file-name (git-file-name name version)) + (patches (search-patches + "extempore-unbundle-external-dependencies.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove bundled sources. + (map delete-file-recursively + '("src/portaudio" + "src/pcre")) + #t)))) (build-system cmake-build-system) (arguments - `(;; The default target also includes ahead-of-time compilation of the - ;; standard libraries. However, during the "install" phase this would - ;; happen *again* for unknown reasons. Hence we only build the - ;; extempore executable during the build phase. - #:make-flags '("extempore") - #:configure-flags '("-DJACK=ON" - ;; We want to distribute. - "-DIN_TREE=OFF" - ;; Don't download any dependencies. - "-DBUILD_DEPS=OFF") + `(#:configure-flags (list "-DJACK=ON" + "-DPACKAGE=ON" + "-DEXTERNAL_SHLIBS_AUDIO=OFF" + "-DEXTERNAL_SHLIBS_GRAPHICS=OFF" + "-DCMAKE_BUILD_TYPE=Release" + (string-append "-DEXT_SHARE_DIR=" + (assoc-ref %outputs "out") + "/share")) #:modules ((ice-9 match) (guix build cmake-build-system) (guix build utils)) #:phases (modify-phases %standard-phases + (add-after 'build 'build-aot-libs + (lambda _ + (for-each (lambda (target) + (invoke "make" target)) + '("aot_base" + "aot_math" + "aot_instruments")) + #t)) + (add-after 'unpack 'patch-install-locations + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + (("EXT_SHARE_DIR=\"\\.\"\\)") + "EXT_SHARE_DIR=\"${EXT_SHARE_DIR}/extempore\")") + (("DESTINATION \"\\.\"\\)") "DESTINATION bin)") + (("DESTINATION \"\\.\"\n") "DESTINATION share/extempore\n")) + #t)) (add-after 'unpack 'patch-directories (lambda* (#:key outputs #:allow-other-keys) - ;; Rewrite default path to runtime directory - (substitute* "src/Extempore.cpp" - (("runtimedir \\+= \"runtime\"") - (string-append "runtimedir = \"" - (assoc-ref outputs "out") - "/lib/extempore/runtime\""))) (substitute* "extras/extempore.el" (("\\(runtime-directory \\(concat default-directory \"runtime\"\\)\\)") (string-append "(runtime-directory \"" (assoc-ref outputs "out") - "/lib/extempore/runtime" + "/share/extempore/runtime" "\")"))) #t)) (add-after 'unpack 'link-with-additional-libs (lambda _ ;; The executable must be linked with libffi and zlib. (substitute* "CMakeLists.txt" - (("add_dependencies\\(aot_extended extended_deps\\)") "") (("target_link_libraries\\(extempore PRIVATE dl" line) (string-append line " ffi z"))) #t)) - ;; FIXME: AOT compilation of the nanovg bindings fail with the error: - ;; "Compiler Error could not bind _nvgLinearGradient" - (add-after 'unpack 'disable-nanovg - (lambda _ - (substitute* "CMakeLists.txt" - (("aotcompile_lib\\(libs/external/nanovg.xtm.*") "")) - #t)) ;; FIXME: All examples that are used as tests segfault for some ;; unknown reason. (add-after 'unpack 'disable-broken-tests @@ -710,20 +721,16 @@ MusePack, Monkey's Audio, and WavPack files.") ("gl/glcompat-directbind" "libGL.so" "mesa"))) #t)) (add-after 'unpack 'use-own-llvm - (lambda* (#:key inputs #:allow-other-keys) - (setenv "EXT_LLVM_DIR" (assoc-ref inputs "llvm")) - ;; Our LLVM builds shared libraries, so Extempore should use - ;; those. - (substitute* "CMakeLists.txt" - (("CMAKE_STATIC_LIBRARY") "CMAKE_SHARED_LIBRARY")) - #t)) + (lambda* (#:key inputs #:allow-other-keys) + (setenv "EXT_LLVM_DIR" (assoc-ref inputs "llvm")) + ;; Our LLVM builds shared libraries, so Extempore should use + ;; those. + (substitute* "CMakeLists.txt" + (("CMAKE_STATIC_LIBRARY") "CMAKE_SHARED_LIBRARY")) + #t)) (add-after 'unpack 'fix-aot-compilation (lambda* (#:key outputs #:allow-other-keys) (substitute* "CMakeLists.txt" - ;; EXT_SHARE_DIR does not exist before installation, so the - ;; working directory should be the source directory instead. - (("WORKING_DIRECTORY \\$\\{EXT_SHARE_DIR\\}") - "WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}") ;; Extempore needs to be told where the runtime is to be found. ;; While we're at it we disable automatic tuning for a specific ;; CPU to make binary substitution possible. diff --git a/gnu/packages/patches/extempore-unbundle-external-dependencies.patch b/gnu/packages/patches/extempore-unbundle-external-dependencies.patch new file mode 100644 index 0000000000..e9484f7994 --- /dev/null +++ b/gnu/packages/patches/extempore-unbundle-external-dependencies.patch @@ -0,0 +1,140 @@ +Remove build machinery for bundled dependencies. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 89e6125e..c5e90750 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,7 +36,7 @@ endif() + if(PACKAGE) + # this needs to be set before project() is called + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12) +- set(ASSETS ON) # necessary for packaging ++ set(ASSETS OFF) # necessary for packaging + message(STATUS "Building Extempore for binary distribution (assets directory will be downloaded)") + endif() + +@@ -134,71 +134,6 @@ else() + message(FATAL_ERROR "Sorry, Extempore isn't supported on this platform - macOS, Linux & Windows only.") + endif() + +-######## +-# PCRE # +-######## +- +-# current in-tree PCRE version: 8.38 +- +-add_library(pcre STATIC +- # headers +- src/pcre/config.h +- src/pcre/pcre.h +- src/pcre/ucp.h +- # source files +- src/pcre/pcre_chartables.c +- src/pcre/pcre_compile.c +- src/pcre/pcre_exec.c +- src/pcre/pcre_globals.c +- src/pcre/pcre_internal.h +- src/pcre/pcre_newline.c +- src/pcre/pcre_tables.c +- ) +- +-target_compile_definitions(pcre +- PRIVATE -DHAVE_CONFIG_H +- ) +- +-if(PACKAGE) +- target_compile_options(pcre +- PRIVATE -mtune=generic) +-endif() +- +-############# +-# portaudio # +-############# +- +-add_library(portaudio STATIC +- src/portaudio/src/common/pa_allocation.c +- src/portaudio/src/common/pa_allocation.h +- src/portaudio/src/common/pa_converters.c +- src/portaudio/src/common/pa_converters.h +- src/portaudio/src/common/pa_cpuload.c +- src/portaudio/src/common/pa_cpuload.h +- src/portaudio/src/common/pa_debugprint.c +- src/portaudio/src/common/pa_debugprint.h +- src/portaudio/src/common/pa_dither.c +- src/portaudio/src/common/pa_dither.h +- src/portaudio/src/common/pa_endianness.h +- src/portaudio/src/common/pa_front.c +- src/portaudio/src/common/pa_hostapi.h +- src/portaudio/src/common/pa_memorybarrier.h +- src/portaudio/src/common/pa_process.c +- src/portaudio/src/common/pa_process.h +- src/portaudio/src/common/pa_ringbuffer.c +- src/portaudio/src/common/pa_ringbuffer.h +- src/portaudio/src/common/pa_stream.c +- src/portaudio/src/common/pa_stream.h +- src/portaudio/src/common/pa_trace.c +- src/portaudio/src/common/pa_trace.h +- src/portaudio/src/common/pa_types.h +- src/portaudio/src/common/pa_util.h +- ) +- +-target_include_directories(portaudio +- PRIVATE src/portaudio/include +- PRIVATE src/portaudio/src/common) +- + # platform-specific + + if(APPLE) +@@ -224,25 +159,8 @@ if(APPLE) + + elseif(UNIX AND NOT APPLE) + # use ALSA on Linux +- target_sources(portaudio +- PRIVATE src/portaudio/src/hostapi/alsa/pa_linux_alsa.c +- PRIVATE src/portaudio/src/os/unix/pa_unix_hostapis.c +- PRIVATE src/portaudio/src/os/unix/pa_unix_util.c +- ) +- target_include_directories(portaudio +- PRIVATE src/portaudio/src/os/unix) +- target_compile_definitions(portaudio +- PRIVATE -DPA_USE_ALSA) +- target_link_libraries(portaudio +- PRIVATE asound) + + if(JACK) +- target_sources(portaudio +- PRIVATE src/portaudio/src/hostapi/jack/pa_jack.c) +- target_compile_definitions(portaudio +- PRIVATE -DPA_USE_JACK) +- target_link_libraries(portaudio +- PRIVATE jack) + endif() + + elseif(WIN32) +@@ -292,8 +210,6 @@ if(ASIO) + endif() + + if(PACKAGE) +- target_compile_options(portaudio +- PRIVATE -mtune=generic) + endif() + + ############## +@@ -411,8 +327,6 @@ endif() + + # dependencies + +-add_dependencies(extempore pcre portaudio) +- + if(BUILD_LLVM) + if(WIN32) + add_dependencies(extempore LLVM-install) +@@ -553,7 +467,7 @@ else() + install(TARGETS extempore + RUNTIME + DESTINATION ".") +- install(DIRECTORY assets runtime libs examples tests ++ install(DIRECTORY runtime libs examples + DESTINATION "." + PATTERN ".DS_Store" EXCLUDE) + endif() -- cgit v1.2.3