From a988b581a0186946fdbd26cdce9dbc5ee0bb69af Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Tue, 3 Jan 2012 16:15:22 +0000 Subject: [PATCH 1/5] Add libkvkontakte svn path=/nixpkgs/trunk/; revision=31240 --- .../libraries/libkvkontakte/default.nix | 20 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/libraries/libkvkontakte/default.nix diff --git a/pkgs/development/libraries/libkvkontakte/default.nix b/pkgs/development/libraries/libkvkontakte/default.nix new file mode 100644 index 00000000000..a56f5784b4d --- /dev/null +++ b/pkgs/development/libraries/libkvkontakte/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchgit, qjson, kdelibs }: + +stdenv.mkDerivation { + name = "libkvkonatkte-1.0-pre20120103"; + + src = fetchgit { + url = git://anongit.kde.org/libkvkontakte; + rev = "4024f69cf54625dbe5dc2e2d811a996774a669ff"; + sha256 = "0ryvjfrsws845k9s76715xid48y01h0ynb5wdx6ln8cm5z5wqj61"; + }; + + buildInputs = [ qjson kdelibs ]; + + meta = { + homepage = https://projects.kde.org/projects/extragear/libs/libkvkontakte; + description = "KDE library for interaction with vkontakte.ru social network via its open API"; + maintainers = [ stdenv.lib.maintainers.urkud ]; + inherit (kdelibs.meta) platforms; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 700a9f99a55..08fa1d42d39 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8093,6 +8093,8 @@ let libktorrent = callPackage ../development/libraries/libktorrent { }; + libkvkontakte = callPackage ../development/libraries/libkvkontakte { }; + liblikeback = callPackage ../development/libraries/liblikeback { }; networkmanagement = callPackage ../tools/networking/networkmanagement { }; From 71c6de7338c98e2363c72456aa9708f92b8cdfd6 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Tue, 3 Jan 2012 16:38:53 +0000 Subject: [PATCH 2/5] cmake-2.8.7 svn path=/nixpkgs/trunk/; revision=31241 --- pkgs/development/tools/build-managers/cmake/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index c7484ee6e84..53e27836d73 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -7,7 +7,7 @@ with stdenv.lib; let os = stdenv.lib.optionalString; majorVersion = "2.8"; - minorVersion = "4"; + minorVersion = "7"; version = "${majorVersion}.${minorVersion}"; in @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz"; - sha256 = "1k2kjaj3vfifb329ff7fr4hcbpbaqb66l97pshq70h7m0zwajznr"; + sha256 = "17zmxh0gyis6w05d2km0swlvy94h3w10jgra0fpa5qcg7l2j628k"; }; patches = From 5386b47ead669344e7f254e4bd37ee7949d51a4e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 3 Jan 2012 17:22:11 +0000 Subject: [PATCH 3/5] * Revert. Cmake is still broken on i686-linux. svn path=/nixpkgs/trunk/; revision=31244 --- pkgs/development/tools/build-managers/cmake/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 53e27836d73..c7484ee6e84 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -7,7 +7,7 @@ with stdenv.lib; let os = stdenv.lib.optionalString; majorVersion = "2.8"; - minorVersion = "7"; + minorVersion = "4"; version = "${majorVersion}.${minorVersion}"; in @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz"; - sha256 = "17zmxh0gyis6w05d2km0swlvy94h3w10jgra0fpa5qcg7l2j628k"; + sha256 = "1k2kjaj3vfifb329ff7fr4hcbpbaqb66l97pshq70h7m0zwajznr"; }; patches = From b9165446519000ba9e43e4ed5ffe2912873e3c3d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 3 Jan 2012 17:50:10 +0000 Subject: [PATCH 4/5] Updated GNU ghostscript to version 9.04.1. - Merged the builder.sh file into the expression itself. - Need to force "-lz" flag to fix linker errors. This is probably a bug in the build system, so further updates may not need that hack. - Need to force "-rpath=${freetype}/lib" flag to fix run-time errors because gs can't find the libfreetype.so.6 library. I don't quite understand why that path isn't hard-coded to begin with. svn path=/nixpkgs/trunk/; revision=31247 --- pkgs/misc/ghostscript/builder.sh | 19 ------ pkgs/misc/ghostscript/default.nix | 35 +++++++---- pkgs/misc/ghostscript/pstoraster.patch | 81 -------------------------- 3 files changed, 23 insertions(+), 112 deletions(-) delete mode 100644 pkgs/misc/ghostscript/builder.sh delete mode 100644 pkgs/misc/ghostscript/pstoraster.patch diff --git a/pkgs/misc/ghostscript/builder.sh b/pkgs/misc/ghostscript/builder.sh deleted file mode 100644 index 361b7f77f0c..00000000000 --- a/pkgs/misc/ghostscript/builder.sh +++ /dev/null @@ -1,19 +0,0 @@ -source $stdenv/setup - -preConfigure() { - # "ijs" is impure: it contains symlinks to /usr/share/automake etc.! - rm -rf ijs/ltmain.sh - - # Don't install stuff in the Cups store path. - makeFlagsArray=(CUPSSERVERBIN=$out/lib/cups CUPSSERVERROOT=$out/etc/cups CUPSDATA=$out/share/cups) -} - -installTargets="install install-so install-data install-doc install-man" - -postInstall() { - for i in $fonts; do - (cd $out/share/ghostscript && tar xvfz $i) - done -} - -genericBuild diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 442fb8a0e50..ddd51f73f79 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libjpeg, libpng, libtiff, zlib, pkgconfig, fontconfig, openssl +{ stdenv, fetchurl, libjpeg, libpng, libtiff, zlib, pkgconfig, fontconfig, openssl, lcms, freetype , x11Support, x11 ? null , cupsSupport ? false, cups ? null , gnuFork ? true @@ -28,10 +28,10 @@ let }; gnuForkData = rec { - name = "ghostscript-8.71.1"; + name = "ghostscript-9.04.1"; src = fetchurl { url = "mirror://gnu/ghostscript/gnu-${name}.tar.bz2"; - sha256 = "0vab9905h6sl5s5miai4vhhwdacjlkxqmykfr42x32sr25wjqgvl"; + sha256 = "0zqa6ggbkdqiszsywgrra4ij0sddlmrfa50bx2mh568qid4ga0a2"; }; inherit meta; @@ -56,8 +56,6 @@ in stdenv.mkDerivation rec { inherit (variant) name src meta; - builder = ./builder.sh; - fonts = [ (fetchurl { url = mirror://gnu/ghostscript/gnu-gs-fonts-std-6.0.tar.gz; @@ -70,17 +68,30 @@ stdenv.mkDerivation rec { # ... add other fonts here ]; - buildInputs = [libjpeg libpng libtiff zlib pkgconfig fontconfig openssl] - ++ stdenv.lib.optional x11Support x11 + buildInputs = [libjpeg libpng libtiff zlib pkgconfig fontconfig openssl lcms] + ++ stdenv.lib.optionals x11Support [x11 freetype] ++ stdenv.lib.optional cupsSupport cups; - configureFlags = - if x11Support then [ "--with-x" ] else [ "--without-x" ]; - CFLAGS = "-fPIC"; + NIX_LDFLAGS = "-lz -rpath=${freetype}/lib"; - patches = [ ./purity.patch ./urw-font-files.patch ] - ++ stdenv.lib.optional gnuFork ./pstoraster.patch; + patches = [ ./purity.patch ./urw-font-files.patch ]; + + preConfigure = '' + # "ijs" is impure: it contains symlinks to /usr/share/automake etc.! + rm -rf ijs/ltmain.sh + + # Don't install stuff in the Cups store path. + makeFlagsArray=(CUPSSERVERBIN=$out/lib/cups CUPSSERVERROOT=$out/etc/cups CUPSDATA=$out/share/cups) + ''; + + configureFlags = if x11Support then [ "--with-x" ] else [ "--without-x" ]; doCheck = true; + + postInstall = '' + for i in $fonts; do + (cd $out/share/ghostscript && tar xvfz $i) + done + ''; } diff --git a/pkgs/misc/ghostscript/pstoraster.patch b/pkgs/misc/ghostscript/pstoraster.patch deleted file mode 100644 index 465c91e4f19..00000000000 --- a/pkgs/misc/ghostscript/pstoraster.patch +++ /dev/null @@ -1,81 +0,0 @@ -Upstream issue: http://bugs.ghostscript.com/show_bug.cgi?id=691108 -e.g. printing a test page prints only black - -Patch: https://bugs.archlinux.org/task/18339 - ---- a/cups/gdevcups.c -+++ b/cups/gdevcups.c -@@ -975,7 +975,8 @@ cups_map_cmyk(gx_device *pdev, /* I - Device info */ - frac k, /* I - Black value */ - frac *out) /* O - Device colors */ - { -- int c0, c1, c2, c3; /* Temporary color values */ -+ int c0 = 0, c1 = 0, -+ c2 = 0, c3 = 0; /* Temporary color values */ - float rr, rg, rb, /* Real RGB colors */ - ciex, ciey, ciez, /* CIE XYZ colors */ - ciey_yn, /* Normalized luminance */ -@@ -2703,9 +2704,13 @@ cups_put_params(gx_device *pdev, /* I - Device info */ - int color_set; /* Were the color attrs set? */ - gdev_prn_space_params sp; /* Space parameter data */ - int width, /* New width of page */ -- height; /* New height of page */ -+ height, /* New height of page */ -+ colorspace, /* New color space */ -+ bitspercolor; /* New bits per color */ - static int width_old = 0, /* Previous width */ -- height_old = 0; /* Previous height */ -+ height_old = 0, /* Previous height */ -+ colorspace_old = 0,/* Previous color space */ -+ bitspercolor_old = 0;/* Previous bits per color */ - ppd_attr_t *backside = NULL, - *backsiderequiresflippedmargins = NULL; - float swap; -@@ -2800,9 +2805,10 @@ cups_put_params(gx_device *pdev, /* I - Device info */ - else if (code == 0) \ - { \ - dprintf1("DEBUG: Setting %s to", sname); \ -- for (i = 0; i < count; i ++) \ -- dprintf1(" %d", (unsigned)(arrayval.data[i])); \ -- cups->header.name[i] = (unsigned)arrayval.data[i]; \ -+ for (i = 0; i < count; i ++) { \ -+ dprintf1(" %d", (unsigned)(arrayval.data[i])); \ -+ cups->header.name[i] = (unsigned)(arrayval.data[i]); \ -+ } \ - dprintf("...\n"); \ - } - -@@ -3243,23 +3249,31 @@ cups_put_params(gx_device *pdev, /* I - Device info */ - } - #endif /* CUPS_RASTER_SYNCv1 */ - -+ colorspace = cups->header.cupsColorSpace; -+ bitspercolor = cups->header.cupsBitsPerColor; -+ - /* - * Don't reallocate memory unless the device has been opened... - * Also reallocate only if the size has actually changed... - */ - -- if (pdev->is_open && (width != width_old || height != height_old)) -+ if (pdev->is_open && -+ (width != width_old || height != height_old || -+ colorspace != colorspace_old || bitspercolor != bitspercolor_old)) - { - - width_old = width; - height_old = height; -+ colorspace_old = colorspace; -+ bitspercolor_old = bitspercolor; - - /* - * Device is open and size has changed, so reallocate... - */ - -- dprintf4("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels...\n", -- pdev->MediaSize[0], pdev->MediaSize[1], width, height); -+ dprintf6("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels, color space: %d, bits per color: %d...\n", -+ pdev->MediaSize[0], pdev->MediaSize[1], width, height, -+ colorspace, bitspercolor); - - sp = ((gx_device_printer *)pdev)->space_params; \ No newline at end of file From 29d613ba0e9aa5ef2dd83511e997105cb7a8bc46 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Tue, 3 Jan 2012 18:00:02 +0000 Subject: [PATCH 5/5] Add a warning to cmake/default.nix svn path=/nixpkgs/trunk/; revision=31248 --- pkgs/development/tools/build-managers/cmake/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index c7484ee6e84..80958e2885f 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -11,6 +11,7 @@ let version = "${majorVersion}.${minorVersion}"; in +# WARNING: Do NOT upgrade cmake in trunk: it fails to build on i686-linux stdenv.mkDerivation rec { name = "cmake-${os useNcurses "cursesUI-"}${os useQt4 "qt4UI-"}${version}";