unofficial mirror of guix-devel@gnu.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: Wed, 22 Mar 2017 16:20:02 -0300	[thread overview]
Message-ID: <87a88d3yql.fsf@openmailbox.org> (raw)
In-Reply-To: <87shma18an.fsf@openmailbox.org> (Adonay Felipe Nogueira's message of "Sat, 18 Mar 2017 20:20:32 -0300")

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

Today, I bring you some good and bad news! :)

* The good news

I'm attaching an improved version of my previous set of recipes.

This should allow *GuixSD* users to use GNU Ring straight away.

However, both Guix users (in foreign distributions) and GuixSD users,
must be advised that this is a work-in-progress, and there are still
untested parts, or parts that were overlooked due to my lack of
experience as developer and all things related to "ld"-stuff and with
other build and developer tools and practices.

If you really want to help out, even if just for testing, please read
on.

* The bad news

After installing at least ring-client-gnome, Guix now suggests the user
to add a custom XDG_DATA_DIRS variable to his "~/.profile" file. For
Guix users in foreign distributions, this might cause an unwanted log-in
loop, described in Guix bug #26202
([[http://lists.gnu.org/archive/html/bug-guix/2017-03/msg00200.html]] or
[[https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26202]]).

* What was not tested

- Everything, including integration with GNOME Evolution data server
  (for contact list and management), both for GNOME Evolution comming
  from Guix, from GuixSD, or from a foreign distribution (because I
  don't use GNOME Evolution, although it comes by default in Trisquel
  7).

* What might need improvement

- Convince Ring to send their patches to their respective upstreams! :D

- Talk to Ring project to see if so much customization is really
  needed. Perhaps they have patches and "rules.mak" files only so that
  their work "gets lighter", but that might not be a requirement.

- For some reason, the Ring daemon (that is provided by "libring"
  package) doesn't come installed with Ring GNOME client (provided by
  "ring-client-gnome").

- Even after installed, the Ring daemon is actually located at
  "${HOME}/.guix-profile/lib/ring/dring". I guess this deosn't sound
  right for an executable.

- Look in the source code of the newly added packages for things I have
  missed, that might need to be corrected, like bundled stuff, or paths
  that should be pointing to store references.

- See section "What was not tested".

- Split the Ring tarball (ring[something].tar.gz) into useful separated
  ones.

  - Or find a way to get each part separatedly from their git
    repositories, making sure that we are indeed getting the code
    corresponding to beta 2.

- For more things to do, read the attached package definitions file.

* Notes for package maintainers

- All the packages are either new or heavily modified to follow patches
  and "rules.mak" files present inside
  "ring[something].tar.gz/ring-project/daemon/contrib/src".

- The only packages that are upgrades to existing ones (but still
  heavily modified) are argon2 and opendht.

* Notes for testers

- When installing:

  - Disable grafts (use `--no-grafts` option), otherwise you might be
    getting the original argon2 and opendht recipes.

  - Install "libring" and "ring-client-gnome".

- After installing:

  - If Guix tells you to change XDG_DATA_DIRS in your "~/.profile",
    don't do it, instead copy what is suggested to be done, and write it
    as a comment (prefixed with "#") to that file, and see the links I
    referenced so far. You'll still need what was suggested by Guix, so
    commenting it is an useful way to save it for later.

- Before using (each time):

  - In a new terminal, do:

    1. Take the line Guix suggested, and paste it (remove the "#" prefix,
       of course), and press Return (or Enter) to use it as command.

    2. Now run: ".guix-profile/lib/ring/dring" -p

    - This will start the Ring daemon in persistent mode, and make the
      current terminal busy (unresponsible, ignoring almost all
      input). It'll only exit if you press Ctrl + C (or force it to
      terminate.

    4. Do step 1 again in another terminal.

    5. Finally, in this other terminal, run "gnome-ring" client.

-- 
- [[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
  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.
- "People said I should accept the world. Bullshit! I don't accept the
  world."
                                                 --- Richard Stallman

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

(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 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))

;;; 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.

(define-public savoir-faire-linux-pjproject
  (let ((savoir-faire-linux-patches
	 (origin
	  (method url-fetch)
	  (uri "http://dl.ring.cx/ring-release/tarballs/ring_20170316.1.06a3f0b.tar.gz")
	  (sha256
	   (base32
	    "1nqpql3343d7icjfbzlwkm8ai5hrx54x03v726g5d6c24ixlzdrb")))))
    (package
     (name "pjproject")
     (version "2.5.5")
     (source
      (origin
       (method url-fetch)
       (uri (string-append
	     "http://www.pjsip.org/release/";
	     version "/" name "-" version ".tar.bz2"))
       (modules '((guix build utils)))
       (snippet
	'(begin
	   (let ((third-party-directories
		  (list "BaseClasses" "bdsound" "bin" "g7221" "gsm"
			"ilbc" "lib" "milenage" "mp3" "speex" "srtp"
			"resample"
			;; Keep only resample, build and README.txt.
			"build/baseclasses" "build/g7221" "build/gsm"
			"build/ilbc" "build/milenage" "build/samplerate"
			"build/speex" "build/srtp"
			"build/resample" "build/yuv")))
	     ;; Keep only Makefiles related to resample.
	     (for-each (lambda (file)
			 (delete-file-recursively
			  (string-append "third_party/" file)))
		       third-party-directories)
	     #t)
	   (let ((third-party-dirs
		  (list "gsm" "ilbc" "speex" "g7221" "srtp"
			"portaudio" "resample")))
	     (for-each
	      (lambda (dirs)
		(substitute* "third_party/build/os-linux.mak"
			     (((string-append "DIRS += " dirs)) "")))
	      third-party-dirs))))
       (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
      `(("savoir-faire-linux-patches" ,savoir-faire-linux-patches)
	("autoconf" ,autoconf)
	("automake" ,automake)
	("pkg-config" ,pkg-config)
	("libtool" ,libtool)))
     (arguments
      `(#:tests? #f ; FIXME make: No rule to make target
		    ; 'pjlib-test-unknown-[something]-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.
	(list "--enable-ext-sound"
	      "--enable-ssl=gnutls"
	      "--disable-oss"
	      "--disable-sound"
	      "--disable-video"
	      "--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"
	      ;; 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)
					   (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
						 ;; Comes from
						 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
						 ;; NOTE These amount
						 ;; for huge changes
						 ;; in pjproject.
						 ;; Particularly, they
						 ;; add support for
						 ;; GnuTLS, which is
						 ;; completely lacking
						 ;; in pjproject
						 ;; 2.5.5.
						 (savoir-faire-linux-patches
						  '("endianness"
						    "gnutls"
						    "notestsapps"
						    "ipv6"
						    "ice_config"
						    "multiple_listeners"
						    "pj_ice_sess"
						    "fix_turn_fallback"
						    "fix_ioqueue_ipv6_sendto"
						    "add_dtls_transport")))
					     (mkdir savoir-faire-linux-patches-directory)
					     (system* "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)
						(zero?
						 (system* "patch" "--force" "-p1" "-i"
							  (string-append savoir-faire-linux-patches-directory "/"
									 file ".patch"))))
					      savoir-faire-linux-patches))))
		       (add-before 'build 'build-dep
				   (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-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).
     (license '(license:gpl2+ ; NEW pjproject is under GNU GPL 2+, not
			      ; GNU GPL 2 (only).
		license:gpl3))))) ; Last time we checked, the
				  ; Savoir-faire Linux patches were
				  ; under GNU GPL 3 (only). Is this
				  ; still true?

(define-public argon2
  (package
   (name "argon2")
   (version "20161029")
   (source
    (origin
     (method url-fetch)
     (uri
      (string-append "https://github.com/P-H-C/phc-winner-argon2/archive/"
		     version ".tar.gz"))
     (file-name (string-append name "-" version ".tar.gz"))
     (snippet
      ;; As we already know, this is probably better to be already
      ;; included in argon2.
      '(let ((p (open-file "argon2.pc" "w")))
	 (begin
	   (display
	    (string-append "prefix=/usr/local\n"
			   "exec_prefix=${prefix}\n"
			   "includedir=${prefix}/include\n"
			   "libdir=${prefix}/lib\n\n"
			   "Name: Argon2\n"
			   "Description: "
			   "The Argon2 password hashing algorithm\n"
			   "Version: 1.0.0\n"
			   "Cflags: -I${includedir}/\n"
			   "Libs: -L${libdir} -largon2\n") p)
	   (close-output-port p))))
     (sha256
      (base32
       "1rymikbysasdadm325jx69i0q19d9srqkny69jwmhswlidr4j07y"))))
   (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
				(lambda _
				  (substitute* "argon2.pc"
					       (("/usr/local")
						(assoc-ref %outputs "out")))))
		     (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" (string-append out "/lib"))
				  (install-file "argon2.pc"
						(string-append out "/lib/pkgconfig"))
				  (copy-recursively "include"
						    (string-append out "/include"))
				  (symlink (string-append out "/lib/libargon2.so")
					   (string-append out "/lib/libargon2.so.0"))))))))
   (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 opendht
  (package
   (name "opendht")
   (version "1.3.0")
   (source
    (origin
     (method url-fetch)
     (uri
      (string-append
       "https://github.com/savoirfairelinux/" name
       "/archive/" version ".tar.gz"))
     (file-name (string-append name "-" version ".tar.gz"))
     (modules '((guix build utils)))
     (snippet
      '(begin
	 (delete-file-recursively "src/argon2")
	 (substitute* "src/Makefile.am"
		      (("./argon2/libargon2.la") "")
		      (("SUBDIRS = argon2") "")
		      (("libopendht_la_LDFLAGS = @LDFLAGS@" all)
		       (string-append all " @argon2_LIBS@")))
	 (substitute* "src/crypto.cpp"
		      (("argon2/argon2.h") "argon2.h"))
	 (substitute* "configure.ac"
		      (("src/argon2/Makefile") "")
		      (("PKG_CHECK_MODULES\\(\\[[Gg][Nn][Uu][Tt][Ll][Ss]\\],[[:blank:]]+\\[gnutls.*$" all)
		       (string-append all "PKG_CHECK_MODULES([argon2], [argon2])\n")))
	 (substitute* "opendht.pc.in"
		      (("Libs: -L\\$\\{libdir\\} -lopendht" all)
		       (string-append all "\nRequires: argon2")))))
     (sha256
      (base32
       "1gqsxjfv7l5m25zxsyxyp70abcf3bvz3iqkv5aa1lj6fzz1rliws"))))
   (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 '("--disable-tools"
			  "--disable-python")
      #: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.")
   (license license:gpl3+))) ; NEW It's under GNU GPL3+.

