0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

edopro: 40.1.4 -> 41.0.2

- Rename ocgcore library to match expected platform-specific name
This commit is contained in:
OPNA2608 2025-04-28 23:37:46 +02:00
parent f93ca760ca
commit 160d74ddfb
2 changed files with 69 additions and 64 deletions

View file

@ -1,11 +1,11 @@
# This is automatically generated by the update script.
# DO NOT MANUALLY EDIT.
{
assets-hash = "sha256-vZhkWJ1ZoNEwdc5kM1S0hyXnWmupiTOanCi9DCuqw/k=";
edopro-version = "40.1.4";
edopro-rev = "c713e23491a1e55c9d8e91257e5f2b5873696b9b";
edopro-hash = "sha256-2E1cjG0FONu/fbr67/3qRCKQ1W/wPznClEWsMa1FAzo=";
irrlicht-version = "1.9.0-unstable-2023-02-18";
irrlicht-rev = "7edde28d4f8c0c3589934c398a3a441286bb7c22";
irrlicht-hash = "sha256-Q2tNiYE/enZPqA5YhUe+Tkvmqtmmz2E0OqTRUDnt+UA=";
assets-hash = "sha256-cta4k6yxrdaFFfum0eshEzLODExBfA+oVPqcOpXG9uk=";
edopro-version = "41.0.2";
edopro-rev = "e5c0578aa504d0831dcbe29dbacd018f7b885b2c";
edopro-hash = "sha256-ZkQXWt73S3Nn+RnkG+e91BId7keI5OpM3NSeDMJWlZY=";
irrlicht-version = "1.9.0-unstable-2025-03-30";
irrlicht-rev = "47264fc2bc3223d110c589c9ffe4339d696a3dd0";
irrlicht-hash = "sha256-AwUCHQOivNgSnYe8kG6JxDIz7H5PC6RoozGiOGUejTI=";
}

View file

@ -2,7 +2,6 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
fetchzip,
makeWrapper,
premake5,
@ -15,8 +14,7 @@
curl,
envsubst,
flac,
# Use fmt 10+ after release 40.1.4+
fmt_9,
fmt,
freetype,
irrlicht,
libevent,
@ -29,7 +27,6 @@
libX11,
libxkbcommon,
libXxf86vm,
lua5_3,
mono,
nlohmann_json,
openal,
@ -119,61 +116,77 @@ let
};
};
ocgcore = stdenv.mkDerivation {
pname = "ocgcore-edopro";
version = deps.edopro-version;
ocgcore =
let
# Refer to CORENAME EPRO_TEXT in <edopro>/gframe/dllinterface.cpp for this
ocgcoreName = lib.strings.concatStrings [
(lib.optionalString (!stdenv.hostPlatform.isWindows) "lib")
"ocgcore"
(
if stdenv.hostPlatform.isiOS then
"-ios"
else if stdenv.hostPlatform.isAndroid then
(
if stdenv.hostPlatform.isx86_64 then
"x64"
else if stdenv.hostPlatform.isx86_32 then
"x86"
else if stdenv.hostPlatform.isAarch64 then
"v8"
else if stdenv.hostPlatform.isAarch32 then
"v7"
else
throw "Don't know what platform suffix edopro expects for ocgcore on: ${stdenv.hostPlatform.system}"
)
else
lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ".aarch64"
)
stdenv.hostPlatform.extensions.sharedLibrary
];
in
stdenv.mkDerivation {
pname = "ocgcore-edopro";
version = deps.edopro-version;
src = edopro-src;
sourceRoot = "${edopro-src.name}/ocgcore";
src = edopro-src;
sourceRoot = "${edopro-src.name}/ocgcore";
patches = [
# Fix linking against our Lua (different name mangling, C in Lua vs C++ in ocgcore)
./ocgcore-lua-symbols.patch
];
nativeBuildInputs = [
premake5
];
nativeBuildInputs = [
premake5
];
enableParallelBuilding = true;
# Drop when edopro version >= 41
buildInputs = [ lua5_3 ];
preBuild = ''
premake5 gmake2 \
--lua-path="${lua5_3}"
'';
buildFlags = [
"verbose=true"
"config=release"
"ocgcoreshared"
];
enableParallelBuilding = true;
makeFlags = [
"-C"
"build"
];
buildFlags = [
"verbose=true"
"config=release"
"ocgcoreshared"
];
# To make sure linking errors are discovered at build time, not when edopro runs into them during loading
env.NIX_LDFLAGS = "--unresolved-symbols=report-all";
makeFlags = [
"-C"
"build"
];
installPhase = ''
runHook preInstall
# To make sure linking errors are discovered at build time, not when edopro runs into them during loading
env.NIX_LDFLAGS = "--unresolved-symbols=report-all";
install -Dm644 bin/release/*ocgcore*${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/${ocgcoreName}
installPhase = ''
runHook preInstall
runHook postInstall
'';
install -Dm644 -t $out/lib bin/release/libocgcore*${stdenv.hostPlatform.extensions.sharedLibrary}
runHook postInstall
'';
meta = {
description = "YGOPro script engine";
homepage = "https://github.com/edo9300/ygopro-core";
license = lib.licenses.agpl3Plus;
inherit maintainers;
platforms = lib.platforms.unix;
meta = {
description = "YGOPro script engine";
homepage = "https://github.com/edo9300/ygopro-core";
license = lib.licenses.agpl3Plus;
inherit maintainers;
platforms = lib.platforms.unix;
};
};
};
edopro = stdenv.mkDerivation {
pname = "edopro";
@ -190,7 +203,7 @@ let
bzip2
curl
flac
fmt_9
fmt
freetype
irrlicht-edopro
libevent
@ -204,14 +217,6 @@ let
sqlite
];
patches = [
(fetchpatch {
name = "libgit2-version.patch";
url = "https://github.com/edo9300/edopro/commit/f8ddbfff51231827a8dd1dcfcb2dda85f50a56d9.patch";
hash = "sha256-w9VTmWfw6vEyVvsOH+AK9lAbUOV+MagzGQ3Wa5DCS/U=";
})
];
# nixpkgs' gcc stack currently appears to not support LTO
# Override where bundled ocgcore get looked up in, so we can supply ours
# (can't use --prebuilt-core or let it build a core on its own without making core updates impossible)