diff --git a/build.profile b/build.profile index 8b1f607..8fdf719 100644 --- a/build.profile +++ b/build.profile @@ -1,4 +1,4 @@ -BUILD_TAG=2135-debug +BUILD_TAG=2.13.5 BUILD_paperless=paperless-ngx-2.13.5 @@ -58,8 +58,8 @@ BUILD_libtiff=tiff-4.7.0 BUILD_libtiff_SRCURL="https://beehive.molgen.mpg.de/3a0fa4a270a4a192b08913f88d0cfbdd/${BUILD_libtiff}.tar.gz" # SRCURL="https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.1.0/libjpeg-turbo-3.1.0.tar.gz" -BUILD_libjpegturbo=libjpeg-turbo-3.1.0 -BUILD_libjpegturbo_SRCURL="https://beehive.molgen.mpg.de/ed3fb4bb4cf794898f11a6d30c54b479/${BUILD_libjpegturbo}.tar.gz" +BUILD_libjpegturbo=libjpegturbo-3.1.0 +BUILD_libjpegturbo_SRCURL="https://beehive.molgen.mpg.de/ed3fb4bb4cf794898f11a6d30c54b479/libjpeg-turbo-3.1.0.tar.gz" # gits BUILD_imagemagick=imagemagick-7.1.1-41 diff --git a/buildall.sh b/buildall.sh index 3a37449..eaec57a 100755 --- a/buildall.sh +++ b/buildall.sh @@ -70,7 +70,7 @@ popd [ -d "${BUILD_DIR}/${BUILD_redis}" ] || ./redis.build.sh [ -d "${BUILD_DIR}/${BUILD_python}" ] || ./Python.build.sh [ -d "${BUILD_DIR}/${BUILD_node}" ] || ./node.build.sh -[ -d "${BUILD_DIR}/${BUILD_libjpegturbo}" ] || ./libjpeg-turbo.build.sh +[ -d "${BUILD_DIR}/${BUILD_libjpegturbo}" ] || ./libjpegturbo.build.sh [ -d "${BUILD_DIR}/${BUILD_ffmpeg}" ] || ./ffmpeg.build.sh [ -d "${BUILD_DIR}/${BUILD_libtiff}" ] || ./libtiff.build.sh [ -d "${BUILD_DIR}/${BUILD_imagemagick}" ] || ./imagemagick.build.sh diff --git a/leptonica.build.sh b/leptonica.build.sh index 0f191c9..3823aad 100755 --- a/leptonica.build.sh +++ b/leptonica.build.sh @@ -49,6 +49,9 @@ export PKG_CONFIG_PATH local _conf=( --prefix ${PREFIX} + --without-libopenjpeg + --disable-shared + --with-pic ) ./configure "${_conf[@]}" diff --git a/libjpegturbo.build.sh b/libjpegturbo.build.sh new file mode 100755 index 0000000..219d2a4 --- /dev/null +++ b/libjpegturbo.build.sh @@ -0,0 +1,56 @@ +#!/bin/bash +{ +set -x +set -e +set -u + +. build.profile + +function B_LIBJPEGTURBO { + +SRCURL="${BUILD_libjpegturbo_SRCURL}" + +BUILD_PKG=${BUILD_libjpegturbo} + +PREFIX="${PREFIX}/${BUILD_PKG}" + +mkdir -p "${PREFIX}" + +cat >"${PREFIX}"/profile <<-EOF +PATH=${PREFIX}/bin:\$PATH +PKG_CONFIG_PATH=${PROJECT}/${BUILD_PKG}/lib/pkgconfig\${PKG_CONFIG_PATH:+:}\${PKG_CONFIG_PATH:-} +LD_LIBRARY_PATH=${PROJECT}/${BUILD_PKG}/lib\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH:-} +EOF + + +test -e "${BUILD_PKG}".tar.gz || wget -nv "${SRCURL}" -O "${BUILD_PKG}".tar.gz +test -d "${BUILD_PKG}" || mkdir -pv "${BUILD_PKG}" && tar -xf "${BUILD_PKG}".tar.gz --strip-components=1 -C "${BUILD_PKG}" + +pushd "${BUILD_PKG}" + +local _conf=( + -DCMAKE_INSTALL_PREFIX=${PREFIX} + -DCMAKE_INSTALL_LIBDIR=lib + -DCMAKE_COLOR_MAKEFILE=OFF + -DCMAKE_VERBOSE_MAKEFILE=ON +) + +rm -rf b +mkdir b +pushd b +# PKG_CONFIG_PATH=${PKG_CONFIG_PATH} cmake .. "${_conf[@]}" +cmake .. "${_conf[@]}" +make -j "${NPROC}" install +popd + +popd + +} + +pushd "${BUILD_DIR}" + +B_LIBJPEGTURBO + +popd + +} diff --git a/profile.build.sh b/profile.build.sh index 4f841b7..f307902 100755 --- a/profile.build.sh +++ b/profile.build.sh @@ -27,6 +27,7 @@ PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin . ${PROJECT}/${BUILD_tesseract}/profile . ${PROJECT}/${BUILD_leptonica}/profile . ${PROJECT}/${BUILD_libtiff}/profile +. ${PROJECT}/${BUILD_libjpegturbo}/profile XDG_CACHE_HOME=${XDG_CACHE_HOME} TMPDIR=${TMPDIR} diff --git a/rebuild.sh b/rebuild.sh index 934a752..99d93aa 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -6,11 +6,9 @@ set -u set -e for arg; do -PKG=$arg +PKG=${arg/\.build\.sh/} eval BT=\$BUILD_$PKG echo "# $BT" [ -d "${BUILD_DIR}/${BT}" ] && echo "rm -rf '${BUILD_DIR}/${BT}'" [ -d "${PREFIX}/${BT}" ] && echo "rm -rf '${PREFIX}/${BT}'" done - - diff --git a/tesseract.build.sh b/tesseract.build.sh index 94cce8f..d24fa18 100755 --- a/tesseract.build.sh +++ b/tesseract.build.sh @@ -8,6 +8,7 @@ set -u . ${PREFIX}/${BUILD_sqlite}/profile . ${PREFIX}/${BUILD_python}/profile +. ${PREFIX}/${BUILD_libjpegturbo}/profile . ${PREFIX}/${BUILD_libtiff}/profile . ${PREFIX}/${BUILD_leptonica}/profile