diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
commit | 99fcaeccb89621dd492203ce1f2d551c06f228ed (patch) | |
tree | 41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/ogre | |
parent | 59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff) | |
parent | 75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff) | |
download | nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2 nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/config/console.nix nixpkgs/nixos/modules/services/mail/mailman.nix nixpkgs/nixos/modules/services/mail/public-inbox.nix nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix nixpkgs/pkgs/applications/networking/irc/weechat/default.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/interpreters/python/default.nix nixpkgs/pkgs/development/node-packages/overrides.nix nixpkgs/pkgs/development/tools/b4/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix nixpkgs/pkgs/servers/mail/public-inbox/default.nix nixpkgs/pkgs/tools/security/pinentry/default.nix nixpkgs/pkgs/tools/text/unoconv/default.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/ogre')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/ogre/1.10.x.nix | 126 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/ogre/1.9.x.nix | 53 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/ogre/default.nix | 128 |
3 files changed, 161 insertions, 146 deletions
diff --git a/nixpkgs/pkgs/development/libraries/ogre/1.10.x.nix b/nixpkgs/pkgs/development/libraries/ogre/1.10.x.nix index cd65630879ef..73f15b744bf5 100644 --- a/nixpkgs/pkgs/development/libraries/ogre/1.10.x.nix +++ b/nixpkgs/pkgs/development/libraries/ogre/1.10.x.nix @@ -1,50 +1,110 @@ -{ fetchurl, stdenv, lib -, cmake, libGLU, libGL -, freetype, freeimage, zziplib, xorgproto, libXrandr -, libXaw, freeglut, libXt, libpng, boost, ois -, libX11, libXmu, libSM, pkg-config -, libXxf86vm, libICE +{ lib +, stdenv +, fetchurl +, fetchpatch +, cmake +, pkg-config +, boost +, freeimage +, freetype +, libpng +, ois +, zziplib +, freeglut +, libGL +, libGLU +, libICE +, libSM +, libX11 +, libXaw +, libXmu +, libXrandr , libXrender -, withNvidiaCg ? false, nvidia_cg_toolkit -, withSamples ? false }: +, libXt +, libXxf86vm +, xorgproto +, darwin +, withNvidiaCg ? false +, nvidia_cg_toolkit +, withSamples ? false +}: +let + inherit (darwin.apple_sdk.frameworks) AGL Cocoa; +in stdenv.mkDerivation rec { pname = "ogre"; version = "1.10.11"; src = fetchurl { - url = "https://bitbucket.org/sinbad/ogre/get/v${lib.replaceStrings ["."] ["-"] version}.tar.gz"; - sha256 = "1zwvlx5dz9nwjazhnrhzb0w8ilpa84r0hrxrmmy69pgr1p1yif5a"; + url = "https://bitbucket.org/sinbad/ogre/get/v${lib.replaceStrings ["."] ["-"] version}.tar.gz"; + sha256 = "1zwvlx5dz9nwjazhnrhzb0w8ilpa84r0hrxrmmy69pgr1p1yif5a"; }; - # fix for ARM. sys/sysctl.h has moved in later glibcs, and - # https://github.com/OGRECave/ogre-next/issues/132 suggests it isn't - # needed anyway. - postPatch = '' - substituteInPlace OgreMain/src/OgrePlatformInformation.cpp \ - --replace '#include <sys/sysctl.h>' "" - ''; + patches = [ + # aarch64-darwin support + (fetchpatch { + url = "https://github.com/OGRECave/ogre/commit/bd5fbe3482c56e58c6c3b3bf439b1eab8c1be258.patch"; + includes = [ "OgreMain/include/OgrePlatform*.h" ]; + sha256 = "sha256-ELeCklQkltz7DeDaGl78Jk1H3Wdfu8fMUiMZaJM4s/Y="; + }) + (fetchpatch { + url = "https://github.com/OGRECave/ogre/commit/0873244cc06b613ca2afbcb5522fe9ef89f111c5.patch"; + sha256 = "sha256-xGvlMB55B2rdthxNMIM5iFf9p/6zuE8bGL9P04qtweQ="; + }) + # aarch64-linux support + (fetchpatch { + name = "fix-build-on-aarch64-linux.patch"; + url = "https://github.com/OGRECave/ogre/commit/8ec086e9bc2e24fab373b514c572483b69071d69.patch"; + sha256 = "sha256-22wlJPZ7lRIPAMqvpI/2YI0neQjGi1UXt8y5zNSpxCw="; + }) + ]; - cmakeFlags = [ "-DOGRE_BUILD_SAMPLES=${toString withSamples}" ] - ++ map (x: "-DOGRE_BUILD_PLUGIN_${x}=on") - ([ "BSP" "OCTREE" "PCZ" "PFX" ] ++ lib.optional withNvidiaCg "CG") - ++ map (x: "-DOGRE_BUILD_RENDERSYSTEM_${x}=on") [ "GL" ]; + nativeBuildInputs = [ + cmake + pkg-config + ]; - nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = - [ libGLU libGL - freetype freeimage zziplib xorgproto libXrandr - libXaw freeglut libXt libpng boost ois - libX11 libXmu libSM - libXxf86vm libICE - libXrender - ] ++ lib.optional withNvidiaCg nvidia_cg_toolkit; + buildInputs = [ + boost + freeimage + freetype + libpng + ois + zziplib + ] ++ lib.optionals stdenv.isLinux [ + freeglut + libGL + libGLU + libICE + libSM + libX11 + libXaw + libXmu + libXrandr + libXrender + libXt + libXxf86vm + xorgproto + ] ++ lib.optionals stdenv.isDarwin [ + AGL + Cocoa + ] ++ lib.optionals withNvidiaCg [ + nvidia_cg_toolkit + ]; + + cmakeFlags = [ + "-DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=FALSE" + "-DOGRE_BUILD_SAMPLES=${toString withSamples}" + ] ++ lib.optionals stdenv.isDarwin [ + "-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=FALSE" + ]; meta = { - description = "A 3D engine"; + description = "3D Object-Oriented Graphics Rendering Engine"; homepage = "https://www.ogre3d.org/"; - maintainers = [ lib.maintainers.raskin ]; - platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ raskin wegank ]; + platforms = lib.platforms.unix; license = lib.licenses.mit; }; } diff --git a/nixpkgs/pkgs/development/libraries/ogre/1.9.x.nix b/nixpkgs/pkgs/development/libraries/ogre/1.9.x.nix deleted file mode 100644 index 7548ed48e7ae..000000000000 --- a/nixpkgs/pkgs/development/libraries/ogre/1.9.x.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ fetchFromGitHub, stdenv, lib -, cmake, libGLU, libGL -, freetype, freeimage, zziplib, xorgproto, libXrandr -, libXaw, freeglut, libXt, libpng, boost, ois -, libX11, libXmu, libSM, pkg-config -, libXxf86vm, libICE -, libXrender -, withNvidiaCg ? false, nvidia_cg_toolkit -, withSamples ? false }: - -stdenv.mkDerivation rec { - pname = "ogre"; - version = "1.9.1"; - - src = fetchFromGitHub { - owner = "OGRECave"; - repo = "ogre"; - rev = "v${version}"; - sha256 = "11lfgzqaps3728dswrq3cbwk7aicigyz08q4hfyy6ikc6m35r4wg"; - }; - - # fix for ARM. sys/sysctl.h has moved in later glibcs, and - # https://github.com/OGRECave/ogre-next/issues/132 suggests it isn't - # needed anyway. - postPatch = '' - substituteInPlace OgreMain/src/OgrePlatformInformation.cpp \ - --replace '#include <sys/sysctl.h>' "" - ''; - - cmakeFlags = [ "-DOGRE_BUILD_SAMPLES=${toString withSamples}" ] - ++ map (x: "-DOGRE_BUILD_PLUGIN_${x}=on") - ([ "BSP" "OCTREE" "PCZ" "PFX" ] ++ lib.optional withNvidiaCg "CG") - ++ map (x: "-DOGRE_BUILD_RENDERSYSTEM_${x}=on") [ "GL" ]; - - - nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = - [ libGLU libGL - freetype freeimage zziplib xorgproto libXrandr - libXaw freeglut libXt libpng boost ois - libX11 libXmu libSM - libXxf86vm libICE - libXrender - ] ++ lib.optional withNvidiaCg nvidia_cg_toolkit; - - meta = { - description = "A 3D engine"; - homepage = "https://www.ogre3d.org/"; - maintainers = [ lib.maintainers.raskin ]; - platforms = lib.platforms.linux; - license = lib.licenses.mit; - }; -} diff --git a/nixpkgs/pkgs/development/libraries/ogre/default.nix b/nixpkgs/pkgs/development/libraries/ogre/default.nix index e93dfdfb144e..ce4951937165 100644 --- a/nixpkgs/pkgs/development/libraries/ogre/default.nix +++ b/nixpkgs/pkgs/development/libraries/ogre/default.nix @@ -1,29 +1,34 @@ -{ fetchFromGitHub +{ lib , stdenv -, lib +, fetchFromGitHub , cmake -, libGLU -, libGL -, freetype +, pkg-config +, unzip +, SDL2 +, boost , freeimage -, zziplib -, xorgproto -, libXrandr -, libXaw -, freeglut -, libXt +, freetype , libpng -, boost , ois +, pugixml +, zziplib + # linux +, freeglut +, libGL +, libGLU +, libICE +, libSM , libX11 +, libXaw , libXmu -, libSM -, pkg-config -, libXxf86vm -, libICE -, unzip +, libXrandr , libXrender -, SDL2 +, libXt +, libXxf86vm +, xorgproto + # darwin +, Cocoa + # optional , withNvidiaCg ? false , nvidia_cg_toolkit , withSamples ? false @@ -31,60 +36,63 @@ stdenv.mkDerivation rec { pname = "ogre"; - version = "1.12.1"; + version = "13.6.4"; src = fetchFromGitHub { owner = "OGRECave"; repo = "ogre"; rev = "v${version}"; - sha256 = "sha256-FHW0+DZhw6MLlhjh4DRYhA+6vBBXMN9K6GEVoR6P5kM="; + hash = "sha256-MSBWCO0s46t+ExWDdmqi16OxmcQXnduhgFt6I4BG1g8="; }; - # fix for ARM. sys/sysctl.h has moved in later glibcs, and - # https://github.com/OGRECave/ogre-next/issues/132 suggests it isn't - # needed anyway. - postPatch = '' - substituteInPlace OgreMain/src/OgrePlatformInformation.cpp \ - --replace '#include <sys/sysctl.h>' "" - ''; - - cmakeFlags = [ "-DOGRE_BUILD_DEPENDENCIES=OFF" "-DOGRE_BUILD_SAMPLES=${toString withSamples}" ] - ++ map (x: "-DOGRE_BUILD_PLUGIN_${x}=on") - ([ "BSP" "OCTREE" "PCZ" "PFX" ] ++ lib.optional withNvidiaCg "CG") - ++ map (x: "-DOGRE_BUILD_RENDERSYSTEM_${x}=on") [ "GL" ]; + nativeBuildInputs = [ + cmake + pkg-config + unzip + ]; + buildInputs = [ + SDL2 + boost + freeimage + freetype + libpng + ois + pugixml + zziplib + ] ++ lib.optionals stdenv.isLinux [ + freeglut + libGL + libGLU + libICE + libSM + libX11 + libXaw + libXmu + libXrandr + libXrender + libXt + libXxf86vm + xorgproto + ] ++ lib.optionals stdenv.isDarwin [ + Cocoa + ] ++ lib.optionals withNvidiaCg [ + nvidia_cg_toolkit + ]; - nativeBuildInputs = [ cmake unzip pkg-config ]; - buildInputs = - [ - cmake - libGLU - libGL - freetype - freeimage - zziplib - xorgproto - libXrandr - libXaw - freeglut - libXt - libpng - boost - ois - libX11 - libXmu - libSM - libXxf86vm - libICE - libXrender - SDL2 - ] ++ lib.optional withNvidiaCg nvidia_cg_toolkit; + cmakeFlags = [ + "-DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=FALSE" + "-DOGRE_BUILD_DEPENDENCIES=OFF" + "-DOGRE_BUILD_SAMPLES=${toString withSamples}" + ] ++ lib.optionals stdenv.isDarwin [ + "-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=FALSE" + ]; meta = { - description = "A 3D engine"; + description = "3D Object-Oriented Graphics Rendering Engine"; homepage = "https://www.ogre3d.org/"; - maintainers = [ lib.maintainers.raskin ]; - platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ raskin wegank ]; + platforms = lib.platforms.unix; license = lib.licenses.mit; }; } |