diff options
author | Vladimír Čunát <v@cunat.cz> | 2024-06-24 12:27:42 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2024-06-24 12:27:42 +0200 |
commit | a67b6cd4fdc7814ad4841a1aa52615ddc181c678 (patch) | |
tree | 23d7eecc3e192deaf1c25c52512536ca655d4d25 /pkgs/by-name/ja | |
parent | 93d3b3c04639d5bbdb3cdc0309fa9169ef7d991e (diff) | |
parent | cf3f00f2ad7bf4c990e9b4b6a09c59cb4707b142 (diff) |
Merge branch 'staging' into staging-next
Diffstat (limited to 'pkgs/by-name/ja')
-rw-r--r-- | pkgs/by-name/ja/jasper/package.nix | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/by-name/ja/jasper/package.nix b/pkgs/by-name/ja/jasper/package.nix index 11a298208f567..ad364086efa90 100644 --- a/pkgs/by-name/ja/jasper/package.nix +++ b/pkgs/by-name/ja/jasper/package.nix @@ -1,10 +1,11 @@ { lib , cmake , fetchFromGitHub -, freeglut +, libglut , libGL , libheif , libjpeg +, darwin , pkg-config , stdenv , enableHEIFCodec ? true @@ -36,8 +37,10 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals enableJPGCodec [ libjpeg ] ++ lib.optionals enableOpenGL [ - freeglut + libglut libGL + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + darwin.apple_sdk.frameworks.Cocoa ]; # Since "build" already exists and is populated, cmake tries to use it, @@ -55,6 +58,14 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; + # The value of __STDC_VERSION__ cannot be automatically determined when cross-compiling + # https://github.com/jasper-software/jasper/blob/87668487/CMakeLists.txt#L415 + # workaround taken from + # https://github.com/openembedded/meta-openembedded/blob/907b9c0a/meta-oe/recipes-graphics/jasper/jasper_4.1.1.bb#L16 + preConfigure = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + cmakeFlagsArray+=(-DJAS_STDC_VERSION="$(echo __STDC_VERSION__ | $CXX -E -P -)") + ''; + meta = { homepage = "https://jasper-software.github.io/jasper/"; description = "Image processing/coding toolkit"; @@ -79,9 +90,6 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "jasper"; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; - # The value of __STDC_VERSION__ cannot be automatically determined when - # cross-compiling. - broken = stdenv.buildPlatform != stdenv.hostPlatform; }; }) # TODO: investigate opengl support |