Merge staging into master

This commit is contained in:
Frederik Rietdijk 2018-04-11 14:55:52 +02:00
commit ee6894ca12
598 changed files with 9599 additions and 7743 deletions

View file

@ -3760,6 +3760,11 @@
github = "twey";
name = "James Twey Kay";
};
typetetris = {
email = "ericwolf42@mail.com";
github = "typetetris";
name = "Eric Wolf";
};
unode = {
email = "alves.rjc@gmail.com";
github = "unode";

View file

@ -612,7 +612,7 @@ sub waitForX {
my ($self, $regexp) = @_;
$self->nest("waiting for the X11 server", sub {
retry sub {
my ($status, $out) = $self->execute("journalctl -b SYSLOG_IDENTIFIER=systemd | grep 'session opened'");
my ($status, $out) = $self->execute("journalctl -b SYSLOG_IDENTIFIER=systemd | grep 'Reached target Current graphical'");
return 0 if $status != 0;
($status, $out) = $self->execute("[ -e /tmp/.X11-unix/X0 ]");
return 1 if $status == 0;

View file

@ -111,6 +111,8 @@ in rec {
ocrProg = tesseract_4.override { enableLanguages = [ "eng" ]; };
imagemagick_tiff = imagemagick_light.override { inherit libtiff; };
# Generate onvenience wrappers for running the test driver
# interactively with the specified network, and for starting the
# VMs from the command line.
@ -128,7 +130,7 @@ in rec {
wrapProgram $out/bin/nixos-test-driver \
--add-flags "''${vms[*]}" \
${lib.optionalString enableOCR
"--prefix PATH : '${ocrProg}/bin:${imagemagick}/bin'"} \
"--prefix PATH : '${ocrProg}/bin:${imagemagick_tiff}/bin'"} \
--run "export testScript=\"\$(cat $out/test-script)\"" \
--set VLANS '${toString vlans}'
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms

View file

@ -92,7 +92,7 @@ let
group = mkOption {
type = types.str;
apply = x: assert (builtins.stringLength x < 17 || abort "Group name '${x}' is longer than 16 characters which is not allowed!"); x;
apply = x: assert (builtins.stringLength x < 32 || abort "Group name '${x}' is longer than 31 characters which is not allowed!"); x;
default = "nogroup";
description = "The user's primary group.";
};

View file

@ -14,7 +14,6 @@ let
name = "mesa-drivers+txc-${p.mesa_drivers.version}";
paths =
[ p.mesa_drivers
p.mesa_drivers.out # mainly for libGL
(if cfg.s3tcSupport then p.libtxc_dxtn else p.libtxc_dxtn_s2tc)
];
};
@ -33,89 +32,92 @@ in
{
options = {
hardware.opengl.enable = mkOption {
description = ''
Whether to enable OpenGL drivers. This is needed to enable
OpenGL support in X11 systems, as well as for Wayland compositors
like sway, way-cooler and Weston. It is enabled by default
by the corresponding modules, so you do not usually have to
set it yourself, only if there is no module for your wayland
compositor of choice. See services.xserver.enable,
programs.sway.enable, and programs.way-cooler.enable.
'';
type = types.bool;
default = false;
};
hardware.opengl.driSupport = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable accelerated OpenGL rendering through the
Direct Rendering Interface (DRI).
'';
};
hardware.opengl = {
enable = mkOption {
description = ''
Whether to enable OpenGL drivers. This is needed to enable
OpenGL support in X11 systems, as well as for Wayland compositors
like sway, way-cooler and Weston. It is enabled by default
by the corresponding modules, so you do not usually have to
set it yourself, only if there is no module for your wayland
compositor of choice. See services.xserver.enable,
programs.sway.enable, and programs.way-cooler.enable.
'';
type = types.bool;
default = false;
};
hardware.opengl.driSupport32Bit = mkOption {
type = types.bool;
default = false;
description = ''
On 64-bit systems, whether to support Direct Rendering for
32-bit applications (such as Wine). This is currently only
supported for the <literal>nvidia</literal> and
<literal>ati_unfree</literal> drivers, as well as
<literal>Mesa</literal>.
'';
};
driSupport = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable accelerated OpenGL rendering through the
Direct Rendering Interface (DRI).
'';
};
hardware.opengl.s3tcSupport = mkOption {
type = types.bool;
default = false;
description = ''
Make S3TC(S3 Texture Compression) via libtxc_dxtn available
to OpenGL drivers instead of the patent-free S2TC replacement.
driSupport32Bit = mkOption {
type = types.bool;
default = false;
description = ''
On 64-bit systems, whether to support Direct Rendering for
32-bit applications (such as Wine). This is currently only
supported for the <literal>nvidia</literal> and
<literal>ati_unfree</literal> drivers, as well as
<literal>Mesa</literal>.
'';
};
Using this library may require a patent license depending on your location.
'';
};
s3tcSupport = mkOption {
type = types.bool;
default = false;
description = ''
Make S3TC(S3 Texture Compression) via libtxc_dxtn available
to OpenGL drivers instead of the patent-free S2TC replacement.
hardware.opengl.package = mkOption {
type = types.package;
internal = true;
description = ''
The package that provides the OpenGL implementation.
'';
};
Using this library may require a patent license depending on your location.
'';
};
hardware.opengl.package32 = mkOption {
type = types.package;
internal = true;
description = ''
The package that provides the 32-bit OpenGL implementation on
64-bit systems. Used when <option>driSupport32Bit</option> is
set.
'';
};
package = mkOption {
type = types.package;
internal = true;
description = ''
The package that provides the OpenGL implementation.
'';
};
hardware.opengl.extraPackages = mkOption {
type = types.listOf types.package;
default = [];
example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ]";
description = ''
Additional packages to add to OpenGL drivers. This can be used
to add OpenCL drivers, VA-API/VDPAU drivers etc.
'';
};
package32 = mkOption {
type = types.package;
internal = true;
description = ''
The package that provides the 32-bit OpenGL implementation on
64-bit systems. Used when <option>driSupport32Bit</option> is
set.
'';
};
hardware.opengl.extraPackages32 = mkOption {
type = types.listOf types.package;
default = [];
example = literalExample "with pkgs.pkgsi686Linux; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]";
description = ''
Additional packages to add to 32-bit OpenGL drivers on
64-bit systems. Used when <option>driSupport32Bit</option> is
set. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc.
'';
extraPackages = mkOption {
type = types.listOf types.package;
default = [];
example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ]";
description = ''
Additional packages to add to OpenGL drivers. This can be used
to add OpenCL drivers, VA-API/VDPAU drivers etc.
'';
};
extraPackages32 = mkOption {
type = types.listOf types.package;
default = [];
example = literalExample "with pkgs.pkgsi686Linux; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]";
description = ''
Additional packages to add to 32-bit OpenGL drivers on
64-bit systems. Used when <option>driSupport32Bit</option> is
set. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc.
'';
};
};
};

View file

@ -25,13 +25,6 @@ let
nvidia_x11 = nvidiaForKernel config.boot.kernelPackages;
nvidia_libs32 = (nvidiaForKernel pkgs_i686.linuxPackages).override { libsOnly = true; kernel = null; };
nvidiaPackage = nvidia: pkgs:
if !nvidia.useGLVND then nvidia.out
else pkgs.buildEnv {
name = "nvidia-libs";
paths = [ pkgs.libglvnd nvidia.out ];
};
enabled = nvidia_x11 != null;
in
@ -57,8 +50,8 @@ in
source = "${nvidia_x11.bin}/share/nvidia/nvidia-application-profiles-rc";
};
hardware.opengl.package = nvidiaPackage nvidia_x11 pkgs;
hardware.opengl.package32 = nvidiaPackage nvidia_libs32 pkgs_i686;
hardware.opengl.package = nvidia_x11.out;
hardware.opengl.package32 = nvidia_libs32.out;
environment.systemPackages = [ nvidia_x11.bin nvidia_x11.settings ]
++ lib.filter (p: p != null) [ nvidia_x11.persistenced ];

View file

@ -10,8 +10,8 @@
#include <errno.h>
#include <linux/capability.h>
#include <sys/capability.h>
#include <linux/prctl.h>
#include <sys/prctl.h>
#include <limits.h>
#include <cap-ng.h>
// Make sure assertions are not compiled out, we use them to codify

View file

@ -626,9 +626,7 @@ in
environment =
{
XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime.
LD_LIBRARY_PATH = concatStringsSep ":" (
[ "${xorg.libX11.out}/lib" "${xorg.libXext.out}/lib" "/run/opengl-driver/lib" ]
LD_LIBRARY_PATH = concatStringsSep ":" ([ "/run/opengl-driver/lib" ]
++ concatLists (catAttrs "libPath" cfg.drivers));
} // cfg.displayManager.job.environment;

View file

@ -137,7 +137,6 @@ let
# Slices / containers.
"slices.target"
"system.slice"
"user.slice"
"machine.slice"
"machines.target"
@ -836,7 +835,8 @@ in
system.requiredKernelConfig = map config.lib.kernelConfig.isEnabled
[ "DEVTMPFS" "CGROUPS" "INOTIFY_USER" "SIGNALFD" "TIMERFD" "EPOLL" "NET"
"SYSFS" "PROC_FS" "FHANDLE" "DMIID" "AUTOFS4_FS" "TMPFS_POSIX_ACL"
"SYSFS" "PROC_FS" "FHANDLE" "CRYPTO_USER_API_HASH" "CRYPTO_HMAC"
"CRYPTO_SHA256" "DMIID" "AUTOFS4_FS" "TMPFS_POSIX_ACL"
"TMPFS_XATTR" "SECCOMP"
];

View file

@ -98,7 +98,7 @@ let
${qemuGraphics} \
${toString config.virtualisation.qemu.options} \
$QEMU_OPTS \
$@
"$@"
'';

View file

@ -0,0 +1,58 @@
diff --git a/src/ugen_osc.cpp b/src/ugen_osc.cpp
index 6b93c6b..dbefe4f 100644
--- a/src/ugen_osc.cpp
+++ b/src/ugen_osc.cpp
@@ -1232,7 +1232,7 @@ CK_DLL_CTRL( gen5_coeffs )
Chuck_Array8 * in_args = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
// fprintf(stdout, "calling gen10coeffs, %d\n", weights);
- if(in_args<0) return;
+ if(in_args!=0) return;
size = in_args->size();
if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
@@ -1287,7 +1287,7 @@ CK_DLL_CTRL( gen7_coeffs )
Chuck_Array8 * in_args = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
// fprintf(stdout, "calling gen10coeffs, %d\n", weights);
- if(in_args<0) return;
+ if(in_args!=0) return;
size = in_args->size();
if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
@@ -1340,7 +1340,7 @@ CK_DLL_CTRL( gen9_coeffs )
Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
// fprintf(stdout, "calling gen10coeffs, %d\n", weights);
- if(weights<0) return;
+ if(weights!=0) return;
size = weights->size();
if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
@@ -1390,7 +1390,7 @@ CK_DLL_CTRL( gen10_coeffs )
Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
// fprintf(stdout, "calling gen10coeffs, %d\n", weights);
- if(weights<0) return;
+ if(weights!=0) return;
size = weights->size();
if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
@@ -1441,7 +1441,7 @@ CK_DLL_CTRL( gen17_coeffs )
Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
// fprintf(stdout, "calling gen17coeffs, %d\n", weights);
- if(weights<0) return;
+ if(weights!=0) return;
size = weights->size();
if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
@@ -1502,7 +1502,7 @@ CK_DLL_CTRL( curve_coeffs )
Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
// fprintf(stdout, "calling gen17coeffs, %d\n", weights);
- if(weights<0) goto done;
+ if(weights!=0) goto done;
nargs = weights->size();
if (nargs < 5 || (nargs % 3) != 2) { // check number of args

View file

@ -1,4 +1,6 @@
{ stdenv, fetchurl, alsaLib, bison, flex, libsndfile, which }:
{ stdenv, fetchurl, alsaLib, bison, flex, libsndfile, which
, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
}:
stdenv.mkDerivation rec {
version = "1.3.5.2";
@ -10,19 +12,24 @@ stdenv.mkDerivation rec {
};
buildInputs = [ bison flex libsndfile which ]
++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib
++ stdenv.lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ];
patches = [ ./darwin-limits.patch ];
patches = [ ./clang.patch ./darwin-limits.patch ];
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-Wno-missing-sysroot";
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-framework MultitouchSupport";
postPatch = ''
substituteInPlace src/makefile --replace "/usr/bin" "$out/bin"
substituteInPlace src/makefile.osx --replace "xcodebuild" "/usr/bin/xcodebuild"
substituteInPlace src/makefile.osx --replace "weak_framework" "framework"
substituteInPlace src/makefile.osx --replace "MACOSX_DEPLOYMENT_TARGET=10.5" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
'';
buildPhase =
stdenv.lib.optionals stdenv.isLinux ["make -C src linux-alsa"] ++
stdenv.lib.optionals stdenv.isDarwin ["make -C src osx"];
buildPhase = ''
make -C src ${if stdenv.isDarwin then "osx" else "linux-alsa"}
'';
installPhase = ''
install -Dm755 ./src/chuck $out/bin/chuck

View file

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
name = "fluidsynth-${version}";
version = "1.1.9";
version = "1.1.10";
src = fetchFromGitHub {
owner = "FluidSynth";
repo = "fluidsynth";
rev = "v${version}";
sha256 = "0krvmb1idnf95l2ydzfcb08ayyx3n4m71hf9fgwv3srzaikvpf3q";
sha256 = "04jlgq1d1hd8r9cnmkl3lgf1fgm7kgy4hh9nfddap41fm1wp121p";
};
nativeBuildInputs = [ pkgconfig cmake ];

View file

@ -15,8 +15,6 @@ stdenv.mkDerivation rec {
buildInputs = [ glib ncurses mpd_clientlib ];
nativeBuildInputs = [ meson ninja pkgconfig gettext ];
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
meta = with stdenv.lib; {
description = "Curses-based interface for MPD (music player daemon)";
homepage = https://www.musicpd.org/clients/ncmpc/;

View file

@ -22,6 +22,10 @@ in mkDerivation rec {
# Module Qt5::Test must be included in `find_package` before it is used.
''
sed -i CMakeLists.txt -e '/find_package(Qt5/ s|)| Test)|'
''
# Fix missing include for gettimeofday()
+ ''
sed -e '1i#include <sys/time.h>' -i src/helper/HelperApp.cpp
'';
nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig qttools ];

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file }:
{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file, libintl }:
with stdenv.lib;
@ -14,9 +14,7 @@ stdenv.mkDerivation rec {
sha256 = "66baaff43f12caebcf0efec9a5533044dc52837f799c73a1fd7312caa86099c2";
};
NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null;
nativeBuildInputs = [ pkgconfig intltool ];
nativeBuildInputs = [ pkgconfig intltool libintl ];
buildInputs = [ gtk2 which file ];
doCheck = true;

View file

@ -1,12 +1,12 @@
{ lib, fetchFromGitHub }:
rec {
version = "8.0.1605";
version = "8.0.1655";
src = fetchFromGitHub {
owner = "vim";
repo = "vim";
rev = "v${version}";
sha256 = "0a8zf43q806py14vq1frm350wycn47cmanj1hn1i7bqx1gdgcal9";
sha256 = "1c6raqjaxgsjazn4l7wqg2cscd5i4bz9m2g2xhn9ba1injs7mps1";
};
enableParallelBuilding = true;

View file

@ -15,6 +15,10 @@ stdenv.mkDerivation {
readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.connector-c blas ]
++ (with python2Packages; [ python dateutil wxPython30 numpy ]);
# On Darwin the installer tries to symlink the help files into a system
# directory
patches = [ ./no_symbolic_links.patch ];
configureFlags = [
"--with-proj-share=${proj}/share/proj"
"--without-opengl"

View file

@ -0,0 +1,37 @@
diff --git a/include/Make/Install.make b/include/Make/Install.make
index 0aba138..8ba74bc 100644
--- a/include/Make/Install.make
+++ b/include/Make/Install.make
@@ -116,11 +116,6 @@ real-install: | $(INST_DIR) $(UNIX_BIN)
-$(INSTALL) config.status $(INST_DIR)/config.status
-$(CHMOD) -R a+rX $(INST_DIR) 2>/dev/null
-ifneq ($(findstring darwin,$(ARCH)),)
- @# enable OSX Help Viewer
- @/bin/ln -sfh "$(INST_DIR)/docs/html" /Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)
-endif
-
$(INST_DIR) $(UNIX_BIN):
$(MAKE_DIR_CMD) $@
diff --git a/macosx/app/build_html_user_index.sh b/macosx/app/build_html_user_index.sh
index 04e63eb..c9d9c2c 100755
--- a/macosx/app/build_html_user_index.sh
+++ b/macosx/app/build_html_user_index.sh
@@ -140,7 +140,6 @@ else
# echo "<tr><td valign=\"top\"><a href=\"$HTMLDIRG/$i\">$BASENAME</a></td> <td>$SHORTDESC</td></tr>" >> $FULLINDEX
# make them local to user to simplify page links
echo "<tr><td valign=\"top\"><a href=\"global_$i\">$BASENAME</a></td> <td>$SHORTDESC</td></tr>" >> $FULLINDEX
- ln -sf "$HTMLDIRG/$i" global_$i
done
done
fi
@@ -183,8 +182,3 @@ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
</html>" > $i.html
done
-# add Help Viewer links in user docs folder
-
-mkdir -p $HOME/Library/Documentation/Help/
-ln -sfh ../../GRASS/$GRASS_MMVER/Modules/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER-addon
-ln -sfh $GISBASE/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER

View file

@ -1,23 +1,31 @@
{ stdenv, fetchurl, fetchpatch, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl
, qwt, fcgi, python2Packages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper
, qjson, qca2, txt2tags, openssl
, withGrass ? false, grass
, qjson, qca2, txt2tags, openssl, darwin, pkgconfig
, withGrass ? false, grass, IOKit, ApplicationServices
}:
stdenv.mkDerivation rec {
name = "qgis-2.18.17";
buildInputs = [ gdal qt4 flex openssl bison proj geos xlibsWrapper sqlite gsl qwt qscintilla
fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags ] ++
fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags pkgconfig ]
++
(stdenv.lib.optionals stdenv.isDarwin [IOKit ApplicationServices])
++
(stdenv.lib.optional withGrass grass) ++
(stdenv.lib.optional (stdenv.isDarwin && withGrass) darwin.apple_sdk.libs.utmp) ++
(with python2Packages; [ jinja2 numpy psycopg2 pygments requests python2Packages.qscintilla sip ]);
nativeBuildInputs = [ cmake makeWrapper ];
nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
# `make -f src/providers/wms/CMakeFiles/wmsprovider_a.dir/build.make src/providers/wms/CMakeFiles/wmsprovider_a.dir/qgswmssourceselect.cpp.o`:
# fatal error: ui_qgsdelimitedtextsourceselectbase.h: No such file or directory
enableParallelBuilding = false;
preConfigure = ''
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libspatialindex)"
'';
# To handle the lack of 'local' RPATH; required, as they call one of
# their built binaries requiring their libs, in the build process.
preBuild = ''
@ -29,19 +37,44 @@ stdenv.mkDerivation rec {
sha256 = "1nxwl5lwibbiz9v3qaw3px7iyxg113zr4j8d99yj07mhk2ap082y";
};
cmakeFlags = stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}";
# CMAKE_FIND_FRAMEWORK=never stops the installer choosing system
# installed frameworks
# QGIS_MACAPP_BUNDLE=0 stops the installer copying the Qt binaries into the
# installation which causes havoc
# Building RelWithDebInfo allows QGIS_DEBUG to print debugging information
cmakeFlags = stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}"
++ stdenv.lib.optional stdenv.isDarwin
(["-DCMAKE_FIND_FRAMEWORK=never"]
++ ["-DQGIS_MACAPP_BUNDLE=0"]);
# ++ ["-DCMAKE_BUILD_TYPE=RelWithDebInfo"];
postInstall = ''
wrapProgram $out/bin/qgis \
--prefix PYTHONPATH : $PYTHONPATH \
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ openssl ]}
'';
postInstall =
(stdenv.lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/qgis \
--set PYTHONPATH $PYTHONPATH \
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ openssl ]}
'') +
(stdenv.lib.optionalString stdenv.isDarwin ''
# Necessary for QGIS to find the correct default GRASS path
${stdenv.lib.optionalString withGrass "ln -sf ${grass} $out/QGIS.app/Contents/MacOS/grass"}
for file in $(find $out -type f -name "QGIS"); do
wrapProgram "$file" \
--prefix DYLD_LIBRARY_PATH : "${qwt}/lib" \
--prefix DYLD_LIBRARY_PATH : "${qscintilla}/lib" \
${stdenv.lib.optionalString withGrass "--prefix PATH : ${grass}/bin"} \
--set PYTHONPATH $PYTHONPATH
done
mkdir -p $out/bin
ln -s $out/QGIS.app/Contents/MacOS/QGIS $out/bin/qgis
'');
meta = {
description = "User friendly Open Source Geographic Information System";
homepage = http://www.qgis.org;
license = stdenv.lib.licenses.gpl2Plus;
platforms = with stdenv.lib.platforms; linux;
platforms = with stdenv.lib.platforms; unix;
maintainers = with stdenv.lib.maintainers; [viric];
};
}

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, libjpeg, libexif, libungif, libtiff, libpng, libwebp, libdrm
, pkgconfig, freetype, fontconfig, which, imagemagick, curl, sane-backends, libXpm
, epoxy, poppler, lirc }:
, epoxy, poppler, mesa_noglu, lirc }:
stdenv.mkDerivation rec {
name = "fbida-2.13";
@ -11,8 +11,11 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkgconfig which ];
buildInputs = [ libexif libjpeg libpng libungif freetype fontconfig libtiff
libwebp imagemagick curl sane-backends libdrm libXpm epoxy poppler lirc ];
buildInputs = [
libexif libjpeg libpng libungif freetype fontconfig libtiff libwebp
imagemagick curl sane-backends libdrm libXpm epoxy poppler lirc
mesa_noglu
];
makeFlags = [ "prefix=$(out)" "verbose=yes" "STRIP=" ];

