Merge pull request #314507 from ShamrockLee/libdvdnav_4_2_1-cross

libdvdnav_4_2_1: fix cross-compilation
This commit is contained in:
Ben Siraphob 2024-06-16 08:38:14 +00:00 committed by GitHub
commit ac4054068e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,12 +12,31 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [libdvdread];
configureScript = "./configure2"; # wtf?
# The upstream supports two configuration workflow:
# one is to generate ./configure via `autoconf`,
# the other is to run ./configure2.
# ./configure2 is a configureation script included in the upstream source
# that supports common "--<name>" flags and generates config.mak and config.h.
# See INSTALL inside the upstream source for detail.
configureScript = "./configure2";
configureFlags = [
"--cc=${stdenv.cc.targetPrefix}cc"
# Let's strip the binaries ourselves,
# as unprefixed `strip` command is not available during cross compilation.
"--disable-strip"
];
preConfigure = ''
mkdir -p $out
'';
makeFlags = [
"AR=${stdenv.cc.targetPrefix}ar"
"LD=${stdenv.cc.targetPrefix}ld"
"RANLIB=${stdenv.cc.targetPrefix}ranlib"
];
meta = {
homepage = "http://dvdnav.mplayerhq.hu/";
description = "Library that implements DVD navigation features such as DVD menus";