FreeBSD: patch expat, kerberos, libedit, ossp-uuid, lz4, sharutils, add libelf-freebsd

wip/yesman
janus 9 years ago
parent f351aaaf85
commit 9897b35661
  1. 3
      pkgs/development/libraries/expat/default.nix
  2. 10
      pkgs/development/libraries/kerberos/krb5.nix
  3. 2
      pkgs/development/libraries/libedit/default.nix
  4. 13
      pkgs/development/libraries/libedit/freebsd-wchar.patch
  5. 28
      pkgs/development/libraries/libelf-freebsd/default.nix
  6. 2
      pkgs/development/libraries/libossp-uuid/default.nix
  7. 4
      pkgs/stdenv/freebsd/default.nix
  8. 2
      pkgs/tools/archivers/sharutils/default.nix
  9. 2
      pkgs/tools/compression/lz4/default.nix
  10. 54
      pkgs/tools/compression/lz4/install-on-freebsd.patch
  11. 4
      pkgs/top-level/all-packages.nix
  12. 4
      pkgs/top-level/perl-packages.nix

@ -10,6 +10,9 @@ stdenv.mkDerivation rec {
patches = [ ./CVE-2015-1283.patch ];
configureFlags = stdenv.lib.optionalString stdenv.isFreeBSD "--with-pic";
# NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.isFreeBSD) "-fPIC";
meta = with stdenv.lib; {
homepage = http://www.libexpat.org/;
description = "A stream-oriented XML parser library written in C";

@ -11,13 +11,15 @@ in
with stdenv.lib;
stdenv.mkDerivation rec {
name = "${type}krb5-${version}";
version = "1.13.2";
version = "1.14";
src = fetchurl {
url = "${meta.homepage}dist/krb5/1.13/krb5-${version}-signed.tar";
sha256 = "1qbdzyrws7d0q4filsibh28z54pd5l987jr0ygv43iq9085w6a75";
url = "${meta.homepage}dist/krb5/1.14/krb5-${version}.tar.gz";
sha256 = "1sgr61cnkgc5xazijaww6wpn5fnxl9vyj9ixk3r3y7ikv3x0gnyf";
};
configureFlags = stdenv.lib.optionalString stdenv.isFreeBSD ''WARN_CFLAGS=""'';
nativeBuildInputs = [ pkgconfig perl yacc ]
# Provides the mig command used by the build scripts
++ stdenv.lib.optional stdenv.isDarwin bootstrap_cmds;
@ -26,7 +28,7 @@ stdenv.mkDerivation rec {
unpackPhase = ''
tar -xf $src
tar -xzf krb5-${version}.tar.gz
#tar -xzf krb5-${version}.tar.gz
cd krb5-${version}/src
'';

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
patches = if stdenv.isCygwin then [
./01-cygwin.patch
] else null;
] else [ ] ++ [ ./freebsd-wchar.patch ];
postInstall = ''
find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \

@ -0,0 +1,13 @@
diff --git a/src/chartype.h b/src/chartype.h
index 0beee17..4ac86f3 100644
--- a/src/chartype.h
+++ b/src/chartype.h
@@ -44,7 +44,7 @@
* supports non-BMP code points without requiring UTF-16, but nothing
* seems to actually advertise this properly, despite Unicode 3.1 having
* been around since 2001... */
-#if !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) && !defined(__OpenBSD__)
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) && !defined(__OpenBSD__)
#ifndef __STDC_ISO_10646__
/* In many places it is assumed that the first 127 code points are ASCII
* compatible, so ensure wchar_t indeed does ISO 10646 and not some other

@ -0,0 +1,28 @@
{ fetchsvn, stdenv }:
stdenv.mkDerivation (rec {
version = "3258";
name = "libelf-freebsd-${version}";
#src = fetchurl {
# url = "http://sourceforge.net/code-snapshots/svn/e/el/elftoolchain/code/elftoolchain-code-${version}-trunk.zip";
# sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr";
#};
src = fetchsvn {
url = svn://svn.code.sf.net/p/elftoolchain/code/trunk ;
rev = 3258;
};
doCheck = true;
meta = {
description = "Essential compilation tools and libraries for building and analyzing ELF based program images";
homepage = https://sourceforge.net/p/elftoolchain/wiki/Home/;
license = stdenv.lib.licenses.bsd2;
platforms = stdenv.lib.platforms.freebsd;
maintainers = [ ];
};
})

@ -10,6 +10,8 @@ stdenv.mkDerivation {
sha256= "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0";
};
configureFlags = stdenv.lib.optional stdenv.isFreeBSD "--with-pic";
meta = with stdenv.lib; {
homepage = http://www.ossp.org/pkg/lib/uuid/;
description = "OSSP uuid ISO-C and C++ shared library";

@ -43,7 +43,7 @@ rec {
preHook = ''
export NIX_IGNORE_LD_THROUGH_GCC=1
export NIX_DONT_SET_RPATH=1
# export NIX_DONT_SET_RPATH=1
export NIX_NO_SELF_RPATH=1
dontFixLibtool=1
stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
@ -118,7 +118,7 @@ rec {
cc = import ../../build-support/cc-wrapper {
inherit stdenv;
nativeTools = true;
nativePrefix = "/usr/local/bin";
nativePrefix = "/usr/local";
nativeLibc = true;
cc = stage2.stdenv.cc; #pkgs.llvmPackages.clang-unwrapped;
isClang = true;

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
preConfigure = ''
# Fix for building on Glibc 2.16. Won't be needed once the
# gnulib in sharutils is updated.
sed -i ${stdenv.lib.optionalString ((stdenv.isFreeBSD || stdenv.isOpenBSD) && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
sed -i ${stdenv.lib.optionalString (stdenv.isOpenBSD && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
'';
# GNU Gettext is needed on non-GNU platforms.

@ -20,6 +20,8 @@ stdenv.mkDerivation rec {
doCheck = false; # tests take a very long time
checkTarget = "test";
patches = [ ./install-on-freebsd.patch ] ;
meta = with stdenv.lib; {
inherit version;
description = "Extremely fast compression algorithm";

@ -0,0 +1,54 @@
diff --git a/Makefile b/Makefile
index d1b0d0c..f8d6a2d 100644
--- a/Makefile
+++ b/Makefile
@@ -80,8 +80,6 @@ clean:
#------------------------------------------------------------------------
-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
install:
@cd $(LZ4DIR); $(MAKE) -e install
@@ -129,4 +127,3 @@ examples:
prg-travis:
@cd $(PRGDIR); $(MAKE) -e test-travis
-endif
diff --git a/lib/Makefile b/lib/Makefile
index 02ddd3b..26ed18f 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -80,8 +80,6 @@ clean:
#------------------------------------------------------------------------
-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
liblz4.pc: liblz4.pc.in Makefile
@echo creating pkgconfig
@@ -114,4 +112,3 @@ uninstall:
@[ -f $(DESTDIR)$(INCLUDEDIR)/lz4frame.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/lz4frame.h
@echo lz4 libraries successfully uninstalled
-endif
diff --git a/programs/Makefile b/programs/Makefile
index f422902..6943363 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -113,8 +113,6 @@ clean:
#------------------------------------------------------------------------
-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
install: lz4 lz4c
@echo Installing binaries
@@ -307,4 +305,3 @@ test-mem: lz4 datagen fuzzer frametest fullbench
test-mem32: lz4c32 datagen
# unfortunately, valgrind doesn't seem to work with non-native binary. If someone knows how to do a valgrind-test on a 32-bits exe with a 64-bits system...
-endif

@ -7109,7 +7109,9 @@ let
libedit = callPackage ../development/libraries/libedit { };
libelf = callPackage ../development/libraries/libelf { };
libelf = if stdenv.isFreeBSD
then callPackage ../development/libraries/libelf-freebsd { }
else callPackage ../development/libraries/libelf { };
libetpan = callPackage ../development/libraries/libetpan { };

@ -6338,8 +6338,8 @@ let self = _self // overrides; _self = with self; {
LocaleGettext = buildPerlPackage {
name = "LocaleGettext-1.05";
buildInputs = stdenv.lib.optional (stdenv.isDarwin || stdenv.isCygwin) pkgs.gettext;
NIX_CFLAGS_LINK = if (stdenv.isDarwin || stdenv.isCygwin) then "-lintl" else null;
buildInputs = stdenv.lib.optional (stdenv.isFreeBSD || stdenv.isDarwin || stdenv.isCygwin) pkgs.gettext;
NIX_CFLAGS_LINK = if (stdenv.isFreeBSD || stdenv.isDarwin || stdenv.isCygwin) then "-lintl" else null;
src = fetchurl {
url = mirror://cpan/authors/id/P/PV/PVANDRY/gettext-1.05.tar.gz;
sha256 = "15262a00vx714szpx8p2z52wxkz46xp7acl72znwjydyq4ypydi7";

Loading…
Cancel
Save