Unverified Commit ac405406 authored by Ben Siraphob's avatar Ben Siraphob Committed by GitHub
Browse files

Merge pull request #314507 from ShamrockLee/libdvdnav_4_2_1-cross

libdvdnav_4_2_1: fix cross-compilation
parents 5fa29cc3 c4681a43
Loading
Loading
Loading
Loading
+20 −1
Original line number Diff line number Diff line
@@ -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";