Skip to content

Commit

Permalink
Updated MediaInfo library to version 21.03.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesage committed Apr 1, 2021
1 parent c1a78e8 commit cdecb35
Showing 1 changed file with 57 additions and 1 deletion.
58 changes: 57 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ ARG DOCKER_IMAGE_VERSION=unknown
ARG FILEBOT_VERSION=4.9.3
ARG OPENJFX_VERSION=8.151.12-r0
ARG CHROMAPRINT_VERSION=1.4.3
ARG MEDIAINFOLIB_VERSION=21.03

# Define software download URLs.
ARG FILEBOT_URL=https://get.filebot.net/filebot/FileBot_${FILEBOT_VERSION}/FileBot_${FILEBOT_VERSION}-portable-jdk8.tar.xz
ARG OPENJFX_URL=https://github.com/sgerrand/alpine-pkg-java-openjfx/releases/download/${OPENJFX_VERSION}/java-openjfx-${OPENJFX_VERSION}.apk
ARG CHROMAPRINT_URL=https://github.com/acoustid/chromaprint/archive/v${CHROMAPRINT_VERSION}.tar.gz
ARG MEDIAINFOLIB_URL=https://mediaarea.net/download/source/libmediainfo/${MEDIAINFOLIB_VERSION}/libmediainfo_${MEDIAINFOLIB_VERSION}.tar.xz

# Define working directory.
WORKDIR /tmp
Expand All @@ -36,6 +38,57 @@ RUN \
del-pkg build-dependencies && \
rm -rf /tmp/* /tmp/.[!.]*

# Compile and install MediaInfo library.
RUN \
# Install packages needed by the build.
add-pkg --virtual build-dependencies \
build-base \
curl \
cmake \
automake \
autoconf \
libtool \
curl-dev \
libzen-dev \
tinyxml2-dev \
&& \
# Set same default compilation flags as abuild.
export CFLAGS="-Os -fomit-frame-pointer" && \
export CXXFLAGS="$CFLAGS" && \
export CPPFLAGS="$CFLAGS" && \
export LDFLAGS="-Wl,--as-needed" && \
# Download MediaInfoLib.
echo "Downloading MediaInfoLib package..." && \
mkdir MediaInfoLib && \
curl -# -L ${MEDIAINFOLIB_URL} | tar xJ --strip 1 -C MediaInfoLib && \
rm -r \
MediaInfoLib/Project/MS* \
MediaInfoLib/Project/zlib \
MediaInfoLib/Source/ThirdParty/tinyxml2 \
&& \
# Compile MediaInfoLib.
echo "Compiling MediaInfoLib..." && \
cd MediaInfoLib/Project/CMake && \
cmake -DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=OFF \
-DBUILD_SHARED_LIBS=ON \
&& \
make -j$(nproc) install && \
cd ../../../ && \
# Strip.
strip -v /usr/lib/libmediainfo.so && \
cd ../ && \
# Cleanup.
rm -r \
/usr/include/MediaInfo \
/usr/include/MediaInfoDLL \
/usr/lib/cmake/mediainfolib \
/usr/lib/pkgconfig/libmediainfo.pc \
&& \
del-pkg build-dependencies && \
rm -rf /tmp/* /tmp/.[!.]*

# Install dependencies.
RUN \
add-pkg --virtual build-dependencies curl && \
Expand All @@ -54,7 +107,10 @@ RUN \
dconf \
openjdk8-jre \
java-jna \
libmediainfo \
# For libmediainfo.
libzen \
libcurl \
tinyxml2 \
&& \
# YAD
add-pkg yad && \
Expand Down

0 comments on commit cdecb35

Please sign in to comment.