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: Thu, 20 Apr 2017 10:55:13 -0300	[thread overview]
Message-ID: <871ssnuqta.fsf@openmailbox.org> (raw)
In-Reply-To: 87shma18an.fsf@openmailbox.org

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

Hi all! :)

I bring you a request: We might need "real" developers working on this
--- because I don't know how to make programs in the languages being
used by upstreams. Also, I'm somewhat "up to my ears" on study paperwork
now. :)

I have attached an improved set of recipes (in one .scm file, still not
a patch), that take suggestions from
[[https://lists.gnu.org/archive/html/ring/2017-03/msg00007.html]] ---
the list archive item doesn't show it, but someone replied privately to
me saying that msgpack must be made with "C++11" set.

Here is the notes that I have made so far:

- I did not test the changes I made yet, but I plan to once I can
  upgrade my packages installed through Guix.

- Updated commit of ring-project.tar.gz still has lots of patches that
  are applied to their upstream. The attached set of recipes, however,
  doesn't have the updated version yet (due to lack of my time).

  - Also, I just tried contacting pjsip/pjproject on an old issue that
    relates to the "gnutls" patch:
    [[http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2017-April/019937.html]].

- For the detailed questions of which license the patched *result*
  should have, I recommend you to talk to ssalenick and dkc in #ring
  channel at chat.freenode.net, because I already talked with them
  briefely. Also, if they don't remember, tell them that they were
  discussing this with "adfeno".

- Other notes are in the .scm file.

[-- Attachment #2: ring.scm --]
[-- Type: application/octet-stream, Size: 29831 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 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.

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

;;; Based on
;;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01541.html>.
(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".
						 ;; 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.
						 (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;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).
     (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?

;;; From <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01937.html>.
(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 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
  (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 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))))))

(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)
     (inputs
      `(("boost" ,boost)))
     (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")
	#:configure-flags '((string-append "--with-boost=\""
					   (assoc-ref inputs "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")
						 ;; 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.
						 (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)))
     (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"))
						 ;; 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
						  '("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/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+))))

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

;;; Based on
;;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01061.html>.
(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)
      ("opendht-with-msgpack-c++-11" ,opendht-with-msgpack-c++-11)
      ("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+)))

;;; Based on
;;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01062.html>.
(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+)))

;;; Based on
;;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01063.html>.
(define-public ring-client-gnome
  (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-04-20 13:55 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 [this message]
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=871ssnuqta.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).