mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
bullet: fix darwin build
The examples fail with an opengl related issue: Undefined symbols for architecture x86_64: "SimpleOpenGL3App::SimpleOpenGL3App(char const*, int, int, bool)", referenced from: _main in main_opengl_single_example.o "_useShadowMap", referenced from: GL_ShapeDrawer::drawScene(btDiscreteDynamicsWorld const*, bool, int) in GL_ShapeDrawer.o ld: symbol(s) not found for architecture x86_64 And the tests need an extra dependencly, possibley related to https://github.com/bulletphysics/bullet3/issues/819 ld: library not found for -lBussIK /cc ZHF #45961
This commit is contained in:
parent
293644c86b
commit
939debc7a4
@ -1,4 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub, cmake, libGLU_combined, freeglut, darwin }:
|
{ stdenv, fetchFromGitHub, cmake, libGLU_combined, freeglut
|
||||||
|
, Cocoa, OpenGL
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "bullet-${version}";
|
name = "bullet-${version}";
|
||||||
@ -11,10 +13,9 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1msp7w3563vb43w70myjmqsdb97kna54dcfa7yvi9l3bvamb92w3";
|
sha256 = "1msp7w3563vb43w70myjmqsdb97kna54dcfa7yvi9l3bvamb92w3";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ cmake ] ++
|
nativeBuildInputs = [ cmake ];
|
||||||
(if stdenv.isDarwin
|
buildInputs = stdenv.lib.optionals stdenv.isLinux [ libGLU_combined freeglut ]
|
||||||
then with darwin.apple_sdk.frameworks; [ Cocoa OpenGL ]
|
++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
|
||||||
else [libGLU_combined freeglut]);
|
|
||||||
|
|
||||||
patches = [ ./gwen-narrowing.patch ];
|
patches = [ ./gwen-narrowing.patch ];
|
||||||
|
|
||||||
@ -28,25 +29,26 @@ stdenv.mkDerivation rec {
|
|||||||
"-DBUILD_CPU_DEMOS=OFF"
|
"-DBUILD_CPU_DEMOS=OFF"
|
||||||
"-DINSTALL_EXTRA_LIBS=ON"
|
"-DINSTALL_EXTRA_LIBS=ON"
|
||||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||||
"-DMACOSX_DEPLOYMENT_TARGET=\"10.9\""
|
|
||||||
"-DOPENGL_FOUND=true"
|
"-DOPENGL_FOUND=true"
|
||||||
"-DOPENGL_LIBRARIES=${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework"
|
"-DOPENGL_LIBRARIES=${OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||||
"-DOPENGL_INCLUDE_DIR=${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework"
|
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||||
"-DOPENGL_gl_LIBRARY=${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework"
|
"-DOPENGL_gl_LIBRARY=${OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||||
"-DCOCOA_LIBRARY=${darwin.apple_sdk.frameworks.Cocoa}/Library/Frameworks/Cocoa.framework"
|
"-DCOCOA_LIBRARY=${Cocoa}/Library/Frameworks/Cocoa.framework"
|
||||||
|
"-DBUILD_BULLET2_DEMOS=OFF"
|
||||||
|
"-DBUILD_UNIT_TESTS=OFF"
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "A professional free 3D Game Multiphysics Library";
|
description = "A professional free 3D Game Multiphysics Library";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Bullet 3D Game Multiphysics Library provides state of the art collision
|
Bullet 3D Game Multiphysics Library provides state of the art collision
|
||||||
detection, soft body and rigid body dynamics.
|
detection, soft body and rigid body dynamics.
|
||||||
'';
|
'';
|
||||||
homepage = http://bulletphysics.org;
|
homepage = http://bulletphysics.org;
|
||||||
license = stdenv.lib.licenses.zlib;
|
license = licenses.zlib;
|
||||||
maintainers = with stdenv.lib.maintainers; [ aforemny ];
|
maintainers = with maintainers; [ aforemny ];
|
||||||
platforms = with stdenv.lib.platforms; unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -22213,7 +22213,9 @@ with pkgs;
|
|||||||
inherit (gnome2) gtksourceview;
|
inherit (gnome2) gtksourceview;
|
||||||
};
|
};
|
||||||
|
|
||||||
bullet = callPackage ../development/libraries/bullet {};
|
bullet = callPackage ../development/libraries/bullet {
|
||||||
|
inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL;
|
||||||
|
};
|
||||||
|
|
||||||
spdlog = callPackage ../development/libraries/spdlog { };
|
spdlog = callPackage ../development/libraries/spdlog { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user