all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adonay Felipe Nogueira <adfeno@openmailbox.org>
To: guix-devel@gnu.org
Subject: Re: Continuing the work on the recipes related to GNU Ring
Date: Fri, 09 Jun 2017 16:00:44 -0300	[thread overview]
Message-ID: <87y3t1dm03.fsf@openmailbox.org> (raw)
In-Reply-To: <87tw5jf6g6.fsf@gmail.com> (Maxim Cournoyer's message of "Fri, 21 Apr 2017 00:24:09 +0900")

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

More improvements, as described in:

- [[http://lists.gnu.org/archive/html/ring/2017-06/msg00004.html]].

- The above reference was also made in an Enhancement tracker in Ring's
  Tuleap instance, but I'm currently unable to visit/access their Tuleap
  instance. For the sake of transparency, once their tracker is
  available again, look for enhancement by searching for "Send patches
  upstream".

I have attached a set of package recipes for those wanting to test.

The problem with the customized flags, and the problem with the highly
patched pjsip/pjproject still persists, but patches for other packages
are mostly upstream now, except for a few two or three patches.

-- 
- [[https://libreplanet.org/wiki/User:Adfeno]]
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre, por isso não uso. Iguais a ele prefiro
  GNU Ring, ou Tox. Quer outras formas de contato? Adicione o vCard
  que está no endereço acima aos teus contatos.
- Pretende me enviar arquivos .doc, .ppt, .cdr, ou .mp3? OK, eu
  aceito, mas não repasso. Entrego apenas em formatos favoráveis ao
  /software/ livre. Favor entrar em contato em caso de dúvida.

[-- Attachment #2: ring.scm --]
[-- Type: application/octet-stream, Size: 30793 bytes --]

;;; Copyright © 2016 Lukas Gradl
;;; Copyright © 2017 Marius Bakke
;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>

;;; Before creating patches out of these recipes, please guarantee that there's contact information for Mx. Gradl and Mx. Bakke.

;;; TODO For other atributions, look for:
;;; - <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01541.html>.
;;; - <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01937.html>.
;;; - <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01938.html>.
;;; - <http://lists.gnu.org/archive/html/guix-devel/2017-01/msg01216.html>.
;;; - <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01061.html>.
;;; - <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01062.html>.
;;; - <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01063.html>.

(define-module (ring)
  #:use-module (gnu packages)
  #: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 libupnp)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages nettle)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages qt)
  #:use-module (gnu packages readline)
  #:use-module (gnu packages serialization)
  #:use-module (gnu packages telephony)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages video)
  #:use-module (gnu packages webkit)
  #:use-module (gnu packages xiph)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages zip)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system cmake)
  #:use-module (guix build-system trivial)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (ice-9 match)
  #:use-module (srfi srfi-1))

;;; FIXME Convince upstream, Ring, to send patches to their upstreams.
;;; FIXME See if the combination of Savoir-faire Linux's pjproject +
;;; restbed + Ring daemon is OK.

;;; Dependencies on OpenSSL were disabled due to licensing issues.

(define-public gnu-ring-release
  (let ((release "20170524.2.745efce")
	(revision 4))
    (package
     (name "gnu-ring-release")
     (version (if (zero? revision)
     		  release
     		  (string-append release "-"
     				 (number->string revision))))
     (source (origin
	      (method url-fetch)
	      (uri (string-append "http://dl.ring.cx/ring-release/tarballs/ring_"
				  release ".tar.gz"))
	      (file-name (string-append name "-" version ".tar.gz"))
	      (sha256
	       (base32
		"0xcp0dcjn3m7ay8jb8f3km776da2m49sb0xz4clqi3njih2fkc45"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
	#:builder
	(begin
	  (use-modules (guix build utils))
	  (let ((gzip (assoc-ref %build-inputs "gzip"))
	  	(source (assoc-ref %build-inputs "source"))
	  	(tar (assoc-ref %build-inputs "tar")))
	    (setenv "PATH" (string-append gzip "/bin:"
	  				  tar "/bin")) 
	    (mkdir-p %output)
	    (system* "tar" "-xvf" source "-C" %output)
	    (chdir (string-append %output "/ring-project"))))))
     (native-inputs
      `(("source" ,source)
	("tar" ,tar)
	("gzip" ,gzip)))
     (synopsis "Distributed multimedia communications platform")
     (description "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.")
     (home-page "https://gnu.org/software/ring")
     (license license:gpl3+))))

;;; Based on
;;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01541.html>.
(define-public savoir-faire-linux-pjproject
  (let ((release "2.5.5")
	(revision 3))
    (package
     (name "pjproject")
     (version (if (zero? revision)
     		  release
     		  (string-append release "-"
     				 (number->string revision))))
     (source (origin
	      (method url-fetch)
	      (uri (string-append "http://www.pjsip.org/release/"
				  release "/" name "-" release ".tar.bz2"))
	      (file-name (string-append name "-" version ".tar.bz2"))
	      (modules '((guix build utils)))
	      (snippet
	       '(begin
		  (let ((third-party-directories
			 '( "BaseClasses" "bdsound" "bin" "g7221" "gsm"
			    "ilbc" "lib" "milenage" "mp3" "speex" "srtp"
			    "resample" "yuv"
			    ;; Keep only resample, build and README.txt.
			    "build/baseclasses" "build/g7221" "build/gsm"
			    "build/ilbc" "build/milenage" "build/samplerate"
			    "build/speex" "build/srtp"
			    ;; Keep only Makefiles related to resample.
			    "build/resample" "build/yuv")))
		    (for-each (lambda (file)
				(delete-file-recursively (string-append "third_party/"
									file)))
			      third-party-directories)
		    #t)
		  (let ((third-party-directories
			 '( "gsm" "ilbc" "speex" "g7221" "srtp"
			    "portaudio"
			    "resample")))
		    (for-each
		     (lambda (directory-path)
		       (substitute* "third_party/build/os-linux.mak"
				    (((string-append "DIRS += " directory-path)) "")))
		     third-party-directories))))
	      (sha256
	       (base32
		"1wq8lpfcd4dfrbl7bgy2yzgp3ldjzq5430fqkhcqad0xfrxj0fdb"))))
     (build-system gnu-build-system)
     (inputs
      `(("portaudio" ,portaudio)))
     (propagated-inputs
      ;; These packages are referenced in the Libs field of the pkg-config
      ;; file that will be installed by pjproject.
      `(("speex" ,speex)
	("libsrtp" ,libsrtp)
	("gnutls" ,gnutls)
	("util-linux" ,util-linux)))
     (native-inputs
      `(("gnu-ring-release" ,gnu-ring-release)
	("autoconf" ,autoconf)
	("automake" ,automake)
	("pkg-config" ,pkg-config)
	("libtool" ,libtool)))
     (arguments
      `(#:tests? #f ; FIXME make: No rule to make target
	            ; 'pjlib/bin/pjlib-test-i686-unknown-linux-gnu'.
	;; #:test-target "selftest"
	#:configure-flags
	;; The disabled features are not used by libring.  Comes from
	;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
	;; NOTE This doesn't seem right, other packages might want
	;; some of these. We must talk to Ring project and ask why we
	;; need things to be built this way. One way out of this would
	;; be to tell it to use external things instead of disabling.
	'( "--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"
	   "--enable-ssl=gnutls"
	   ;; Now deviating from the rules.mak file.
	   "--with-external-srtp"
	   ;; Now back to following the rules.mak file.
	   "CFLAGS=-DPJ_ICE_MAX_CAND=32 -DPJ_ICE_MAX_CHECKS=150 -DPJ_ICE_COMP_BITS=2 -DPJ_ICE_MAX_STUN=3 -DPJSIP_MAX_PKT_LEN=8000")
	#:phases
	(modify-phases %standard-phases
		       (add-after 'unpack 'apply-patches
				  (lambda* (#:key inputs #:allow-other-keys)
					   ;; Comes from
					   ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
					   ;; We already asked
					   ;; Ring to contribute
					   ;; upstrea, please
					   ;; see:
					   ;; https://tuleap.ring.cx/plugins/tracker/?aid=1546.
					   ;; NOTE These amount
					   ;; for huge changes
					   ;; in pjproject.
					   ;; Particularly, they
					   ;; add support for
					   ;; GnuTLS, which is
					   ;; completely lacking
					   ;; in pjproject
					   ;; 2.5.5.
					   (let ((savoir-faire-linux-patches
						  '("endianness"
						    "gnutls"
						    "notestsapps"
						    "fix_base64"
						    "ipv6"
						    "ice_config"
						    "multiple_listeners"
						    "pj_ice_sess"
						    "fix_turn_fallback"
						    "fix_ioqueue_ipv6_sendto"
						    "add_dtls_transport"))
						 (patches-directory "savoir-faire-linux-patches"))
					     (mkdir patches-directory)
					     (for-each
					      (lambda (file)
						(copy-file
						 (string-append (assoc-ref inputs "gnu-ring-release")
								"/ring-project/daemon/contrib/src/pjproject/" file ".patch")
						 (string-append patches-directory
								"/" file ".patch"))
						(zero? (system* "patch" "-f" "-p1" "-i"
								(string-append patches-directory
									       "/" file ".patch"))))
					      savoir-faire-linux-patches))))
		       (add-before 'build 'build-dependencies
				   (lambda _
				     (zero? (system* "make" "dep"))))
		       (add-before 'patch-source-shebangs 'autoconf
				   (lambda _
				     (zero? (system* "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;3R-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
						   "selftest: pjlib-test pjlib-util-test pjmedia-test")))))))
     (home-page "www.pjsip.org")
     (synopsis "Session Initiation Protocol (SIP) stack")
     (description "PJProject provides an implementation of the Session
Initiation Protocol (SIP) and a multimedia framework. This package is intended
for use with libring.  There are several custom patches, most notably the use
of gnutls instead of openssl for encryption.")
     ;; We should make the license only one, the one which is
     ;; effective as result of applying savoir-faire-linux-patches,
     ;; because we don't want to say that the whole package has two
     ;; licenses for which the user can "choose" from (dual licensing).
     ;; NEW pjproject is under GNU GPL 2+, not GPL 2 (only).
     ;; Last time we checked, the
     ;; Savoir-faire Linux patches were under
     ;; GNU GPL 3 (only). Is this still true?
     (license '(license:gpl2+
		license:gpl3)))))

(define-public savoir-faire-linux-asio
  (let ((release "1.10.8")
	(commit "28d9b8d6df708024af5227c551673fdb2519f5bf")
	(revision 2))
    (package
     (name "asio")
     (version (if (zero? revision)
     		  release
     		  (string-append release "-"
     				 (number->string revision)
     				 "." (string-take commit 7))))
     (source (origin
	      (method url-fetch)
	      (uri (string-append "https://github.com/chriskohlhoff/asio/archive/"
				  commit ".tar.gz"))
	      (file-name (string-append name "-" version ".tar.gz"))
	      (sha256
	       (base32
		"07wp56vibqp1qp8ca1ahbhs8md7k22im7nmlx0haqxdgszp1zcvb"))))
     (build-system gnu-build-system)
     (inputs
      `(("boost" ,boost)))
     (native-inputs
      `(("autoconf" ,autoconf)
	("automake" ,automake)
	("gnu-ring-release" ,gnu-ring-release)))
     (arguments
      `(#:configure-flags
	`(,(string-append "--with-boost=\""
			  (assoc-ref %build-inputs "boost") "\""))
	#:phases
	(modify-phases %standard-phases
		       (add-after 'unpack 'change-directory-and-apply-patches
				  (lambda* (#:key inputs #:allow-other-keys)
					   ;; We asked Ring to
					   ;; send patches to
					   ;; their upstream,
					   ;; status can be seen
					   ;; at:
					   ;; https://tuleap.ring.cx/plugins/tracker/?aid=1546.
					   ;; These patches just
					   ;; disable tests and
					   ;; examples.  We
					   ;; should convince
					   ;; Ring to send these
					   ;; patches to their
					   ;; upstream, asio.
					   (let ((savoir-faire-linux-patches
						  '("no_tests_examples"))
						 (patches-directory "savoir-faire-linux-patches"))
					     (chdir "asio")
					     (mkdir patches-directory)
					     (for-each
					      (lambda (file)
						(copy-file
						 (string-append (assoc-ref inputs "gnu-ring-release")
								"/ring-project/daemon/contrib/src/asio/" file ".patch")
						 (string-append patches-directory
								"/" file ".patch"))
						(zero? (system* "patch" "-f" "-p1" "-i"
								(string-append patches-directory
									       "/" file ".patch"))))
					      savoir-faire-linux-patches))))
		       (add-before 'configure 'run-autogen
				   (lambda _
				     (zero? (system* "./autogen.sh")))))))
     (synopsis "Asio C++ Library")
     (description "Asio is a cross-platform C++ library for network
and low-level I/O programming that provides developers with a
consistent asynchronous model using a modern C++ approach.")
     (home-page "https://github.com/chriskohlhoff/asio")
     (license license:boost1.0))))

(define-public savoir-faire-linux-restbed
  (let ((release "45.5-RC1")
	(commit "6dd46e1d9ab3801a6c6e1aabaee74d066e12c5e1")
	(revision 2))
    (package
     (name "restbed")
     (version (if (zero? revision)
     		  release
     		  (string-append release "-"
     				 (number->string revision)
     				 "." (string-take commit 7))))
     (source (origin
	      (method url-fetch)
	      (uri (string-append "https://github.com/Corvusoft/restbed/archive/"
				  commit ".tar.gz"))
	      (file-name (string-append name "-" version ".tar.gz"))
	      (sha256
	       (base32
		"0wl52qmpmxmrq8mcm8ckpqfqrrj6dfcvmc3qkigymf3mj2ckf9n3"))))
     (build-system cmake-build-system)
     (inputs
      `(("asio" ,savoir-faire-linux-asio)
	("catch" ,catch-framework)
	("glibc" ,glibc)
	("kashmir" ,kashmir)))
     (native-inputs
      `(("gnu-ring-release" ,gnu-ring-release)))
     (arguments
      `(#:tests? #f
	;; Comes from "ring-project/daemon/contrib/src/restbed/rules.mak".
	#:configure-flags
	`(,(string-append "-DCMAKE_INSTALL_LIBDIR="
			 (assoc-ref %outputs "out") "/lib")
	  "-DBUILD_TESTS=NO"
	  "-DBUILD_EXAMPLES=NO"
	  "-DBUILD_SSL=NO"
	  "-DBUILD_SHARED=NO")
	#:phases
	(modify-phases %standard-phases
		       (add-after 'unpack 'apply-patches-and-fix-paths
				  (lambda* (#:key inputs #:allow-other-keys)
					   (let ((asio (assoc-ref inputs "asio"))
						 (catch (assoc-ref inputs "catch"))
						 (glibc (assoc-ref inputs "glibc"))
						 (kashmir (assoc-ref inputs "kashmir"))
						 ;; We asked Ring to
						 ;; send patches
						 ;; upstream, status
						 ;; can be seen at:
						 ;; https://tuleap.ring.cx/plugins/tracker/?aid=1546.
						 ;; These patches deal
						 ;; with minor fixes.
						 ;; We should convince
						 ;; Ring upstream to
						 ;; send these patches
						 ;; to their upstream,
						 ;; restbed.
						 (savoir-faire-linux-patches
						  '("strand"))
						 (patches-directory "savoir-faire-linux-patches"))
					     (mkdir patches-directory)
					     (for-each
					      (lambda (file)
						(copy-file
						 (string-append (assoc-ref inputs "gnu-ring-release")
								"/ring-project/daemon/contrib/src/restbed/" file ".patch")
						 (string-append patches-directory
								"/" file ".patch"))
						(zero? (system* "patch" "-f" "-p1" "-i"
								(string-append patches-directory
									       "/" file ".patch"))))
					      savoir-faire-linux-patches)
					     (substitute* "cmake/modules/Findasio.cmake"
							  (("(find_path\\( asio_INCLUDE asio\\.hpp HINTS )[^\n]*\n" _ begin)
							   (string-append begin "\"" asio "/include\" )\n")))
					     (substitute* "cmake/modules/Findcatch.cmake"
							  (("(find_path\\( catch_INCLUDE catch\\.hpp HINTS )[^\n]*\n" _ begin)
							   (string-append begin "\"" catch "/include\" )\n")))
					     (substitute* "cmake/modules/Findkashmir.cmake"
							  (("(find_path\\( kashmir_INCLUDE kashmir HINTS )[^\n]*\n" _ begin)
							   (string-append begin "\"" kashmir "/kashmir-dependency\" )\n")))
					     (substitute* "cmake/modules/Findsyslog.cmake"
							  (("(find_path\\( syslog_INCLUDE syslog\\.h HINTS )[^\n]*\n" _ begin)
							   (string-append begin "\"" glibc "/include\" )\n")))))))))
     (synopsis "Asynchronous RESTful functionality to C++11 applications")
     (description "Restbed is a comprehensive and consistent programming
model for building applications that require seamless and secure
communication over HTTP.")
     (home-page "https://github.com/Corvusoft/restbed")
     (license license:agpl3+))))

;;; Based on
;;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01061.html>.
(define-public libring
  (package
   (inherit gnu-ring-release)
   (name "libring")
   (source (origin
	    (inherit (package-source gnu-ring-release))
	    (modules '((guix build utils)))
	    (snippet
	     '(begin
		(delete-file-recursively "daemon/contrib")))))
   (build-system gnu-build-system)
   (inputs
    `(("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)
      ("libsamplerate" ,libsamplerate)
      ("libsndfile" ,libsndfile)
      ("libupnp" ,libupnp)
      ("libva" ,libva)
      ("libvorbis" ,libvorbis)
      ("libx264" ,libx264)
      ("opendht-with-msgpack-c++-11" ,opendht-with-msgpack-c++-11)
      ("opus" ,opus)
      ("pcre" ,pcre)
      ("pjproject" ,savoir-faire-linux-pjproject)
      ("pulseaudio" ,pulseaudio)
      ("speex" ,speex)
      ("yaml-cpp" ,yaml-cpp)
      ("zlib" ,zlib)
      ("crypto++" ,crypto++)
      ("libx11" ,libx11)
      ("python" ,python)
      ("python-wrapper" ,python-wrapper)
      ("restbed" ,savoir-faire-linux-restbed)
      ("speexdsp" ,speexdsp)))
   (native-inputs
    `(("autoconf" ,autoconf)
      ("automake" ,automake)
      ("cppunit" ,cppunit)
      ("libtool" ,libtool)
      ("perl" ,perl)
      ("pkg-config" ,pkg-config)))
   (arguments
    `(#:tests? #f ; FIXME The tests fail to compile due to missing headers.
      #:phases
      (modify-phases %standard-phases
		     (add-after 'unpack 'change-directory
				(lambda _
				  (chdir "daemon")))
		     (add-before 'configure 'autoconf
				 (lambda _
				   (zero? (system* "autoreconf" "-vfi"))))
		     (add-before 'build 'add-lib-dir
				 (lambda _
				   (mkdir "src/lib"))))))
   (description
    (string-append (package-description gnu-ring-release) "

This package provides a library and daemon implementing the Ring core
functionality."))))

;;; Based on
;;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01062.html>.
(define-public libringclient
  (package
   (inherit gnu-ring-release)
   (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
      `(,(string-append "-DRING_BUILD_DIR="
			(assoc-ref %build-inputs "libring") "/include"))
      #:phases
      (modify-phases %standard-phases
		     (add-after 'unpack 'change-directory
				(lambda _
				  (chdir "lrc")))
		     (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))))))))
   (description
    (string-append (package-description gnu-ring-release) "

This package provides a library common to all Ring clients."))))

;;; Based on
;;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01063.html>.
(define-public ring-client-gnome
  (package
   (inherit gnu-ring-release)
   (name "ring-client-gnome")
   (build-system cmake-build-system)
   (inputs
    `(("libringclient" ,libringclient)
      ("gtk+" ,gtk+)
      ("glib:bin" ,glib "bin")
      ("qrencode" ,qrencode)
      ("libnotify" ,libnotify)
      ("clutter" ,clutter)
      ("clutter-gtk" ,clutter-gtk)
      ("gettext" ,gnu-gettext)
      ("webkitgtk" ,webkitgtk)))
   (native-inputs
    `(("pkg-config" ,pkg-config)
      ("doxygen" ,doxygen)))
   (propagated-inputs
    `(("libring" ,libring) ; This is needed to run dring.
      ("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"))))))
   (description
    (string-append (package-description gnu-ring-release) "

This package provides the Ring client for the Gnome Desktop."))))

;;; From <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01937.html>.
(define-public argon2
  (let ((release "20161029")
	(commit "9e3ae0f5e91eced6de3c28a9b61f2d91200119e3")
	(revision 4))
    (package
     (name "argon2")
     (version (if (zero? revision)
     		  release
     		  (string-append release "-"
     				 (number->string revision)
     				 "." (string-take commit 7))))
     (source (origin
	      (method url-fetch)
	      (uri (string-append "https://github.com/P-H-C/phc-winner-argon2/archive/"
				  commit ".tar.gz"))
	      (file-name (string-append name "-" version ".tar.gz"))
	      (modules '((guix build utils)))
	      (snippet
	       '(begin
		  (substitute* "Makefile"
			       (("ifneq \\(\\$\\(OPTTEST\\), 0\\)")
				"ifneq (1, 0)"))))
	      (sha256
	       (base32
		"122rpbrl2lbhgwj7sanbgyn81dnp3azr8ydxr5sc0rwqlyg3iqdp"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
	#:make-flags '("CC=gcc")
	#:phases
	(modify-phases %standard-phases
		       (delete 'configure)
		       (add-after 'unpack 'fix-pkg-config-and-makefile
				  (lambda _
				    (substitute* "libargon2.pc"
						 (("/usr")
						  (assoc-ref %outputs "out"))
						 (("@HOST_MULTIARCH@")
						  ,(or (%current-target-system)
						       (%current-system)))
						 (("@UPSTREAM_VER@")
						  ,release))))
		       (replace 'install
				(lambda _
				  (let ((out (assoc-ref %outputs "out")))
				    (install-file "argon2"
						  (string-append out "/bin"))
				    (install-file "libargon2.a"
						  (string-append out "/lib"))
				    (install-file "libargon2.so.0"
						  (string-append out "/lib"))
				    (install-file "libargon2.pc"
				    		  (string-append out "/lib/pkgconfig"))
				    (copy-recursively "include"
						      (string-append out "/include"))
				    (symlink (string-append out "/lib/libargon2.so.0")
				    	     (string-append out "/lib/libargon2.so"))))))))
     (home-page "https://www.argon2.com/")
     (synopsis "Password hashing library")
     (description "Argon2 provides a key derivation function that was declared
winner of the 2015 Password Hashing Competition.")
     (license license:cc0))))

(define-public msgpack-c++-11
  (package
   (inherit msgpack)
   (name "msgpack-c++-11")
   (arguments
    (substitute-keyword-arguments (package-arguments msgpack)
				  ((#:make-flags msgpack-make-flags)
				   `(append ,msgpack-make-flags
					    '("-DMSGPACK_CXX11=ON")))))))

;;; Based on
;;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01938.html>.
(define-public opendht
  (let ((release "1.3.3")
	(revision 5))
    (package
     (name "opendht") 
     (version (if (zero? revision)
     		  release
     		  (string-append release "-"
     				 (number->string revision))))
     (source (origin
	      (method url-fetch)
	      (uri (string-append "https://github.com/savoirfairelinux/" name
				  "/archive/" release ".tar.gz"))
	      (file-name (string-append name "-" version ".tar.gz"))
	      (sha256
	       (base32
		"07c8pj3wd7vmz505w508nlc4pssv38ca9s1asv8ydq9qvppd780b"))))
     (build-system gnu-build-system)
     (inputs
      `(("gnutls" ,gnutls)
	("nettle" ,nettle)
	("readline" ,readline)))
     (propagated-inputs
      `(("argon2" ,argon2)
	("msgpack" ,msgpack))) ; included in several installed headers
     (native-inputs
      `(("autoconf" ,autoconf)
	("pkg-config" ,pkg-config)
	("automake" ,automake)
	("libtool" ,libtool)))
     (arguments
      `(#:configure-flags '("--with-argon2")
	#:phases (modify-phases %standard-phases
				(add-before 'configure 'autoconf
					    (lambda _
					      (zero?
					       (system* "autoreconf" "-vfi")))))))
     (home-page "https://github.com/savoirfairelinux/opendht/")
     (synopsis "Distributed Hash Table (DHT) library")
     (description "OpenDHT is a Distributed Hash Table (DHT) library.  It may
be used to manage peer-to-peer network connections as needed for real time
communication.")
     ;; NEW It's under GNU GPL3+.
     (license license:gpl3+))))

(define-public opendht-with-msgpack-c++-11
  (package
   (inherit opendht)
   (name "opendht-with-msgpack-c++-11")
   (propagated-inputs
    `(("msgpack-c++-11" ,msgpack-c++-11)
      ,@(alist-delete "msgpack" (package-propagated-inputs opendht))))))

;;; From
;;; <http://lists.gnu.org/archive/html/guix-devel/2017-01/msg01216.html>.
;;; Not including
;;; <http://lists.gnu.org/archive/html/guix-devel/2017-01/msg01392.html>.
;;; When prearing patches, must include this attribution.
(define-public crypto++
  (let ((release "5.6.5")
	(revision 1))
    (package
     (name "crypto++")
     (version (if (zero? revision)
     		  release
     		  (string-append release "-"
     				 (number->string revision))))
     (source (origin
	      (method url-fetch)
	      (uri (let ((numeric-version
			  (match (string-split release #\.)
				 ((first-digit other-digits ...)
				  (string-append first-digit
						 (string-concatenate
						  other-digits))))))
		     (string-append "https://cryptopp.com/cryptopp"
				    numeric-version ".zip")))
	      (sha256
	       (base32
		"0d1cqdz369ivi082k59025wvxzywvkizw7i0pf5h0a1izs3g8pm7"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
	`(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
	  ,(string-append "BINDIR=" (assoc-ref %outputs "bin") "/bin")
	  ,(string-append "DATADIR=" (assoc-ref %outputs "doc") "/share")
	  "DISABLE_CXXFLAGS_OPTIMIZATIONS=1"
	  ;; Override "/sbin/ldconfig" with simply "echo" since
	  ;; we don't need ldconfig(8).
	  "LDCONF=echo")
	#:phases
	(modify-phases %standard-phases
		       (add-after 'unpack 'enter-source
				  ;; They have made a zip-bomb.
				  (lambda _ (chdir "..") #t))
		       (add-after 'enter-source 'disable-optimizations
				  (lambda _
				    ;; XXX: The disable optimizations
				    ;; flag above is not recognized in
				    ;; the current version. See
				    ;; https://github.com/weidai11/cryptopp/pull/354.
				    ;; For now, just remove it the dirty
				    ;; way.
				    (substitute* "GNUmakefile"
						 (("-march=native") ""))
				    #t))
		       (delete 'configure)
		       (add-after 'build 'build-shared
				  (lambda _
				    ;; By default, only the static
				    ;; library is built.
				    (zero?
				     (system* "make" "shared"))))
		       (add-after 'install 'move-static-library
				  (lambda* (#:key outputs #:allow-other-keys)
					   (let* ((out (assoc-ref outputs "out"))
						  (lib (string-append out "/lib"))
						  (static (assoc-ref outputs "static"))
						  (slib (string-append static "/lib")))
					     (mkdir-p slib)
					     (for-each (lambda (file)
							 (install-file file slib)
							 (delete-file file))
						       (find-files lib "\\.l?a$"))
					     #t)))
		       (add-after 'move-static-library 'add-so-version-symlink
				  ;; The library is named
				  ;; MAJOR.MINOR.PATCHLEVEL. Some
				  ;; programs expect a MAJOR.MINOR
				  ;; symlink.
				  (lambda* (#:key outputs #:allow-other-keys)
					   (let ((out (assoc-ref outputs "out"))
						 (major+minor ,(version-major+minor release)))
					     (with-directory-excursion (string-append out "/lib")
								       (symlink (string-append "libcryptopp.so." ,release)
										(string-append "libcryptopp.so." major+minor))
								       #t)))))))
     (outputs
      '("out" ; 6.4M shared library and headers
	"bin" ; 6.3M cryptest.exe
	"doc" ; 6.4M documentation and examples
	"static")) ; 15M static library
     (native-inputs
      `(("unzip" ,unzip)))
     (synopsis "C++ class library of cryptographic schemes")
     (description "Crypto++ is a large collection of cryptograhic
algorithms and related utilities for C++.")
     (home-page "https://cryptopp.com")
     ;; The compilation is licensed under Boost 1.0, while
     ;; most individual files are in the public domain.
     ;; Should we add two licenses?
     (license '(license:boost1.0
		license:public-domain)))))

(define-public kashmir
  (let ((release "0")
	(commit "2f3913f49c4ac7f9bff9224db5178f6f8f0ff3ee")
	(revision 1))
    (package
     (name "kashmir")
     (version (if (zero? revision)
     		  release
     		  (string-append release "-"
     				 (number->string revision)
     				 "." (string-take commit 7))))
     (source (origin
	      (method url-fetch)
	      (uri (string-append "https://github.com/Corvusoft/" name
				  "-dependency/archive/" commit ".tar.gz"))
	      (file-name (string-append name "-" version ".tar.gz"))
	      (sha256
	       (base32
		"11hbh3d7w74gng9qgz3hdrzvxjgil1pymk2bzxv1ajh9vp60xxs9"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
	#:builder
	(begin
	  (use-modules (guix build utils))
	  (let ((gzip (assoc-ref %build-inputs "gzip"))
		(source (assoc-ref %build-inputs "source"))
		(tar (assoc-ref %build-inputs "tar")))
	    (setenv "PATH" (string-append gzip "/bin:"
					  tar "/bin"))
	    (mkdir-p %output)
	    (system* "tar" "-xvf" source "-C" %output)
	    (chdir %output)
	    (for-each (lambda (file)
			(rename-file file "kashmir-dependency"))
		      (find-files "." "kashmir-dependency-" #:directories? #t))))))
     (native-inputs
      `(("source" ,source)
	("tar" ,tar)
	("gzip" ,gzip)))
     (synopsis "C++ library providing extra functionality for projects")
     (description "The Kashmir Library is intended to provide
functionality needed in many software projects, but not present in the
C++ standard library.")
     (home-page "tps://github.com/corvusoft/kashmir-dependency")
     (license license:boost1.0))))

  parent reply	other threads:[~2017-06-09 19:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18 23:20 Continuing the work on the recipes related to GNU Ring Adonay Felipe Nogueira
2017-03-19  2:25 ` John Darrington
2017-03-22 19:20 ` Adonay Felipe Nogueira
2017-03-22 19:56   ` Leo Famulari
2017-03-22 20:41     ` Adonay Felipe Nogueira
2017-03-24 23:42   ` Adonay Felipe Nogueira
2017-03-25  0:01     ` Adonay Felipe Nogueira
2017-03-26 13:21       ` Ludovic Courtès
2017-03-31 19:05         ` Adonay Felipe Nogueira
2017-04-20 13:55 ` Adonay Felipe Nogueira
2017-04-20 15:24   ` Maxim Cournoyer
2017-04-20 16:22     ` Adonay Felipe Nogueira
2017-06-09 19:00     ` Adonay Felipe Nogueira [this message]
2017-06-11 20:40       ` Ludovic Courtès
2017-06-30 13:09         ` Adonay Felipe Nogueira
2017-07-30  9:55           ` ng0
2017-07-30 13:16             ` Adonay Felipe Nogueira
2017-07-30 14:45               ` ng0

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y3t1dm03.fsf@openmailbox.org \
    --to=adfeno@openmailbox.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.