Merge pull request #14218 from abbradar/avidemux
avidemux: 2.5.6 -> 2.6.12
This commit is contained in:
commit
a6e0046b75
@ -1,46 +1,115 @@
|
|||||||
{stdenv, fetchurl, cmake, pkgconfig, libxml2, qt4, gtk, gettext, SDL,
|
{ stdenv, lib, fetchurl, cmake, pkgconfig, lndir
|
||||||
libXv, pixman, libpthreadstubs, libXau, libXdmcp, libxslt, x264,
|
, zlib, gettext, libvdpau, libva, libXv, sqlite, x265
|
||||||
alsaLib, lame, faad2, libvorbis, yasm, libvpx, xvidcore, libva,
|
, yasm, fribidi, gtk3, qt4
|
||||||
faac ? null, faacSupport ? false }:
|
, withX264 ? true, x264
|
||||||
|
, withLAME ? true, lame
|
||||||
|
, withFAAC ? true, faac
|
||||||
|
, withVorbis ? true, libvorbis
|
||||||
|
, withPulse ? true, libpulseaudio
|
||||||
|
, withFAAD ? true, faad2
|
||||||
|
, withOpus ? true, libopus
|
||||||
|
, withVPX ? true, libvpx
|
||||||
|
}:
|
||||||
|
|
||||||
assert stdenv ? glibc;
|
stdenv.mkDerivation rec {
|
||||||
assert faacSupport -> faac != null;
|
name = "avidemux-${version}";
|
||||||
|
version = "2.6.12";
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "avidemux-2.5.6";
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = mirror://sourceforge/avidemux/avidemux_2.5.6.tar.gz;
|
url = "mirror://sourceforge/avidemux/avidemux/${version}/avidemux_${version}.tar.gz";
|
||||||
sha256 = "12wvxz0n2g85f079d8mdkkp2zm279d34m9v7qgcqndh48cn7znnn";
|
sha256 = "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ cmake pkgconfig libxml2 qt4 gtk gettext SDL libXv
|
nativeBuildInputs = [ cmake pkgconfig yasm lndir ];
|
||||||
pixman libpthreadstubs libXau libXdmcp libxslt x264 alsaLib
|
buildInputs = [ zlib gettext libvdpau libva libXv sqlite x265 fribidi gtk3 qt4 ]
|
||||||
lame faad2 libvorbis yasm libvpx xvidcore libva
|
++ lib.optional withX264 x264
|
||||||
] ++ stdenv.lib.optional faacSupport faac;
|
++ lib.optional withLAME lame
|
||||||
|
++ lib.optional withFAAC faac
|
||||||
|
++ lib.optional withVorbis libvorbis
|
||||||
|
++ lib.optional withPulse libpulseaudio
|
||||||
|
++ lib.optional withFAAD faad2
|
||||||
|
++ lib.optional withOpus libopus
|
||||||
|
++ lib.optional withVPX libvpx
|
||||||
|
;
|
||||||
|
|
||||||
cmakeFlags = "-DPTHREAD_INCLUDE_DIR=${stdenv.glibc}/include" +
|
enableParallelBuilding = false;
|
||||||
" -DGETTEXT_INCLUDE_DIR=${gettext}/include" +
|
|
||||||
" -DSDL_INCLUDE_DIR=${SDL}/include/SDL";
|
|
||||||
|
|
||||||
NIX_LDFLAGS="-lpthread";
|
outputs = [ "out" "cli" "gtk" "qt4" ];
|
||||||
|
|
||||||
postInstall = ''
|
patches = [ ./dynamic_install_dir.patch ];
|
||||||
cd $NIX_BUILD_TOP/$sourceRoot
|
|
||||||
mkdir build_plugins
|
|
||||||
cd build_plugins
|
|
||||||
cmake $cmakeFlags -DAVIDEMUX_INSTALL_PREFIX=$out \
|
|
||||||
-DAVIDEMUX_SOURCE_DIR=$NIX_BUILD_TOP/$sourceRoot \
|
|
||||||
-DAVIDEMUX_CORECONFIG_DIR=$NIX_BUILD_TOP/$sourceRoot/build/config ../plugins
|
|
||||||
|
|
||||||
make
|
buildCommand = ''
|
||||||
make install
|
unpackPhase
|
||||||
|
cd "$sourceRoot"
|
||||||
|
patchPhase
|
||||||
|
|
||||||
|
export cmakeFlags="$cmakeFlags -DAVIDEMUX_SOURCE_DIR=$(pwd)"
|
||||||
|
|
||||||
|
function buildOutput() {
|
||||||
|
( plugin_ui="$1"
|
||||||
|
output_dir="$2"
|
||||||
|
shift 2
|
||||||
|
export cmakeFlags="$cmakeFlags -DPLUGIN_UI=$plugin_ui -DCMAKE_INSTALL_PREFIX=$output_dir"
|
||||||
|
for i in "$@" avidemux_plugins; do
|
||||||
|
( cd "$i"
|
||||||
|
cmakeConfigurePhase
|
||||||
|
buildPhase
|
||||||
|
installPhase
|
||||||
|
)
|
||||||
|
done
|
||||||
|
rm -rf avidemux_plugins/build
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildUi() {
|
||||||
|
plugin_ui="$1"
|
||||||
|
output_dir="$2"
|
||||||
|
shift 2
|
||||||
|
|
||||||
|
# Hack to split builds properly
|
||||||
|
mkdir -p $output_dir
|
||||||
|
lndir $out $output_dir
|
||||||
|
buildOutput $plugin_ui $output_dir "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
function fixupUi() {
|
||||||
|
output_dir="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
find $output_dir -lname $out\* -delete
|
||||||
|
find $output_dir -type f | while read -r f; do
|
||||||
|
rpath="$(patchelf --print-rpath $f 2>/dev/null)" || continue
|
||||||
|
new_rpath=""
|
||||||
|
IFS=':' read -ra old_rpath <<< "$rpath"
|
||||||
|
for p in "''${old_rpath[@]}"; do
|
||||||
|
new_rpath="$new_rpath:$p"
|
||||||
|
if [[ $p = $output_dir* ]]; then
|
||||||
|
new_rpath="$new_rpath:$out/''${p#$output_dir}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
patchelf --set-rpath "$new_rpath" $f
|
||||||
|
patchelf --shrink-rpath $f
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
buildOutput COMMON $out avidemux_core
|
||||||
|
buildOutput SETTINGS $out
|
||||||
|
buildUi CLI $cli avidemux/cli
|
||||||
|
buildUi GTK $gtk avidemux/gtk
|
||||||
|
buildUi QT4 $qt4 avidemux/qt4
|
||||||
|
|
||||||
|
fixupPhase
|
||||||
|
|
||||||
|
fixupUi $cli
|
||||||
|
fixupUi $gtk
|
||||||
|
fixupUi $qt4
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://fixounet.free.fr/avidemux/;
|
homepage = http://fixounet.free.fr/avidemux/;
|
||||||
description = "Free video editor designed for simple video editing tasks";
|
description = "Free video editor designed for simple video editing tasks";
|
||||||
maintainers = with stdenv.lib.maintainers; [viric];
|
maintainers = with stdenv.lib.maintainers; [ viric abbradar ];
|
||||||
platforms = with stdenv.lib.platforms; linux;
|
platforms = with stdenv.lib.platforms; linux;
|
||||||
|
license = stdenv.lib.licenses.gpl2;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
12
pkgs/applications/video/avidemux/dynamic_install_dir.patch
Normal file
12
pkgs/applications/video/avidemux/dynamic_install_dir.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -ru3 avidemux_2.6.12.old/avidemux_core/ADM_core/src/ADM_fileio.cpp avidemux_2.6.12/avidemux_core/ADM_core/src/ADM_fileio.cpp
|
||||||
|
--- avidemux_2.6.12.old/avidemux_core/ADM_core/src/ADM_fileio.cpp 2016-03-25 15:26:00.368213627 +0300
|
||||||
|
+++ avidemux_2.6.12/avidemux_core/ADM_core/src/ADM_fileio.cpp 2016-03-26 02:32:56.163550537 +0300
|
||||||
|
@@ -393,7 +393,7 @@
|
||||||
|
|
||||||
|
return ADM_getRelativePath(buffer, base1, base2, base3);
|
||||||
|
#else
|
||||||
|
- return ADM_getRelativePath(ADM_INSTALL_DIR, base1, base2, base3);
|
||||||
|
+ return ADM_getRelativePath(getenv("ADM_ROOT_DIR"), base1, base2, base3);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
29
pkgs/applications/video/avidemux/wrapper.nix
Normal file
29
pkgs/applications/video/avidemux/wrapper.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ buildEnv, avidemux, makeWrapper
|
||||||
|
# GTK version is broken upstream, see https://bugzilla.redhat.com/show_bug.cgi?id=1244340
|
||||||
|
, withUi ? "qt4"
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
ui = builtins.getAttr withUi avidemux;
|
||||||
|
|
||||||
|
in buildEnv {
|
||||||
|
name = "avidemux-${withUi}-" + avidemux.version;
|
||||||
|
|
||||||
|
paths = [ avidemux ui ];
|
||||||
|
|
||||||
|
buildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
# TODO: This could be avoided if buildEnv could be forced to create all directories
|
||||||
|
if [ -L $out/bin ]; then
|
||||||
|
rm $out/bin
|
||||||
|
mkdir $out/bin
|
||||||
|
for i in ${ui}/bin/*; do
|
||||||
|
ln -s $i $out/bin
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
for i in $out/bin/*; do
|
||||||
|
wrapProgram $i --set ADM_ROOT_DIR $out
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
}
|
@ -11526,7 +11526,11 @@ in
|
|||||||
|
|
||||||
autopanosiftc = callPackage ../applications/graphics/autopanosiftc { };
|
autopanosiftc = callPackage ../applications/graphics/autopanosiftc { };
|
||||||
|
|
||||||
avidemux = callPackage ../applications/video/avidemux { };
|
avidemux_unwrapped = callPackage ../applications/video/avidemux { };
|
||||||
|
|
||||||
|
avidemux = callPackage ../applications/video/avidemux/wrapper.nix {
|
||||||
|
avidemux = avidemux_unwrapped;
|
||||||
|
};
|
||||||
|
|
||||||
avogadro = callPackage ../applications/science/chemistry/avogadro {
|
avogadro = callPackage ../applications/science/chemistry/avogadro {
|
||||||
eigen = eigen2;
|
eigen = eigen2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user