gnome2.ORBit2: fix cross

This commit is contained in:
Artturin 2023-11-08 19:55:05 +02:00
parent 4c1f023268
commit 38a32f41de

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, pkg-config, glib, libIDL, libintl }:
{ lib, stdenv, fetchurl, pkg-config, glib, libIDL, libintl, buildPackages }:
stdenv.mkDerivation rec {
pname = "ORBit2";
@ -9,11 +9,34 @@ stdenv.mkDerivation rec {
sha256 = "0l3mhpyym9m5iz09fz0rgiqxl2ym6kpkwpsp1xrr4aa80nlh1jam";
};
strictDeps = true;
# Processing file orbit-interface.idl
# sh: gcc: not found
# output does not contain binaries for build
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ pkg-config libintl ];
propagatedBuildInputs = [ glib libIDL ];
outputs = [ "out" "dev" ];
configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"--with-idl-compiler=${lib.getExe' buildPackages.gnome2.ORBit2 "orbit-idl-2"}"
# https://github.com/void-linux/void-packages/blob/e5856e02aa6ef7e4f2725afbff2915f89d39024b/srcpkgs/ORBit2/template#L17-L35
"ac_cv_alignof_CORBA_boolean=1"
"ac_cv_alignof_CORBA_char=1"
"ac_cv_alignof_CORBA_double=8"
"ac_cv_alignof_CORBA_float=4"
"ac_cv_alignof_CORBA_long=4"
"ac_cv_alignof_CORBA_long_double=8"
"ac_cv_alignof_CORBA_long_long=8"
"ac_cv_alignof_CORBA_octet=1"
"ac_cv_alignof_CORBA_short=2"
"ac_cv_alignof_CORBA_struct=1"
"ac_cv_alignof_CORBA_wchar=2"
"ac_cv_alignof_CORBA_pointer=${if stdenv.hostPlatform.is64bit then "8" else "4"}"
];
preBuild = ''
sed 's/-DG_DISABLE_DEPRECATED//' -i linc2/src/Makefile
'';