Support newest libjpeg-turbo on Oracle

This commit is contained in:
Dmitry Maksyoma 2023-01-24 21:29:05 +13:00
parent 8cd57a612d
commit c34724f421
3 changed files with 16 additions and 3 deletions

View File

@ -14,7 +14,6 @@ RUN dnf install -y \
gcc-c++ \
git \
gnutls-devel \
libjpeg-turbo-devel \
libpng-devel \
libtiff-devel \
make \
@ -53,6 +52,10 @@ RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/

View File

@ -4,7 +4,7 @@ set -euo pipefail
build_and_install() {
export MAKEFLAGS=-j`nproc`
export CFLAGS="-fpic -flto"
export CFLAGS="-fpic"
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G"Unix Makefiles"
make
make install
@ -17,6 +17,10 @@ install_build_dependencies() {
yum install -y cmake gcc
return
fi
if [ "$DISTRO" = oracle ]; then
dnf install -y cmake gcc
return
fi
apt-get update
apt-get install -y cmake gcc
@ -27,6 +31,10 @@ ensure_libjpeg_is_fast() {
yum install -y nasm
return
fi
if [ "$DISTRO" = oracle ]; then
dnf install -y nasm
return
fi
apt-get update
apt-get install -y nasm

View File

@ -1,8 +1,10 @@
#!/bin/bash
detect_distro() {
if [ -f /etc/centos-release ]; then
DISTRO=centos
elif [ -f /etc/oracle-release ]; then
DISTRO=oracle7
DISTRO=oracle
elif [ -f /usr/bin/zypper ]; then
DISTRO=opensuse
else