(define-public savoir-faire-linux-asio
  (let ((savoir-faire-linux-patches
	 (origin
	  (method url-fetch)
	  (uri "http://dl.ring.cx/ring-release/tarballs/ring_20170316.1.06a3f0b.tar.gz")
	  (sha256
	   (base32
	    "1nqpql3343d7icjfbzlwkm8ai5hrx54x03v726g5d6c24ixlzdrb")))))
    (package
     (name "asio")
     (version "28d9b8d")
     (source
      (origin
       (method url-fetch)
       (uri "https://github.com/chriskohlhoff/asio/archive/28d9b8d6df708024af5227c551673fdb2519f5bf.tar.gz")
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
	(base32 "07wp56vibqp1qp8ca1ahbhs8md7k22im7nmlx0haqxdgszp1zcvb"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("autoconf" ,autoconf)
	("automake" ,automake)
	("savoir-faire-linux-patches" ,savoir-faire-linux-patches)))
     (arguments
      ;; Comes from "ring-project/daemon/contrib/src/asio/rules.mak".
      ;; We must talk to Ring to know if disabling Asio integration
      ;; with Boost is a requirement.
      `(#:configure-flags '("--without-boost")
	#:phases
	(modify-phases %standard-phases
		       (add-after 'unpack 'change-directory-and-apply-patches
				  (lambda* (#:key inputs #:allow-other-keys)
					   (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
						 ;; These patches just
						 ;; disable tests and
						 ;; examples.  We
						 ;; should convince
						 ;; Ring to send these
						 ;; patches to their
						 ;; upstream, asio.
						 (savoir-faire-linux-patches
						  '("no_tests_examples")))
					     (chdir "asio")
					     (mkdir savoir-faire-linux-patches-directory)
					     (system* "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
						      "-C" savoir-faire-linux-patches-directory "--strip-components=5" "ring-project/daemon/contrib/src/asio")
					     (for-each
					      (lambda (file)
						(zero?
						 (system* "patch" "--force" "-p1" "-i"
							  (string-append savoir-faire-linux-patches-directory "/"
									 file ".patch"))))
					      savoir-faire-linux-patches))))
		       (add-before 'configure 'run-autogen
				  (lambda _
				    (zero? (system* "./autogen.sh")))))))
     (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:boost1.0))))

(define-public savoir-faire-linux-restbed
  (let ((savoir-faire-linux-patches
	 (origin
	  (method url-fetch)
	  (uri "http://dl.ring.cx/ring-release/tarballs/ring_20170316.1.06a3f0b.tar.gz")
	  (sha256
	   (base32
	    "1nqpql3343d7icjfbzlwkm8ai5hrx54x03v726g5d6c24ixlzdrb")))))
    (package
     (name "restbed")
     (version "3418750")
     (source
      (origin
       (method url-fetch)
       (uri "https://github.com/Corvusoft/restbed/archive/34187502642144ab9f749ab40f5cdbd8cb17a54a.tar.gz")
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
	(base32 "1c96w83v0iz61bqd0safza698g8622dhsrrf01aigibj4cmsbjph"))))
     (build-system cmake-build-system)
     (inputs
      `(("asio" ,savoir-faire-linux-asio)
	("catch" ,catch-framework)
	("glibc" ,glibc)
	("openssl" ,openssl)))
     (native-inputs
      `(("savoir-faire-linux-patches" ,savoir-faire-linux-patches)))
     (arguments
      `(#:tests? #f
	;; Comes from "ring-project/daemon/contrib/src/restbed/rules.mak".
	#:configure-flags
	'("-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 ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
						 (asio (assoc-ref inputs "asio"))
						 (catch (assoc-ref inputs "catch"))
						 (glibc (assoc-ref inputs "glibc"))
						 (openssl (assoc-ref inputs "openssl"))
						 ;; These patches deal
						 ;; with minor fixes.
						 ;; We should convince
						 ;; Ring upstream to
						 ;; send these patches
						 ;; to their upstream,
						 ;; restbed.
						 (savoir-faire-linux-patches
						  '("CMakeLists"
						    "strand"
						    "uri_cpp")))
					     (mkdir savoir-faire-linux-patches-directory)
					     (system* "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
						      "-C" savoir-faire-linux-patches-directory "--strip-components=5" "ring-project/daemon/contrib/src/restbed")
					     (for-each
					      (lambda (file)
						(zero?
						 (system* "patch" "--force" "-p1" "-i"
							  (string-append savoir-faire-linux-patches-directory "/"
									 file ".patch"))))
					      savoir-faire-linux-patches)
					     (substitute* "cmake/modules/Findasio.cmake"
							 (("(find_path\\( asio_INCLUDE asio\\.hpp HINTS ).*$" all begin)
							  (string-append begin " \"" asio "/include\" )")))
					     (substitute* "cmake/modules/Findcatch.cmake"
							 (("(find_path\\( catch_INCLUDE catch\\.hpp HINTS ).*$" all begin)
							  (string-append begin " \"" catch "/include\" )")))
					     (substitute* "cmake/modules/Findopenssl.cmake"
							 (("(find_library\\( ssl_LIBRARY ssl ssleay32 HINTS ).*$" all begin)
							  (string-append begin " \"" openssl "/lib\" )"))
							 (("(find_library\\( crypto_LIBRARY crypto libeay32 HINTS ).*$" all begin)
							  (string-append begin " \"" openssl "/lib\" )"))
							 (("(find_path\\( ssl_INCLUDE openssl/ssl\\.h HINTS ).*$" all begin)
							  (string-append begin " \"" openssl "/include\" )")))
					     (substitute* "cmake/modules/Findsyslog.cmake"
							 (("(find_path\\( syslog_INCLUDE syslog\\.h HINTS ).*$" all begin)
							  (string-append begin " \"" glibc "/include\" )")))))))))
     (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+))))

