Merge x-updates

This commit is contained in:
Vladimír Čunát
2013-12-25 23:56:41 +01:00
87 changed files with 778 additions and 1023 deletions

View File

@@ -1,11 +1,15 @@
{ stdenv, fetchurl, pkgconfig, perl, glib, libintlOrEmpty, gobjectIntrospection }:
let
ver_maj = "2.10";
ver_min = "0";
in
stdenv.mkDerivation rec {
name = "atk-2.8.0";
name = "atk-${ver_maj}.${ver_min}";
src = fetchurl {
url = "mirror://gnome/sources/atk/2.8/${name}.tar.xz";
sha256 = "1x3dd3hg9l1j9dq70xwph13vxdp6a9wbfcnryryf1wr6c8bij9dj";
url = "mirror://gnome/sources/atk/${ver_maj}/${name}.tar.xz";
sha256 = "1c2hbg66wfvibsz2ia0ri48yr62751fn950i97c53j3b0fjifsb3";
};
buildInputs = libintlOrEmpty;
@@ -14,6 +18,8 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ glib gobjectIntrospection /*ToDo: why propagate*/ ];
#doCheck = true; # no checks in there (2.10.0)
postInstall = "rm -rf $out/share/gtk-doc";
meta = {

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl, atk, glibmm, pkgconfig }:
stdenv.mkDerivation rec {
name = "atkmm-2.22.6";
name = "atkmm-2.22.7";
src = fetchurl {
url = mirror://gnome/sources/atkmm/2.22/atkmm-2.22.6.tar.xz;
sha256 = "1dmf72i7jv2a2gavjiah2722bf5qk3hb97hn5dasxqxr0r8jjx0a";
url = "mirror://gnome/sources/atkmm/2.22/${name}.tar.xz";
sha256 = "06zrf2ymml2dzp53sss0d4ch4dk9v09jm8rglnrmwk4v81mq9gxz";
};
propagatedBuildInputs = [ atk glibmm ];

View File

@@ -1,86 +0,0 @@
{ postscriptSupport ? true
, pdfSupport ? true
, pngSupport ? true
, xcbSupport ? false
, gobjectSupport ? true, glib
, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype, xlibs
, zlib, libpng, pixman, libxcb ? null, xcbutil ? null
, libiconvOrEmpty, libintlOrEmpty
}:
assert postscriptSupport -> zlib != null;
assert pngSupport -> libpng != null;
assert xcbSupport -> libxcb != null && xcbutil != null;
stdenv.mkDerivation rec {
name = "cairo-1.12.2";
src = fetchurl {
url = "http://cairographics.org/releases/${name}.tar.xz";
sha1 = "bc2ee50690575f16dab33af42a2e6cdc6451e3f9";
};
buildInputs =
[ pkgconfig x11 fontconfig xlibs.libXrender ]
++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ]
++ libintlOrEmpty
++ libiconvOrEmpty;
propagatedBuildInputs =
[ freetype pixman ] ++
stdenv.lib.optional gobjectSupport glib ++
stdenv.lib.optional postscriptSupport zlib ++
stdenv.lib.optional pngSupport libpng;
NIX_CFLAGS_COMPILE = ( if stdenv.isDarwin
then "-I${pixman}/include/pixman-1"
else "" );
configureFlags =
[ "--enable-tee" ]
++ stdenv.lib.optional xcbSupport "--enable-xcb"
++ stdenv.lib.optional pdfSupport "--enable-pdf";
preConfigure = ''
# Work around broken `Requires.private' that prevents Freetype
# `-I' flags to be propagated.
sed -i "src/cairo.pc.in" \
-es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype}/include/freetype2 -I${freetype}/include|g'
''
# On FreeBSD, `-ldl' doesn't exist.
+ (stdenv.lib.optionalString stdenv.isFreeBSD
'' for i in "util/"*"/Makefile.in" boilerplate/Makefile.in
do
cat "$i" | sed -es/-ldl//g > t
mv t "$i"
done
'');
enableParallelBuilding = true;
# The default `--disable-gtk-doc' is ignored.
postInstall = "rm -rf $out/share/gtk-doc";
meta = {
description = "A 2D graphics library with support for multiple output devices";
longDescription = ''
Cairo is a 2D graphics library with support for multiple output
devices. Currently supported output targets include the X
Window System, Quartz, Win32, image buffers, PostScript, PDF,
and SVG file output. Experimental backends include OpenGL
(through glitz), XCB, BeOS, OS/2, and DirectFB.
Cairo is designed to produce consistent output on all output
media while taking advantage of display hardware acceleration
when available (e.g., through the X Render Extension).
'';
homepage = http://cairographics.org/;
licenses = [ "LGPLv2+" "MPLv1" ];
platforms = stdenv.lib.platforms.all;
};
}

View File

