remove stdenv.isBSD

This commit is contained in:
codyopel 2015-02-24 22:15:51 -05:00
parent 6a6cc70978
commit e29b0da9c7
7 changed files with 18 additions and 31 deletions

View file

@ -5,9 +5,9 @@ let
platform = with stdenv; platform = with stdenv;
if isDarwin then "macosx" if isDarwin then "macosx"
else if isCygwin then "cygwin" else if isCygwin then "cygwin"
else if isBSD then "bsd" else if (isFreeBSD || isOpenBSD) then "bsd"
else if isSunOS then "solaris" else if isSunOS then "solaris"
else "linux"; # Should be a sane default else "linux"; # Should be a sane default
lib = stdenv.lib; lib = stdenv.lib;
in in
stdenv.mkDerivation { stdenv.mkDerivation {

View file

@ -21,14 +21,13 @@ stdenv.mkDerivation rec {
dontStrip = stdenv ? cross; # Don't run the native `strip' when cross-compiling. dontStrip = stdenv ? cross; # Don't run the native `strip' when cross-compiling.
postInstall = # Install headers in the right place.
# Install headers in the right place. postInstall = ''
'' ln -s${if stdenv.isBSD then "" else "r"}v "$out/lib/"libffi*/include "$out/include" ln -s${if (stdenv.isFreeBSD || stdenv.isOpenBSD || stdenv.isDarwin) then "" else "r"}v "$out/lib/"libffi*/include "$out/include"
''; '';
meta = { meta = {
description = "A foreign function call interface library"; description = "A foreign function call interface library";
longDescription = '' longDescription = ''
The libffi library provides a portable, high level programming The libffi library provides a portable, high level programming
interface to various calling conventions. This allows a interface to various calling conventions. This allows a
@ -43,12 +42,9 @@ stdenv.mkDerivation rec {
interface. A layer must exist above libffi that handles type interface. A layer must exist above libffi that handles type
conversions for values passed between the two languages. conversions for values passed between the two languages.
''; '';
homepage = http://sourceware.org/libffi/; homepage = http://sourceware.org/libffi/;
# See http://github.com/atgreen/libffi/blob/master/LICENSE . # See http://github.com/atgreen/libffi/blob/master/LICENSE .
license = stdenv.lib.licenses.free; license = stdenv.lib.licenses.free;
maintainers = [ ]; maintainers = [ ];
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };

View file

@ -200,14 +200,9 @@ let
isCygwin = system == "i686-cygwin" isCygwin = system == "i686-cygwin"
|| system == "x86_64-cygwin"; || system == "x86_64-cygwin";
isFreeBSD = system == "i686-freebsd" isFreeBSD = system == "i686-freebsd"
|| system == "x86_64-freebsd"; || system == "x86_64-freebsd";
isOpenBSD = system == "i686-openbsd" isOpenBSD = system == "i686-openbsd"
|| system == "x86_64-openbsd"; || system == "x86_64-openbsd";
isBSD = system == "i686-freebsd"
|| system == "x86_64-freebsd"
|| system == "i686-openbsd"
|| system == "x86_64-openbsd"
|| system == "x86_64-darwin";
isi686 = system == "i686-linux" isi686 = system == "i686-linux"
|| system == "i686-gnu" || system == "i686-gnu"
|| system == "i686-freebsd" || system == "i686-freebsd"

View file

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
'' ''
# Fix for building on Glibc 2.16. Won't be needed once the # Fix for building on Glibc 2.16. Won't be needed once the
# gnulib in sharutils is updated. # gnulib in sharutils is updated.
sed -i ${stdenv.lib.optionalString (stdenv.isBSD && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h sed -i ${stdenv.lib.optionalString ((stdenv.isFreeBSD || stdenv.isOpenBSD || stdenv.isDarwin) && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
''; '';
# GNU Gettext is needed on non-GNU platforms. # GNU Gettext is needed on non-GNU platforms.
@ -26,7 +26,6 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Tools for remote synchronization and `shell archives'"; description = "Tools for remote synchronization and `shell archives'";
longDescription = longDescription =
'' GNU shar makes so-called shell archives out of many files, preparing '' GNU shar makes so-called shell archives out of many files, preparing
them for transmission by electronic mail services. A shell archive them for transmission by electronic mail services. A shell archive
@ -43,11 +42,8 @@ stdenv.mkDerivation rec {
by a copy of the shell. unshar may also process files containing by a copy of the shell. unshar may also process files containing
concatenated shell archives. concatenated shell archives.
''; '';
homepage = http://www.gnu.org/software/sharutils/; homepage = http://www.gnu.org/software/sharutils/;
license = stdenv.lib.licenses.gpl3Plus; license = stdenv.lib.licenses.gpl3Plus;
maintainers = [ ]; maintainers = [ ];
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
}; };

View file

@ -1,4 +1,4 @@
{stdenv, fetchurl, unzip}: { stdenv, fetchurl, unzip }:
let let
s = # Generated upstream information s = # Generated upstream information
rec { rec {
@ -12,7 +12,7 @@ let
buildInputs = [ buildInputs = [
unzip unzip
]; ];
isUnix = stdenv.isLinux || stdenv.isGNU || stdenv.isDarwin || stdenv.isBSD; isUnix = with stdenv; isLinux || isGNU || isDarwin || isFreeBSD || isOpenBSD;
isx86 = stdenv.isi686 || stdenv.isx86_64; isx86 = stdenv.isi686 || stdenv.isx86_64;
compileFlags = "" compileFlags = ""
+ (stdenv.lib.optionalString isUnix " -Dunix -pthread ") + (stdenv.lib.optionalString isUnix " -Dunix -pthread ")

View file

@ -1,4 +1,4 @@
{stdenv, fetchurl, unzip}: { stdenv, fetchurl, unzip }:
let let
s = # Generated upstream information s = # Generated upstream information
rec { rec {
@ -12,7 +12,7 @@ let
buildInputs = [ buildInputs = [
unzip unzip
]; ];
isUnix = stdenv.isLinux || stdenv.isGNU || stdenv.isDarwin || stdenv.isBSD; isUnix = with stdenv; isLinux || isGNU || isDarwin || isFreeBSD || isOpenBSD;
isx86 = stdenv.isi686 || stdenv.isx86_64; isx86 = stdenv.isi686 || stdenv.isx86_64;
compileFlags = "" compileFlags = ""
+ (stdenv.lib.optionalString isUnix " -Dunix -pthread ") + (stdenv.lib.optionalString isUnix " -Dunix -pthread ")

View file

@ -1,4 +1,4 @@
{stdenv, fetchurl}: { stdenv, fetchurl }:
let let
version = "1.7.0"; version = "1.7.0";
@ -6,17 +6,17 @@ let
# These settings are found in the Makefile, but there seems to be no # These settings are found in the Makefile, but there seems to be no
# way to select one ore the other setting other than editing the file # way to select one ore the other setting other than editing the file
# manually, so we have to duplicate the know how here. # manually, so we have to duplicate the know how here.
systemFlags = systemFlags = with stdenv;
if stdenv.isDarwin then '' if isDarwin then ''
CFLAGS="-O2 -Wall -fomit-frame-pointer" CFLAGS="-O2 -Wall -fomit-frame-pointer"
LDFLAGS= LDFLAGS=
EXTRA_OBJS=strverscmp.o EXTRA_OBJS=strverscmp.o
'' else if stdenv.isCygwin then '' '' else if isCygwin then ''
CFLAGS="-O2 -Wall -fomit-frame-pointer -DCYGWIN" CFLAGS="-O2 -Wall -fomit-frame-pointer -DCYGWIN"
LDFLAGS=-s LDFLAGS=-s
TREE_DEST=tree.exe TREE_DEST=tree.exe
EXTRA_OBJS=strverscmp.o EXTRA_OBJS=strverscmp.o
'' else if stdenv.isBSD then '' '' else if (isFreeBSD || isOpenBSD) then ''
CFLAGS="-O2 -Wall -fomit-frame-pointer" CFLAGS="-O2 -Wall -fomit-frame-pointer"
LDFLAGS=-s LDFLAGS=-s
EXTRA_OBJS=strverscmp.o EXTRA_OBJS=strverscmp.o