(define-public crypto++
  (package
   (name "crypto++")
   (version "5.6.5")
   (source (origin
	    (method url-fetch)
	    (uri (let ((numeric-version
			(match (string-split version #\.)
			       ((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
      (list (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
				;; ??? Why are we in the TestData folder.
				(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 version)))
					   (with-directory-excursion (string-append out "/lib")
								     (symlink (string-append "libcryptopp.so." ,version)
									      (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 (list license:boost1.0
		  license:public-domain))))

(define-public libring
  (package
   (name "libring")
   (version "20170316.1.06a3f0b")
   (source
    (origin
     (method url-fetch)
     (uri "http://dl.ring.cx/ring-release/tarballs/ring_20170316.1.06a3f0b.tar.gz")
     (modules '((guix build utils)))
     (snippet
      '(begin
	 (delete-file-recursively "daemon/contrib")))
     (sha256
      (base32
       "1nqpql3343d7icjfbzlwkm8ai5hrx54x03v726g5d6c24ixlzdrb"))))
   (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)
      ("libva" ,libva)
      ("opendht" ,opendht)
      ("opus" ,opus)
      ("pcre" ,pcre)
      ("pjproject" ,savoir-faire-linux-pjproject)
      ("pulseaudio" ,pulseaudio)
      ("libsamplerate" ,libsamplerate)
      ("libsndfile" ,libsndfile)
      ("speex" ,speex)
      ("libupnp" ,libupnp)
      ("libvorbis" ,libvorbis)
      ("libx264" ,libx264)
      ("yaml-cpp" ,yaml-cpp)
      ("zlib" ,zlib)
      ;; These were added by adfeno here for now, please fix this if
      ;; this isn't the right place for them,
      ("crypto++" ,crypto++)
      ("python" ,python)
      ("python-wrapper" ,python-wrapper)
      ("restbed" ,savoir-faire-linux-restbed)
      ("libx11" ,libx11)))
   (native-inputs
    `(("autoconf" ,autoconf)
      ("pkg-config" ,pkg-config)
      ("automake" ,automake)
      ("libtool" ,libtool)
      ("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")))
		     (add-before 'configure 'autoconf
				 (lambda _
				   (zero? (system* "autoreconf" "-vfi"))))
		     (add-before 'build 'add-lib-dir
				 (lambda _
				   (mkdir "src/lib"))))))
   (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.

This package provides a library and daemon implementing the Ring core 
functionality.")
   (home-page "https://gnu.org/software/ring")
   (license license:gpl3+)))

(define-public libringclient
  (package
   (name "libringclient")
   (version "20170316.1.06a3f0b")
   (source
    (origin
     (method url-fetch)
     (uri "http://dl.ring.cx/ring-release/tarballs/ring_20170316.1.06a3f0b.tar.gz")
     (sha256
      (base32
       "1nqpql3343d7icjfbzlwkm8ai5hrx54x03v726g5d6c24ixlzdrb"))))
   (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"))
			   ;; "/daemon/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))))))))
   (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.

This package provides a library common to all Ring clients.")
   (home-page "https://gnu.org/software/ring")
   (license license:gpl3+)))

(define-public ring-client-gnome
  ;; FIXME Find a way to tell Guix to only build what is inside
  ;; "client-gnome" path.
  (package
   (name "ring-client-gnome")
   (version "20170316.1.06a3f0b")
   (source
    (origin
     (method url-fetch)
     (uri "http://dl.ring.cx/ring-release/tarballs/ring_20170316.1.06a3f0b.tar.gz")
     (sha256
      (base32
       "1nqpql3343d7icjfbzlwkm8ai5hrx54x03v726g5d6c24ixlzdrb"))))
   (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"))))))
   (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.

This package provides the Ring client for the Gnome Desktop.")
   (home-page "https://gnu.org/software/ring")
   (license license:gpl3+)))

  parent reply	other threads:[~2017-03-22 19:20 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 [this message]
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
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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87a88d3yql.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).