@@ -3,12 +3,16 @@
gobjectIntrospection
}:
stdenv.mkDerivation {
name = "clutter-1.8.2";
let
ver_maj = "1.16";
ver_min = "2";
in
stdenv.mkDerivation rec {
name = "clutter-${ver_maj}.${ver_min}";
src = fetchurl {
url = mirror://gnome/sources/clutter/1.8/clutter-1.8.2.tar.xz;
sha256 = "0bzsvnharawfg525lpavrp55mq4aih5nb01dwwqwnccg8hk9z2fw";
url = "mirror://gnome/sources/clutter/${ver_maj}/${name}.tar.xz";
sha256 = "0hnz6fnrkc7ixrm2x83sxyha32p9896d7ilzhvxwfgzlh26fidqc";
};
nativeBuildInputs = [ pkgconfig ];
@@ -19,6 +23,8 @@ stdenv.mkDerivation {
configureFlags = [ "--enable-introspection" ]; # needed by muffin AFAIK
#doCheck = true; # no tests possible without a display
meta = {
description = "Clutter, a library for creating fast, dynamic graphical user interfaces";

View File

@@ -1,22 +1,33 @@
{ stdenv, fetchurl, pkgconfig, mesa, glib, gdk_pixbuf, libXfixes, libXcomposite
, libXdamage, libintlOrEmpty
, pangoSupport ? true, pango, cairo, gobjectIntrospection }:
{ stdenv, fetchurl, pkgconfig, mesa_noglu, glib, gdk_pixbuf, xorg, libintlOrEmpty
, pangoSupport ? true, pango, cairo, gobjectIntrospection, wayland }:
let
ver_maj = "1.16";
ver_min = "0";
in
stdenv.mkDerivation rec {
name = "cogl-1.8.2";
name = "cogl-${ver_maj}.${ver_min}";
src = fetchurl {
url = mirror://gnome/sources/cogl/1.8/cogl-1.8.2.tar.xz;
sha256 = "1ix87hz3qxqysqwx58wbc46lzchlmfs08fjzbf3l6mmsqj8gs9pc";
url = "mirror://gnome/sources/cogl/${ver_maj}/${name}.tar.xz";
sha256 = "153014xygwyz9wmvgfwjxncqgc0qqvcy6b3jx1zdl3q5d9iw9hkm";
};
nativeBuildInputs = [ pkgconfig ];
configureFlags = " --enable-introspection " ;
configureFlags = [
"--enable-introspection"
"--enable-gles1"
"--enable-gles2"
"--enable-kms-egl-platform"
"--enable-wayland-egl-platform"
"--enable-wayland-egl-server"
];
propagatedBuildInputs =
[ mesa glib gdk_pixbuf libXfixes libXcomposite libXdamage
gobjectIntrospection ]
propagatedBuildInputs = with xorg; [
glib gdk_pixbuf gobjectIntrospection
mesa_noglu libXrandr libXfixes libXcomposite libXdamage wayland
]
++ libintlOrEmpty;
buildInputs = stdenv.lib.optionals pangoSupport [ pango cairo ];
@@ -27,6 +38,8 @@ gobjectIntrospection ]
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
#doCheck = true; # all tests fail (no idea why)
meta = with stdenv.lib; {
description = "A small open source library for using 3D graphics hardware for rendering";
maintainers = with maintainers; [ lovek323 ];

View File

@@ -3,8 +3,8 @@
, libX11, libICE, libSM, useX11 ? (stdenv.isLinux || stdenv.isDarwin) }:
let
version = "1.6.14"; # 1.7.* isn't recommended, even for gnome 3.8
sha256 = "0v7mcxwfmpjf7vndnvf2kf02al61clrxs36bqii20s0lawfh2xjn";
version = "1.6.16"; # 1.7.* isn't recommended, even for gnome 3.8
sha256 = "0wrmh5azszb54zpy7d0zjsy456khcv8yc19ivqrygkdg7a3l4gs6";
inherit (stdenv) lib;

View File

@@ -9,7 +9,7 @@ composableDerivation.composableDerivation {} (fixed: {
md5 = "f5592cff69b239166c9b64ff81943b1a";
};
buildInputs = [ unzip libjpeg ];
buildInputs = [ unzip libjpeg libtiff ];
# don't use optimization for gcc >= 4.3. That's said to be causeing segfaults
preConfigure = "export CFLAGS=-O0; export CXXFLAGS=-O0";

View File

@@ -1,12 +1,16 @@
{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, xz
{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11
, jasper, libintlOrEmpty, gobjectIntrospection }:
let
ver_maj = "2.30";
ver_min = "2";
in
stdenv.mkDerivation rec {
name = "gdk-pixbuf-2.28.2";
name = "gdk-pixbuf-${ver_maj}.${ver_min}";
src = fetchurl {
url = "mirror://gnome/sources/gdk-pixbuf/2.28/${name}.tar.xz";
sha256 = "05s6ksvy1yan6h6zny9n3bmvygcnzma6ljl6i0z9cci2xg116c8q";
url = "mirror://gnome/sources/gdk-pixbuf/${ver_maj}/${name}.tar.xz";
sha256 = "1gzczsv41h28is4rrxjfyj1qx8ifp23fq2ckh0k099m9fnhbzfna";
};
# !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
@@ -20,6 +24,8 @@ stdenv.mkDerivation rec {
+ stdenv.lib.optionalString (gobjectIntrospection != null) " --enable-introspection=yes"
;
doCheck = false; # broken animation tester
postInstall = "rm -rf $out/share/gtk-doc";
meta = {

View File

@@ -10,6 +10,13 @@
# Possible solution: disable compilation of this example somehow
# Reminder: add 'sed -e 's@python2\.[0-9]@python@' -i
# $out/bin/gtester-report' to postInstall if this is solved
/*
* Use --enable-installed-tests for GNOME-related packages,
and use them as a separately installed tests runned by Hydra
(they should test an already installed package)
https://wiki.gnome.org/GnomeGoals/InstalledTests
* Support org.freedesktop.Application, including D-Bus activation from desktop files
*/
let
# Some packages don't get "Cflags" from pkgconfig correctly
@@ -24,15 +31,18 @@ let
done
ln -sr -t "$out/include/" "$out"/lib/*/include/* 2>/dev/null || true
'';
ver_maj = "2.38";
ver_min = "2";
in
with { inherit (stdenv.lib) optionalString; };
stdenv.mkDerivation rec {
name = "glib-2.36.4";
name = "glib-${ver_maj}.${ver_min}";
src = fetchurl {
url = "mirror://gnome/sources/glib/2.36/${name}.tar.xz";
sha256 = "0zmdbkg2yjyxdl72w34lxvrssbzqzdficskkfn22s0994dad4m7n";
url = "mirror://gnome/sources/glib/${ver_maj}/${name}.tar.xz";
sha256 = "0d2px8m77603s5pm3md4bcm5d0ksbcsb6ik1w52hjslnq1a9hsh5";
};
# configure script looks for d-bus but it is (probably) only needed for tests

View File

@@ -1,15 +1,21 @@
{ stdenv, fetchurl, pkgconfig, glib, gdk_pixbuf, libsigcxx }:
{ stdenv, fetchurl, pkgconfig, glib, libsigcxx }:
let
ver_maj = "2.38";
ver_min = "1";
in
stdenv.mkDerivation rec {
name = "glibmm-2.34.1";
name = "glibmm-${ver_maj}.${ver_min}";
src = fetchurl {
url = "mirror://gnome/sources/glibmm/2.34/${name}.tar.xz";
sha256 = "1i4jsvahva2q0mig7kjnpsw0r3fnpybm8b6hzymfm2hpgqnaa9dl";
url = "mirror://gnome/sources/glibmm/${ver_maj}/${name}.tar.xz";
sha256 = "18n4czi6lh4ncj54apxms18xn9k8pmrp2ba9sxn0sk9w3pp2bja9";
};
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ glib gdk_pixbuf libsigcxx ];
propagatedBuildInputs = [ glib libsigcxx ];
#doCheck = true; # some tests need network
meta = {
description = "C++ interface to the GLib library";

View File

@@ -4,12 +4,16 @@
# it may be worth thinking about using multiple derivation outputs
# In that case its about 6MB which could be separated
let
ver_maj = "1.38";
ver_min = "0";
in
stdenv.mkDerivation rec {
name = "gobject-introspection-1.36.0";
name = "gobject-introspection-${ver_maj}.${ver_min}";
src = fetchurl {
url = "mirror://gnome/sources/gobject-introspection/1.36/${name}.tar.xz";
sha256 = "10v3idh489vra7pjn1g8f844nnl6719zgkgq3dv38xcf8afnvrz3";
url = "mirror://gnome/sources/gobject-introspection/${ver_maj}/${name}.tar.xz";
sha256 = "0wvxyvgajmms2bb6k3pf1rdpnd79xdxamykzvxzmcyn1ag9yax9m";
};
buildInputs = [ flex bison glib pkgconfig python ]

View File

@@ -1,5 +1,6 @@
{ stdenv, fetchurl, pkgconfig, gettext
, expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, xlibs, x11, gobjectIntrospection
{ stdenv, fetchurl, pkgconfig, gettext, perl
, expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, gobjectIntrospection
, xlibs, x11, wayland, libxkbcommon
, xineramaSupport ? stdenv.isLinux
, cupsSupport ? stdenv.isLinux, cups ? null
}:
@@ -7,17 +8,23 @@
assert xineramaSupport -> xlibs.libXinerama != null;
assert cupsSupport -> cups != null;
let
ver_maj = "3.10";
ver_min = "5"; # .6 needs currently unreleased wayland for introspection (wl_proxy_marshal_constructor)
in
stdenv.mkDerivation rec {
name = "gtk+-3.8.4";
name = "gtk+-${ver_maj}.${ver_min}";
src = fetchurl {
url = "mirror://gnome/sources/gtk+/3.8/${name}.tar.xz";
sha256 = "1qlj0qdhkp8j5xiris4l4xnx47g4pbk4qnj3nf8rwa82fwb610xh";
url = "mirror://gnome/sources/gtk+/${ver_maj}/${name}.tar.xz";
sha256 = "1iyc566r61d3jfdiq5knwbssq5bsqsn8hqzdm30vmw6dx3cgd49i";
};
enableParallelBuilding = true;
nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection ];
nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection perl ];
buildInputs = [ wayland libxkbcommon ];
propagatedBuildInputs = with xlibs; with stdenv.lib;
[ expat glib cairo pango gdk_pixbuf atk at_spi2_atk ]
++ optionals stdenv.isLinux [ libXrandr libXrender libXcomposite libXi libXcursor ]

View File

@@ -5,14 +5,16 @@ stdenv.mkDerivation rec {
src = fetchurl_gnome {
project = "gtkmm";
major = "2"; minor = "24"; patchlevel = "2"; extension = "xz";
sha256 = "0gcm91sc1a05c56kzh74l370ggj0zz8nmmjvjaaxgmhdq8lpl369";
major = "2"; minor = "24"; patchlevel = "4"; extension = "xz";
sha256 = "1vpmjqv0aqb1ds0xi6nigxnhlr0c74090xzi15b92amlzkrjyfj4";
};
nativeBuildInputs = [pkgconfig];
propagatedBuildInputs = [ glibmm gtk atkmm cairomm pangomm ];
doCheck = true;
meta = {
description = "C++ interface to the GTK+ graphical user interface library";
@@ -30,7 +32,7 @@ stdenv.mkDerivation rec {
license = "LGPLv2+";
maintainers = [stdenv.lib.maintainers.raskin];
maintainers = with stdenv.lib.maintainers; [ raskin vcunat ];
platforms = stdenv.lib.platforms.linux;
};
}

View File

@@ -1,17 +1,23 @@
{ stdenv, fetchurl, pkgconfig, gtk3, glibmm, cairomm, pangomm, atkmm }:
let
ver_maj = "3.10";
ver_min = "1";
in
stdenv.mkDerivation rec {
name = "gtkmm-3.7.12"; # gnome 3.8 release; stable 3.6 has problems with our new glibc
name = "gtkmm-${ver_maj}.${ver_min}";
src = fetchurl {
url = "mirror://gnome/sources/gtkmm/3.7/${name}.tar.xz";
sha256 = "05nrilm34gid7kqlq09hcdd7942prn2vbr1qgqvdhgy4x8pvz9p9";
url = "mirror://gnome/sources/gtkmm/${ver_maj}/${name}.tar.xz";
sha256 = "0f1587pc6x8hn268vqj5zr4dvyisj5zd9zpsfxyfm1pkbjmcv9bg";
};
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ glibmm gtk3 atkmm cairomm pangomm ];
doCheck = true;
meta = {
description = "C++ interface to the GTK+ graphical user interface library";
@@ -29,7 +35,7 @@ stdenv.mkDerivation rec {
license = "LGPLv2+";
maintainers = with stdenv.lib.maintainers; [ raskin urkud ];
maintainers = with stdenv.lib.maintainers; [ raskin urkud vcunat ];
platforms = stdenv.lib.platforms.linux;
};
}

View File

@@ -4,12 +4,16 @@
, libxml2, libxslt, docbook_xsl
, lightWeight ? true, gnome, samba, makeWrapper }:
let
ver_maj = "1.18";
version = "${ver_maj}.3";
in
stdenv.mkDerivation rec {
name = "gvfs-1.14.2";
name = "gvfs-${version}";
src = fetchurl {
url = "mirror://gnome/sources/gvfs/1.14/${name}.tar.xz";
sha256 = "1g4ghyf45jg2ajdkv2d972hbckyjh3d9jdrppai85pl9pk2dmfy3";
url = "mirror://gnome/sources/gvfs/${ver_maj}/${name}.tar.xz";
sha256 = "0b27vidnrwh6yb2ga9a1k9qlrz6lrzsaz2hcxqbc1igivhb9g0hx";
};
nativeBuildInputs = [ pkgconfig intltool libtool ];

View File

@@ -1,19 +1,30 @@
{ stdenv, fetchurl, pkgconfig, glib, freetype,
icu ? null, graphite2 ? null, libintlOrEmpty }:
{ stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintlOrEmpty
, icu, graphite2
, withIcu ? false # recommended by upstream as default, but most don't needed and it's big
, withGraphite2 ? true # it is small and major distros do include it
}:
# TODO: split non-icu and icu lib into different outputs?
# (icu is a ~30 MB dependency, the rest is very small in comparison)
stdenv.mkDerivation rec {
name = "harfbuzz-0.9.12";
name = "harfbuzz-0.9.24";
src = fetchurl {
url = "http://www.freedesktop.org/software/harfbuzz/release/${name}.tar.bz2";
sha256 = "19cx5y2m20rp7z5j7mwqfb4ph2g8lrri69zim44x362y4w5gfly6";
sha256 = "08i46xx92hvz2br2d9hdxjgi0g5jglwf5bdfsandxb0qlgc5vwpd";
};
buildInputs = [ pkgconfig glib freetype ]
configureFlags = [
( "--with-graphite2=" + (if withGraphite2 then "yes" else "no") ) # not auto-detected by default
( "--with-icu=" + (if withIcu then "yes" else "no") )
];
buildInputs = [ pkgconfig glib freetype cairo ] # recommended by upstream
++ libintlOrEmpty;
propagatedBuildInputs = []
++ (stdenv.lib.optionals (icu != null) [icu])
++ (stdenv.lib.optionals (graphite2 != null) [graphite2])
++ stdenv.lib.optional withGraphite2 graphite2
++ stdenv.lib.optional withIcu icu
;
meta = {

View File

@@ -3,15 +3,17 @@
let
pname = "icu4c";
version = "51.1";
ver_maj = "52";
ver_min = "1";
version = "${ver_maj}.${ver_min}";
in
stdenv.mkDerivation {
name = pname + "-" + version;
src = fetchurl {
url = http://download.icu-project.org/files/icu4c/51.1/icu4c-51_1-src.tgz;
sha256 = "0sv6hgkm92pm27zgjxgk284lcxxbsl0syi40ckw2b7yj7d8sxrc7";
url = "http://download.icu-project.org/files/icu4c/${version}/icu4c-${ver_maj}_${ver_min}-src.tgz";
sha256 = "14l0kl17nirc34frcybzg0snknaks23abhdxkmsqg3k9sil5wk9g";
};
postUnpack = ''

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev }:
stdenv.mkDerivation rec {
name = "libdrm-2.4.46";
name = "libdrm-2.4.50";
src = fetchurl {
url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
sha256 = "1wah4qmrrcv0gnx65lhrlxb6gprxch92wy8lhxv6102fml6k5krk";
sha256 = "0idh6cwqr2rilig7vygb3gxvivchp0q1iq4md79jq340v96d48rq";
};
nativeBuildInputs = [ pkgconfig ];

View File

@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
sha256 = "0d0jwdmj3h89bxdxlwrys2mw18mqcj4rzgb5l2ndpah8zj600mr6";
};
patches = [ ./libjpeg-turbo-1.3.0-CVE-2013-6629-and-6630.patch ];
buildInputs = [ nasm ];
doCheck = true;

View File

@@ -0,0 +1,40 @@
Thanks to the sources below; this patch discovered via Gentoo.
http://bugzilla.redhat.com/show_bug.cgi?id=1031734
http://bugzilla.redhat.com/show_bug.cgi?id=1031749
http://sourceforge.net/p/libjpeg-turbo/code/1090/
--- libjpeg-turbo-1.3.0/jdmarker.c
+++ libjpeg-turbo-1.3.0/jdmarker.c
@@ -304,7 +304,7 @@
/* Process a SOS marker */
{
INT32 length;
- int i, ci, n, c, cc;
+ int i, ci, n, c, cc, pi;
jpeg_component_info * compptr;
INPUT_VARS(cinfo);
@@ -348,6 +348,13 @@
TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
compptr->dc_tbl_no, compptr->ac_tbl_no);
+
+ /* This CSi (cc) should differ from the previous CSi */
+ for (pi = 0; pi < i; pi++) {
+ if (cinfo->cur_comp_info[pi] == compptr) {
+ ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
+ }
+ }
}
/* Collect the additional scan parameters Ss, Se, Ah/Al. */
@@ -465,6 +472,8 @@
for (i = 0; i < count; i++)
INPUT_BYTE(cinfo, huffval[i], return FALSE);
+ MEMZERO(&huffval[count], (256 - count) * SIZEOF(UINT8));
+
length -= count;
if (index & 0x10) { /* AC table definition */

View File

@@ -1,18 +1,14 @@
{ stdenv, fetchurl, zlib, libpng, libjpeg, lcms, automake110x, autoconf, libtool }:
{ stdenv, fetchurl, zlib, libpng, libjpeg, lcms2 }:
stdenv.mkDerivation rec {
name = "libmng-1.0.10";
name = "libmng-2.0.2";
src = fetchurl {
url = "mirror://sourceforge/libmng/${name}.tar.bz2";
sha256 = "06415s40gz833s1v1q7c04c0m49p4sc87ich0vpdid2ldj0pf53v";
url = "mirror://sourceforge/libmng/${name}.tar.xz";
sha256 = "0l5wa3b9rr4zl49zbbjpapqyccqjwzkzw1ph3p4pk9p5h73h9317";
};
preConfigure = "unmaintained/autogen.sh";
nativeBuildInputs = [ automake110x autoconf libtool ];
propagatedBuildInputs = [ zlib libpng libjpeg lcms ];
propagatedBuildInputs = [ zlib libpng libjpeg lcms2 ];
meta = {
description = "Reference library for reading, displaying, writing and examining Multiple-Image Network Graphics";

View File

@@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
ver_maj = "0.7";
ver_min = "5";
ver_min = "6";
name = "libnotify-${ver_maj}.${ver_min}";
src = fetchurl {
url = "mirror://gnome/sources/libnotify/${ver_maj}/${name}.tar.xz";
sha256 = "0lmnzy16vdjs9vlgdm0b7wfyi1nh526hv2dpb7vxb92bhx3wny23";
sha256 = "0dyq8zgjnnzcah31axnx6afb21kl7bks1gvrg4hjh3nk02j1rxhf";
};
src_m4 = fetchurl {
url = "mirror://gentoo/distfiles/introspection-20110205.m4.tar.bz2";

View File

@@ -3,11 +3,11 @@
assert zlib != null;
let
version = "1.6.4";
sha256 = "15pqany43q2hzaxqn84p9dba071xmvqi8h1bhnjxnxdf3g64zayg";
patch_src = fetchurl { # not released yet, hopefully OK
url = "mirror://sourceforge/libpng-apng/libpng-1.6.3-apng.patch.gz";
sha256 = "0fjnb6cgbj2c7ggl0qzcnliml2ylrjxzigp89vw0hxq221k5mlsx";
version = "1.6.8";
sha256 = "109h2fcjspd792lvh5q4xnkpsv7rjczmrdl15i4ajx0xbs5kvxr4";
patch_src = fetchurl {
url = "mirror://sourceforge/libpng-apng/libpng-${version}-apng.patch.gz";
sha256 = "0wysnv0d8h7pyz7gfagnkwra2k7malqga1cn6wbk2l7a8k2r53qi";
};
whenPatched = stdenv.lib.optionalString apngSupport;

View File

@@ -6,7 +6,7 @@
# no introspection by default, it's too big
stdenv.mkDerivation rec {
name = "librsvg-2.36.4";
name = "librsvg-2.36.4"; # 2.37 needs pango 1.32.6, 2.40 doesn't support gtk2
src = fetchurl {
url = "mirror://gnome/sources/librsvg/2.36/${name}.tar.xz";

View File

@@ -1,15 +1,17 @@
{ stdenv, fetchurl, pkgconfig, gnum4 }:
stdenv.mkDerivation rec {
name = "libsigc++-2.2.10";
name = "libsigc++-2.2.11";
src = fetchurl {
url = "mirror://gnome/sources/libsigc++/2.2/${name}.tar.xz";
sha256 = "8ceb6f2732f5399ef50d5b70f433d49945a12e0900b8f9f43c135866a2e5bf47";
sha256 = "0ms93q7r8zznsqkfdj1ds9533f0aqfaw3kdkqv154rzmfigh8d4q";
};
buildInputs = [ pkgconfig gnum4 ];
doCheck = true;
meta = {
homepage = http://libsigc.sourceforge.net/;
description = "A typesafe callback system for standard C++";

View File

@@ -1,32 +1,35 @@
{ stdenv, fetchurl, pkgconfig, glib, libxml2, sqlite, intltool, python
, gnomeSupport ? true, libgnome_keyring, glib_networking
{ stdenv, fetchurl, pkgconfig, intltool, python, gobjectIntrospection
, glib, libxml2, sqlite, glib_networking
, gnomeSupport ? true, libgnome_keyring
}:
stdenv.mkDerivation {
name = "libsoup-2.44.2";
meta = {
description = "HTTP client/server library";
license = stdenv.lib.licenses.lgpl2Plus;
};
src = fetchurl {
url = mirror://gnome/sources/libsoup/2.44/libsoup-2.44.2.tar.xz;
sha256 = "1wwqsmi1jvidiqwbdnjl66nmk1yja8w9dxf9cz10zh56fjmvbr77";
};
preConfigure = ''
substituteInPlace libsoup/tld-parser.py \
--replace "!/usr/bin/env python" "!${python}/bin/${python.executable}"
'';
buildInputs = [ pkgconfig intltool python ];
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig intltool python gobjectIntrospection ];
propagatedBuildInputs = [ glib libxml2 sqlite ]
++ stdenv.lib.optionals gnomeSupport [ libgnome_keyring ];
passthru.propagatedUserEnvPackages = [ glib_networking ];
# glib_networking is a runtime dependency, not a compile-time dependency
configureFlags = "--disable-tls-check";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
meta = {
# inherit (glib.meta) maintainers platforms;
};
}

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl, cmake, zlib, libgcrypt }:
stdenv.mkDerivation rec {
name = "libssh-0.5.3";
name = "libssh-0.5.5";
src = fetchurl {
url = "https://red.libssh.org/attachments/download/38/${name}.tar.gz";
sha256 = "1w6s217vjq0w3v5i0c5ql6m0ki1yz05g9snah3azxfkl9k4schpd";
url = "https://red.libssh.org/attachments/download/51/${name}.tar.gz";
sha256 = "17cfdff4hc0ijzrr15biq29fiabafz0bw621zlkbwbc1zh2hzpy0";
};
buildInputs = [ zlib libgcrypt ];

View File

@@ -1,7 +1,13 @@
{ stdenv, fetchurl, zlib, libjpeg }:
let version = "4.0.3"; in
{ stdenv, fetchurl, fetchsvn, pkgconfig, zlib, libjpeg, xz }:
let
version = "4.0.3";
patchDir = fetchsvn {
url = svn://svn.archlinux.org/packages/libtiff/trunk;
rev = "198247";
sha256 = "0a47l0zkc1zz7wxg64cyjv9z1djdvfyxgmwd03znlsac4zijkcy4";
};
in
stdenv.mkDerivation rec {
name = "libtiff-${version}";
@@ -13,10 +19,27 @@ stdenv.mkDerivation rec {
sha256 = "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa";
};
propagatedBuildInputs = [ zlib libjpeg ];
patchPhase = ''
for p in ${patchDir}/*-{2013-4244,2012-4447,2012-4564,2013-1960,2013-1961,libjpeg-turbo}.patch; do
patch -p1 < "$p"
done
(
cd tools
for p in ${patchDir}/*-CVE-{2013-4231,2013-4232}.patch; do
patch -p0 < "$p"
done
)
patch -p0 < ${patchDir}/${if stdenv.isDarwin then "tiff-4.0.3" else "*"}-tiff2pdf-colors.patch
''; # ^ sh on darwin seems not to expand globs in redirects, and I don't want to rebuild all again elsewhere
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ zlib libjpeg xz ]; #TODO: opengl support (bogus configure detection)
enableParallelBuilding = true;
doCheck = true;
meta = {
description = "Library and utilities for working with the TIFF image file format";
homepage = http://www.remotesensing.org/libtiff/;

View File

@@ -18,7 +18,6 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig glib gtk dbus_glib ];
# don't make deprecated usages hard errors
preBuildPhases = "preBuild";
preBuild = ''substituteInPlace unique/dbus/Makefile --replace -Werror ""'';
doCheck = true;

View File

@@ -1,10 +1,13 @@
{ stdenv, fetchurl, pkgconfig, udev }:
let
version = "1.0.17";
in
stdenv.mkDerivation rec {
name = "libusb-1.0.17";
name = "libusb-${version}";
src = fetchurl {
url = "mirror://sourceforge/libusbx/libusbx-1.0.17.tar.bz2";
url = "mirror://sourceforge/libusbx/libusbx-${version}.tar.bz2";
sha256 = "1f25a773x9x5n48a0mcigyk77ay0hkiz6y6bi4588wzf7wn8svw7";
};

View File

@@ -1,17 +1,17 @@
{ stdenv, fetchurl, pkgconfig, xlibs }:
stdenv.mkDerivation rec {
name = "libvdpau-0.6";
name = "libvdpau-0.7";
src = fetchurl {
url = "http://people.freedesktop.org/~aplattner/vdpau/${name}.tar.gz";
sha256 = "0x9dwxzw0ilsy88kqlih3170z1zfrrsx1dr9jbwbn0cbkpnbwmcv";
sha256 = "1q5wx6fmqg2iiw57wxwh5vv4yszqs4nlvlzhzdn9vig8gi30ip14";
};
buildInputs = with xlibs; [ pkgconfig dri2proto libXext ];
propagatedBuildInputs = [ xlibs.libX11 ];
configureFlags = stdenv.lib.optional stdenv.isDarwin [ "--build=x86_64" ];
meta = {

View File

@@ -10,4 +10,6 @@ stdenv.mkDerivation {
buildInputs = [ pkgconfig intltool ];
propagatedBuildInputs = [ libX11 gtk3 ];
configureFlags = [ "--disable-introspection" ];
}

View File

@@ -1,14 +1,14 @@
{ stdenv, fetchurl, yacc, flex, xkeyboard_config }:
{ stdenv, fetchurl, pkgconfig, yacc, flex, xkeyboard_config }:
stdenv.mkDerivation rec {
name = "libxkbcommon-0.2.0";
name = "libxkbcommon-0.3.1";
src = fetchurl {
url = "http://xkbcommon.org/download/${name}.tar.bz2";
sha256 = "0hpvfa8p4bhvhc1gcb578m354p5idd192xb8zlaq16d33h90msvl";
url = "http://xkbcommon.org/download/${name}.tar.xz";
sha256 = "13mk335r4dhi9qglzbp46ina1wz4qgcp8r7s06iq7j50pf0kb5ww";
};
buildInputs = [ yacc flex xkeyboard_config ];
buildInputs = [ pkgconfig yacc flex xkeyboard_config ];
configureFlags = ''
--with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl, libxml2 }:
stdenv.mkDerivation (rec {
name = "libxslt-1.1.27";
name = "libxslt-1.1.28";
src = fetchurl {
url = "ftp://xmlsoft.org/libxml2/${name}.tar.gz";
sha256 = "09ky3vhlaahvsb0q9gp6h3as53pfj70gincirachjqzj46jdka5n";
sha256 = "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz";
};
buildInputs = [ libxml2 ];

View File

@@ -3,8 +3,8 @@
, libdrm, xorg, wayland, udev, llvm, libffi
, libvdpau
, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
, enableR600LlvmCompiler ? false # current llvm-3.3 + mesa-9.1.6 don't configure
, enableExtraFeatures ? false # add ~15 MB to mesa_drivers
, enableR600LlvmCompiler ? true, libelf
, enableExtraFeatures ? false # not maintained
}:
if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
@@ -16,23 +16,26 @@ else
This or the mesa attribute (which also contains GLU) are small (~ 2.2 MB, mostly headers)
and are designed to be the buildInput of other packages.
- DRI and EGL drivers are compiled into $drivers output,
which is bigger (~13 MB) and depends on LLVM (~40 MB).
These should be searched at runtime in /run/current-system/sw/lib/*
which is bigger (~13 MB) and depends on LLVM (~44 MB).
These should be searched at runtime in "/run/opengl-driver{,-32}/lib/*"
and so are kind-of impure (given by NixOS).
(I suppose on non-NixOS one would create the appropriate symlinks from there.)
- libOSMesa is in $osmesa (~4.2 MB)
*/
let
version = "9.1.7";
version = "9.2.5";
# this is the default search path for DRI drivers (note: X server introduces an overriding env var)
driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32";
in
with { inherit (stdenv.lib) optional optionals optionalString; };
stdenv.mkDerivation {
name = "mesa-noglu-${version}";
src = fetchurl {
src = fetchurl {
url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
sha256 = "1824p185ys7z9bah46xasp7khv44n9wv2c4p38i1dispniwbirih";
sha256 = "1w3bxclgwl2hwyxk3za7dbdakb8jsya7afck35cz0v8pxppvjsml";
};
prePatch = "patchShebangs .";
@@ -40,7 +43,6 @@ stdenv.mkDerivation {
patches = [
./static-gallium.patch
./dricore-gallium.patch
./fix-rounding.patch
./werror-wundef.patch
];
@@ -50,11 +52,11 @@ stdenv.mkDerivation {
-i src/egl/main/Makefile.am
'';
outputs = ["out" "drivers"];
outputs = ["out" "drivers" "osmesa"];
preConfigure = "./autogen.sh";
configureFlags = with stdenv.lib; [
configureFlags = [
"--with-dri-driverdir=$(drivers)/lib/dri"
"--with-egl-driver-dir=$(drivers)/lib/egl"
"--with-dri-searchpath=${driverLink}/lib/dri"
@@ -65,70 +67,84 @@ stdenv.mkDerivation {
"--enable-driglx-direct" # seems enabled anyway
"--enable-gallium-llvm" "--with-llvm-shared-libs"
"--enable-xa" # used in vmware driver
"--enable-gles1" "--enable-gles2"
"--enable-vdpau"
"--enable-osmesa" # used by wine
"--with-dri-drivers=i965,r200,radeon"
"--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast" # radeonsi complains about R600 missing in LLVM
("--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast"
+ optionalString enableR600LlvmCompiler ",radeonsi")
"--with-egl-platforms=x11,wayland,drm" "--enable-gbm" "--enable-shared-glapi"
]
++ optional enableR600LlvmCompiler "--enable-r600-llvm-compiler" # complains about R600 missing in LLVM
++ optional enableR600LlvmCompiler "--enable-r600-llvm-compiler"
++ optional enableTextureFloats "--enable-texture-float"
++ optionals enableExtraFeatures [
"--enable-gles1" "--enable-gles2"
"--enable-osmesa"
"--enable-openvg" "--enable-gallium-egl" # not needed for EGL in Gallium, but OpenVG might be useful
#"--enable-xvmc" # tests segfault with 9.1.{1,2,3}
"--enable-vdpau"
#"--enable-opencl" # ToDo: opencl seems to need libclc for clover
];
nativeBuildInputs = [ pkgconfig python makedepend file flex bison ];
propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ]
++
stdenv.lib.optionals stdenv.isLinux [libdrm]
;
++ optionals stdenv.isLinux [libdrm]
;
buildInputs = with xorg; [
autoconf automake libtool intltool expat libxml2Python llvm
libXfixes glproto dri2proto libX11 libXext libxcb libXt
libffi wayland
] ++ stdenv.lib.optionals enableExtraFeatures [ /*libXvMC*/ libvdpau ]
++ stdenv.lib.optional stdenv.isLinux [udev]
;
libffi wayland libvdpau
] ++ optionals enableExtraFeatures [ /*libXvMC*/ ]
++ optional stdenv.isLinux udev
++ optional enableR600LlvmCompiler libelf
;
enableParallelBuilding = true;
doCheck = true;
#doCheck = true; # https://bugs.freedesktop.org/show_bug.cgi?id=67672
# TODO: best fix this before merging >=9.2 to master
# move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
# move gallium-related stuff to $drivers, so $out doesn't depend on LLVM;
# also move libOSMesa to $osmesa, as it's relatively big
# ToDo: probably not all .la files are completely fixed, but it shouldn't matter
postInstall = with stdenv.lib; ''
mv -t "$drivers/lib/" \
'' + optionalString enableExtraFeatures ''
`#$out/lib/libXvMC*` \
$out/lib/vdpau \
$out/lib/libOSMesa* \
$out/lib/gbm $out/lib/libgbm* \
$out/lib/gallium-pipe \
'' + ''
$out/lib/libdricore* \
$out/lib/libgallium* \
$out/lib/vdpau \
$out/lib/libxatracker*
mkdir -p {$osmesa,$drivers}/lib/pkgconfig
mv -t $osmesa/lib/ \
$out/lib/libOSMesa*
mv -t $drivers/lib/pkgconfig/ \
$out/lib/pkgconfig/xatracker.pc
mv -t $osmesa/lib/pkgconfig/ \
$out/lib/pkgconfig/osmesa.pc
'' + /* now fix references in .la files */ ''
sed "/^libdir=/s,$out,$drivers," -i \
'' + optionalString enableExtraFeatures ''
`#$drivers/lib/libXvMC*.la` \
$drivers/lib/vdpau/*.la \
$drivers/lib/libOSMesa*.la \
$drivers/lib/gallium-pipe/*.la \
'' + ''
$drivers/lib/libgallium.la \
$drivers/lib/vdpau/*.la \
$drivers/lib/libdricore*.la
sed "s,$out\(/lib/\(libdricore[0-9\.]*\|libgallium\).la\),$drivers\1,g" \
-i $drivers/lib/*.la $drivers/lib/*/*.la
sed "/^libdir=/s,$out,$osmesa," -i \
$osmesa/lib/libOSMesa*.la
'' + /* work around bug #529, but maybe $drivers should also be patchelf-ed */ ''
find $drivers/ -type f -executable -print0 | xargs -0 strip -S || true
find $drivers/ $osmesa/ -type f -executable -print0 | xargs -0 strip -S || true
'' + /* add RPATH so the drivers can find the moved libgallium and libdricore9 */ ''
for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do
@@ -138,6 +154,8 @@ stdenv.mkDerivation {
done
'' + /* set the default search path for DRI drivers; used e.g. by X server */ ''
substituteInPlace "$out/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}"
'' + /* move vdpau drivers to $drivers/lib, so they are found */ ''
mv "$drivers"/lib/vdpau/* "$drivers"/lib/ && rmdir "$drivers"/lib/vdpau
'';
#ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM
@@ -148,6 +166,6 @@ stdenv.mkDerivation {
homepage = http://www.mesa3d.org/;
license = "bsd";
platforms = stdenv.lib.platforms.mesaPlatforms;
maintainers = [ stdenv.lib.maintainers.simons ];
maintainers = with stdenv.lib.maintainers; [ simons vcunat ];
};
}

View File

@@ -1,357 +0,0 @@
From c25ae5d27b114e23d5734f846002df1a05759658 Mon Sep 17 00:00:00 2001
From: Roland Scheidegger <sroland@vmware.com>
Date: Thu, 31 Jan 2013 19:27:49 +0000
Subject: gallivm: fix issues with trunc/round/floor/ceil with no arch rounding
The emulation of these if there's no rounding instruction available
is a bit more complicated than what the code did.
In particular, doing fp-to-int/int-to-fp will not work if the exponent
is large enough (and with NaNs, Infs). Hence such values need to be filtered
out and the original value returned in this case (which fortunately should
always be exact). This comes at the expense of performance (if your cpu
doesn't support rounding instructions).
Furthermore, floor/ifloor/ceil/iceil were affected by precision issues for
values near negative (for floor) or positive (for ceil) zero, fix that as well
(fixing this issue might not actually be slower except for ceil/iceil if the
type is not signed which is probably rare - note iceil has no callers left
in any case).
Also add some new rounding test values in lp_test_arit to actually test
for that stuff (which previously would have failed without sse41).
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=59701.
---
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index b4e9f23..ec05026 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@ -1590,12 +1590,37 @@ lp_build_trunc(struct lp_build_context *bld,
return lp_build_round_arch(bld, a, LP_BUILD_ROUND_TRUNCATE);
}
else {
- LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type);
- LLVMTypeRef int_vec_type = lp_build_int_vec_type(bld->gallivm, type);
- LLVMValueRef res;
- res = LLVMBuildFPToSI(builder, a, int_vec_type, "");
- res = LLVMBuildSIToFP(builder, res, vec_type, "");
- return res;
+ const struct lp_type type = bld->type;
+ struct lp_type inttype;
+ struct lp_build_context intbld;
+ LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
+ LLVMValueRef trunc, res, anosign, mask;
+ LLVMTypeRef int_vec_type = bld->int_vec_type;
+ LLVMTypeRef vec_type = bld->vec_type;
+
+ assert(type.width == 32); /* might want to handle doubles at some point */
+
+ inttype = type;
+ inttype.floating = 0;
+ lp_build_context_init(&intbld, bld->gallivm, inttype);
+
+ /* round by truncation */
+ trunc = LLVMBuildFPToSI(builder, a, int_vec_type, "");
+ res = LLVMBuildSIToFP(builder, trunc, vec_type, "floor.trunc");
+
+ /* mask out sign bit */
+ anosign = lp_build_abs(bld, a);
+ /*
+ * mask out all values if anosign > 2^24
+ * This should work both for large ints (all rounding is no-op for them
+ * because such floats are always exact) as well as special cases like
+ * NaNs, Infs (taking advantage of the fact they use max exponent).
+ * (2^24 is arbitrary anything between 2^24 and 2^31 should work.)
+ */
+ anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, "");
+ cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, "");
+ mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval);
+ return lp_build_select(bld, mask, a, res);
}
}
@@ -1620,11 +1645,36 @@ lp_build_round(struct lp_build_context *bld,
return lp_build_round_arch(bld, a, LP_BUILD_ROUND_NEAREST);
}
else {
- LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type);
- LLVMValueRef res;
+ const struct lp_type type = bld->type;
+ struct lp_type inttype;
+ struct lp_build_context intbld;
+ LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
+ LLVMValueRef res, anosign, mask;
+ LLVMTypeRef int_vec_type = bld->int_vec_type;
+ LLVMTypeRef vec_type = bld->vec_type;
+
+ assert(type.width == 32); /* might want to handle doubles at some point */
+
+ inttype = type;
+ inttype.floating = 0;
+ lp_build_context_init(&intbld, bld->gallivm, inttype);
+
res = lp_build_iround(bld, a);
res = LLVMBuildSIToFP(builder, res, vec_type, "");
- return res;
+
+ /* mask out sign bit */
+ anosign = lp_build_abs(bld, a);
+ /*
+ * mask out all values if anosign > 2^24
+ * This should work both for large ints (all rounding is no-op for them
+ * because such floats are always exact) as well as special cases like
+ * NaNs, Infs (taking advantage of the fact they use max exponent).
+ * (2^24 is arbitrary anything between 2^24 and 2^31 should work.)
+ */
+ anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, "");
+ cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, "");
+ mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval);
+ return lp_build_select(bld, mask, a, res);
}
}
@@ -1648,11 +1698,52 @@ lp_build_floor(struct lp_build_context *bld,
return lp_build_round_arch(bld, a, LP_BUILD_ROUND_FLOOR);
}
else {
- LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type);
- LLVMValueRef res;
- res = lp_build_ifloor(bld, a);
- res = LLVMBuildSIToFP(builder, res, vec_type, "");
- return res;
+ const struct lp_type type = bld->type;
+ struct lp_type inttype;
+ struct lp_build_context intbld;
+ LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
+ LLVMValueRef trunc, res, anosign, mask;
+ LLVMTypeRef int_vec_type = bld->int_vec_type;
+ LLVMTypeRef vec_type = bld->vec_type;
+
+ assert(type.width == 32); /* might want to handle doubles at some point */
+
+ inttype = type;
+ inttype.floating = 0;
+ lp_build_context_init(&intbld, bld->gallivm, inttype);
+
+ /* round by truncation */
+ trunc = LLVMBuildFPToSI(builder, a, int_vec_type, "");
+ res = LLVMBuildSIToFP(builder, trunc, vec_type, "floor.trunc");
+
+ if (type.sign) {
+ LLVMValueRef tmp;
+
+ /*
+ * fix values if rounding is wrong (for non-special cases)
+ * - this is the case if trunc > a
+ */
+ mask = lp_build_cmp(bld, PIPE_FUNC_GREATER, res, a);
+ /* tmp = trunc > a ? 1.0 : 0.0 */
+ tmp = LLVMBuildBitCast(builder, bld->one, int_vec_type, "");
+ tmp = lp_build_and(&intbld, mask, tmp);
+ tmp = LLVMBuildBitCast(builder, tmp, vec_type, "");
+ res = lp_build_sub(bld, res, tmp);
+ }
+
+ /* mask out sign bit */
+ anosign = lp_build_abs(bld, a);
+ /*
+ * mask out all values if anosign > 2^24
+ * This should work both for large ints (all rounding is no-op for them
+ * because such floats are always exact) as well as special cases like
+ * NaNs, Infs (taking advantage of the fact they use max exponent).
+ * (2^24 is arbitrary anything between 2^24 and 2^31 should work.)
+ */
+ anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, "");
+ cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, "");
+ mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval);
+ return lp_build_select(bld, mask, a, res);
}
}
@@ -1676,11 +1767,48 @@ lp_build_ceil(struct lp_build_context *bld,
return lp_build_round_arch(bld, a, LP_BUILD_ROUND_CEIL);
}
else {
- LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type);
- LLVMValueRef res;
- res = lp_build_iceil(bld, a);
- res = LLVMBuildSIToFP(builder, res, vec_type, "");
- return res;
+ const struct lp_type type = bld->type;
+ struct lp_type inttype;
+ struct lp_build_context intbld;
+ LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
+ LLVMValueRef trunc, res, anosign, mask, tmp;
+ LLVMTypeRef int_vec_type = bld->int_vec_type;
+ LLVMTypeRef vec_type = bld->vec_type;
+
+ assert(type.width == 32); /* might want to handle doubles at some point */
+
+ inttype = type;
+ inttype.floating = 0;
+ lp_build_context_init(&intbld, bld->gallivm, inttype);
+
+ /* round by truncation */
+ trunc = LLVMBuildFPToSI(builder, a, int_vec_type, "");
+ trunc = LLVMBuildSIToFP(builder, trunc, vec_type, "ceil.trunc");
+
+ /*
+ * fix values if rounding is wrong (for non-special cases)
+ * - this is the case if trunc < a
+ */
+ mask = lp_build_cmp(bld, PIPE_FUNC_LESS, trunc, a);
+ /* tmp = trunc < a ? 1.0 : 0.0 */
+ tmp = LLVMBuildBitCast(builder, bld->one, int_vec_type, "");
+ tmp = lp_build_and(&intbld, mask, tmp);
+ tmp = LLVMBuildBitCast(builder, tmp, vec_type, "");
+ res = lp_build_add(bld, trunc, tmp);
+
+ /* mask out sign bit */
+ anosign = lp_build_abs(bld, a);
+ /*
+ * mask out all values if anosign > 2^24
+ * This should work both for large ints (all rounding is no-op for them
+ * because such floats are always exact) as well as special cases like
+ * NaNs, Infs (taking advantage of the fact they use max exponent).
+ * (2^24 is arbitrary anything between 2^24 and 2^31 should work.)
+ */
+ anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, "");
+ cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, "");
+ mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval);
+ return lp_build_select(bld, mask, a, res);
}
}
@@ -1826,32 +1954,30 @@ lp_build_ifloor(struct lp_build_context *bld,
res = lp_build_round_arch(bld, a, LP_BUILD_ROUND_FLOOR);
}
else {
- /* Take the sign bit and add it to 1 constant */
- LLVMTypeRef vec_type = bld->vec_type;
- unsigned mantissa = lp_mantissa(type);
- LLVMValueRef mask = lp_build_const_int_vec(bld->gallivm, type,
- (unsigned long long)1 << (type.width - 1));
- LLVMValueRef sign;
- LLVMValueRef offset;
+ struct lp_type inttype;
+ struct lp_build_context intbld;
+ LLVMValueRef trunc, itrunc, mask;
- /* sign = a < 0 ? ~0 : 0 */
- sign = LLVMBuildBitCast(builder, a, int_vec_type, "");
- sign = LLVMBuildAnd(builder, sign, mask, "");
- sign = LLVMBuildAShr(builder, sign,
- lp_build_const_int_vec(bld->gallivm, type,
- type.width - 1),
- "ifloor.sign");
+ assert(type.floating);
+ assert(lp_check_value(type, a));
- /* offset = -0.99999(9)f */
- offset = lp_build_const_vec(bld->gallivm, type,
- -(double)(((unsigned long long)1 << mantissa) - 10)/((unsigned long long)1 << mantissa));
- offset = LLVMConstBitCast(offset, int_vec_type);
+ inttype = type;
+ inttype.floating = 0;
+ lp_build_context_init(&intbld, bld->gallivm, inttype);
- /* offset = a < 0 ? offset : 0.0f */
- offset = LLVMBuildAnd(builder, offset, sign, "");
- offset = LLVMBuildBitCast(builder, offset, vec_type, "ifloor.offset");
+ /* round by truncation */
+ itrunc = LLVMBuildFPToSI(builder, a, int_vec_type, "");
+ trunc = LLVMBuildSIToFP(builder, itrunc, bld->vec_type, "ifloor.trunc");
- res = LLVMBuildFAdd(builder, res, offset, "ifloor.res");
+ /*
+ * fix values if rounding is wrong (for non-special cases)
+ * - this is the case if trunc > a
+ * The results of doing this with NaNs, very large values etc.
+ * are undefined but this seems to be the case anyway.
+ */
+ mask = lp_build_cmp(bld, PIPE_FUNC_GREATER, trunc, a);
+ /* cheapie minus one with mask since the mask is minus one / zero */
+ return lp_build_add(&intbld, itrunc, mask);
}
}
@@ -1883,35 +2009,30 @@ lp_build_iceil(struct lp_build_context *bld,
res = lp_build_round_arch(bld, a, LP_BUILD_ROUND_CEIL);
}
else {
- LLVMTypeRef vec_type = bld->vec_type;
- unsigned mantissa = lp_mantissa(type);
- LLVMValueRef offset;
+ struct lp_type inttype;
+ struct lp_build_context intbld;
+ LLVMValueRef trunc, itrunc, mask;
- /* offset = 0.99999(9)f */
- offset = lp_build_const_vec(bld->gallivm, type,
- (double)(((unsigned long long)1 << mantissa) - 10)/((unsigned long long)1 << mantissa));
+ assert(type.floating);
+ assert(lp_check_value(type, a));
- if (type.sign) {
- LLVMValueRef mask = lp_build_const_int_vec(bld->gallivm, type,
- (unsigned long long)1 << (type.width - 1));
- LLVMValueRef sign;
+ inttype = type;
+ inttype.floating = 0;
+ lp_build_context_init(&intbld, bld->gallivm, inttype);
- /* sign = a < 0 ? 0 : ~0 */
- sign = LLVMBuildBitCast(builder, a, int_vec_type, "");
- sign = LLVMBuildAnd(builder, sign, mask, "");
- sign = LLVMBuildAShr(builder, sign,
- lp_build_const_int_vec(bld->gallivm, type,
- type.width - 1),
- "iceil.sign");
- sign = LLVMBuildNot(builder, sign, "iceil.not");
-
- /* offset = a < 0 ? 0.0 : offset */
- offset = LLVMConstBitCast(offset, int_vec_type);
- offset = LLVMBuildAnd(builder, offset, sign, "");
- offset = LLVMBuildBitCast(builder, offset, vec_type, "iceil.offset");
- }
+ /* round by truncation */
+ itrunc = LLVMBuildFPToSI(builder, a, int_vec_type, "");
+ trunc = LLVMBuildSIToFP(builder, itrunc, bld->vec_type, "iceil.trunc");
- res = LLVMBuildFAdd(builder, a, offset, "iceil.res");
+ /*
+ * fix values if rounding is wrong (for non-special cases)
+ * - this is the case if trunc < a
+ * The results of doing this with NaNs, very large values etc.
+ * are undefined but this seems to be the case anyway.
+ */
+ mask = lp_build_cmp(bld, PIPE_FUNC_LESS, trunc, a);
+ /* cheapie plus one with mask since the mask is minus one / zero */
+ return lp_build_sub(&intbld, itrunc, mask);
}
/* round to nearest (toward zero) */
diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c
index 99928b8..f14e4b3 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_arit.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c
@@ -207,6 +207,18 @@ const float round_values[] = {
-10.0, -1, 0.0, 12.0,
-1.49, -0.25, 1.25, 2.51,
-0.99, -0.01, 0.01, 0.99,
+ 1.401298464324817e-45f, // smallest denormal
+ -1.401298464324817e-45f,
+ 1.62981451e-08f,
+ -1.62981451e-08f,
+ 1.62981451e15f, // large number not representable as 32bit int
+ -1.62981451e15f,
+ FLT_EPSILON,
+ -FLT_EPSILON,
+ 1.0f - 0.5f*FLT_EPSILON,
+ -1.0f + FLT_EPSILON,
+ FLT_MAX,
+ -FLT_MAX
};
static float fractf(float x)
--
cgit v0.9.0.2-2-gbebe

View File

@@ -1,11 +1,15 @@
{ stdenv, fetchurl, pkgconfig, pango, glibmm, cairomm, libpng, cairo }:
let
ver_maj = "2.34";
ver_min = "0";
in
stdenv.mkDerivation rec {
name = "pangomm-2.28.4";
name = "pangomm-${ver_maj}.${ver_min}";
src = fetchurl {
url = mirror://gnome/sources/pangomm/2.28/pangomm-2.28.4.tar.xz;
sha256 = "10kcdpg080m393f1vz0km41kd3483fkyabprm59gvjwklxkcp3bp";
url = "mirror://gnome/sources/pangomm/${ver_maj}/${name}.tar.xz";
sha256 = "0hcyvv7c5zmivprdam6cp111i6hn2y5jsxzk00m6j9pncbzvp0hf";
};
nativeBuildInputs = [ pkgconfig ];

View File

@@ -1,11 +1,11 @@
{ fetchurl, stdenv, pkgconfig, perl, withPNG ? true, libpng, glib /*just passthru*/ }:
stdenv.mkDerivation rec {
name = "pixman-0.30.2";
name = "pixman-0.32.4";
src = fetchurl {
url = "http://cairographics.org/releases/${name}.tar.gz";
sha256 = "1sgnpx34pj3245a9v8056jddc4cg4xxkqdjvvw6k2hnprhh8k65x";
sha256 = "113ycngcssbrps217dyajq96hm9xghsfch82h14yffla1r1fviw0";
};
nativeBuildInputs = [ pkgconfig perl ];

View File

@@ -4,8 +4,8 @@
}:
let
version = "0.24.3"; # even major numbers are stable
sha256 = "0kip6mxp4lscr3wvgfashqk7ymhx2w1hgdilfpgig0a5kr805kfj";
version = "0.24.4"; # even major numbers are stable
sha256 = "1qh1gk6hq5cfpkqyxxgkpyl78na8dckmh6zbgsqbpw762yd518y8";
qtcairo_patches =
let qtcairo = fetchgit { # the version for poppler-0.22

View File

@@ -49,6 +49,16 @@ stdenv.mkDerivation rec {
patches =
[ ./glib-2.32.patch
(fetchurl {
name = "CVE-2013-4549.patch";
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/CVE-2013-4549.patch?h=packages/qt4";
sha256 = "0xz60fmspzvsyhd0f013pvh2bbm87976128fphbckfcwiqr1hanw";
})
(fetchurl {
name = "libmng2.patch";
url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/libmng2.patch?h=packages/qt4";
sha256 = "1sgnrl3qzr370ad5bqc66f7sp0gk046jnsy1811x24f16cs04xzh";
})
(substituteAll {
src = ./dlopen-absolute-paths.diff;
inherit cups icu libXfixes;

View File

@@ -1,17 +1,15 @@
{ stdenv, fetchurl, pkgconfig, freetype, libXft, pango, fontconfig, cmake }:
{ stdenv, fetchurl, pkgconfig, freetype, cmake }:
stdenv.mkDerivation rec {
version = "1.2.4";
name = "graphite2-${version}";
src = fetchurl {
url = "mirror://sourceforge/silgraphite/graphite2/${name}.tgz";
sha256 = "00xhv1mp640fr3wmdzwn4yz0g56jd4r9fb7b02mc1g19h0bdbhsb";
};
buildInputs = [pkgconfig freetype libXft pango fontconfig cmake];
NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";
buildInputs = [ pkgconfig freetype cmake ];
meta = {
description = "An advanced font engine";

View File

@@ -1,13 +1,13 @@
{ stdenv, fetchurl, libffi, expat, pkgconfig, libxslt, docbook_xsl, doxygen }:
let version = "1.0.5"; in
let version = "1.3.0"; in
stdenv.mkDerivation rec {
name = "wayland-${version}";
src = fetchurl {
url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
sha256 = "130n7v5i7rfsrli2n8vdzfychlgd8v7by7sfgp8vfqdlss5km34w";
sha256 = "0vhd8z74r4zmm7hrbb8l450sb6slqkdrvmk4k78sq9lays2pd09f";
};
buildInputs = [ pkgconfig libffi expat libxslt docbook_xsl doxygen ];

View File

@@ -0,0 +1,54 @@
{ stdenv, fetchurl, perl, python, ruby, bison, gperf, flex
, pkgconfig, which, gettext, gobjectIntrospection
, gtk2, gtk3, wayland, libwebp, enchant
, libxml2, libsoup, libsecret, libxslt, harfbuzz
}:
stdenv.mkDerivation rec {
name = "webkitgtk-2.2.3";
meta = {
description = "Web content rendering engine, GTK+ port";
homepage = "http://webkitgtk.org/";
license = stdenv.lib.licenses.bsd2;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ iyzsong ];
};
src = fetchurl {
url = "http://webkitgtk.org/releases/${name}.tar.xz";
sha256 = "01a69v0aw3bv2zkx6jzk71r3pjlf2xfhxavjnma89kmd78qb7g4l";
};
patches = [ ./webcore-svg-libxml-cflags.patch ];
prePatch = ''
patchShebangs Tools/gtk
for i in $(find . -name '*.p[l|m]'); do
sed -e 's@/usr/bin/gcc@gcc@' -i $i
done
'';
configureFlags = [
"--disable-geolocation"
"--disable-video" # TODO: gsteramer-1.0
"--enable-introspection"
];
dontAddDisableDepTrack = true;
nativeBuildInputs = [
perl python ruby bison gperf flex
pkgconfig which gettext gobjectIntrospection
];
buildInputs = [
gtk2 wayland libwebp enchant
libxml2 libsecret libxslt harfbuzz
];
propagatedBuildInputs = [ gtk3 libsoup ];
#enableParallelBuilding = true; # build problems on Hydra
}

View File

@@ -0,0 +1,8 @@
--- webkitgtk-2.2.3-orig/GNUmakefile.in 2013-12-04 17:56:28.000000000 +0800
+++ webkitgtk-2.2.3/GNUmakefile.in 2013-12-05 17:32:37.976689248 +0800
@@ -21911,6 +21911,7 @@
@ENABLE_SVG_TRUE@ $(CAIRO_CFLAGS) \
@ENABLE_SVG_TRUE@ $(FREETYPE_CFLAGS) \
@ENABLE_SVG_TRUE@ $(LIBSOUP_CFLAGS) \
+@ENABLE_SVG_TRUE@ $(LIBXML_CFLAGS) \
@ENABLE_SVG_TRUE@ $(UNICODE_CFLAGS)