unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Continuing the work on the recipes related to GNU Ring
@ 2017-03-18 23:20 Adonay Felipe Nogueira
  2017-03-19  2:25 ` John Darrington
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Adonay Felipe Nogueira @ 2017-03-18 23:20 UTC (permalink / raw)
  To: Desenvolvimento de Guix e GuixSD

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

Here is a work-in-progress set of package definitions, the packages are
upgraded to their latest version, except for:

- pjproject(-sfl) :: Which I upgraded to 2.5.5 so as to respect the
  compatibility of the patches that are in "[Tarball with
  sfl-patches]/ring-project/daemon/contrib/src/pjproject". Although
  version 2.6 of the original pjprojects is out.

- argon2 and opendht :: For which I copied the recipe from Guix servers,
  bud didn't check for new versions yet (not even in the original
  recipes). I copied the original ones so as to try to apply the changes
  proposed by Mx. Gradl. However, I do know that we must send changes to
  upstream (this is why the first FIXME reflects such need), I just want
  to have a working patch (no need to commit it) so as to make sure
  things work across all Guix users.

Currently, the "configure" phase of the "libring" package is failing due
to missing "restbed" dependency.

-- 
- [[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: 16520 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 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 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 xiph)
  #: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))

;;; FIXME Send patches to upstream.

(define-public pjproject-sfl
  (let ((sfl-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
	   ;; The following removes bundled packages except for 'resample'.
	   ;; Pjproject uses some of the source files of resample and one own
	   ;; header (resamplesubs.h) not included with resample to build a
	   ;; shared library.  Upstream resample does not build this
	   ;; library. The license of resample is the LGPL2;; The homepage of resample is at:
	   ;; https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html
	   (let ((third-party-directories
		  (list "BaseClasses" "bdsound" "bin" "g7221" "gsm"
			"ilbc" "lib" "milenage" "mp3" "speex" "srtp"
			;; 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.
	     (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")))
	     (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
      `(("sfl-patches" ,sfl-patches)
	;; These patches are distributed with the libring source.  They
	;; contain various nontrivial changes such as the use of gnutls
	;; instead of openssl.
	("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".
	(list "--disable-oss"
	      "--disable-sound"
	      "--disable-video"
	      "--enable-ext-sound"
	      "--disable-speex-aec"
	      "--disable-g711-codec"
	      "--disable-l16-codec"
	      "--disable-gsm-codec"
	      "--disable-g722-codec"
	      "--disable-g7221-codec"
	      "--disable-speex-codec"
	      "--disable-ilbc-codec"
	      "--disable-opencore-amr"
	      "--disable-silk"
	      "--disable-sdl"
	      "--disable-ffmpeg"
	      "--disable-v4l2"
	      "--disable-openh264"
	      "--disable-resample"
	      "--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)
					   (let ((patch-dir "patch-dir")
						 ;; Comes from
						 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
						 (patches
						  '("endianness"
						    "gnutls"
						    "notestsapps"
						    "ipv6"
						    "ice_config"
						    "multiple_listeners"
						    "pj_ice_sess"
						    "fix_turn_fallback"
						    "fix_ioqueue_ipv6_sendto"
						    "add_dtls_transport")))
					     (mkdir patch-dir)
					     (system* "tar" "-xvf" (assoc-ref inputs "sfl-patches")
						      "-C" patch-dir "--strip-components=5" "ring-project/daemon/contrib/src/pjproject")
					     (for-each
					      (lambda (file)
						(zero?
						 (system* "patch" "--force" "-p1" "-i"
							  (string-append patch-dir "/"
									 file ".patch"))))
					      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.")
     (license '(license:gpl2 ; pjproject
		license:gpl3 ; sfl-patches
		license:lgpl2+))))) ; bundled resample

(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
      '(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 "0.6.1")
   (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@")
		       "libopendht_la_LDFLAGS = @LDFLAGS@ @argon2_LIBS@"))
	 (substitute* "src/crypto.cpp"
		      (("argon2/argon2.h") "argon2.h"))
	 (substitute* "configure.ac"
		      (("src/argon2/Makefile") "")
		      (("PKG_CHECK_MODULES..GNUTLS.. .gnutls .. 3.1..")
		       "PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.1])\nPKG_CHECK_MODULES([argon2], [argon2 >= 1.0])"))
	 (substitute* "opendht.pc.in"
		      (("Libs: -L..libdir. -lopendht")
		       (string-append "Libs: -L${libdir} -lopendht\n"
				      "Requires: argon2")))))
     (sha256
      (base32
       "09yvkmbqbym3b5md4n96qc1s9sf2n8ji404hagih45rmsj49599x"))))
   (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)))

(define-public libring
  ;; FIXME "configure" phase Fails due to missing "restbed".
  (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)
      ("opendht" ,opendht)
      ("opus" ,opus)
      ("pcre" ,pcre)
      ("pjproject" ,pjproject-sfl)
      ("pulseaudio" ,pulseaudio)
      ("libsamplerate" ,libsamplerate)
      ("libsndfile" ,libsndfile)
      ("speex" ,speex)
      ("libupnp" ,libupnp)
      ("libvorbis" ,libvorbis)
      ("libx264" ,libx264)
      ("yaml-cpp" ,yaml-cpp)
      ("zlib" ,zlib)))
   (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-before 'configure 'change-directory-and-do-autoconf
				 (lambda _
				   (chdir "daemon")
				   (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://ring.cx/")
   (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")
	     "/daemon/include"))
      #:phases
      (modify-phases %standard-phases
		     (add-after 'configure 'find-dbus-interfaces
				(lambda* (#:key inputs outputs #:allow-other-keys)
					 (substitute* "CMakeFiles/ringclient.dir/build.make"
						      (((string-append (assoc-ref outputs "out")
								       "/share/dbus-1/interfaces"))
						       (string-append (assoc-ref inputs "libring")
								      "/daemon/share/dbus-1/interfaces"))))))))
   (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://ring.cx/")
   (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)))
   (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-before 'configure '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://ring.cx/")
   (license license:gpl3+)))

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-07-30 14:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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