Skip to content

Commit

Permalink
fix: support for TIFF with CMYK and alpha channel (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
subotic authored Jan 31, 2024
1 parent 93308c2 commit c0cc033
Show file tree
Hide file tree
Showing 50 changed files with 212 additions and 309 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# License along with Sipi. If not, see <http://www.gnu.org/licenses/>.
#

cmake_minimum_required(VERSION 3.24)
cmake_minimum_required(VERSION 3.27)
cmake_policy(VERSION 3.18)
if(POLICY CMP0135) # DOWNLOAD_EXTRACT_TIMESTAMP
cmake_policy(SET CMP0135 OLD)
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.sipi-dev-env
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ RUN apt-get update \
ARG UID=1000
RUN useradd -m -u ${UID} -s /bin/bash builder
USER builder
EXPOSE 1024
7 changes: 1 addition & 6 deletions ext/bzip2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.14.5)
project(bzip2_builder C CXX)
include(ExternalProject)

Expand All @@ -7,11 +6,7 @@ include(ExternalProject)
# since we also need this as a shared library, we need to compile with PIC - Position Independent Code
# which may generate less efficient code
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)

ExternalProject_Add(project_bzip2
INSTALL_DIR ${COMMON_LOCAL}
Expand Down
7 changes: 1 addition & 6 deletions ext/curl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.14.5)
project(curl_builder C CXX)
include(ExternalProject)

Expand Down Expand Up @@ -29,11 +28,7 @@ include(ExternalProject)
#
# get libcurl
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)

ExternalProject_Add(project_curl
DEPENDS ssl
Expand Down
1 change: 0 additions & 1 deletion ext/exiv2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.14.5)
project(exiv2_builder C CXX)
include(ExternalProject)

Expand Down
8 changes: 1 addition & 7 deletions ext/expat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
cmake_minimum_required(VERSION 3.14.5)
project(expat_builder C CXX)
include(ExternalProject)

if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()

set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)

