From a047ba25f4ab932980460db588f7ef14602bc4a2 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Tue, 9 Feb 2016 15:23:16 +0100 Subject: libiconv: fix on mingw --- pkgs/development/libraries/libiconv/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/libiconv/default.nix b/pkgs/development/libraries/libiconv/default.nix index f5818c3bf4c..9b62436ae08 100644 --- a/pkgs/development/libraries/libiconv/default.nix +++ b/pkgs/development/libraries/libiconv/default.nix @@ -1,6 +1,6 @@ { fetchurl, stdenv, lib }: -assert (!stdenv.isLinux); +assert !stdenv.isLinux || stdenv ? cross; # TODO: improve on cross stdenv.mkDerivation rec { name = "libiconv-1.14"; @@ -15,6 +15,12 @@ stdenv.mkDerivation rec { ./libiconv-1.14-wchar.patch ]; + postPatch = + lib.optionalString (stdenv.cross.libc or null == "msvcrt") + '' + sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h + ''; + configureFlags = # On Cygwin, Libtool produces a `.dll.a', which is not a "real" DLL # (Windows' linker would need to be used somehow to produce an actual -- cgit 1.4.1 From afaf1c2f77b0f30feaa155aa1ecd67353cd70896 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Thu, 21 Apr 2016 14:24:41 +0200 Subject: gettext: remove crossAttrs They seem not needed anymore. --- pkgs/development/libraries/gettext/default.nix | 7 ------- 1 file changed, 7 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 940df56c03c..78a8756b59b 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -54,13 +54,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - crossAttrs = { - buildInputs = lib.optional (stdenv ? ccCross && stdenv.ccCross.libc ? libiconv) - stdenv.ccCross.libc.libiconv.crossDrv; - # Gettext fails to guess the cross compiler - configureFlags = "CXX=${stdenv.cross.config}-g++"; - }; - meta = { description = "Well integrated set of translation tools and documentation"; -- cgit 1.4.1 From 94eba251038cc3177f312e122c28bfbb0cc92ebc Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Tue, 9 Feb 2016 15:37:04 +0100 Subject: libxml2: fix on mingw, without DLLs ATM After closure-size merge we need to disable python support, as python upstream doesn't support cross-building linux -> mingw. --- pkgs/development/libraries/libxml2/default.nix | 35 ++++++++++++++++++-------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index f7e175373e1..769169104ab 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, zlib, xz, python, findXMLCatalogs }: +{ stdenv, lib, fetchurl, zlib, xz, python, findXMLCatalogs, libiconv +, supportPython ? (! stdenv ? cross) }: stdenv.mkDerivation rec { name = "libxml2-${version}"; @@ -9,23 +10,35 @@ stdenv.mkDerivation rec { sha256 = "0bd17g6znn2r98gzpjppsqjg33iraky4px923j3k8kdl8qgy7sad"; }; - outputs = [ "dev" "out" "bin" "doc" "py" ]; - propagatedBuildOutputs = "out bin py"; + outputs = [ "dev" "out" "bin" "doc" ] + ++ lib.optional supportPython "py"; + propagatedBuildOutputs = "out bin" + lib.optionalString supportPython " py"; - buildInputs = [ python ] + buildInputs = lib.optional supportPython python # Libxml2 has an optional dependency on liblzma. However, on impure # platforms, it may end up using that from /usr/lib, and thus lack a # RUNPATH for that, leading to undefined references for its users. - ++ stdenv.lib.optional stdenv.isFreeBSD xz; + ++ lib.optional stdenv.isFreeBSD xz; propagatedBuildInputs = [ zlib findXMLCatalogs ]; - configureFlags = "--with-python=${python}"; + configureFlags = lib.optional supportPython "--with-python=${python}"; enableParallelBuilding = true; - preInstall = ''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"''; - installFlags = ''pythondir="$(py)/lib/${python.libPrefix}/site-packages"''; + crossAttrs = lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { + # creating the DLL is broken ATM + dontDisableStatic = true; + configureFlags = configureFlags ++ [ "--disable-shared" ]; + + # libiconv is a header dependency - propagating is enough + propagatedBuildInputs = [ findXMLCatalogs libiconv ]; + }; + + preInstall = lib.optionalString supportPython + ''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"''; + installFlags = lib.optionalString supportPython + ''pythondir="$(py)/lib/${python.libPrefix}/site-packages"''; postFixup = '' moveToOutput bin/xml2-config "$dev" @@ -33,13 +46,13 @@ stdenv.mkDerivation rec { moveToOutput share/man/man1 "$bin" ''; - passthru = { inherit version; pythonSupport = true; }; + passthru = { inherit version; pythonSupport = supportPython; }; meta = { homepage = http://xmlsoft.org/; description = "An XML parsing library for C"; license = "bsd"; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = lib.platforms.unix; + maintainers = [ lib.maintainers.eelco ]; }; } -- cgit 1.4.1 From 49bec8173026c1a050829b43447a4a8f8ca850ed Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Tue, 9 Feb 2016 15:37:48 +0100 Subject: libxslt: fix on mingw by upstream patch It's only static, as libxml2 is only static ATM. --- pkgs/development/libraries/libxslt/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix index 0eda42879ec..c76f2824604 100644 --- a/pkgs/development/libraries/libxslt/default.nix +++ b/pkgs/development/libraries/libxslt/default.nix @@ -9,6 +9,12 @@ stdenv.mkDerivation rec { }; patches = stdenv.lib.optional stdenv.isSunOS ./patch-ah.patch + ++ stdenv.lib.optional (stdenv.cross.libc or null == "msvcrt") + (fetchpatch { + name = "mingw.patch"; + url = "http://git.gnome.org/browse/libxslt/patch/?id=ab5810bf27cd63"; + sha256 = "0kkqq3fv2k3q86al38vp6zwxazpvp5kslcjnmrq4ax5cm2zvsjk3"; + }) ++ [ (fetchpatch { name = "CVE-2015-7995.patch"; -- cgit 1.4.1 From 80509ab287687591ba179535bfc1cec88013a0d9 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Tue, 9 Feb 2016 19:14:18 +0100 Subject: libpng: fix on mingw by disabling doCheck --- pkgs/development/libraries/libpng/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix index 6faed97aaee..a5a0e1d42a3 100644 --- a/pkgs/development/libraries/libpng/default.nix +++ b/pkgs/development/libraries/libpng/default.nix @@ -26,7 +26,9 @@ in stdenv.mkDerivation rec { preConfigure = "export bin=$dev"; - doCheck = true; + # it's hard to cross-run tests and some check programs didn't compile anyway + makeFlags = stdenv.lib.optional (!doCheck) "check_PROGRAMS="; + doCheck = ! stdenv ? cross; postInstall = ''mv "$out/bin" "$dev/bin"''; -- cgit 1.4.1 From 321ecde8a163cdde9e39df277288e9ff3817f4df Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Thu, 21 Apr 2016 16:12:50 +0200 Subject: zlib: on mingw, add another DLL link Also clean up the expression a little. It fixes at least libpng's DLL. --- pkgs/development/libraries/zlib/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 59713bb8d20..f7a72a7673a 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -52,14 +52,21 @@ stdenv.mkDerivation rec { crossAttrs = { dontStrip = static; + dontSetConfigureCross = true; } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { - configurePhase='' - installFlags="BINARY_PATH=$out/bin INCLUDE_PATH=$out/include LIBRARY_PATH=$out/lib" - ''; + installFlags = [ + "BINARY_PATH=$(out)/bin" + "INCLUDE_PATH=$(dev)/include" + "LIBRARY_PATH=$(out)/lib" + ]; makeFlags = [ "-f" "win32/Makefile.gcc" "PREFIX=${stdenv.cross.config}-" - ] ++ (if static then [] else [ "SHARED_MODE=1" ]); + ] ++ stdenv.lib.optional (!static) "SHARED_MODE=1"; + + # Non-typical naming confuses libtool which then refuses to use zlib's DLL + # in some cases, e.g. when compiling libpng. + postInstall = postInstall + "ln -s zlib1.dll $out/bin/libz.dll"; } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") { makeFlags = [ "RANLIB=${stdenv.cross.config}-ranlib" ]; }; -- cgit 1.4.1 From bd3d377e5eff3521de386c298c9bd89b132f2ad0 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Tue, 9 Feb 2016 19:27:14 +0100 Subject: freetype: fix on mingw --- pkgs/development/libraries/freetype/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 81e98056e90..0548d1433b7 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -26,7 +26,8 @@ stdenv.mkDerivation rec { }; patches = [] - ++ optionals useEncumberedCode [ + # mingw: these patches use `strcasestr` which isn't available on windows + ++ optionals (useEncumberedCode && stdenv.cross.libc or null != "msvcrt" ) [ (fetchbohoomil "01-freetype-2.6.2-enable-valid.patch" "1szq0zha7n41f4pq179wgfkam034mp2xn0xc36sdl5sjp9s9hv08") (fetchbohoomil "02-upstream-2015.12.05.patch" @@ -39,7 +40,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype # dependence on harfbuzz is looser than the reverse dependence - buildInputs = [ pkgconfig which ] + nativeBuildInputs = [ pkgconfig which ] # FreeType requires GNU Make, which is not part of stdenv on FreeBSD. ++ optional (!stdenv.isLinux) gnumake; @@ -56,7 +57,7 @@ stdenv.mkDerivation rec { postInstall = glib.flattenInclude; - crossAttrs = { + crossAttrs = stdenv.lib.optionalAttrs (stdenv.cross.libc or null != "msvcrt") { # Somehow it calls the unwrapped gcc, "i686-pc-linux-gnu-gcc", instead # of gcc. I think it's due to the unwrapped gcc being in the PATH. I don't # know why it's on the PATH. -- cgit 1.4.1 From 7d4ebb526caa9904dc45e5905dd2e4d90f912979 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Wed, 10 Feb 2016 12:40:20 +0100 Subject: libjpeg(-turbo): fix on mingw By porting a patch from msys2. --- pkgs/development/libraries/libjpeg-turbo/default.nix | 4 ++++ .../libraries/libjpeg-turbo/mingw-boolean.patch | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index da4d3a9822f..c326e630bd0 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -8,6 +8,10 @@ stdenv.mkDerivation rec { sha256 = "0gi349hp1x7mb98s4mf66sb2xay2kjjxj9ihrriw0yiy0k9va6sj"; }; + patches = + stdenv.lib.optional (stdenv.cross.libc or null == "msvcrt") + ./mingw-boolean.patch; + outputs = [ "dev" "out" "doc" "bin" ]; nativeBuildInputs = [ nasm ]; diff --git a/pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch b/pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch new file mode 100644 index 00000000000..9b9483d6398 --- /dev/null +++ b/pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch @@ -0,0 +1,19 @@ +Ported to updated libjpeg-turbo from +https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-libjpeg-turbo/jpeg-typedefs.patch +--- a/jmorecfg.h 2012-02-10 06:47:55 +0300 ++++ b/jmorecfg.h 2012-05-03 10:29:13 +0400 +@@ -224,7 +224,13 @@ + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +-#ifndef HAVE_BOOLEAN ++#if defined(_WIN32) && !defined(HAVE_BOOLEAN) ++#ifndef __RPCNDR_H__ ++typedef unsigned char boolean; ++#endif ++#define HAVE_BOOLEAN ++#endif ++#if !defined(HAVE_BOOLEAN) && !defined(__RPCNDR_H__) + typedef int boolean; + #endif + #ifndef FALSE /* in case these macros already exist */ -- cgit 1.4.1 From 076a09ee37570363f5fef77292a61a117edfdc8d Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Wed, 10 Feb 2016 12:07:15 +0100 Subject: poppler: disable some dependencies for minimal config lcms, openjpeg and curl don't seem to be so necessary. --- pkgs/development/libraries/poppler/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index ebcdcc2b3ef..ef27113806b 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -22,8 +22,8 @@ stdenv.mkDerivation rec { # TODO: reduce propagation to necessary libs propagatedBuildInputs = with lib; - [ zlib freetype fontconfig libjpeg lcms curl openjpeg ] - ++ optional (!minimal) cairo + [ zlib freetype fontconfig libjpeg ] + ++ optionals (!minimal) [ cairo lcms curl openjpeg ] ++ optional qt4Support qt4 ++ optional qt5Support qtbase; @@ -35,8 +35,11 @@ stdenv.mkDerivation rec { "--enable-libcurl" "--enable-zlib" ] - ++ optionals minimal [ "--disable-poppler-glib" "--disable-poppler-cpp" ] - ++ optional (!utils) "--disable-utils"; + ++ optionals minimal [ + "--disable-poppler-glib" "--disable-poppler-cpp" + "--disable-libopenjpeg" "--disable-libcurl" + ] + ++ optional (!utils) "--disable-utils" ; enableParallelBuilding = true; -- cgit 1.4.1 From 960244c0af1cfab1c16993815e0373e36425f79b Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Wed, 10 Feb 2016 12:08:23 +0100 Subject: poppler: improve on mingw The minimal version should be fine now. --- pkgs/development/libraries/poppler/default.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index ef27113806b..d9d5a7679b1 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -43,6 +43,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + crossAttrs.postPatch = + # there are tests using `strXXX_s` functions that are missing apparently + stdenv.lib.optionalString (stdenv.cross.libc or null == "msvcrt") + "sed '/^SUBDIRS =/s/ test / /' -i Makefile.in"; + meta = with lib; { homepage = http://poppler.freedesktop.org/; description = "A PDF rendering library"; -- cgit 1.4.1 From ad033f7665c14133cd17225d97a8db79012ddcbe Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 11 Apr 2015 23:19:37 +0200 Subject: boost: Fix generation of crossB2Args. `concatMapStringsSep` actually needs a function to work on the list items, but it was probably a leftover from the refactor in af8654d. Signed-off-by: aszlig --- pkgs/development/libraries/boost/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 5b0c06bd6bb..65d188a86c5 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -77,7 +77,7 @@ let "toolset=gcc-cross" "--without-python" ]; - crossB2Args = concatMapStringsSep " " (genericB2Flags ++ crossB2Flags); + crossB2Args = concatStringsSep " " (genericB2Flags ++ crossB2Flags); builder = b2Args: '' ./b2 ${b2Args} -- cgit 1.4.1 From 2d760a28b3479bcbb39d512cf9930b46d17d5364 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 12 Apr 2015 10:32:18 +0200 Subject: boost: Supply some configure flags for mingw. Otherwise, Boost.Build is trying to compile against pthread and desperately searches for icu/iconv. Signed-off-by: aszlig --- pkgs/development/libraries/boost/generic.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 65d188a86c5..758d95309bb 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -76,6 +76,9 @@ let "--user-config=user-config.jam" "toolset=gcc-cross" "--without-python" + ] ++ optionals stdenv.isCrossWin [ + "target-os=windows" + "threadapi=win32" ]; crossB2Args = concatStringsSep " " (genericB2Flags ++ crossB2Flags); -- cgit 1.4.1 From 5f0f48c08b3c718d898b2f00b7b48a5bf6d3eb95 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 12 Apr 2015 10:34:06 +0200 Subject: boost: Reduce noise during cross compile. I guess the "set -x" was only left there for debugging, so I'm removing it because it let's the scrollback buffer explode ;-) Signed-off-by: aszlig --- pkgs/development/libraries/boost/generic.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 758d95309bb..51d3c911d67 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -173,7 +173,6 @@ stdenv.mkDerivation { # usual --build and --host added on cross building. preConfigure = '' export configureFlags="--without-icu ${concatStringsSep " " commonConfigureFlags}" - set -x cat << EOF > user-config.jam using gcc : cross : $crossConfig-g++ ; EOF -- cgit 1.4.1 From fb74d901d76d393be28b19651f5368b89db93d16 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 12 Apr 2015 12:01:07 +0200 Subject: boost: Add patch for mingw to use gas instead. The upstream sources only compile with masm, so we need to add a patch that translates the masm sources to GNU assembler. Unfortunately, this means, that "generic.nix" is no longer very much generic, but the versions we currently include work fine with the patch. Unfortunately, the boost build still doesn't finish, but we're getting there soon enough. The patch is from https://svn.boost.org/trac/boost/ticket/7262 and following the discussion it seems that the upstream authors are unwilling to add a gas version for the Windows platform. So in the long term we might need to find a better solution to that, like for example using Wine to run MASM. Signed-off-by: aszlig --- pkgs/development/libraries/boost/generic.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 51d3c911d67..561f65afa51 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -1,4 +1,4 @@ -{ stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames +{ stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames , toolset ? if stdenv.cc.isClang then "clang" else null , enableRelease ? true , enableDebug ? false @@ -79,6 +79,9 @@ let ] ++ optionals stdenv.isCrossWin [ "target-os=windows" "threadapi=win32" + "binary-format=pe" + "address-model=${if stdenv.isCross64 then "64" else "32"}" + "architecture=x86" ]; crossB2Args = concatStringsSep " " (genericB2Flags ++ crossB2Flags); @@ -180,5 +183,13 @@ stdenv.mkDerivation { buildPhase = builder crossB2Args; installPhase = installer crossB2Args; postFixup = fixup; + } // optionalAttrs stdenv.isCrossWin { + patches = fetchurl { + url = "https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/" + + "boost-mingw.patch"; + sha256 = "0s32kwll66k50w6r5np1y5g907b7lcpsjhfgr7rsw7q5syhzddyj"; + }; + + patchFlags = "-p0"; }; } -- cgit 1.4.1 From 2b0d72585432832b96ed5cf117cf9035874dfce2 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Tue, 16 Feb 2016 20:36:51 +0100 Subject: boost: finish fixes for mingw - Dynamic linking won't work, it seems. - When using a native python, the extension isn't built, so let's not depend on it. - Replace flags missing on this branch, such as `isCrossWin`. --- pkgs/development/libraries/boost/generic.nix | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 561f65afa51..8835c58618a 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -4,8 +4,8 @@ , enableDebug ? false , enableSingleThreaded ? false , enableMultiThreaded ? true -, enableShared ? true -, enableStatic ? false +, enableShared ? !(stdenv.cross.libc or null == "msvcrt") # problems for now +, enableStatic ? !enableShared , enablePIC ? false , enableExceptions ? false , taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic)) @@ -76,11 +76,11 @@ let "--user-config=user-config.jam" "toolset=gcc-cross" "--without-python" - ] ++ optionals stdenv.isCrossWin [ + ] ++ optionals (stdenv.cross.libc == "msvcrt") [ "target-os=windows" "threadapi=win32" "binary-format=pe" - "address-model=${if stdenv.isCross64 then "64" else "32"}" + "address-model=${if hasPrefix "x86_64-" stdenv.cross.config then "64" else "32"}" "architecture=x86" ]; crossB2Args = concatStringsSep " " (genericB2Flags ++ crossB2Flags); @@ -114,6 +114,8 @@ let find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \ -exec sed '1i#line 1 "{}"' -i '{}' \; ) + '' + optionalString (stdenv.cross.libc or null == "msvcrt") '' + ${stdenv.cross.config}-ranlib "$lib"/lib/*.a ''; in @@ -149,14 +151,15 @@ stdenv.mkDerivation { enableParallelBuilding = true; - buildInputs = [ icu expat zlib bzip2 python ] + buildInputs = [ expat zlib bzip2 ] + ++ stdenv.lib.optionals (! stdenv ? cross) [ python icu ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; configureScript = "./bootstrap.sh"; - configureFlags = commonConfigureFlags ++ [ - "--with-icu=${icu.dev}" - "--with-python=${python.interpreter}" - ] ++ optional (toolset != null) "--with-toolset=${toolset}"; + configureFlags = commonConfigureFlags + ++ [ "--with-python=${python.interpreter}" ] + ++ optional (! stdenv ? cross) "--with-icu=${icu.dev}" + ++ optional (toolset != null) "--with-toolset=${toolset}"; buildPhase = builder nativeB2Args; @@ -168,10 +171,6 @@ stdenv.mkDerivation { setOutputFlags = false; crossAttrs = rec { - buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ]; - # all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to - # override them. - propagatedBuildInputs = buildInputs; # We want to substitute the contents of configureFlags, removing thus the # usual --build and --host added on cross building. preConfigure = '' @@ -183,7 +182,7 @@ stdenv.mkDerivation { buildPhase = builder crossB2Args; installPhase = installer crossB2Args; postFixup = fixup; - } // optionalAttrs stdenv.isCrossWin { + } // optionalAttrs (stdenv.cross.libc == "msvcrt") { patches = fetchurl { url = "https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/" + "boost-mingw.patch"; -- cgit 1.4.1 From 1bfc3a8965d54b88d132bf7368dac33919ba57e1 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Tue, 16 Feb 2016 20:44:54 +0100 Subject: boost: support libiconv, also on non-glibc platforms --- pkgs/development/libraries/boost/generic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 8835c58618a..8e5579cb8ea 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames +{ stdenv, fetchurl, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv , toolset ? if stdenv.cc.isClang then "clang" else null , enableRelease ? true , enableDebug ? false @@ -151,7 +151,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; - buildInputs = [ expat zlib bzip2 ] + buildInputs = [ expat zlib bzip2 libiconv ] ++ stdenv.lib.optionals (! stdenv ? cross) [ python icu ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; -- cgit 1.4.1 From b1bf11881a9e2f17c410f5ba8d03756daf71c975 Mon Sep 17 00:00:00 2001 From: obadz Date: Tue, 3 May 2016 22:54:06 +0100 Subject: spdlog: init at 292bdc5 --- pkgs/development/libraries/spdlog/default.nix | 36 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/libraries/spdlog/default.nix (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/spdlog/default.nix b/pkgs/development/libraries/spdlog/default.nix new file mode 100644 index 00000000000..1c3952e7adf --- /dev/null +++ b/pkgs/development/libraries/spdlog/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, cmake }: + +stdenv.mkDerivation rec { + name = "spdlog-${version}"; + version = stdenv.lib.strings.substring 0 7 rev; + rev = "292bdc5eb4929f183c78d2c67082b715306f81c9"; + + src = fetchFromGitHub { + owner = "gabime"; + repo = "spdlog"; + inherit rev; + sha256 = "1b6b0c81a8hisaibqlzj5mrk3snrfl8p5sqa056q2f02i62zksbn"; + }; + + buildInputs = [ cmake ]; + + # cmakeFlags = [ "-DSPDLOG_BUILD_EXAMPLES=ON" ]; + + outputs = [ "out" "doc" ]; + + postInstall = '' + mkdir -p $out/share/doc/spdlog + cp -rv ../example $out/share/doc/spdlog + ''; + + meta = with stdenv.lib; { + description = "Very fast, header only, C++ logging library."; + homepage = https://github.com/gabime/spdlog; + license = licenses.mit; + maintainers = with maintainers; [ obadz ]; + platforms = platforms.all; + + # This is a header-only library, no point in hydra building it: + hydraPlatforms = []; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ffcbeddfb93..5f901adb856 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16709,6 +16709,8 @@ in bullet = callPackage ../development/libraries/bullet {}; + spdlog = callPackage ../development/libraries/spdlog { }; + dart = callPackage ../development/interpreters/dart { }; httrack = callPackage ../tools/backup/httrack { }; -- cgit 1.4.1 From 63a63c53d6de08543c08b19f7a62b930b91d19d0 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 3 May 2016 23:40:55 +0200 Subject: poppler: 0.36.0 -> 0.43.0 --- pkgs/development/libraries/poppler/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index ebcdcc2b3ef..ae20cb4090c 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -5,8 +5,8 @@ }: let # beware: updates often break cups_filters build - version = "0.36.0"; # even major numbers are stable - sha256 = "13i440kv873wgmw50rs4d1v05cj0r7bqnghd70hp9vy44dxhdk4k"; + version = "0.43.0"; # even major numbers are stable + sha256 = "0mi4zf0pz3x3fx3ir7szz1n57nywgbpd4mp2r7mvf47f4rmf4867"; in stdenv.mkDerivation rec { name = "poppler-${suffix}-${version}"; -- cgit 1.4.1 From 3e401a8d01ddb21fe43f77124bfbefb7c82299ef Mon Sep 17 00:00:00 2001 From: José Romildo Malaquias Date: Tue, 3 May 2016 22:32:57 -0300 Subject: imlib2: 1.4.8 -> 1.4.9 --- pkgs/development/libraries/imlib2/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/imlib2/default.nix b/pkgs/development/libraries/imlib2/default.nix index 8d79fcc50a8..85e9979ebb0 100644 --- a/pkgs/development/libraries/imlib2/default.nix +++ b/pkgs/development/libraries/imlib2/default.nix @@ -1,17 +1,19 @@ { stdenv, fetchurl, xlibsWrapper, libjpeg, libtiff, giflib, libpng, bzip2, pkgconfig }: stdenv.mkDerivation rec { - name = "imlib2-1.4.8"; + name = "imlib2-1.4.9"; src = fetchurl { url = "mirror://sourceforge/enlightenment/${name}.tar.bz2"; - sha256 = "0xxhgkd1axlcmf3kp1d7naiygparpg8l3sg3d263rhl2z0gm7aw9"; + sha256 = "08809xxk2555yj6glixzw9a0x3x8cx55imd89kj3r0h152bn8a3x"; }; buildInputs = [ xlibsWrapper libjpeg libtiff giflib libpng bzip2 ]; nativeBuildInputs = [ pkgconfig ]; + enableParallelBuilding = true; + preConfigure = '' substituteInPlace imlib2-config.in \ --replace "@my_libs@" "" -- cgit 1.4.1 From 367b2aa1e422f2ee8a0860df52e98a5d788cef6a Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Thu, 5 May 2016 05:27:17 +0300 Subject: dbus-glibc: Set --exec-prefix to fix pkgconfig file Without this notify-osd fails to find dbus-binding-tool, since the pkgconfig file would contain e.g.: ```` prefix=/nix/store/hxsbjbjn7g1j1cf60n228yi9wnzrl4yk-dbus-glib-0.104 exec_prefix=${prefix} ```` ... and notify-osd is using `exec_prefix` to locate the binaries. Set it to $dev to match the location of installed binaries (we have `outputBin = "dev";`). Issue #15074. --- pkgs/development/libraries/dbus-glib/default.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix index 59d227f0e86..d06a919cada 100644 --- a/pkgs/development/libraries/dbus-glib/default.nix +++ b/pkgs/development/libraries/dbus-glib/default.nix @@ -17,6 +17,10 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ dbus glib ]; + preConfigure = '' + configureFlagsArray+=("--exec-prefix=$dev") + ''; + doCheck = true; passthru = { inherit dbus glib; }; -- cgit 1.4.1