From 9809e11dcc6e116dc7233aaa957545c4a0f887e8 Mon Sep 17 00:00:00 2001 From: Arkadiusz Adamski Date: Fri, 19 Nov 2021 16:22:15 +0100 Subject: [PATCH] Fix include (#10) --- Sources/CMozJpeg/includes/cdjpeg.h | 4 ++++ install-linux-dependencies.sh | 25 ++++++++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Sources/CMozJpeg/includes/cdjpeg.h b/Sources/CMozJpeg/includes/cdjpeg.h index cb63061..5a57de8 100644 --- a/Sources/CMozJpeg/includes/cdjpeg.h +++ b/Sources/CMozJpeg/includes/cdjpeg.h @@ -15,6 +15,8 @@ #define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ #define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ +#ifndef cdjpeg_h +#define cdjpeg_h #include "jinclude.h" #include "jpeglib.h" #include "jerror.h" /* get library error codes too */ @@ -162,3 +164,5 @@ EXTERN(FILE *) write_stdout (void); #ifndef EXIT_WARNING #define EXIT_WARNING 2 #endif + +#endif /* cdjpeg_h */ diff --git a/install-linux-dependencies.sh b/install-linux-dependencies.sh index 6a4ac80..289d4c6 100755 --- a/install-linux-dependencies.sh +++ b/install-linux-dependencies.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -ex MOZJPEG_VER=3.3.1 @@ -6,19 +7,17 @@ mkdir -p /app && cd /app mkdir -p /build/lib && mkdir -p /build/bin -ADD . . - -apt-get update -apt-get install -y wget libssl-dev autoconf automake libtool pkg-config nasm make +apt-get update +apt-get install -y wget libssl-dev autoconf automake libtool pkg-config nasm make # build and install mozjpeg -wget https://github.com/mozilla/mozjpeg/archive/v$MOZJPEG_VER.tar.gz -tar -xvf v$MOZJPEG_VER.tar.gz -cd mozjpeg-$MOZJPEG_VER -autoreconf -fiv -mkdir build -cd build -sh ../configure && make install -rm /app/v$MOZJPEG_VER.tar.gz -echo "/opt/mozjpeg/lib64/" >> /etc/ld.so.conf.d/mozjpeg.conf +wget https://github.com/mozilla/mozjpeg/archive/v$MOZJPEG_VER.tar.gz +tar -xvf v$MOZJPEG_VER.tar.gz +cd mozjpeg-$MOZJPEG_VER +autoreconf -fiv +mkdir build +cd build +sh ../configure && make install +rm /app/v$MOZJPEG_VER.tar.gz +echo "/opt/mozjpeg/lib64/" >> /etc/ld.so.conf.d/mozjpeg.conf ldconfig