fix some packages on darwin

This commit is contained in:
Eric Seidel
2014-09-09 13:54:26 -07:00
committed by Joel Taylor
parent e22889064f
commit 0577499d74
9 changed files with 28 additions and 5 deletions
@@ -65,6 +65,5 @@ in stdenv.mkDerivation rec {
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ shlevy lovek323 raskin viric ]; maintainers = with stdenv.lib.maintainers; [ shlevy lovek323 raskin viric ];
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.all;
# broken = stdenv.isDarwin;
}; };
} }
@@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
sha256 = "b1ca708994180236917ae79e17606da5bd334ca6acd6873a550027e1c0ec874a"; sha256 = "b1ca708994180236917ae79e17606da5bd334ca6acd6873a550027e1c0ec874a";
}; };
patches = [ ./fix-clang-build-on-osx.diff ];
prefixKey = "-prefix "; prefixKey = "-prefix ";
configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11lib configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11lib
"-x11include" x11inc ]; "-x11include" x11inc ];
@@ -0,0 +1,20 @@
diff --git a/configure b/configure
index d45e88f..25d872b 100755
--- a/configure
+++ b/configure
@@ -322,7 +322,14 @@ case "$bytecc,$target" in
bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
mathlib="";;
*,*-*-darwin*)
- bytecccompopts="-fno-defer-pop $gcc_warnings"
+ # On recent version of OSX, gcc is a symlink to clang
+ if $bytecc --version | grep -q clang; then
+ # -fno-defer-pop is not supported by clang, and make recent
+ # versions of clang to fail
+ bytecccompopts="$gcc_warnings"
+ else
+ bytecccompopts="-fno-defer-pop $gcc_warnings"
+ fi
mathlib=""
mkexe="$mkexe -Wl,-no_compact_unwind"
# Tell gcc that we can use 32-bit code addresses for threaded code
@@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
configurePhase = '' configurePhase = ''
sed -i "makefile" -"es|PREFIX[[:blank:]]*=.*$|PREFIX = $out|g" sed -i "makefile" -"es|PREFIX[[:blank:]]*=.*$|PREFIX = $out|g"
sed -i "makefile" -"es|gcc|$CC|g"
''; '';
doCheck = true; doCheck = true;
+1 -1
View File
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
description = "Smart and user-friendly command line shell"; description = "Smart and user-friendly command line shell";
homepage = "http://fishshell.com/"; homepage = "http://fishshell.com/";
license = licenses.gpl2; license = licenses.gpl2;
platforms = platforms.linux; platforms = platforms.unix;
maintainers = with maintainers; [ ocharles ]; maintainers = with maintainers; [ ocharles ];
}; };
} }
+2
View File
@@ -26,6 +26,8 @@ stdenv.mkDerivation {
sharedLibrary = sharedLibrary =
!stdenv.isDarwin && !(stdenv ? isDietLibC) && !(stdenv ? isStatic) && stdenv.system != "i686-cygwin" && !linkStatic; !stdenv.isDarwin && !(stdenv ? isDietLibC) && !(stdenv ? isStatic) && stdenv.system != "i686-cygwin" && !linkStatic;
patchPhase = stdenv.lib.optionalString stdenv.isDarwin "substituteInPlace Makefile --replace 'CC=gcc' 'CC=clang'";
preConfigure = "substituteInPlace Makefile --replace '$(PREFIX)/man' '$(PREFIX)/share/man'"; preConfigure = "substituteInPlace Makefile --replace '$(PREFIX)/man' '$(PREFIX)/share/man'";
makeFlags = if linkStatic then "LDFLAGS=-static" else ""; makeFlags = if linkStatic then "LDFLAGS=-static" else "";
+1 -1
View File
@@ -16,6 +16,6 @@ stdenv.mkDerivation rec {
license = [ "GPLv2+" ]; license = [ "GPLv2+" ];
maintainers = with stdenv.lib.maintainers; [ the-kenny viric ]; maintainers = with stdenv.lib.maintainers; [ the-kenny viric ];
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.unix;
}; };
} }
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
cd src cd src
for f in tex4ht t4ht htcmd ; do for f in tex4ht t4ht htcmd ; do
# -DENVFILE="$out/share/texmf-nix/tex4ht/base/unix/tex4ht.env" # -DENVFILE="$out/share/texmf-nix/tex4ht/base/unix/tex4ht.env"
gcc -o $f $f.c -I${tetex}/include -L${tetex}/lib -DHAVE_DIRENT_H -DHAVE_DIRENT_H -DKPATHSEA -lkpathsea $CC -o $f $f.c -I${tetex}/include -L${tetex}/lib -DHAVE_DIRENT_H -DHAVE_DIRENT_H -DKPATHSEA -lkpathsea
done done
cd - cd -
''; '';
@@ -22,7 +22,6 @@ rec {
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
doMainBuild = fullDepEntry ( stdenv.lib.optionalString stdenv.isDarwin '' doMainBuild = fullDepEntry ( stdenv.lib.optionalString stdenv.isDarwin ''
export MACOSX_DEPLOYMENT_TARGET=10.9
export DYLD_LIBRARY_PATH="${poppler}/lib" export DYLD_LIBRARY_PATH="${poppler}/lib"
'' + '' '' + ''
mkdir -p $out mkdir -p $out