Skip to content

Commit

Permalink
Add Linux-specific build script that fixes up rpath, disable Dirac co…
Browse files Browse the repository at this point in the history
…dec because of linking issues on Linux.
  • Loading branch information
adamjs committed Jul 4, 2021
1 parent 7a9470b commit 16c8d9e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
26 changes: 26 additions & 0 deletions make-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

BUILD_DIR=build
INSTALL_DIR=build/out
CUR_DIR=$(pwd)

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

mkdir -p $INSTALL_DIR
INSTALL_PATH=$(cd $INSTALL_DIR; pwd)
INSTALL_LIB_PATH=$INSTALL_PATH/lib/x86_64-linux-gnu
cd $CUR_DIR

meson --prefix=$INSTALL_PATH --default-library=static -Ddebug=false -Doptimization=s -Dintrospection=disabled -Dglib:default_library=shared -Dglib:tests=false -Dgst-plugins-good:cairo=disabled -Dgst-plugins-good:soup=disabled -Dgst-plugins-good:tests=disabled -Dgst-plugins-good:dv=disabled -Dgst-plugins-bad:openh264=disabled -Dgst-plugins-bad:openjpeg=disabled -Dgst-plugins-bad:tests=disabled -Dgst-plugins-base:pango=disabled -DFFmpeg:libfreetype=disabled -Dcairo:freetype=disabled -Dlibsoup:tests=false -Dugly=disabled -Dpython=disabled -Ddevtools=disabled -Dgst-examples=disabled -Dtls=disabled -Dqt5=disabled -Dtests=disabled -Dexamples=disabled -Dc_args="-DG_INTL_STATIC_COMPILATION -DFFI_STATIC_BUILD -DORC_STATIC_COMPILATION -DPSL_STATIC -DLIBXML_STATIC -DOPJ_STATIC -DPCRE_STATIC -fPIC" -Dcpp_args="-DG_INTL_STATIC_COMPILATION -DFFI_STATIC_BUILD -DORC_STATIC_COMPILATION -DPSL_STATIC -DLIBXML_STATIC -DOPJ_STATIC -DPCRE_STATIC -fPIC" -Dasm_args="-fPIC" -Dgst-full-version-script="" $BUILD_DIR
cd $BUILD_DIR
ninja
ninja install
cd $INSTALL_LIB_PATH
patchelf --set-rpath '$ORIGIN' libgio-2.0.so
patchelf --set-rpath '$ORIGIN' libglib-2.0.so
patchelf --set-rpath '$ORIGIN' libgmodule-2.0.so
patchelf --set-rpath '$ORIGIN' libgobject-2.0.so
patchelf --set-rpath '$ORIGIN' libgstreamer-full-1.0.so
patchelf --set-rpath '$ORIGIN' libgthread-2.0.so
cd $CUR_DIR
2 changes: 1 addition & 1 deletion subprojects/FFmpeg/libavcodec/allcodecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ extern AVCodec ff_cscd_decoder;
extern AVCodec ff_cyuv_decoder;
extern AVCodec ff_dds_decoder;
extern AVCodec ff_dfa_decoder;
extern AVCodec ff_dirac_decoder;
//extern AVCodec ff_dirac_decoder;
extern AVCodec ff_dnxhd_encoder;
extern AVCodec ff_dnxhd_decoder;
extern AVCodec ff_dpx_encoder;
Expand Down
2 changes: 1 addition & 1 deletion subprojects/FFmpeg/libavcodec/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ libavcodec_optional_sources = {
'dds_decoder' : files('dds.c'),
'derf_dpcm_decoder' : files('dpcm.c'),
'dfa_decoder' : files('dfa.c'),
'dirac_decoder' : files('diracdec.c','dirac.c','diracdsp.c','diractab.c','dirac_arith.c','dirac_dwt.c','dirac_vlc.c'),
# 'dirac_decoder' : files('diracdec.c','dirac.c','diracdsp.c','diractab.c','dirac_arith.c','dirac_dwt.c','dirac_vlc.c'),
'dirac_parser' : files('dirac_parser.c'),
'dnxhd_decoder' : files('dnxhddec.c','dnxhddata.c'),
'dnxhd_demuxer' : files('dnxhddata.c'),
Expand Down
2 changes: 1 addition & 1 deletion subprojects/FFmpeg/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ hwaccel_library_list = hwaccel_library_nonfree_list + [

subsystem_list = [
'dct',
'dwt',
# 'dwt',
'error_resilience',
'faan',
'fast_unaligned',
Expand Down

0 comments on commit 16c8d9e

Please sign in to comment.