ExternalProject_Add(project_expat
INSTALL_DIR ${COMMON_LOCAL}
Expand Down
8 changes: 2 additions & 6 deletions ext/fmt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
cmake_minimum_required(VERSION 3.14.5)
project(libfmt_builder C CXX)
include(ExternalProject)

#
# get fmt
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(
project_fmt
Expand Down
8 changes: 2 additions & 6 deletions ext/gettext/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
cmake_minimum_required(VERSION 3.14.5)
project(gettext_builder C CXX)
include(ExternalProject)

#
# get gettext
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(
project_gettext
Expand Down
8 changes: 2 additions & 6 deletions ext/jansson/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.14.5)
project(libjansson_builder C CXX)
include(ExternalProject)

Expand All @@ -7,11 +6,8 @@ set(JANSSON_INSTALL_LIB_DIR "lib/${BITS}")
#
# get jansson
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(
project_jansson
Expand Down
8 changes: 2 additions & 6 deletions ext/jbigkit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
cmake_minimum_required(VERSION 3.14.5)
project(jbigkit_builder C CXX)
include(ExternalProject)

#
# get JBIG
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)



ExternalProject_Add(
Expand Down
8 changes: 2 additions & 6 deletions ext/jpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
cmake_minimum_required(VERSION 3.14.5)
project(jpeg_builder C CXX)
include(ExternalProject)

#
# get libjpeg 1.4.1
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)



ExternalProject_Add(project_jpeg
Expand Down
8 changes: 2 additions & 6 deletions ext/kakadu/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.14.5)
project(kakadu_builder C CXX)
include(ExternalProject)

Expand All @@ -10,11 +9,8 @@ message(STATUS ${CONFIGURE_LIBDIR})
message(STATUS "VENDOR=${COMMON_VENDOR}")
message(STATUS "KDU_MAKE=${KDU_MAKE}")

if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(
project_kakadu
Expand Down
8 changes: 2 additions & 6 deletions ext/lcms2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
cmake_minimum_required(VERSION 3.14.5)
project(lcms2_builder C CXX)
include(ExternalProject)

#
# get lcms2
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(project_lcms2
INSTALL_DIR ${COMMON_LOCAL}
Expand Down
8 changes: 2 additions & 6 deletions ext/lua/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
cmake_minimum_required(VERSION 3.14.5)
project(liblua_builder C CXX)
include(ExternalProject)


#
# get lua
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)



ExternalProject_Add(project_lua
Expand Down
8 changes: 2 additions & 6 deletions ext/luarocks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
cmake_minimum_required(VERSION 3.14.5)
project(libluarocks_builder C CXX)
include(ExternalProject)

#
# get luarocks
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(project_luarocks
DEPENDS lua
Expand Down
1 change: 0 additions & 1 deletion ext/openjpeg200/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.14.5)
project(liboj2_builder C CXX)
include(ExternalProject)

Expand Down
7 changes: 1 addition & 6 deletions ext/openssl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.16)
project(ssl_builder C CXX)
include(ExternalProject)

Expand All @@ -12,11 +11,7 @@ else()
set(CONF_ARCHOPT "")
endif()

if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(project_ssl
Expand Down
16 changes: 7 additions & 9 deletions ext/png/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
cmake_minimum_required(VERSION 3.14.5)
project(libpng_builder C CXX)
include(ExternalProject)

#
# get png
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)

set(LibPngVersion "1.6.41")

ExternalProject_Add(project_png
DEPENDS zlib
DEPENDS xz
INSTALL_DIR ${COMMON_LOCAL}
URL https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/libpng-1.6.37.tar.gz/download
URL https://sourceforge.net/projects/libpng/files/libpng16/${LibPngVersion}/libpng-${LibPngVersion}.tar.gz/download
${timestamp_policy}
DOWNLOAD_DIR ${COMMON_SRCS}/downloads
SOURCE_DIR ${COMMON_SRCS}/libpng-1.6.37
SOURCE_DIR ${COMMON_SRCS}/libpng-${LibPngVersion}
CMAKE_ARGS ${SHARED_OPTION}
-DCMAKE_PREFIX_PATH=${COMMON_LOCAL}
-DCMAKE_INSTALL_PREFIX=${COMMON_LOCAL}
-DCMAKE_INSTALL_LIBDIR=${CONFIGURE_LIBDIR}
-DPNG_ARM_NEON:BOOL=on
-DPNG_TESTS:BOOL=OFF
-DPNG_BUILD_ZLIB:BOOL=ON
-DPNG_BUILD_ZLIB:BOOL=OFF
-DZLIB_ROOT:BOOL=ON
-DZLIB_INCLUDE_DIR=${CONFIGURE_INCDIR}
-DZLIB_LIBRARY=${CONFIGURE_LIBDIR}/libz${CMAKE_STATIC_LIBRARY_SUFFIX}
)
Expand Down
7 changes: 1 addition & 6 deletions ext/shttp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
cmake_minimum_required(VERSION 3.14.5)
project(libshttps_builder C CXX)
include(ExternalProject)

#
# httplib
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(project_shttps
Expand Down
7 changes: 1 addition & 6 deletions ext/sqlite3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
cmake_minimum_required(VERSION 3.14.5)
project(sqlite_builder C CXX)
include(ExternalProject)

#https://www.sqlite.org/2020/sqlite-autoconf-3310000.tar.gz
# get sqlite3
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(project_sqlite3
Expand Down
7 changes: 1 addition & 6 deletions ext/tiff/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.14.5)
project(tiff_builder C CXX)
include(ExternalProject)

Expand All @@ -14,11 +13,7 @@ else()
set(CMAKE_CREATE_SHARED "-DBUILD_SHARED_LIBS=OFF")
endif()

if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)

set(LibTiffVersion "4.1.0")

Expand Down
7 changes: 1 addition & 6 deletions ext/webp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.1.0.tar.gz
cmake_minimum_required(VERSION 3.14.5)
project(libwebp_builder C CXX)
include(ExternalProject)

#
# libwebp
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(project_webp
Expand Down
7 changes: 1 addition & 6 deletions ext/xz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
cmake_minimum_required(VERSION 3.14.5)
project(libxz_builder C CXX)
include(ExternalProject)

#
# libxyz
#
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.24.0)
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)
else()
unset(timestamp_policy)
endif()
set(timestamp_policy DOWNLOAD_EXTRACT_TIMESTAMP OLD)


ExternalProject_Add(project_xz
Expand Down
Loading

0 comments on commit c0cc033

Please sign in to comment.