Merge pull request #218881 from mikatammi/fix_libglibutil_cross

Fix libglibutil, libgbinder and gbinder-python cross-compilation
This commit is contained in:
Guillaume Girol
2023-03-12 15:52:32 +00:00
committed by GitHub
3 changed files with 17 additions and 0 deletions
@@ -22,6 +22,13 @@ stdenv.mkDerivation rec {
libglibutil
];
postPatch = ''
# Fix pkg-config and ranlib names for cross-compilation
substituteInPlace Makefile \
--replace "pkg-config" "$PKG_CONFIG" \
--replace "ranlib" "$RANLIB"
'';
makeFlags = [
"LIBDIR=$(out)/lib"
"INSTALL_INCLUDE_DIR=$(dev)/include/gbinder"
@@ -21,6 +21,11 @@ stdenv.mkDerivation rec {
glib
];
postPatch = ''
# Fix pkg-config name for cross-compilation
substituteInPlace Makefile --replace "pkg-config" "$PKG_CONFIG"
'';
makeFlags = [
"LIBDIR=$(out)/lib"
"INSTALL_INCLUDE_DIR=$(dev)/include/gutil"
@@ -26,6 +26,11 @@ buildPythonPackage rec {
pkg-config
];
postPatch = ''
# Fix pkg-config name for cross-compilation
substituteInPlace setup.py --replace "pkg-config" "$PKG_CONFIG"
'';
setupPyGlobalFlags = [ "--cython" ];
meta = with lib; {