From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukas Gradl Subject: [Patch 1/10] Add pjproject. Date: Mon, 12 Sep 2016 21:23:24 -0500 Message-ID: <87inu01qsj.fsf@openmailbox.org> References: <87mvjc1quq.fsf@openmailbox.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjdNp-000768-8z for guix-devel@gnu.org; Mon, 12 Sep 2016 22:23:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjdNl-0000mK-Sl for guix-devel@gnu.org; Mon, 12 Sep 2016 22:23:37 -0400 Received: from smtp8.openmailbox.org ([62.4.1.42]:52439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjdNl-0000m0-H4 for guix-devel@gnu.org; Mon, 12 Sep 2016 22:23:33 -0400 In-Reply-To: <87mvjc1quq.fsf@openmailbox.org> (Lukas Gradl's message of "Mon, 12 Sep 2016 21:22:05 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-Add-pjproject.patch Content-Transfer-Encoding: quoted-printable From=20d6a6a5ded95071a58a160a435ccf56d6828148b0 Mon Sep 17 00:00:00 2001 From: Lukas Gradl Date: Wed, 20 Jul 2016 21:26:32 -0500 Subject: [PATCH 01/10] gnu: Add pjproject * gnu/packages/telephony.scm (pjproject-sfl): New variable. =2D-- gnu/packages/telephony.scm | 181 +++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 181 insertions(+) diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index d8a33dd..4893dbd 100644 =2D-- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -23,6 +23,7 @@ =20 (define-module (gnu packages telephony) #:use-module (gnu packages) + #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages gnupg) #:use-module (gnu packages linux) @@ -34,6 +35,7 @@ #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu)) =20 (define-public commoncpp @@ -286,3 +288,182 @@ lists. All you need to join an existing conference i= s the host name or IP address of one of the participants.") (home-page "http://holdenc.altervista.org/seren/") (license gpl3+))) + +(define-public pjproject-sfl + (let ((sfl-patches + (let ((commit "3dbedf53e9cceebb1eed155b5143026f6d253cb8")) + (origin + (method git-fetch) + (uri + (git-reference + (url + "https://gerrit-ring.savoirfairelinux.com/ring-daemon.git") + (commit commit))) + (file-name (string-append "sfl-patches" "-" "0.0.0-1." + (string-take commit 7) "-checkout"= )) + (modules '((guix build utils) + (ice-9 ftw))) + (snippet + '(let ((files (scandir "." (lambda (file) + (if (or (string=3D? file ".") + (string=3D? file "..")) + #f + #t))))) + (mkdir-p "sfl-patches") + (copy-recursively "contrib/src/pjproject/" "sfl-patches") + (for-each delete-file-recursively files))) + (sha256 + (base32 + "1xnvkv0h24zr1dcmp7djjhqgzvrwic242jy4hb3m5qv71azvcsqg")))))) + (package + (name "pjproject") + (version "2.4") + (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 o= wn + ; 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_Soft= ware.html + (let ((third-party-directories + (list "BaseClasses" "bdsound" "bin" "g7221" "gsm" + "ilbc" "lib" "milenage" "mp3" "portaudio" + "speex" "srtp" ; Keep only resample, build and + ; README.txt. + "build/baseclasses" "build/g7221" "build/gsm" + "build/ilbc" "build/milenage" "build/portaudio" + "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" "portaudio" + "g7221" "srtp"))) + (for-each + (lambda (dirs) + (substitute* "third_party/build/os-linux.mak" + (((string-append "DIRS +=3D " dirs)) ""))) + third-party-dirs)) + (substitute* "aconfigure.ac" + (("third_party/build/portaudio/os-auto.mak") "")))) + (sha256 + (base32 + "0n90n1p41svf23d4fag8jqbjnv82fz14z6zchb8j1kldvap1b00h")))) + ;"13fx7kpf1sswj7r0zl7fqkzg3rl5xz3dl96wdnv15qxfviq5wvq8")))) 2.4= .5 + (build-system gnu-build-system) + (inputs + `(("portaudio" ,portaudio))) ; It might be possible to remove this. + (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 vari= ous + ; nontrivial changes such as the use= of + ; gnutls instead of openssl. + ("autoconf" ,autoconf) + ("automake" ,automake) + ("pkg-config" ,pkg-config) + ("libtool" ,libtool))) + (arguments + `(#:test-target + "selftest" + #:configure-flags + (list "--disable-oss" + "--disable-sound" + "--disable-video" + "--enable-ext-sound" + "--disable-g711-codec" + "--disable-l16-codec" + "--disable-gsm-codec" + "--disable-g722-codec" + "--disable-g7221-codec" + "--disable-ilbc-codec" + "--disable-opencore-amr" + "--disable-sdl" + "--disable-ffmpeg" + "--disable-v4l2" + "--enable-ssl=3Dgnutls" + "--with-external-speex" + "--with-external-pa" + "--with-external-srtp") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'apply-patches + (lambda* (#:key inputs #:allow-other-keys) + (begin + (mkdir "patch-dir") + (system* "tar" "-xvf" (assoc-ref inputs "sfl-patches") + "-C" "patch-dir" "--strip-components=3D1") + (let ((patch-dir + (string-append "patch-dir" "/sfl-patches")) + (patches + '("errno" "endianness" "gnutls" "ipv6" "ice_config" + "multiple_listeners" "pj_ice_sess"))) + (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 + (lambda _ + (substitute* "Makefile" + (((string-append + "selftest: " + "pjlib-test " + "pjlib-util-test " + "pjnath-test " ; This test fails. + "pjmedia-test " + "pjsip-test " ; This test fails. + "pjsua-test")) ; This test fails. This test would need + ; python. + (string-append + "selftest: " + "pjlib-test " + "pjlib-util-test " + "pjmedia-test"))))) + (add-before 'autoconf 'set-flags + (lambda _ + (setenv "CFLAGS" + (string-append + "-DPJ_ICE_MAX_CAND=3D32" " " + "-DPJ_ICE_MAX_CHECKS=3D150" " " + "-DPJ_ICE_COMP_BITS=3D2"))))))) + (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 '(gpl2+ ; pjproject + gpl3+ ; sfl-patches + lgpl2+))))) ; bundled resample + =2D-=20 2.9.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX12McAAoJEFP7dyh+2DCRul8P/0PDL4K93p+nVdIQf9XGTvo5 5zOuQbk2UzR8S0swPEVKOSfSAjKCorPA6aD/DJlcQGjlXlltM2Le6QFYStFWO324 68fnlJeUVLCCfkECPzvRougs2KUYgMG512kx+3sgTxd8SLXmWGZKM0pfU1PLLiFa 7uGmNzI3XEAE3UFdHVcmVpHo4LfCfL7gEs9AgkCKjnH6yY5SHqlbLulkwG+LioT3 kPCK/fbek+osbiJ9NBGQrOiFIef5poVBP5Ow47JuHV5ORYOEs3kjsqs1JET4vQ9U poQNl8jHIccWUry/CVtrAj7d8rpEZU0OjK/+wAZb9liyODn7ifoaXGQA2k+uUEy0 hvEPH4YHCupimTJhrIKcjRbqE8qewcqWsrWk0CmYOUQoL8H1415btq+PvSY5lftE OEznUlQhRSy88QYybO2tmW5yXdchdVB8FL0mbh/2hRr2PHjsio7r6RAQJLm5SrZb T1yFwmU1KA+JAJZFq4FbnkB0xl26VnVZ09dnWoqudU0m6DJU/gZo7x4jbLFwqxuU E9MPlhWJj/nkHcz5aYMLVK5m4rO5YoJh5Vtc7fXVGpgiAqoAjGJ0k7L9gbrIdsoM A8xV2Udz/gqHK1JAF4SYlZBYHFFBZAL4lq5TsW76mioHOx+1EOSvClkSMinncYSw NOxgUNh6Kxbcc1DZB/nE =cizy -----END PGP SIGNATURE----- --==-=-=--