View file

@ -46,8 +46,7 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = true;
# "screenshot" needs this.
NIX_LDFLAGS = "-rpath ${xorg.libX11.out}/lib"
+ stdenv.lib.optionalString stdenv.isDarwin " -lintl";
NIX_LDFLAGS = "-rpath ${xorg.libX11.out}/lib";
meta = {
description = "The GNU Image Manipulation Program";

View file

@ -1,7 +1,7 @@
{
mkDerivation, lib,
extra-cmake-modules, kdoctools,
kdelibs4support, kdnssd, libvncserver, libXtst, qtx11extras
kdelibs4support, kdnssd, libvncserver, libXtst, libXdamage, qtx11extras
}:
mkDerivation {
@ -11,6 +11,6 @@ mkDerivation {
maintainers = with lib.maintainers; [ jerith666 ];
};
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [ libvncserver libXtst qtx11extras ];
buildInputs = [ libvncserver libXtst libXdamage qtx11extras ];
propagatedBuildInputs = [ kdelibs4support kdnssd ];
}

View file

@ -1,8 +1,8 @@
{ stdenv, python3, fetchFromGitHub }:
{ stdenv, python3, fetchFromGitHub, fetchpatch }:
with python3.pkgs; buildPythonApplication rec {
version = "3.7";
name = "buku-${version}";
pname = "buku";
src = fetchFromGitHub {
owner = "jarun";
@ -11,7 +11,12 @@ with python3.pkgs; buildPythonApplication rec {
sha256 = "0qc6xkrhf2phaj9fhym19blr4rr2vllvnyljjz909xr4vsynvb41";
};
nativeBuildInputs = [
patches = fetchpatch {
url = https://github.com/jarun/Buku/commit/495d6eac4d9371e8ce6d3f601e2bb9e5e74962b4.patch;
sha256 = "0py4l5qcgdzqr0iqmcc8ddld1bspk8iwypz4dcr88y70j86588gk";
};
checkInputs = [
pytestcov
pytest-catchlog
hypothesis

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libjpeg, libtiff, librsvg, libintlOrEmpty }:
{ stdenv, fetchurl, libjpeg, libtiff, librsvg, libiconv }:
stdenv.mkDerivation rec {
name = "djvulibre-3.5.27";
@ -10,9 +10,7 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" ];
buildInputs = [ libjpeg libtiff librsvg ] ++ libintlOrEmpty;
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
buildInputs = [ libjpeg libtiff librsvg libiconv ];
meta = with stdenv.lib; {
description = "A library and viewer for the DJVU file format for scanned images";

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, gtk, gettext, ncurses, libiconv, libintlOrEmpty
{ stdenv, fetchurl, pkgconfig, gtk, gettext, ncurses, libiconv, libintl
, withBuildColors ? true
}:
@ -19,10 +19,7 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gtk gettext libintlOrEmpty ]
++ stdenv.lib.optional stdenv.isDarwin libiconv;
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
buildInputs = [ gtk gettext libintl libiconv ];
makeFlags = [
"PREFIX=$(out)"

View file

@ -94,6 +94,9 @@ in pythonPackages.buildPythonApplication rec {
-e 's,pyserial>=[^"]*,pyserial,g' \
-e 's,semantic_version>=[^"]*,semantic_version,g' \
-e 's,wrapt>=[^"]*,wrapt,g' \
-e 's,python-dateutil>=[^"]*,python-dateutil,g' \
-e 's,emoji>=[^"]*,emoji,g' \
-e 's,futures>=[^"]*,futures,g' \
setup.py
'';

View file

@ -1,4 +1,4 @@
{ mkDerivation, stdenv, lib, fetchFromGitHub, fetchpatch, procps ? null
{ mkDerivation, stdenv, lib, fetchFromGitHub, fetchpatch, procps
, qtbase, qtwebengine, qtwebkit
, cmake
, syncthing

View file

@ -19,8 +19,7 @@ stdenv.mkDerivation rec {
mkdir locale
'';
NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"
+ stdenv.lib.optionalString stdenv.isDarwin " -lintl";
NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__";
meta = with stdenv.lib; {
homepage = https://dushistov.github.io/sdcv/;

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, makeWrapper, pkgconfig
, gtk, girara, ncurses, gettext, docutils
, file, sqlite, glib, texlive, libintlOrEmpty
, file, sqlite, glib, texlive, libintl
, gtk-mac-integration, synctexSupport ? true
}:
@ -20,8 +20,8 @@ stdenv.mkDerivation rec {
icon = ./icon.xpm;
nativeBuildInputs = [
pkgconfig
] ++ optional stdenv.isDarwin [ libintlOrEmpty ];
pkgconfig libintl
];
buildInputs = [
file gtk girara
@ -29,7 +29,6 @@ stdenv.mkDerivation rec {
] ++ optional synctexSupport texlive.bin.core
++ optional stdenv.isDarwin [ gtk-mac-integration ];
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
makeFlags = [

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, ncurses, glib, openssl, perl, libintlOrEmpty }:
{ stdenv, fetchurl, pkgconfig, ncurses, glib, openssl, perl, libintl }:
stdenv.mkDerivation rec {
version = "1.1.1";
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ncurses glib openssl perl libintlOrEmpty ];
buildInputs = [ ncurses glib openssl perl libintl ];
configureFlags = [
"--with-proxy"

View file

@ -5,12 +5,12 @@ let
in
buildPythonApplication rec {
pname = "fava";
version = "1.6";
version = "1.7";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "0iif4imx76ra0lsisksrq5vf54wbivnrb3xqz6mkx9lik3pp5sbx";
sha256 = "c4eba4203bddaa7bc9d54971d2afeeebab0bc80ce89be1375a41a07c4e82b62f";
};
doCheck = false;

View file

@ -58,8 +58,6 @@ stdenv.mkDerivation {
+ (if pythonSupport then "PYTHON_PATH=${python}/bin/python" else "NO_PYTHON=1")
+ (if stdenv.isSunOS then " INSTALL=install NO_INET_NTOP= NO_INET_PTON=" else "")
+ (if stdenv.isDarwin then " NO_APPLE_COMMON_CRYPTO=1" else " sysconfdir=/etc/ ")
# XXX: USE_PCRE2 might be useful in general, look into it
# XXX other alpine options?
+ (if stdenv.hostPlatform.isMusl then "NO_SYS_POLL_H=1 NO_GETTEXT=YesPlease" else "");
# build git-credential-osxkeychain if darwin

View file

@ -1,5 +1,5 @@
{ pkgs, stdenv, lib, bundler, fetchurl, fetchFromGitHub, bundlerEnv, libiconv
, ruby, tzdata, git, procps, dpkg, nettools
, ruby, tzdata, git, ps, dpkg, nettools
}:
/* When updating the Gemfile add `gem "activerecord-nulldb-adapter"`
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [
rubyEnv ruby bundler tzdata git procps dpkg nettools
rubyEnv ruby bundler tzdata git ps dpkg nettools
];
patches = [
@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
rm config/initializers/gitlab_shell_secret_token.rb
substituteInPlace app/controllers/admin/background_jobs_controller.rb \
--replace "ps -U" "${procps}/bin/ps -U"
--replace "ps -U" "${ps}/bin/ps -U"
sed -i '/ask_to_continue/d' lib/tasks/gitlab/two_factor.rake

View file

@ -4,7 +4,7 @@
let
# if you bump version, update pkgs.tortoisehg too or ping maintainer
version = "4.5";
version = "4.5.2";
name = "mercurial-${version}";
inherit (python2Packages) docutils hg-git dulwich python;
in python2Packages.buildPythonApplication {
@ -13,7 +13,7 @@ in python2Packages.buildPythonApplication {
src = fetchurl {
url = "https://mercurial-scm.org/release/${name}.tar.gz";
sha256 = "0rgjy42zdlbzgp4qq49amzplfcvycyijf4kdhc5wk3fqz7cki4sd";
sha256 = "14732hhw2ibvy5khqxjc8a983z3rib5vp9lqfbws80lm3kyryjm4";
};
inherit python; # pass it so that the same version can be used in hg2git

View file

@ -2,11 +2,11 @@
python2Packages.buildPythonApplication rec {
name = "tortoisehg-${version}";
version = "4.5";
version = "4.5.2";
src = fetchurl {
url = "https://bitbucket.org/tortoisehg/targz/downloads/${name}.tar.gz";
sha256 = "11m2hir2y1hblg9sqmansv16rcp560j2d3nhqzfhkim46a59fxvk";
sha256 = "0q12zjpgafdch4ns31k4afy25g837xm7v2qwj62806l2dz4rm4h9";
};
pythonPath = with python2Packages; [ pyqt4 mercurial qscintilla iniparse ];

View file

@ -13,7 +13,7 @@
, libmpeg2, libsamplerate, libmad
, libogg, libvorbis, flac, libxslt
, lzo, libcdio, libmodplug, libass, libbluray
, sqlite, mysql, nasm, gnutls, libva, wayland
, sqlite, mysql, nasm, gnutls, libva, libdrm, wayland
, curl, bzip2, zip, unzip, glxinfo, xdpyinfo
, libcec, libcec_platform, dcadec, libuuid
, libcrossguid, libmicrohttpd
@ -121,7 +121,7 @@ in stdenv.mkDerivation rec {
gnutls libidn libtasn1 nasm p11-kit
libxml2 yasm python2
boost libmicrohttpd
gettext pcre-cpp yajl fribidi libva
gettext pcre-cpp yajl fribidi libva libdrm
openssl gperf tinyxml2 taglib libssh swig jre
libX11 xproto inputproto libXt libXmu libXext xextproto
libXinerama libXrandr randrproto libXtst libXfixes fixesproto

View file

@ -7,11 +7,13 @@
, numaSupport ? stdenv.isLinux && !stdenv.isArm, numactl
, seccompSupport ? stdenv.isLinux, libseccomp
, pulseSupport ? !stdenv.isDarwin, libpulseaudio
, sdlSupport ? !stdenv.isDarwin, SDL
, sdlSupport ? !stdenv.isDarwin, SDL2
, vncSupport ? true, libjpeg, libpng
, spiceSupport ? !stdenv.isDarwin, spice, spice-protocol
, usbredirSupport ? spiceSupport, usbredir
, xenSupport ? false, xen
, openGLSupport ? sdlSupport, mesa_noglu, epoxy, libdrm
, virglSupport ? openGLSupport, virglrenderer
, hostCpuOnly ? false
, nixosTestRunner ? false
}:
@ -52,18 +54,42 @@ stdenv.mkDerivation rec {
++ optionals seccompSupport [ libseccomp ]
++ optionals numaSupport [ numactl ]
++ optionals pulseSupport [ libpulseaudio ]
++ optionals sdlSupport [ SDL ]
++ optionals sdlSupport [ SDL2 ]
++ optionals vncSupport [ libjpeg libpng ]
++ optionals spiceSupport [ spice-protocol spice ]
++ optionals usbredirSupport [ usbredir ]
++ optionals stdenv.isLinux [ alsaLib libaio libcap_ng libcap attr ]
++ optionals xenSupport [ xen ];
++ optionals xenSupport [ xen ]
++ optionals openGLSupport [ mesa_noglu epoxy libdrm ]
++ optionals virglSupport [ virglrenderer ];
enableParallelBuilding = true;
patches = [ ./no-etc-install.patch ./statfs-flags.patch ]
patches = [ ./no-etc-install.patch ./statfs-flags.patch (fetchpatch {
name = "glibc-2.27-memfd.patch";
url = "https://git.qemu.org/?p=qemu.git;a=patch;h=75e5b70e6b5dcc4f2219992d7cffa462aa406af0";
sha256 = "0gaz93kb33qc0jx6iphvny0yrd17i8zhcl3a9ky5ylc2idz0wiwa";
}) ]
++ optional nixosTestRunner ./force-uid0-on-9p.patch
++ optional pulseSupport ./fix-hda-recording.patch;
++ optional pulseSupport ./fix-hda-recording.patch
++ optionals stdenv.hostPlatform.isMusl [
(fetchpatch {
url = https://raw.githubusercontent.com/alpinelinux/aports/2bb133986e8fa90e2e76d53369f03861a87a74ef/main/qemu/xattr_size_max.patch;
sha256 = "1xfdjs1jlvs99hpf670yianb8c3qz2ars8syzyz8f2c2cp5y4bxb";
})
(fetchpatch {
url = https://raw.githubusercontent.com/alpinelinux/aports/2bb133986e8fa90e2e76d53369f03861a87a74ef/main/qemu/musl-F_SHLCK-and-F_EXLCK.patch;
sha256 = "1gm67v41gw6apzgz7jr3zv9z80wvkv0jaxd2w4d16hmipa8bhs0k";
})
(fetchpatch {
url = https://raw.githubusercontent.com/alpinelinux/aports/61a7a1b77a868e3b940c0b25e6c2b2a6c32caf20/main/qemu/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch;
sha256 = "1ar6r1vpmhnbs72v6mhgyahcjcf7b9b4xi7asx17sy68m171d2g6";
})
(fetchpatch {
url = https://raw.githubusercontent.com/alpinelinux/aports/2bb133986e8fa90e2e76d53369f03861a87a74ef/main/qemu/fix-sigevent-and-sigval_t.patch;
sha256 = "0wk0rrcqywhrw9hygy6ap0lfg314m9z1wr2hn8338r5gfcw75mav";
})
];
hardeningDisable = [ "stackprotector" ];
@ -84,7 +110,9 @@ stdenv.mkDerivation rec {
++ optional hostCpuOnly "--target-list=${hostCpuTargets}"
++ optional stdenv.isDarwin "--enable-cocoa"
++ optional stdenv.isLinux "--enable-linux-aio"
++ optional xenSupport "--enable-xen";
++ optional xenSupport "--enable-xen"
++ optional openGLSupport "--enable-opengl"
++ optional virglSupport "--enable-virglrenderer";
postFixup =
''

View file

@ -15,11 +15,16 @@
in lib.overrideDerivation qemu (orig: {
name = "${(builtins.parseDrvName qemu.name).name}-${version}pre${revCount}_${shortRev}";
inherit src;
# <<<<<<< HEAD
# # https://github.com/riscv/riscv-qemu/pull/109
# patches = [ ./no-etc-install.patch ./statfs-flags.patch ./riscv-initrd.patch ];
# =======
# The pulseaudio and statfs patches are in 2.12.0+, which this is based on
patches = [
./force-uid0-on-9p.patch
./no-etc-install.patch
];
configureFlags = orig.configureFlags ++ [ "--target-list=${lib.concatStringsSep "," targets}" ];
postInstall = null;
})

View file

@ -25,6 +25,11 @@ stdenv.mkDerivation rec {
export cmakeFlags="-DPREFIX=$out -DCFGDIR=/etc/icewm"
'';
patches = [ ./fix-strlcat_strlcpy.patch ] ++
stdenv.lib.optional stdenv.hostPlatform.isMusl ./musl.patch;
patchFlags = [ "-p0" ];
meta = {
description = "A simple, lightweight X window manager";
longDescription = ''

View file

@ -0,0 +1,236 @@
--- src/apppstatus.cc 2017-07-30 10:59:06.000000000 +0200
+++ src/apppstatus.cc 2017-08-09 09:12:54.332052762 +0200
@@ -366,7 +366,7 @@
sscanf(p, "%s %s %s %s %s", val[0], val[1], val[2], val[3], val[4]);
for (i = 0; i < 4; i++) {
if (strncmp(val[i+1], "?", 1) != 0)
- strlcpy(phoneNumber, val[i+1], sizeof phoneNumber);
+ my_strlcpy(phoneNumber, val[i+1], sizeof phoneNumber);
}
}
--- src/base.h 2017-07-30 10:59:06.000000000 +0200
+++ src/base.h 2017-08-09 09:11:13.082025484 +0200
@@ -44,9 +44,9 @@
/*** String Functions *********************************************************/
/* Prefer this as a safer alternative over strcpy. Return strlen(from). */
-size_t strlcpy(char *dest, const char *from, size_t dest_size);
+size_t my_strlcpy(char *dest, const char *from, size_t dest_size);
/* Prefer this over strcat. Return strlen(dest) + strlen(from). */
-size_t strlcat(char *dest, const char *from, size_t dest_size);
+size_t my_strlcat(char *dest, const char *from, size_t dest_size);
char *newstr(char const *str);
char *newstr(char const *str, int len);
--- src/gnome2.cc 2017-07-30 10:59:06.000000000 +0200
+++ src/gnome2.cc 2017-08-09 09:11:21.819027846 +0200
@@ -158,8 +158,8 @@
const int plen = strlen(fPath);
char tmp[256];
- strlcpy(tmp, fPath, sizeof tmp);
- strlcat(tmp, "/.directory", sizeof tmp);
+ my_strlcpy(tmp, fPath, sizeof tmp);
+ my_strlcat(tmp, "/.directory", sizeof tmp);
if (isDir && !stat(tmp, &sb)) { // looks like kde/gnome1 style
@@ -279,8 +279,8 @@
while ((file = readdir(dir)) != NULL) {
char fullpath[256];
- strlcpy(fullpath, dirname, sizeof fullpath);
- strlcat(fullpath, file->d_name, sizeof fullpath);
+ my_strlcpy(fullpath, dirname, sizeof fullpath);
+ my_strlcat(fullpath, file->d_name, sizeof fullpath);
GnomeDesktopItem *ditem =
gnome_desktop_item_new_from_file(fullpath,
(GnomeDesktopItemLoadFlags)0,
--- src/icehelp.cc 2017-07-30 10:59:06.000000000 +0200
+++ src/icehelp.cc 2017-08-09 09:11:31.490030459 +0200
@@ -1790,8 +1790,8 @@
const size_t size = 9 + strlen(cfmt) + strlen(cstr) + strlen(crea);
char *cbuf = (char *)malloc(size);
snprintf(cbuf, size, cfmt, cstr);
- strlcat(cbuf, ":\n ", size);
- strlcat(cbuf, crea, size);
+ my_strlcat(cbuf, ":\n ", size);
+ my_strlcat(cbuf, crea, size);
node *root = new node(node::div);
flist<node> nodes(root);
--- src/icesm.cc 2017-07-30 10:59:06.000000000 +0200
+++ src/icesm.cc 2017-08-09 09:13:12.946057758 +0200
@@ -28,10 +28,10 @@
wordexp_t w;
if (wordexp(trim(buf), &w, 0) != 0 || w.we_wordc == 0)
return false;
- size_t len = strlcpy(buf, trim(w.we_wordv[0]), bufsiz);
+ size_t len = my_strlcpy(buf, trim(w.we_wordv[0]), bufsiz);
for (size_t k = 1; k < w.we_wordc && len < bufsiz; ++k) {
- strlcat(buf, " ", bufsiz);
- len = strlcat(buf, trim(w.we_wordv[k]), bufsiz);
+ my_strlcat(buf, " ", bufsiz);
+ len = my_strlcat(buf, trim(w.we_wordv[k]), bufsiz);
}
wordfree(&w);
if (len >= bufsiz)
@@ -39,7 +39,7 @@
#else
char *str = trim(buf);
if (str > buf)
- strlcpy(buf, str, bufsiz);
+ my_strlcpy(buf, str, bufsiz);
#endif
if (buf[0] == '#' || buf[0] == '=')
buf[0] = 0;
--- src/icesound.cc 2017-07-30 10:59:06.000000000 +0200
+++ src/icesound.cc 2017-08-09 09:11:26.686029161 +0200
@@ -145,8 +145,8 @@
char * findSample(int sid) {
char basefname[1024];
- strlcpy(basefname, gui_events[sid].name, sizeof basefname);
- strlcat(basefname, ".wav", sizeof basefname);
+ my_strlcpy(basefname, gui_events[sid].name, sizeof basefname);
+ my_strlcat(basefname, ".wav", sizeof basefname);
return findSample(basefname);
}
--- src/misc.cc 2017-07-30 10:59:06.000000000 +0200
+++ src/misc.cc 2017-08-09 09:13:39.372064834 +0200
@@ -448,7 +448,7 @@
#endif
/* Prefer this as a safer alternative over strcpy. Return strlen(from). */
-size_t strlcpy(char *dest, const char *from, size_t dest_size)
+size_t my_strlcpy(char *dest, const char *from, size_t dest_size)
{
const char *in = from;
if (dest_size > 0) {
@@ -463,12 +463,12 @@
}
/* Prefer this over strcat. Return strlen(dest) + strlen(from). */
-size_t strlcat(char *dest, const char *from, size_t dest_size)
+size_t my_strlcat(char *dest, const char *from, size_t dest_size)
{
char *to = dest;
char *const stop = to + dest_size - 1;
while (to < stop && *to) ++to;
- return to - dest + strlcpy(to, from, dest_size - (to - dest));
+ return to - dest + my_strlcpy(to, from, dest_size - (to - dest));
}
char *newstr(char const *str) {
--- src/strtest.cc 2017-07-30 10:59:06.000000000 +0200
+++ src/strtest.cc 2017-08-09 09:13:24.395060823 +0200
@@ -286,63 +286,63 @@
strtest tester("strlc");
char d[10] = "@";
size_t n;
- n = strlcpy(d, "", 0);
+ n = my_strlcpy(d, "", 0);
sequal(d, "@");
assert(d, n == 0);
- n = strlcpy(d, "a", 0);
+ n = my_strlcpy(d, "a", 0);
sequal(d, "@");
assert(d, n == 1);
- n = strlcpy(d, "", 1);
+ n = my_strlcpy(d, "", 1);
sequal(d, "");
assert(d, n == 0);
- n = strlcpy(d, "a", 1);
+ n = my_strlcpy(d, "a", 1);
sequal(d, "");
assert(d, n == 1);
- n = strlcpy(d, "a", 2);
+ n = my_strlcpy(d, "a", 2);
sequal(d, "a");
assert(d, n == 1);
- n = strlcpy(d, "ab", 2);
+ n = my_strlcpy(d, "ab", 2);
sequal(d, "a");
assert(d, n == 2);
- n = strlcpy(d, "ab", 3);
+ n = my_strlcpy(d, "ab", 3);
sequal(d, "ab");
assert(d, n == 2);
- n = strlcpy(d, "abc", sizeof d);
+ n = my_strlcpy(d, "abc", sizeof d);
sequal(d, "abc");
assert(d, n == 3);
- n = strlcat(d, "def", 4);
+ n = my_strlcat(d, "def", 4);
sequal(d, "abc");
assert(d, n == 6);
- n = strlcat(d, "def", sizeof d);
+ n = my_strlcat(d, "def", sizeof d);
sequal(d, "abcdef");
assert(d, n == 6);
- n = strlcat(d, "ghijkl", sizeof d);
+ n = my_strlcat(d, "ghijkl", sizeof d);
sequal(d, "abcdefghi");
assert(d, n == 12);
- n = strlcpy(d, "123", sizeof d);
+ n = my_strlcpy(d, "123", sizeof d);
sequal(d, "123");
assert(d, n == 3);
- n = strlcpy(d, d + 1, sizeof d);
+ n = my_strlcpy(d, d + 1, sizeof d);
sequal(d, "23");
assert(d, n == 2);
- n = strlcpy(d, d + 1, sizeof d);
+ n = my_strlcpy(d, d + 1, sizeof d);
sequal(d, "3");
assert(d, n == 1);
- n = strlcpy(d, d + 1, sizeof d);
+ n = my_strlcpy(d, d + 1, sizeof d);
sequal(d, "");
assert(d, n == 0);
}
@@ -418,7 +418,7 @@
while (a.next()) {
const char *e = a.entry();
assert(e, strcoll(buf, e) < 0);
- strlcpy(buf, e, sizeof buf);
+ my_strlcpy(buf, e, sizeof buf);
}
assert(buf, strcoll(buf, "~~~~~~~~~") < 0);
}
@@ -437,7 +437,7 @@
cstring c(s.entry());
const char *e = c.c_str();
assert(e, strcoll(buf, e) < 0);
- strlcpy(buf, e, sizeof buf);
+ my_strlcpy(buf, e, sizeof buf);
}
assert(buf, strcoll(buf, "~~~~~~~~~") < 0);
}
--- src/udir.cc 2017-07-30 10:59:06.000000000 +0200
+++ src/udir.cc 2017-08-09 09:13:28.346061883 +0200
@@ -66,7 +66,7 @@
if (impl) {
DirPtr dirp(impl);
if (dirp.next()) {
- strlcpy(fEntry, dirp.name(), sizeof fEntry);
+ my_strlcpy(fEntry, dirp.name(), sizeof fEntry);
return true;
}
}

View file

@ -0,0 +1,23 @@
--- src/ylocale.cc 2017-07-30 10:59:06.000000000 +0200
+++ src/ylocale.cc 2017-08-09 08:15:50.938841549 +0200
@@ -55,6 +55,8 @@
int const codesetItems[] = {
#ifdef CONFIG_NL_CODESETS
CONFIG_NL_CODESETS
+#elif !defined(__GLIBC__)
+ CODESET, 0
#else
CODESET, _NL_CTYPE_CODESET_NAME, 0
#endif
--- src/globit.c 2017-07-30 10:59:06.000000000 +0200
+++ src/globit.c 2017-08-09 08:17:18.691824584 +0200
@@ -143,7 +143,9 @@
} else if (*pattern == '~') {
/* yes, tilde */
is_absolute = 2;
+#if defined(__GLIBC__)
glob_flags |= GLOB_TILDE;
+#endif
/* any slash in the pattern? */
while (*cp && *cp != '/')
++cp;

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, wayland, libGLU_combined, libxkbcommon, cairo, libxcb
{ stdenv, fetchurl, pkgconfig, wayland, libGL, mesa_noglu, libxkbcommon, cairo, libxcb
, libXcursor, xlibsWrapper, udev, libdrm, mtdev, libjpeg, pam, dbus, libinput
, pango ? null, libunwind ? null, freerdp ? null, vaapi ? null, libva ? null
, libwebp ? null, xwayland ? null, wayland-protocols
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
wayland libGLU_combined libxkbcommon cairo libxcb libXcursor xlibsWrapper udev libdrm
wayland libGL mesa_noglu libxkbcommon cairo libxcb libXcursor xlibsWrapper udev libdrm
mtdev libjpeg pam dbus libinput pango libunwind freerdp vaapi libva
libwebp wayland-protocols
];

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "iana-etc-${version}";
version = "20180108";
version = "20180405";
src = fetchurl {
url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz";
sha256 = "1x4jacrvjwcsan88rg2wf2a8bajsglg6w4396vbr18zh0sya84a2";
sha256 = "0x6i95arrc4lcq2il3r05hbnd9vsi87z4yc8s3agkvbj74d6hfhj";
};
installPhase = ''

View file

@ -1,9 +1,9 @@
{ stdenv, fetchurl, pkgconfig, openssl, libjpeg, zlib, lz4, freetype, fontconfig
, fribidi, SDL2, SDL, libGLU_combined, giflib, libpng, libtiff, glib, gst_all_1, libpulseaudio
, fribidi, SDL2, SDL, libGL, giflib, libpng, libtiff, glib, gst_all_1, libpulseaudio
, libsndfile, xorg, libdrm, libxkbcommon, udev, utillinux, dbus, bullet, luajit
, python27Packages, openjpeg, doxygen, expat, harfbuzz, jbig2dec, librsvg
, dbus_libs, alsaLib, poppler, ghostscript, libraw, libspectre, xineLib, libwebp
, curl, libinput, systemd, writeText
, curl, libinput, systemd, mesa_noglu, writeText
}:
stdenv.mkDerivation rec {
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl zlib lz4 freetype fontconfig SDL libGLU_combined
buildInputs = [ openssl zlib lz4 freetype fontconfig SDL libGL mesa_noglu
giflib libpng libtiff glib gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
gst_all_1.gst-libav libpulseaudio libsndfile xorg.libXcursor xorg.printproto
xorg.libX11 udev systemd ];

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, glib, libIDL, libintlOrEmpty }:
{ stdenv, fetchurl, pkgconfig, glib, libIDL, libintl }:
stdenv.mkDerivation rec {
name = "ORBit2-${minVer}.19";
@ -9,8 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "0l3mhpyym9m5iz09fz0rgiqxl2ym6kpkwpsp1xrr4aa80nlh1jam";
};
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ glib libIDL ] ++ libintlOrEmpty;
nativeBuildInputs = [ pkgconfig libintl ];
propagatedBuildInputs = [ glib libIDL ];
outputs = [ "out" "dev" ];

View file

@ -14,6 +14,4 @@ stdenv.mkDerivation {
buildInputs = [ gtk python gettext ];
propagatedBuildInputs = [ libxml2 ];
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
}

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, clang, which, libobjc }:
let
version = "2.6.8";
version = "2.7.0";
in
stdenv.mkDerivation rec {
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-${version}.tar.gz";
sha256 = "0r00439f7vrggdwv60n8p626gnyymhq968i5x9ad2i4v6g8x4gk0";
sha256 = "1khiygfkz0zhh9b5nybn40g0xnnjxchk24n49hff1bwanszir84h";
};
configureFlags = [

View file

@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
buildInputs = [
xorg.libxcb
xorg.libXdamage
xorg.xcbutilwm
xorg.xcbutilimage
qtbase

View file

@ -4,7 +4,7 @@
qtbase, qttools, qtx11extras, qtsvg, libdbusmenu, kwindowsystem, solid,
kguiaddons, liblxqt, libqtxdg, lxqt-globalkeys, libsysstat,
xorg, libstatgrab, lm_sensors, libpulseaudio, alsaLib, menu-cache,
lxmenu-data, pcre
lxmenu-data, pcre, libXdamage
}:
stdenv.mkDerivation rec {
@ -47,6 +47,7 @@ stdenv.mkDerivation rec {
menu-cache
lxmenu-data
pcre
libXdamage
];
cmakeFlags = [ "-DPULL_TRANSLATIONS=NO" ];

View file

@ -1,11 +1,11 @@
{
mkDerivation,
extra-cmake-modules, kdoctools,
kconfig, kconfigwidgets, ki18n, qtx11extras,
kconfig, kconfigwidgets, ki18n, qtx11extras, libXxf86vm
}:
mkDerivation {
name = "kgamma5";
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [ kconfig kconfigwidgets ki18n qtx11extras ];
buildInputs = [ kconfig kconfigwidgets ki18n qtx11extras libXxf86vm ];
}

View file

@ -1,23 +1,40 @@
{ stdenv, lib, buildFHSUserEnv
}:
{ lib, buildFHSUserEnv }:
let
pio-pkgs = pkgs: (with pkgs;
[
python27Packages.python
python27Packages.setuptools
python27Packages.pip
python27Packages.bottle
python27Packages.platformio
pio-pkgs = pkgs:
let
python = pkgs.python.override {
packageOverrides = self: super: {
# https://github.com/platformio/platformio-core/issues/349
click = super.click.overridePythonAttrs (oldAttrs: rec {
version = "5.1";
src = oldAttrs.src.override {
inherit version;
sha256 = "678c98275431fad324275dec63791e4a17558b40e5a110e20a82866139a85a5a";
};
});
platformio = self.callPackage ./core.nix { };
};
};
in (with pkgs; [
zlib
]) ++ (with python.pkgs; [
python
setuptools
pip
bottle
platformio
]);
in
buildFHSUserEnv {
in buildFHSUserEnv {
name = "platformio";
targetPkgs = pio-pkgs;
multiPkgs = pio-pkgs;
meta = with stdenv.lib; {
meta = with lib; {
description = "An open source ecosystem for IoT development";
homepage = http://platformio.org;
maintainers = with maintainers; [ mog ];

View file

@ -1,24 +1,21 @@
{ stdenv, buildPythonPackage, fetchPypi
, bottle, click_5, colorama
, bottle, click, colorama
, lockfile, pyserial, requests
, semantic-version
, isPy3k, isPyPy
, git
}:
buildPythonPackage rec {
disabled = isPy3k || isPyPy;
buildPythonPackage rec {
pname = "platformio";
version="3.5.1";
name = "${pname}-${version}";
version = "3.5.2";
src = fetchPypi {
inherit pname version;
sha256 = "0cc15mzh7p1iykip0jpxldz81yz946vrgvhwmfl8w3z5kgjjgx3n";
sha256 = "bb311ce5b8f12c95bc45c2071626a4887a3632fb2472b4d69a873b2acfc2e4ec";
};
propagatedBuildInputs = [
bottle click_5 colorama git lockfile
bottle click colorama git lockfile
pyserial requests semantic-version
];

View file

@ -1,4 +1,4 @@
{ newScope, stdenv, binutils-raw, wrapCCWith, symlinkJoin }:
{ newScope, stdenv, binutils, wrapCCWith, symlinkJoin }:
let
callPackage = newScope (self // {inherit stdenv;});
@ -7,7 +7,7 @@ let
emscriptenfastcomp-wrapped = wrapCCWith {
cc = self.emscriptenfastcomp-unwrapped;
# Never want Apple's cctools for WASM target
bintools = binutils-raw;
bintools = binutils;
libc = stdenv.cc.libc;
extraBuildCommands = ''
# hardening flags break WASM support

View file

@ -57,16 +57,18 @@ let version = "7.3.0";
enableParallelBuilding = true;
patches =
[ ]
[ # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html
./riscv-pthread-reentrant.patch
# https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00297.html
./riscv-no-relax.patch
]
++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional noSysDirs ../no-sys-dirs.patch
++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied
url = "https://git.busybox.net/buildroot/plain/package/gcc/7.1.0/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02";
sha256 = "0mrvxsdwip2p3l17dscpc1x8vhdsciqw1z5q9i6p5g9yg1cqnmgs";
})
++ optional langFortran ../gfortran-driving.patch
# https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html
++ optional targetPlatform.isRiscV ./riscv-pthread-reentrant.patch;
++ optional langFortran ../gfortran-driving.patch;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@ -212,7 +214,12 @@ stdenv.mkDerivation ({
--replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname"
'';
postPatch =
postPatch = ''
configureScripts=$(find . -name configure)
for configureScript in $configureScripts; do
patchShebangs $configureScript
done
'' + (
if (hostPlatform.isHurd
|| (libcCross != null # e.g., building `gcc.crossDrv'
&& libcCross ? crossConfig
@ -271,7 +278,7 @@ stdenv.mkDerivation ({
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
''
)
else null;
else "");
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;

View file

@ -0,0 +1,109 @@
commit e7c570f37384d824cb9725f237920e9691e57269
gpg: Signature made Tue 06 Mar 2018 04:52:46 PM PST
gpg: using RSA key 00CE76D1834960DFCE886DF8EF4CA1502CCBAB41
gpg: issuer "palmer@dabbelt.com"
gpg: Good signature from "Palmer Dabbelt <palmer@dabbelt.com>" [ultimate]
gpg: aka "Palmer Dabbelt <palmer@sifive.com>" [ultimate]
Author: Palmer Dabbelt <palmer@sifive.com>
Date: Thu Mar 1 12:01:06 2018 -0800
RISC-V: Add and document the "-mno-relax" option
RISC-V relies on aggressive linker relaxation to get good code size. As
a result no text symbol addresses can be known until link time, which
means that alignment must be handled during the link. This alignment
pass is essentially just another linker relaxation, so this has the
unfortunate side effect that linker relaxation is required for
correctness on many RISC-V targets.
The RISC-V assembler has supported an ".option norelax" for a long time
because there are situations in which linker relaxation is a bad idea --
the canonical example is when trying to materialize the initial value of
the global pointer into a register, which would otherwise be relaxed to
a NOP. We've been relying on users who want to disable relaxation for
an entire link to pass "-Wl,--no-relax", but that still relies on the
linker relaxing R_RISCV_ALIGN to handle alignment despite it not being
strictly necessary.
This patch adds a GCC option, "-mno-relax", that disable linker
relaxation by adding ".option norelax" to the top of every generated
assembly file. The assembler is smart enough to handle alignment at
assemble time for files that have never emitted a relaxable relocation,
so this is sufficient to really disable all relaxations in the linker,
which results in significantly faster link times for large objects.
This also has the side effect of allowing toolchains that don't support
linker relaxation (LLVM and the Linux module loader) to function
correctly. Toolchains that don't support linker relaxation should
default to "-mno-relax" and error when presented with any R_RISCV_ALIGN
relocation as those need to be handled for correctness.
gcc/ChangeLog
2018-03-01 Palmer Dabbelt <palmer@sifive.com>
* config/riscv/riscv.opt (mrelax): New option.
* config/riscv/riscv.c (riscv_file_start): Emit ".option
"norelax" when riscv_mrelax is disabled.
* doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
index c38f6c394d54..3e81874de232 100644
--- a/gcc/config/riscv/riscv.c
+++ b/gcc/config/riscv/riscv.c
@@ -3979,6 +3979,11 @@ riscv_file_start (void)
/* Instruct GAS to generate position-[in]dependent code. */
fprintf (asm_out_file, "\t.option %spic\n", (flag_pic ? "" : "no"));
+
+ /* If the user specifies "-mno-relax" on the command line then disable linker
+ relaxation in the assembler. */
+ if (! riscv_mrelax)
+ fprintf (asm_out_file, "\t.option norelax\n");
}
/* Implement TARGET_ASM_OUTPUT_MI_THUNK. Generate rtl rather than asm text
diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt
index 581a26bb5c1e..b37ac75d9bb4 100644
--- a/gcc/config/riscv/riscv.opt
+++ b/gcc/config/riscv/riscv.opt
@@ -106,6 +106,11 @@ mexplicit-relocs
Target Report Mask(EXPLICIT_RELOCS)
Use %reloc() operators, rather than assembly macros, to load addresses.
+mrelax
+Target Bool Var(riscv_mrelax) Init(1)
+Take advantage of linker relaxations to reduce the number of instructions
+required to materialize symbol addresses.
+
Mask(64BIT)
Mask(MUL)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 8d366c626bae..deb48af2ecad 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1042,7 +1042,8 @@ See RS/6000 and PowerPC Options.
-msave-restore -mno-save-restore @gol
-mstrict-align -mno-strict-align @gol
-mcmodel=medlow -mcmodel=medany @gol
--mexplicit-relocs -mno-explicit-relocs @gol}
+-mexplicit-relocs -mno-explicit-relocs @gol
+-mrelax -mno-relax @gol}
@emph{RL78 Options}
@gccoptlist{-msim -mmul=none -mmul=g13 -mmul=g14 -mallregs @gol
@@ -23102,6 +23103,12 @@ Use or do not use assembler relocation operators when dealing with symbolic
addresses. The alternative is to use assembler macros instead, which may
limit optimization.
+@item -mrelax
+@itemx -mno-relax
+Take advantage of linker relaxations to reduce the number of instructions
+required to materialize symbol addresses. The default is to take advantage of
+linker relaxations.
+
@end table
@node RL78 Options

View file

@ -4,6 +4,7 @@
# build-tools
, bootPkgs, alex, happy, hscolour
, autoconf, autoreconfHook, automake, coreutils, fetchurl, fetchpatch, perl, python3, sphinx
, runCommand
, libffi, libiconv ? null, ncurses
@ -89,6 +90,7 @@ stdenv.mkDerivation rec {
url = "https://git.haskell.org/ghc.git/commitdiff_plain/2fc8ce5f0c8c81771c26266ac0b150ca9b75c5f3";
sha256 = "03253ci40np1v6k0wmi4aypj3nmj3rdyvb1k6rwqipb30nfc719f";
})
(import ./abi-depends-determinism.nix { inherit fetchpatch runCommand; })
] ++ stdenv.lib.optional deterministicProfiling
(fetchpatch { # Backport of https://phabricator.haskell.org/D4388 for more determinism
url = "https://github.com/shlevy/ghc/commit/fec1b8d3555c447c0d8da0e96b659be67c8bb4bc.patch";

View file

@ -4,6 +4,7 @@
# build-tools
, bootPkgs, alex, happy
, autoconf, automake, coreutils, fetchgit, fetchpatch, perl, python3
, runCommand
, libffi, libiconv ? null, ncurses
@ -85,7 +86,9 @@ stdenv.mkDerivation rec {
outputs = [ "out" "doc" ];
patches = stdenv.lib.optional deterministicProfiling
patches = [
(import ./abi-depends-determinism.nix { inherit fetchpatch runCommand; })
] ++ stdenv.lib.optional deterministicProfiling
(fetchpatch { # https://phabricator.haskell.org/D4388 for more determinism
url = "https://github.com/shlevy/ghc/commit/8b2dbd869d1a64de3e99fa8b1c9bb1140eee7099.patch";
sha256 = "0hxpiwhbg64rsyjdr4psh6dwyp58b96mad3adccvfr0x8hc6ba2m";

View file

@ -0,0 +1,12 @@
# https://phabricator.haskell.org/D4159 to fix non-determinism in
# cached abi-depends fields in package databases, modified to only
# contain hunks that exist in distribution tarballs.
{ fetchpatch, runCommand }: let
base = fetchpatch rec { # Non-determinism in cached abi-depends fields
# Originally https://phabricator-files.haskell.org/file/data/4pqrbo5b62sifktfbrls/PHID-FILE-4g4zjiqlfxmmlaos7lz7/D4159.diff
url = "http://tarballs.nixos.org/sha256/${sha256}";
name = "D4159.diff";
sha256 = "0b8a08sisf1swmarm6nh9rgw7cpzi2rwdzvrd6ny49c7wk0f7x4b";
};
in runCommand base.name {}
"sed -n '/utils\\/ghc-pkg/,$p' ${base} >$out"

View file

@ -35,8 +35,7 @@ stdenv.mkDerivation rec {
};
# perl is used for testing go vet
nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ]
++ optionals stdenv.isLinux [ procps ];
nativeBuildInputs = [ perl which pkgconfig patch makeWrapper procps ];
buildInputs = [ cacert pcre ]
++ optionals stdenv.isLinux [ stdenv.cc.libc.out ]
++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];

View file

@ -35,8 +35,7 @@ stdenv.mkDerivation rec {
};
# perl is used for testing go vet
nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ]
++ optionals stdenv.isLinux [ procps ];
nativeBuildInputs = [ perl which pkgconfig patch makeWrapper procps ];
buildInputs = [ cacert pcre ]
++ optionals stdenv.isLinux [ stdenv.cc.libc.out ]
++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "iasl-${version}";
version = "20170303";
version = "20180313";
src = fetchurl {
url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz";
sha256 = "1dc933rr11gv1nlaf5j8ih1chdakbjbjkn34jgbm330zppmck4y0";
sha256 = "05ab2xfv9wqwbzjaa9xqgrvvan87rxv29hw48h1gcckpc5smp2wm";
};
NIX_CFLAGS_COMPILE = "-O3";

View file

@ -1,4 +1,5 @@
{ stdenv, callPackage, recurseIntoAttrs, makeRustPlatform, llvm, fetchurl
, fetchpatch
, targets ? []
, targetToolchains ? []
, targetPatches ? []
@ -22,6 +23,11 @@ in rec {
patches = [
./patches/0001-Disable-fragile-tests-libstd-net-tcp-on-Darwin-Linux.patch
# Adapted from https://github.com/rust-lang/rust/pull/47912
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/rust/raw/1bb4d24c060915c304c9a9f86a438388e599f9c6/f/0002-Use-a-range-to-identify-SIGSEGV-in-stack-guards.patch";
sha256 = "16hc170qzzcb9lcabk0ln005zji2h1gq0knbr9avbbzlbg9jha2q";
})
] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch
# https://github.com/rust-lang/rust/issues/45410
++ stdenv.lib.optional stdenv.isAarch64 ./patches/aarch64-disable-test_loading_cosine.patch;

View file

@ -1,5 +1,5 @@
{ stdenv, targetPackages
, fetchurl, fetchgit, fetchzip, file, python2, tzdata, procps
, fetchurl, fetchgit, fetchzip, file, python2, tzdata, ps
, llvm, jemalloc, ncurses, darwin, rustPlatform, git, cmake, curl
, which, libffi, gdb
, version
@ -19,8 +19,6 @@ let
inherit (stdenv.lib) optional optionalString;
inherit (darwin.apple_sdk.frameworks) Security;
procps = if stdenv.isDarwin then darwin.ps else args.procps;
llvmShared = llvm.override { enableSharedLibraries = true; };
target = builtins.replaceStrings [" "] [","] (builtins.toString targets);
@ -129,7 +127,7 @@ stdenv.mkDerivation {
# ps is needed for one of the test cases
nativeBuildInputs =
[ file python2 procps rustPlatform.rust.rustc git cmake
[ file python2 ps rustPlatform.rust.rustc git cmake
which libffi
]
# Only needed for the debuginfo tests

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt, autoconf, graphviz
, glib, libiconv, libintlOrEmpty, libtool, expat
, glib, libiconv, libintl, libtool, expat
}:
let
@ -16,7 +16,7 @@ let
nativeBuildInputs = [ pkgconfig flex bison libxslt ] ++ extraNativeBuildInputs;
buildInputs = [ glib libiconv ] ++ libintlOrEmpty ++ extraBuildInputs;
buildInputs = [ glib libiconv libintl ] ++ extraBuildInputs;
meta = with stdenv.lib; {
description = "Compiler for GObject type system";

View file

@ -1,17 +1,18 @@
{ stdenv, fetchFromGitHub, cmake, llvmPackages }:
{ stdenv, fetchFromGitHub, cmake, llvmPackages, libxml2 }:
stdenv.mkDerivation rec {
version = "0.1.1";
version = "0.2.0";
name = "zig-${version}";
src = fetchFromGitHub {
owner = "zig-lang";
repo = "zig";
rev = "${version}";
sha256 = "01yqjyi25f99bfmxxwyh45k7j84z0zg7n9jl8gg0draf96mzdh06";
sha256 = "0lym28z9mj6hfiq78x1fsd8y89h8xyfc1jgqyazi1g9r72427n07";
};
buildInputs = [ cmake llvmPackages.clang-unwrapped llvmPackages.llvm ];
nativeBuildInputs = [ cmake ];
buildInputs = [ llvmPackages.clang-unwrapped llvmPackages.llvm libxml2 ];
cmakeFlags = [
"-DZIG_LIBC_INCLUDE_DIR=${stdenv.cc.libc_dev}/include"
@ -26,7 +27,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "Programming languaged designed for robustness, optimality, and clarity";
homepage = http://ziglang.org/;
homepage = https://ziglang.org/;
license = licenses.mit;
platforms = platforms.unix;
maintainers = [ maintainers.andrewrk ];

View file

@ -27,12 +27,15 @@
nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
buildInputs = [ readline libtool libunistring libffi ];
propagatedBuildInputs = [ gmp boehmgc ]
# XXX: These ones aren't normally needed here, but since
# `libguile-2.0.la' reads `-lltdl -lunistring', adding them here will add
propagatedBuildInputs = [
gmp boehmgc
# XXX: These ones aren't normally needed here, but `libguile*.la' has '-l'
# flags for them without corresponding '-L' flags. Adding them here will add
# the needed `-L' flags. As for why the `.la' file lacks the `-L' flags,
# see below.
++ [ libtool libunistring ];
libtool libunistring
];
enableParallelBuilding = true;
@ -70,11 +73,12 @@
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
''
# XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
# why `--with-libunistring-prefix' and similar options coming from
# `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
sed -i "$out/lib/pkgconfig/guile-2.0.pc" \
+ ''
sed -i "$out/lib/pkgconfig/guile"-*.pc \
-e "s|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool.lib}/lib -lltdl|g ;

View file

@ -28,12 +28,15 @@
nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
buildInputs = [ readline libtool libunistring libffi ];
propagatedBuildInputs = [ gmp boehmgc ]
# XXX: These ones aren't normally needed here, but since
# `libguile-2.0.la' reads `-lltdl -lunistring', adding them here will add
propagatedBuildInputs = [
gmp boehmgc
# XXX: These ones aren't normally needed here, but `libguile*.la' has '-l'
# flags for them without corresponding '-L' flags. Adding them here will add
# the needed `-L' flags. As for why the `.la' file lacks the `-L' flags,
# see below.
++ [ libtool libunistring ];
libtool libunistring
];
enableParallelBuilding = true;
@ -66,11 +69,12 @@
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
''
# XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
# why `--with-libunistring-prefix' and similar options coming from
# `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
sed -i "$out/lib/pkgconfig/guile-2.2.pc" \
+ ''
sed -i "$out/lib/pkgconfig/guile"-*.pc \
-e "s|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool.lib}/lib -lltdl|g ;

View file

@ -19,17 +19,17 @@ stdenv.mkDerivation rec {
sha256 = "0b8034v1s82n4dg5rzcn12067ha3nxaylp2vdp8gg08kjsbzphhk";
};
nativeBuildInputs = [ readline ];
buildInputs = [ readline ];
patches = if stdenv.isDarwin then [ ./5.2.darwin.patch ] else [ dsoPatch ];
configurePhase =
if stdenv.isDarwin
then ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} )
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.${version}.dylib" INSTALL_DATA='cp -d' )
'' else ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} )
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" AR="$AR q" RANLIB="$RANLIB" )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.${luaversion} liblua.so.${version}" INSTALL_DATA='cp -d' )
'';
@ -56,31 +56,6 @@ stdenv.mkDerivation rec {
EOF
'';
crossAttrs = let
inherit (hostPlatform) isDarwin isMinGW;
in {
configurePhase = ''
makeFlagsArray=(
INSTALL_TOP=$out
INSTALL_MAN=$out/share/man/man1
V=${luaversion}
R=${version}
${if isMinGW then "mingw" else stdenv.lib.optionalString isDarwin ''
''}
)
'' + stdenv.lib.optionalString isMinGW ''
installFlagsArray=(
TO_BIN="lua.exe luac.exe"
TO_LIB="liblua.a lua52.dll"
INSTALL_DATA="cp -d"
)
'';
} // stdenv.lib.optionalAttrs isDarwin {
postPatch = ''
sed -i -e 's/-Wl,-soname[^ ]* *//' src/Makefile
'';
};
meta = {
homepage = http://www.lua.org;
description = "Powerful, fast, lightweight, embeddable scripting language";

View file

@ -12,17 +12,17 @@ stdenv.mkDerivation rec {
sha256 = "0320a8dg3aci4hxla380dx1ifkw8gj4gbw5c4dz41g1kh98sm0gn";
};
nativeBuildInputs = [ readline ];
buildInputs = [ readline ];
patches = if stdenv.isDarwin then [ ./5.2.darwin.patch ] else [];
configurePhase =
if stdenv.isDarwin
then ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} )
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=macosx CFLAGS="-DLUA_USE_LINUX -fno-common -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.${version}.dylib" INSTALL_DATA='cp -d' )
'' else ''
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version})
makeFlagsArray=( INSTALL_TOP=$out INSTALL_MAN=$out/share/man/man1 PLAT=linux CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" LDFLAGS="-fPIC" V=${luaversion} R=${version} CC="$CC" AR="$AR q" RANLIB="$RANLIB" )
installFlagsArray=( TO_BIN="lua luac" TO_LIB="liblua.a liblua.so liblua.so.${luaversion} liblua.so.${version}" INSTALL_DATA='cp -d' )
cat ${./lua-5.3-dso.make} >> src/Makefile
sed -e 's/ALL_T *= */& $(LUA_SO)/' -i src/Makefile
@ -55,31 +55,6 @@ stdenv.mkDerivation rec {
EOF
'';
crossAttrs = let
inherit (hostPlatform) isDarwin isMinGW;
in {
configurePhase = ''
makeFlagsArray=(
INSTALL_TOP=$out
INSTALL_MAN=$out/share/man/man1
V=${luaversion}
R=${version}
${if isMinGW then "mingw" else stdenv.lib.optionalString isDarwin ''
''}
)
'' + stdenv.lib.optionalString isMinGW ''
installFlagsArray=(
TO_BIN="lua.exe luac.exe"
TO_LIB="liblua.a lua52.dll"
INSTALL_DATA="cp -d"
)
'';
} // stdenv.lib.optionalAttrs isDarwin {
postPatch = ''
sed -i -e 's/-Wl,-soname[^ ]* *//' src/Makefile
'';
};
meta = {
homepage = http://www.lua.org;
description = "Powerful, fast, lightweight, embeddable scripting language";

View file

@ -10,7 +10,7 @@ attrs // {
buildInputs = [ flit ];
buildPhase = attrs.buildPhase or ''
runHook preBuild
flit wheel
flit build --format wheel
runHook postBuild
'';

View file

@ -27,7 +27,7 @@ with stdenv.lib;
let
majorVersion = "3.6";
minorVersion = "4";
minorVersion = "5";
minorVersionSuffix = "";
pythonVersion = majorVersion;
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
@ -51,7 +51,7 @@ in stdenv.mkDerivation {
src = fetchurl {
url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
sha256 = "1fna7g8jxzl4kd2pqmmqhva5724c5m920x3fsrpsgskaylmr76qm";
sha256 = "19l7inxm056jjw33zz97z0m02hsi7jnnx5kyb76abj5ml4xhad7l";
};
NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s";

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "SDL_gfx-${version}";
version = "2.0.25";
version = "2.0.26";
src = fetchurl {
url = "http://www.ferzkopp.net/Software/SDL_gfx-2.0/${name}.tar.gz";
sha256 = "1h2rj34dxi5xlwpvm293v2d91gsirhnpzlmnjns9xwkcdg0fsvjm";
sha256 = "0ijljhs0v99dj6y27hc10z6qchyp8gdp4199y6jzngy6dzxlzsvw";
};
buildInputs = [ SDL ] ;

View file

@ -18,6 +18,8 @@ stdenv.mkDerivation rec {
patchPhase = ''
echo "Removing C++-style comments from include/acl.h"
sed -e '/^\/\//d' -i include/acl.h
patchShebangs .
'';
configureFlags = [ "MAKE=make" "MSGFMT=msgfmt" "MSGMERGE=msgmerge" "XGETTEXT=xgettext" "ZIP=gzip" "ECHO=echo" "SED=sed" "AWK=gawk" ];

View file

@ -23,10 +23,7 @@ stdenv.mkDerivation rec {
# ToDo: on non-NixOS we create a symlink from there?
configureFlags = "--with-dbus-daemondir=/run/current-system/sw/bin/";
NIX_LDFLAGS = with stdenv; lib.optionalString isDarwin "-lintl";
meta = with stdenv.lib; {
platforms = platforms.unix;
};
}

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, meson, ninja, gettext, pkgconfig, glib
, fixDarwinDylibNames, libintlOrEmpty, gobjectIntrospection, gnome3
, fixDarwinDylibNames, gobjectIntrospection, gnome3
}:
let
@ -25,8 +25,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
buildInputs = libintlOrEmpty
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
nativeBuildInputs = [ meson ninja pkgconfig gettext gobjectIntrospection ];

View file

@ -18,6 +18,12 @@ stdenv.mkDerivation rec {
patches = if (hostPlatform.libc == "musl") then [ ./fix-headers-musl.patch ] else null;
postPatch = ''
for script in install-sh include/install-sh; do
patchShebangs $script
done
'';
meta = with stdenv.lib; {
homepage = "http://savannah.nongnu.org/projects/attr/";
description = "Library and tools for manipulating extended attributes";

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, pkgconfig, libiconv
, libintlOrEmpty, expat, zlib, libpng, pixman, fontconfig, freetype, xorg
, libintl, expat, zlib, libpng, pixman, fontconfig, freetype, xorg
, gobjectSupport ? true, glib
, xcbSupport ? true # no longer experimental since 1.12
, glSupport ? true, libGL ? null # libGLU_combined is no longer a big dependency
@ -34,7 +34,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
pkgconfig
libiconv
] ++ libintlOrEmpty ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
libintl
] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreGraphics
CoreText
ApplicationServices

View file

@ -7,4 +7,11 @@ callPackage ./generic.nix (args // rec{
url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz";
sha256 = "0bkam9z5vnrxpbxkkh9kw6yzjka9di56h11iijikdd1f71l5nbpw";
};
# Don't build tests due to badness with ec_ilog
prePatch = ''
substituteInPlace Makefile.in \
--replace 'SUBDIRS = libcelt tests' \
'SUBDIRS = libcelt'
'';
})

View file

@ -1,5 +1,6 @@
{ stdenv, version, src
, liboggSupport ? true, libogg ? null # if disabled only the library will be built
, prePatch ? ""
, ...
}:
@ -10,6 +11,8 @@ stdenv.mkDerivation rec {
inherit src;
inherit prePatch;
buildInputs = []
++ stdenv.lib.optional liboggSupport libogg;

View file

@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
name = "check-${version}";
version = "0.11.0";
version = "0.12.0";
src = fetchurl {
url = "https://github.com/libcheck/check/releases/download/${version}/check-${version}.tar.gz";
sha256 = "05jn1pgb7hqb937xky2147nnq3r4qy5wwr79rddpax3bms5a9xr4";
sha256 = "0d22h8xshmbpl9hba9ch3xj8vb9ybm5akpsbbh7yj07fic4h2hj6";
};
# Test can randomly fail: http://hydra.nixos.org/build/7243912

View file

@ -1,19 +1,20 @@
{ stdenv, fetchurl, pkgconfig, libGL, glib, gdk_pixbuf, xorg, libintlOrEmpty
{ stdenv, fetchurl, pkgconfig, libGL, glib, gdk_pixbuf, xorg, libintl
, pangoSupport ? true, pango, cairo, gobjectIntrospection, wayland, gnome3
, mesa_noglu
, gstreamerSupport ? true, gst_all_1 }:
let
pname = "cogl";
version = "1.22.2";
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
version = "1.22.2";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
sha256 = "03f0ha3qk7ca0nnkkcr1garrm1n1vvfqhkz9lwjm592fnv6ii9rr";
};
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig libintl ];
configureFlags = [
"--enable-introspection"
@ -24,10 +25,9 @@ in stdenv.mkDerivation rec {
++ stdenv.lib.optionals (!stdenv.isDarwin) [ "--enable-gles1" "--enable-gles2" ];
propagatedBuildInputs = with xorg; [
glib gdk_pixbuf gobjectIntrospection wayland
glib gdk_pixbuf gobjectIntrospection wayland mesa_noglu
libGL libXrandr libXfixes libXcomposite libXdamage
]
++ libintlOrEmpty
++ stdenv.lib.optionals gstreamerSupport [ gst_all_1.gstreamer
gst_all_1.gst-plugins-base ];
@ -37,8 +37,6 @@ in stdenv.mkDerivation rec {
= stdenv.lib.optionalString (stdenv.isDarwin && pangoSupport)
"-I${pango.dev}/include/pango-1.0 -I${cairo.dev}/include/cairo";
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
#doCheck = true; # all tests fail (no idea why)
passthru = {

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libintlOrEmpty, zlib, gettext }:
{ stdenv, fetchurl, zlib, gettext }:
stdenv.mkDerivation rec {
name = "cracklib-2.9.6";
@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "0hrkb0prf7n92w6rxgq0ilzkk6rkhpys2cfqkrbzswp27na7dkqp";
};
buildInputs = [ libintlOrEmpty zlib gettext ];
buildInputs = [ zlib gettext ];
meta = with stdenv.lib; {
homepage = https://github.com/cracklib/cracklib;

View file

@ -6,8 +6,8 @@ assert x11Support -> libX11 != null
&& libSM != null;
let
version = "1.10.24";
sha256 = "06ydmrg76l1kwl3190d72zpiy3qxy248x6gskxbj9qiqfsr4w63i";
version = "1.12.6";
sha256 = "05picaq8j60wlwyi84qvw5liw3nd0cws9va3krnc3pms0wm906v2";
self = stdenv.mkDerivation {
name = "dbus-${version}";

View file

@ -25,10 +25,9 @@ stdenv.mkDerivation rec {
substituteInPlace src/dispatch_common.h --replace "PLATFORM_HAS_GLX 0" "PLATFORM_HAS_GLX 1"
'';
# add libGL to rpath because libepoxy dlopen()s libEGL
postFixup = optionalString stdenv.isLinux ''
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libGL ]}:$(patchelf --print-rpath $out/lib/libepoxy.so.0.0.0)" $out/lib/libepoxy.so.0.0.0
'';
patches = [ ./libgl-path.patch ];
NIX_CFLAGS_COMPILE = ''-DLIBGL_PATH="${getLib libGL}/lib"'';
meta = {
description = "A library for handling OpenGL function pointer management";

View file

@ -0,0 +1,35 @@
From 4046e0ac8ed93354c01de5f3b5cae790cce70404 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Thu, 29 Mar 2018 07:21:02 -0500
Subject: [PATCH] Explicitly search LIBGL_PATH as fallback, if defined.
---
src/dispatch_common.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/dispatch_common.c b/src/dispatch_common.c
index bc2fb94..776237b 100644
--- a/src/dispatch_common.c
+++ b/src/dispatch_common.c
@@ -306,6 +306,18 @@ get_dlopen_handle(void **handle, const char *lib_name, bool exit_on_fail)
pthread_mutex_lock(&api.mutex);
if (!*handle) {
*handle = dlopen(lib_name, RTLD_LAZY | RTLD_LOCAL);
+#ifdef LIBGL_PATH
+ if (!*handle) {
+ char pathbuf[sizeof(LIBGL_PATH) + 1 + 1024 + 1];
+ int l = snprintf(pathbuf, sizeof(pathbuf), "%s/%s", LIBGL_PATH, lib_name);
+ if (l < 0 || l >= sizeof(pathbuf)) {
+ // This really shouldn't happen
+ fprintf(stderr, "Error prefixing library pathname\n");
+ exit(1);
+ }
+ *handle = dlopen(pathbuf, RTLD_LAZY | RTLD_LOCAL);
+ }
+#endif
if (!*handle) {
if (exit_on_fail) {
fprintf(stderr, "Couldn't open %s: %s\n", lib_name, dlerror());
--
2.16.3

View file

@ -1,5 +1,5 @@
{ stdenv, substituteAll, fetchurl, fetchpatch
, pkgconfig, freetype, expat, libxslt, dejavu_fonts
, pkgconfig, freetype, expat, libxslt, gperf, dejavu_fonts
, hostPlatform
}:
@ -18,11 +18,12 @@ let
configVersion = "2.11"; # bump whenever fontconfig breaks compatibility with older configurations
in
stdenv.mkDerivation rec {
name = "fontconfig-2.12.1";
name = "fontconfig-${version}";
version = "2.12.6";
src = fetchurl {
url = "http://fontconfig.org/release/${name}.tar.bz2";
sha256 = "1wy7svvp7df6bjpg1m5vizb3ngd7rhb20vpclv3x3qa71khs6jdl";
sha256 = "05zh65zni11kgnhg726gjbrd55swspdvhqbcnj5a5xh8gn03036g";
};
patches = [
@ -30,23 +31,12 @@ stdenv.mkDerivation rec {
src = ./config-compat.patch;
inherit configVersion;
})
(fetchpatch {
name = "glibc-2.25.diff";
url = "https://cgit.freedesktop.org/fontconfig/patch/?id=1ab5258f7c";
sha256 = "0x2a4qx51j3gqcp1kp4lisdzmhrkw1zw0r851d82ksgjlc0vkbaz";
})
];
# additionally required for the glibc-2.25 patch; avoid requiring gperf
postPatch = ''
sed s/CHAR_WIDTH/CHARWIDTH/g -i src/fcobjshash.{h,gperf}
sleep 2
touch src/fcobjshash.h
'';
outputs = [ "bin" "dev" "lib" "out" ]; # $out contains all the config
propagatedBuildInputs = [ freetype ];
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig gperf ];
buildInputs = [ expat ];
configureFlags = [

View file

@ -1,27 +0,0 @@
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=f958c48ee43
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index af7b465..7dd4513 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -780,10 +780,19 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
+ {
+ /* in malformed fonts it is possible to have other */
+ /* opcodes in the middle of a flex (which don't */
+ /* increase `num_flex_vectors'); we thus have to */
+ /* check whether we can add a point */
+ if ( FT_SET_ERROR( t1_builder_check_points( builder, 1 ) ) )
+ goto Syntax_Error;
+
t1_builder_add_point( builder,
x,
y,
(FT_Byte)( idx == 3 || idx == 6 ) );
+ }
}
break;

View file

@ -1,22 +0,0 @@
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=3774fc08b
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index d18e821..0baf836 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -1718,6 +1718,14 @@
first = outline->n_contours <= 1
? 0 : outline->contours[outline->n_contours - 2] + 1;
+ /* in malformed fonts it can happen that a contour was started */
+ /* but no points were added */
+ if ( outline->n_contours && first == outline->n_points )
+ {
+ outline->n_contours--;
+ return;
+ }
+
/* We must not include the last point in the path if it */
/* is located on the first point. */
if ( outline->n_points > 1 )

View file

@ -1,6 +1,6 @@
{ stdenv, lib, fetchurl, copyPathsToStore
, hostPlatform
, pkgconfig, which
, pkgconfig, which, makeWrapper
, zlib, bzip2, libpng, gnumake, glib
, # FreeType supports LCD filtering (colloquially referred to as sub-pixel rendering).
@ -11,10 +11,10 @@
let
inherit (stdenv.lib) optional optionals optionalString;
version = "2.7.1"; name = "freetype-" + version;
in stdenv.mkDerivation {
inherit name;
in stdenv.mkDerivation rec {
name = "freetype-${version}";
version = "2.9";
meta = with stdenv.lib; {
description = "A font rendering engine";
@ -33,24 +33,17 @@ in stdenv.mkDerivation {
src = fetchurl {
url = "mirror://savannah/freetype/${name}.tar.bz2";
sha256 = "121gm15ayfg3rglby8ifh8384mcjb9dhmx9j40zl7yszw72b4frs";
sha256 = "12jcdz1in20yaa55izxalg3hm1pf7nydfrzps5bzb4zgihybmzz6";
};
propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype
# dependence on harfbuzz is looser than the reverse dependence
nativeBuildInputs = [ pkgconfig which ]
nativeBuildInputs = [ pkgconfig which makeWrapper ]
# FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
++ optional (!stdenv.isLinux) gnumake;
patches =
[
./pcf-introduce-driver.patch
./pcf-config-long-family-names.patch
./disable-pcf-long-family-names.patch
./enable-table-validation.patch
# remove the two CVE patches after updating to >= 2.8
./cve-2017-8105.patch
./cve-2017-8287.patch
[ ./enable-table-validation.patch
] ++
optional useEncumberedCode ./enable-subpixel-rendering.patch;
@ -65,7 +58,10 @@ in stdenv.mkDerivation {
doCheck = true;
postInstall = glib.flattenInclude;
postInstall = glib.flattenInclude + ''
wrapProgram "$dev/bin/freetype-config" \
--set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig"
'';
crossAttrs = stdenv.lib.optionalAttrs (hostPlatform.libc or null != "msvcrt") {
# Somehow it calls the unwrapped gcc, "i686-pc-linux-gnu-gcc", instead

View file

@ -1,553 +0,0 @@
diff --git a/devel/ftoption.h b/devel/ftoption.h
index 3b63931..b8b0a8d 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -82,8 +82,8 @@ FT_BEGIN_HEADER
/* to control the various font drivers and modules. The controllable */
/* properties are listed in the section `Controlling FreeType Modules' */
/* in the reference's table of contents; currently there are properties */
- /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */
- /* TrueType (file `ftttdrv.h'). */
+ /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */
+ /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */
/* */
/* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
/* multiple lines for better readability). */
@@ -835,6 +835,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/**** ****/
+ /**** P C F D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* There are many PCF fonts just called `Fixed' which look completely */
+ /* different, and which have nothing to do with each other. When */
+ /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
+ /* random, the style changes often if one changes the size and one */
+ /* cannot select some fonts at all. This option makes the PCF module */
+ /* prepend the foundry name (plus a space) to the family name. */
+ /* */
+ /* We also check whether we have `wide' characters; all put together, we */
+ /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */
+ /* */
+ /* If this option is activated, it can be controlled with the */
+ /* `no-long-family-names' property of the pcf driver module. */
+ /* */
+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
/**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/
/**** ****/
/*************************************************************************/
diff --git a/docs/CHANGES b/docs/CHANGES
index cb3b327..3823395 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -1,4 +1,20 @@
+CHANGES BETWEEN 2.7.1 and 2.7.2
+
+ I. IMPORTANT CHANGES
+
+ - The PCF change to show more `colourful' family names (introduced
+ in version 2.7.1) was too radical; it can now be configured with
+ PCF_CONFIG_OPTION_LONG_FAMILY_NAMES at compile time. If
+ activated, it can be switched off at run time with the new pcf
+ property `no-long-family-names'. If the `FREETYPE_PROPERTIES'
+ environment variable is available, you can say
+
+ FREETYPE_PROPERTIES=pcf:no-long-family-names=1
+
+
+======================================================================
+
CHANGES BETWEEN 2.7 and 2.7.1
I. IMPORTANT CHANGES
diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h
index 950d36c..d491af5 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -357,6 +357,19 @@
/*************************************************************************
*
* @macro:
+ * FT_PCF_DRIVER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the PCF driver module.
+ *
+ */
+#define FT_PCF_DRIVER_H <freetype/ftpcfdrv.h>
+
+
+ /*************************************************************************
+ *
+ * @macro:
* FT_TYPE1_TABLES_H
*
* @description:
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index f5bc540..5676074 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -82,8 +82,8 @@ FT_BEGIN_HEADER
/* to control the various font drivers and modules. The controllable */
/* properties are listed in the section `Controlling FreeType Modules' */
/* in the reference's table of contents; currently there are properties */
- /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */
- /* TrueType (file `ftttdrv.h'). */
+ /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */
+ /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */
/* */
/* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
/* multiple lines for better readability). */
@@ -835,6 +835,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/**** ****/
+ /**** P C F D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* There are many PCF fonts just called `Fixed' which look completely */
+ /* different, and which have nothing to do with each other. When */
+ /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
+ /* random, the style changes often if one changes the size and one */
+ /* cannot select some fonts at all. This option makes the PCF module */
+ /* prepend the foundry name (plus a space) to the family name. */
+ /* */
+ /* We also check whether we have `wide' characters; all put together, we */
+ /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */
+ /* */
+ /* If this option is activated, it can be controlled with the */
+ /* `no-long-family-names' property of the pcf driver module. */
+ /* */
+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
/**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/
/**** ****/
/*************************************************************************/
diff --git a/include/freetype/ftchapters.h b/include/freetype/ftchapters.h
index ab43895..a0a121b 100644
--- a/include/freetype/ftchapters.h
+++ b/include/freetype/ftchapters.h
@@ -77,6 +77,7 @@
/* auto_hinter */
/* cff_driver */
/* tt_driver */
+/* pcf_driver */
/* */
/***************************************************************************/
diff --git a/include/freetype/ftpcfdrv.h b/include/freetype/ftpcfdrv.h
new file mode 100644
index 0000000..6622c93
--- /dev/null
+++ b/include/freetype/ftpcfdrv.h
@@ -0,0 +1,105 @@
+/***************************************************************************/
+/* */
+/* ftpcfdrv.h */
+/* */
+/* FreeType API for controlling the PCF driver (specification only). */
+/* */
+/* Copyright 2017 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef FTPCFDRV_H_
+#define FTPCFDRV_H_
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+ /**************************************************************************
+ *
+ * @section:
+ * pcf_driver
+ *
+ * @title:
+ * The PCF driver
+ *
+ * @abstract:
+ * Controlling the PCF driver module.
+ *
+ * @description:
+ * While FreeType's PCF driver doesn't expose API functions by itself,
+ * it is possible to control its behaviour with @FT_Property_Set and
+ * @FT_Property_Get. Right now, there is a single property
+ * `no-long-family-names' available if FreeType is compiled with
+ * PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
+ *
+ * The PCF driver's module name is `pcf'.
+ *
+ */
+
+
+ /**************************************************************************
+ *
+ * @property:
+ * no-long-family-names
+ *
+ * @description:
+ * If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling
+ * FreeType, the PCF driver constructs long family names.
+ *
+ * There are many PCF fonts just called `Fixed' which look completely
+ * different, and which have nothing to do with each other. When
+ * selecting `Fixed' in KDE or Gnome one gets results that appear rather
+ * random, the style changes often if one changes the size and one
+ * cannot select some fonts at all. The improve this situation, the PCF
+ * module prepends the foundry name (plus a space) to the family name.
+ * It also checks whether there are `wide' characters; all put together,
+ * family names like `Sony Fixed' or `Misc Fixed Wide' are constructed.
+ *
+ * If `no-long-family-names' is set, this feature gets switched off.
+ *
+ * {
+ * FT_Library library;
+ * FT_Bool no_long_family_names = TRUE;
+ *
+ *
+ * FT_Init_FreeType( &library );
+ *
+ * FT_Property_Set( library, "pcf",
+ * "no-long-family-names",
+ * &no_long_family_names );
+ * }
+ *
+ * @note:
+ * This property can be used with @FT_Property_Get also.
+ *
+ * This property can be set via the `FREETYPE_PROPERTIES' environment
+ * variable (using values 1 and 0 for `on' and `off', respectively).
+ *
+ */
+
+
+FT_END_HEADER
+
+
+#endif /* FTPCFDRV_H_ */
+
+
+/* END */
diff --git a/src/pcf/pcf.h b/src/pcf/pcf.h
index 830cabe..f0390cb 100644
--- a/src/pcf/pcf.h
+++ b/src/pcf/pcf.h
@@ -167,6 +167,8 @@ FT_BEGIN_HEADER
{
FT_DriverRec root;
+ FT_Bool no_long_family_names;
+
} PCF_DriverRec, *PCF_Driver;
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index 8f4a90d..bc65423 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -49,6 +49,8 @@ THE SOFTWARE.
#include FT_SERVICE_BDF_H
#include FT_SERVICE_FONT_FORMAT_H
+#include FT_SERVICE_PROPERTIES_H
+#include FT_PCF_DRIVER_H
/*************************************************************************/
@@ -667,6 +669,110 @@ THE SOFTWARE.
};
+ /*
+ * PROPERTY SERVICE
+ *
+ */
+ static FT_Error
+ pcf_property_set( FT_Module module, /* PCF_Driver */
+ const char* property_name,
+ const void* value,
+ FT_Bool value_is_string )
+ {
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+ FT_Error error = FT_Err_Ok;
+ PCF_Driver driver = (PCF_Driver)module;
+
+#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+ FT_UNUSED( value_is_string );
+#endif
+
+
+ if ( !ft_strcmp( property_name, "no-long-family-names" ) )
+ {
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+ if ( value_is_string )
+ {
+ const char* s = (const char*)value;
+ long lfn = ft_strtol( s, NULL, 10 );
+
+
+ if ( lfn == 0 )
+ driver->no_long_family_names = 0;
+ else if ( lfn == 1 )
+ driver->no_long_family_names = 1;
+ else
+ return FT_THROW( Invalid_Argument );
+ }
+ else
+#endif
+ {
+ FT_Bool* no_long_family_names = (FT_Bool*)value;
+
+
+ driver->no_long_family_names = *no_long_family_names;
+ }
+
+ return error;
+ }
+
+#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+ FT_UNUSED( module );
+ FT_UNUSED( value );
+ FT_UNUSED( value_is_string );
+
+#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+ FT_TRACE0(( "pcf_property_set: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ static FT_Error
+ pcf_property_get( FT_Module module, /* PCF_Driver */
+ const char* property_name,
+ const void* value )
+ {
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+ FT_Error error = FT_Err_Ok;
+ PCF_Driver driver = (PCF_Driver)module;
+
+
+ if ( !ft_strcmp( property_name, "no-long-family-names" ) )
+ {
+ FT_Bool no_long_family_names = driver->no_long_family_names;
+ FT_Bool* val = (FT_Bool*)value;
+
+
+ *val = no_long_family_names;
+
+ return error;
+ }
+
+#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+ FT_UNUSED( module );
+ FT_UNUSED( value );
+
+#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+ FT_TRACE0(( "pcf_property_get: missing property `%s'\n",
+ property_name ));
+ return FT_THROW( Missing_Property );
+ }
+
+
+ FT_DEFINE_SERVICE_PROPERTIESREC(
+ pcf_service_properties,
+
+ (FT_Properties_SetFunc)pcf_property_set, /* set_property */
+ (FT_Properties_GetFunc)pcf_property_get ) /* get_property */
+
+
/*
*
* SERVICE LIST
@@ -677,6 +783,7 @@ THE SOFTWARE.
{
{ FT_SERVICE_ID_BDF, &pcf_service_bdf },
{ FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_PCF },
+ { FT_SERVICE_ID_PROPERTIES, &pcf_service_properties },
{ NULL, NULL }
};
@@ -694,7 +801,14 @@ THE SOFTWARE.
FT_CALLBACK_DEF( FT_Error )
pcf_driver_init( FT_Module module ) /* PCF_Driver */
{
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+ PCF_Driver driver = (PCF_Driver)module;
+
+
+ driver->no_long_family_names = 0;
+#else
FT_UNUSED( module );
+#endif
return FT_Err_Ok;
}
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 38ba110..3eacf2b 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -1393,57 +1393,75 @@ THE SOFTWARE.
prop = pcf_find_property( face, "FAMILY_NAME" );
if ( prop && prop->isString )
{
- /* Prepend the foundry name plus a space to the family name. */
- /* There are many fonts just called `Fixed' which look completely */
- /* different, and which have nothing to do with each other. When */
- /* selecting `Fixed' in KDE or Gnome one gets results that appear */
- /* rather random, the style changes often if one changes the size */
- /* and one cannot select some fonts at all. */
- /* */
- /* We also check whether we have `wide' characters; all put */
- /* together, we get family names like `Sony Fixed' or `Misc Fixed */
- /* Wide'. */
- PCF_Property foundry_prop, point_size_prop, average_width_prop;
-
- int l = ft_strlen( prop->value.atom ) + 1;
- int wide = 0;
-
-
- foundry_prop = pcf_find_property( face, "FOUNDRY" );
- point_size_prop = pcf_find_property( face, "POINT_SIZE" );
- average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" );
-
- if ( point_size_prop && average_width_prop )
+
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+ PCF_Driver driver = (PCF_Driver)FT_FACE_DRIVER( face );
+
+
+ if ( !driver->no_long_family_names )
{
- if ( average_width_prop->value.l >= point_size_prop->value.l )
+ /* Prepend the foundry name plus a space to the family name. */
+ /* There are many fonts just called `Fixed' which look */
+ /* completely different, and which have nothing to do with each */
+ /* other. When selecting `Fixed' in KDE or Gnome one gets */
+ /* results that appear rather random, the style changes often if */
+ /* one changes the size and one cannot select some fonts at all. */
+ /* */
+ /* We also check whether we have `wide' characters; all put */
+ /* together, we get family names like `Sony Fixed' or `Misc */
+ /* Fixed Wide'. */
+
+ PCF_Property foundry_prop, point_size_prop, average_width_prop;
+
+ int l = ft_strlen( prop->value.atom ) + 1;
+ int wide = 0;
+
+
+ foundry_prop = pcf_find_property( face, "FOUNDRY" );
+ point_size_prop = pcf_find_property( face, "POINT_SIZE" );
+ average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" );
+
+ if ( point_size_prop && average_width_prop )
{
- /* This font is at least square shaped or even wider */
- wide = 1;
- l += ft_strlen( " Wide" );
+ if ( average_width_prop->value.l >= point_size_prop->value.l )
+ {
+ /* This font is at least square shaped or even wider */
+ wide = 1;
+ l += ft_strlen( " Wide" );
+ }
}
- }
- if ( foundry_prop && foundry_prop->isString )
- {
- l += ft_strlen( foundry_prop->value.atom ) + 1;
+ if ( foundry_prop && foundry_prop->isString )
+ {
+ l += ft_strlen( foundry_prop->value.atom ) + 1;
- if ( FT_NEW_ARRAY( root->family_name, l ) )
- goto Exit;
+ if ( FT_NEW_ARRAY( root->family_name, l ) )
+ goto Exit;
+
+ ft_strcpy( root->family_name, foundry_prop->value.atom );
+ ft_strcat( root->family_name, " " );
+ ft_strcat( root->family_name, prop->value.atom );
+ }
+ else
+ {
+ if ( FT_NEW_ARRAY( root->family_name, l ) )
+ goto Exit;
- ft_strcpy( root->family_name, foundry_prop->value.atom );
- ft_strcat( root->family_name, " " );
- ft_strcat( root->family_name, prop->value.atom );
+ ft_strcpy( root->family_name, prop->value.atom );
+ }
+
+ if ( wide )
+ ft_strcat( root->family_name, " Wide" );
}
else
+
+#endif /* PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
{
- if ( FT_NEW_ARRAY( root->family_name, l ) )
+ if ( FT_STRDUP( root->family_name, prop->value.atom ) )
goto Exit;
-
- ft_strcpy( root->family_name, prop->value.atom );
}
-
- if ( wide )
- ft_strcat( root->family_name, " Wide" );
}
else
root->family_name = NULL;
--
cgit v1.0-41-gc330

View file

@ -1,68 +0,0 @@
diff --git a/src/pcf/pcf.h b/src/pcf/pcf.h
index c726e5e..830cabe 100644
--- a/src/pcf/pcf.h
+++ b/src/pcf/pcf.h
@@ -163,6 +163,13 @@ FT_BEGIN_HEADER
} PCF_FaceRec, *PCF_Face;
+ typedef struct PCF_DriverRec_
+ {
+ FT_DriverRec root;
+
+ } PCF_DriverRec, *PCF_Driver;
+
+
/* macros for pcf font format */
#define LSBFirst 0
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index 10d5c20..8f4a90d 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -691,22 +691,38 @@ THE SOFTWARE.
}
+ FT_CALLBACK_DEF( FT_Error )
+ pcf_driver_init( FT_Module module ) /* PCF_Driver */
+ {
+ FT_UNUSED( module );
+
+ return FT_Err_Ok;
+ }
+
+
+ FT_CALLBACK_DEF( void )
+ pcf_driver_done( FT_Module module ) /* PCF_Driver */
+ {
+ FT_UNUSED( module );
+ }
+
+
FT_CALLBACK_TABLE_DEF
const FT_Driver_ClassRec pcf_driver_class =
{
{
FT_MODULE_FONT_DRIVER |
FT_MODULE_DRIVER_NO_OUTLINES,
- sizeof ( FT_DriverRec ),
+ sizeof ( PCF_DriverRec ),
"pcf",
0x10000L,
0x20000L,
- NULL, /* module-specific interface */
+ NULL, /* module-specific interface */
- NULL, /* FT_Module_Constructor module_init */
- NULL, /* FT_Module_Destructor module_done */
+ pcf_driver_init, /* FT_Module_Constructor module_init */
+ pcf_driver_done, /* FT_Module_Destructor module_done */
pcf_driver_requester /* FT_Module_Requester get_interface */
},
--
cgit v1.0-41-gc330

View file

@ -1,11 +1,11 @@
{ stdenv, lib, buildPlatform, fetchurl }:
stdenv.mkDerivation rec {
name = "gdbm-1.14";
name = "gdbm-1.14.1";
src = fetchurl {
url = "mirror://gnu/gdbm/${name}.tar.gz";
sha256 = "02dakgrq93xwgln8qfv3vs5jyz5yvds5nyzkx6rhg9v585x478dd";
sha256 = "0pxwz3jlwvglq2mrbxvrjgr8pa0aj73p3v9sxmdlj570zw0gzknd";
};
doCheck = true; # not cross;

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, gnome3
, jasper, libintlOrEmpty, gobjectIntrospection, doCheck ? false }:
, jasper, gobjectIntrospection, doCheck ? false }:
let
pname = "gdk-pixbuf";
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
# !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
buildInputs = [ libX11 gobjectIntrospection ] ++ libintlOrEmpty;
buildInputs = [ libX11 gobjectIntrospection ];
nativeBuildInputs = [ pkgconfig ];
@ -61,4 +61,3 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
};
}

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, pkgconfig, glib, babl, libpng, cairo, libjpeg, which
, librsvg, pango, gtk, bzip2, json-glib, intltool, autoreconfHook, libraw
, libwebp, gnome3 }:
, libwebp, gnome3, libintl }:
stdenv.mkDerivation rec {
name = "gegl-0.3.30";
@ -10,8 +10,6 @@ stdenv.mkDerivation rec {
sha256 = "0lg5j5kn24qvyb6fn7khxf3jadkacbpnb9nrqzy7w665s8xakd7q";
};
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
hardeningDisable = [ "format" ];
# needs fonts otherwise don't know how to pass them
@ -28,7 +26,7 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ glib json-glib babl ]; # for gegl-3.0.pc
nativeBuildInputs = [ pkgconfig intltool which autoreconfHook ];
nativeBuildInputs = [ pkgconfig intltool which autoreconfHook libintl ];
meta = with stdenv.lib; {
description = "Graph-based image processing framework";

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, glib, babl, libpng, cairo, libjpeg
, librsvg, pango, gtk2, bzip2, intltool
, librsvg, pango, gtk2, bzip2, intltool, libintl
, OpenGL ? null }:
stdenv.mkDerivation rec {
@ -20,14 +20,12 @@ stdenv.mkDerivation rec {
# needs fonts otherwise don't know how to pass them
configureFlags = "--disable-docs";
NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null;
buildInputs = [ babl libpng cairo libjpeg librsvg pango gtk2 bzip2 intltool ]
buildInputs = [ babl libpng cairo libjpeg librsvg pango gtk2 bzip2 intltool libintl ]
++ stdenv.lib.optional stdenv.isDarwin OpenGL;
nativeBuildInputs = [ pkgconfig ];
meta = {
meta = {
description = "Graph-based image processing framework";
homepage = http://www.gegl.org;
license = stdenv.lib.licenses.gpl3;

View file

@ -1,4 +1,4 @@
{ fetchurl, stdenv, intltool, libintlOrEmpty, pkgconfig, glib, json-glib, libsoup, geoip
{ fetchurl, stdenv, intltool, pkgconfig, glib, json-glib, libsoup, geoip
, dbus, dbus-glib, modemmanager, avahi, glib-networking, wrapGAppsHook, gobjectIntrospection
}:
@ -18,8 +18,7 @@ stdenv.mkDerivation rec {
pkgconfig intltool wrapGAppsHook gobjectIntrospection
];
buildInputs = libintlOrEmpty ++
[ glib json-glib libsoup geoip
buildInputs = [ glib json-glib libsoup geoip
dbus dbus-glib avahi
] ++ optionals (!stdenv.isDarwin) [ modemmanager ];
@ -37,8 +36,6 @@ stdenv.mkDerivation rec {
"--disable-modem-gps-source"
"--disable-nmea-source" ];
NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl";
postInstall = ''
sed -i $dev/lib/pkgconfig/libgeoclue-2.0.pc -e "s|includedir=.*|includedir=$dev/include|"
'';

View file

@ -49,6 +49,7 @@ stdenv.mkDerivation rec {
buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv;
setupHook = ./gettext-setup-hook.sh;
gettextNeedsLdflags = hostPlatform.libc != "glibc" && !hostPlatform.isMusl;
enableParallelBuilding = true;

View file

@ -5,3 +5,24 @@ gettextDataDirsHook() {
}
addEnvHooks "$hostOffset" gettextDataDirsHook
# libintl must be listed in load flags on non-Glibc
# it doesn't hurt to have it in Glibc either though
gettextLdflags() {
# The `depHostOffset` describes how the host platform of the dependencies
# are slid relative to the depending package. It is brought into scope of
# the environment hook defined as the role of the dependency being applied.
case $depHostOffset in
-1) local role='BUILD_' ;;
0) local role='' ;;
1) local role='TARGET_' ;;
*) echo "cc-wrapper: Error: Cannot be used with $depHostOffset-offset deps" >2;
return 1 ;;
esac
export NIX_${role}LDFLAGS+=" -lintl"
}
if [ ! -z "@gettextNeedsLdflags@" ]; then
addEnvHooks "$hostOffset" gettextLdflags
fi

Some files were not shown because too many files have changed in this diff Show more