1{ stdenv, fetchurl, fetchpatch, pkgconfig, bison, flex, unixODBC
2, openssl, openldap, cyrus_sasl, kerberos, expat, SDL, libdv, libv4l, alsaLib }:
3
4stdenv.mkDerivation rec {
5 name = "ptlib-2.10.11";
6
7 src = fetchurl {
8 url = "mirror://gnome/sources/ptlib/2.10/${name}.tar.xz";
9 sha256 = "1jf27mjz8vqnclhrhrpn7niz4c177kcjbd1hc7vn65ihcqfz05rs";
10 };
11
12 NIX_CFLAGS_COMPILE = "-std=gnu++98";
13
14 nativeBuildInputs = [ pkgconfig ];
15 buildInputs = [ bison flex unixODBC openssl openldap
16 cyrus_sasl kerberos expat SDL libdv libv4l alsaLib ];
17
18 enableParallelBuilding = true;
19
20 patches = [
21 (fetchpatch { url = http://sources.debian.net/data/main/p/ptlib/2.10.11~dfsg-2.1/debian/patches/bison-fix;
22 sha256 = "0vzv9kyn9s628z8wy2gva380gi1rmhxilwlg5pikl5a0wn8p46nw";
23 })
24 (fetchpatch { url = http://sources.debian.net/data/main/p/ptlib/2.10.11~dfsg-2.1/debian/patches/no-sslv3;
25 sha256 = "172s1dnnrl54p9sf1nl7s475sm78rpw3p8jxi0pdx6izzl8hcdr0";
26 })
27 ./ptlib-2.10.11-glibc-2.26.patch
28 ];
29
30 # fix typedef clashes with unixODBC>=2.3.5
31 postPatch = ''
32 substituteInPlace include/ptlib/unix/ptlib/contain.h \
33 --replace "typedef uintptr_t UINT" "typedef unsigned int UINT" \
34 --replace "typedef wchar_t WCHAR" "typedef unsigned short WCHAR"
35 '';
36
37 meta = with stdenv.lib; {
38 description = "Portable Tools from OPAL VoIP";
39 maintainers = [ maintainers.raskin ];
40 platforms = platforms.linux;
41 };
42
43 passthru = {
44 updateInfo = {
45 downloadPage = "http://ftp.gnome.org/sources/ptlib/";
46 };
47 };
48}