Bläddra i källkod

Tiff refactoring and should build on win/android/linux (#38)

* libtiff refactoring to make it build clean for all platforms

Signed-off-by: lawsonamzn <[email protected]>
mrieggeramzn 4 år sedan
förälder
incheckning
e679d39c21

+ 1 - 0
package-system/.gitignore

@@ -18,3 +18,4 @@ mikkelsen-*
 azslc-*
 azslc-*
 zlib-*
 zlib-*
 lz4-*
 lz4-*
+tiff-*

+ 21 - 0
package-system/tiff/COPYRIGHT

@@ -0,0 +1,21 @@
+Copyright (c) 1988-1997 Sam Leffler
+Copyright (c) 1991-1997 Silicon Graphics, Inc.
+
+Permission to use, copy, modify, distribute, and sell this software and 
+its documentation for any purpose is hereby granted without fee, provided
+that (i) the above copyright notices and this permission notice appear in
+all copies of the software and related documentation, and (ii) the names of
+Sam Leffler and Silicon Graphics may not be used in any advertising or
+publicity relating to the software without the specific, prior written
+permission of Sam Leffler and Silicon Graphics.
+
+THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
+EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
+WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
+
+IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
+LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
+OF THIS SOFTWARE.

+ 34 - 0
package-system/tiff/FindTIFF_compat.cmake

@@ -0,0 +1,34 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# this file is provided to give compatibility to non-o3de-projects
+# it defines the same targets as is defined in the default FindTIFF.cmake
+# shipped with CMAKE.
+# Its meant to be deployed into the zlib subfolder of the package
+# and then allows you set the variable TIFF_ROOT on the command line to point at this folder,
+# to force it to use this package instead of system TIFF. 
+
+set(TIFF_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/include)
+set(TIFF_INCLUDE_DIR ${TIFF_INCLUDE_DIRS})
+set(TIFF_LIBRARIES ${CMAKE_CURRENT_LIST_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}tiff${CMAKE_STATIC_LIBRARY_SUFFIX})
+set(TIFF_LIBRARY ${TIFF_LIBRARIES})
+set(TIFF_LIBRARY_RELEASE ${TIFF_LIBRARIES})
+set(TIFF_LIBRARY_DEBUG ${TIFF_LIBRARIES})
+set(TIFF_FOUND True)
+
+set(TIFF_VERSION_STRING "4.2.0.15")
+set(TIFF_VERSION_MAJOR "4")
+set(TIFF_VERSION_MINOR "2")
+set(TIFF_VERSION_PATCH "0")
+set(TIFF_MAJOR_VERSION "4")
+set(TIFF_MINOR_VERSION "2")
+set(TIFF_PATCH_VERSION "0")
+
+add_library(TIFF::TIFF INTERFACE IMPORTED GLOBAL)
+set_target_properties(TIFF::TIFF PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${TIFF_INCLUDE_DIRS}")
+target_link_libraries(TIFF::TIFF INTERFACE ${TIFF_LIBRARIES})

+ 31 - 0
package-system/tiff/Findtiff.cmake

@@ -0,0 +1,31 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# this file actually ingests the library and defines targets.
+set(TARGET_WITH_NAMESPACE "3rdParty::tiff")
+if (TARGET ${TARGET_WITH_NAMESPACE})
+    return()
+endif()
+
+set(TIFF_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/tiff/include)
+set(TIFF_LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/tiff/lib)
+set(TIFF_CXX_FOUND 0)
+
+set(TIFF_LIBRARY_RELEASE ${TIFF_LIBS_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}tiff${CMAKE_STATIC_LIBRARY_SUFFIX})
+set(TIFF_LIBRARY_DEBUG ${TIFF_LIBRARY_RELEASE})
+
+# we set it to a generator expression for multi-config situations:
+set(TIFF_LIBRARY                  "$<$<CONFIG:profile>:${TIFF_LIBRARY_RELEASE}>")
+set(TIFF_LIBRARY ${TIFF_LIBRARY} "$<$<CONFIG:Release>:${TIFF_LIBRARY_RELEASE}>")
+set(TIFF_LIBRARY ${TIFF_LIBRARY} "$<$<CONFIG:Debug>:${TIFF_LIBRARY_DEBUG}>")
+
+add_library(${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+ly_target_include_system_directories(TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${TIFF_INCLUDE_DIR})
+target_link_libraries(${TARGET_WITH_NAMESPACE} INTERFACE ${TIFF_LIBRARY})
+
+set(TIFF_FOUND True)

+ 6 - 0
package-system/tiff/PackageInfo.json

@@ -0,0 +1,6 @@
+{
+    "PackageName" : "tiff-4.2.0.15",
+    "URL"         : "http://www.simplesystems.org/libtiff/misc.html",
+    "License"     : "libtiff",
+    "LicenseFile" : "COPYRIGHT"
+}

+ 62 - 0
package-system/tiff/build_config.json

@@ -0,0 +1,62 @@
+{
+    "git_url":"https://gitlab.com/libtiff/libtiff.git",
+    "git_tag":"v4.2.0",
+    "package_name":"tiff",
+    "package_version":"4.2.0.15-rev2",
+    "package_url":"http://www.simplesystems.org/libtiff/misc.html",
+    "package_license":"libtiff",
+    "package_license_file":"COPYRIGHT",
+    "cmake_find_source":"Findtiff.cmake",
+    "cmake_find_target":"Findtiff.cmake",
+    "cmake_build_args" : [ "-j", "8"],
+    "patch_file" : "o3de_patch.patch",
+    "Platforms":{
+        "Windows":{
+            "Windows":{
+                "custom_build_cmd" : [
+                    "build_tiff_windows.cmd"
+                ],
+                "custom_install_cmd": [
+                    "install_tiff_windows.cmd"
+                ]
+            },
+            "Android":{
+                "custom_build_cmd" : [
+                    "build_tiff_android.cmd"
+                ],
+                "custom_install_cmd": [
+                    "install_tiff_android.cmd"
+                ]
+            }
+        },
+        
+        "Darwin":{
+            "Mac":{
+                "custom_build_cmd": [
+                    "./build_tiff_mac.sh"
+                 ],
+                 "custom_install_cmd": [
+                    "./install_tiff_mac.sh"
+                 ]
+            },
+            "iOS":{
+                "custom_build_cmd": [
+                    "./build_tiff_ios.sh"
+                 ],
+                 "custom_install_cmd": [
+                    "./install_tiff_ios.sh"
+                 ]
+             }
+        },
+        "Linux":{
+            "Linux":{
+                "custom_build_cmd": [
+                    "./build_tiff_linux.sh"
+                ],
+                "custom_install_cmd": [
+                    "./install_tiff_linux.sh"
+                ]
+            }
+        }
+    }
+}

+ 18 - 0
package-system/tiff/build_tiff_android.cmd

@@ -0,0 +1,18 @@
+@rem #
+@rem # Copyright (c) Contributors to the Open 3D Engine Project.
+@rem # For complete copyright and license terms please see the LICENSE at the root of this distribution.
+@rem # 
+@rem # SPDX-License-Identifier: Apache-2.0 OR MIT
+@rem #
+
+@IF "%LY_ANDROID_NDK_ROOT%" == "" (
+    @echo Need to set the varible LY_ANDROID_NDK_ROOT to the location of your NDK install!
+    @exit /b 1
+)
+
+cmake -S temp/src -B temp/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_STANDARD=17 -DCMAKE_TOOLCHAIN_FILE=%LY_ANDROID_NDK_ROOT%\\build\\cmake\\android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DBUILD_SHARED_LIBS=OFF -Djpeg=OFF -Dold-jpeg=OFF -Dpixarlog=OFF -Dzlib=ON -DZLIB_ROOT=../zlib-android/zlib -DCMAKE_POLICY_DEFAULT_CMP0074=NEW
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+cmake --build temp/build --target tiff -j 8
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+
+exit /b 0

+ 31 - 0
package-system/tiff/build_tiff_ios.sh

@@ -0,0 +1,31 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+cmake -S temp/src -B temp/build -G Xcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 \
+                                         -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 \
+                                         -DCMAKE_POLICY_DEFAULT_CMP0074=NEW \
+                                         -DCMAKE_C_FLAGS="-fPIC" \
+                                         -DBUILD_SHARED_LIBS=OFF \
+                                         -Djpeg=OFF -Dold-jpeg=OFF -Dpixarlog=OFF \
+                                         -Dzlib=ON -DZLIB_ROOT=../zlib-ios/zlib \
+                                         -Dlzma=OFF \
+                                         -DCMAKE_MACOSX_BUNDLE=OFF \
+                                         -Dwebp=OFF \
+                                         -Djbig=OFF \
+                                         -Dzstd=OFF \
+                                         -Djpeg12=OFF
+if [ $? -ne 0 ]; then
+    echo "Error generating build"
+    exit 1
+fi
+
+cmake --build temp/build --target tiff --config Release -j 8
+if [ $? -ne 0 ]; then
+    echo "Error building"
+    exit 1
+fi

+ 30 - 0
package-system/tiff/build_tiff_linux.sh

@@ -0,0 +1,30 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+cmake -S temp/src -B temp/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 \
+                                -DCMAKE_POLICY_DEFAULT_CMP0074=NEW \
+                                -DCMAKE_C_FLAGS="-fPIC" \
+                                -DBUILD_SHARED_LIBS=OFF \
+                                -Djpeg=OFF -Dold-jpeg=OFF -Dpixarlog=OFF \
+                                -Dlzma=OFF \
+                                -Dzlib=ON -DZLIB_ROOT=../zlib-linux/zlib \
+                                -Dwebp=OFF \
+                                -Djbig=OFF \
+                                -Dzstd=OFF \
+                                -Djpeg12=OFF
+                                
+if [ $? -ne 0 ]; then
+    echo "Error generating build"
+    exit 1
+fi
+
+cmake --build temp/build --target tiff -j 8
+if [ $? -ne 0 ]; then
+    echo "Error building"
+    exit 1
+fi

+ 31 - 0
package-system/tiff/build_tiff_mac.sh

@@ -0,0 +1,31 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+cmake -S temp/src -B temp/build -G Xcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 \
+                                         -DCMAKE_POLICY_DEFAULT_CMP0074=NEW \
+                                         -DCMAKE_C_FLAGS="-fPIC" \
+                                         -DBUILD_SHARED_LIBS=OFF \
+                                         -Djpeg=OFF -Dold-jpeg=OFF -Dpixarlog=OFF \
+                                         -Dlzma=OFF \
+                                         -Dzlib=ON -DZLIB_ROOT=../zlib-mac/zlib \
+                                         -Dwebp=OFF \
+                                         -Djbig=OFF \
+                                         -Dzstd=OFF \
+                                         -Djpeg12=OFF
+
+if [ $? -ne 0 ]; then
+    echo "Error generating build"
+    exit 1
+fi
+
+cmake --build temp/build --target tiff --config Release -j 8
+if [ $? -ne 0 ]; then
+    echo "Error building"
+    exit 1
+fi
+

+ 22 - 0
package-system/tiff/build_tiff_windows.cmd

@@ -0,0 +1,22 @@
+@rem #
+@rem # Copyright (c) Contributors to the Open 3D Engine Project.
+@rem # For complete copyright and license terms please see the LICENSE at the root of this distribution.
+@rem # 
+@rem # SPDX-License-Identifier: Apache-2.0 OR MIT
+@rem #
+
+cmake -S temp/src -B temp/build -DCMAKE_CXX_STANDARD=17 ^
+                                -DCMAKE_POLICY_DEFAULT_CMP0074=NEW ^
+                                -DBUILD_SHARED_LIBS=OFF ^
+                                -Djpeg=OFF -Dold-jpeg=OFF -Dpixarlog=OFF ^
+                                -Dlzma=OFF ^
+                                -Dzlib=ON -DZLIB_ROOT=../zlib-windows/zlib ^
+                                -Dwebp=OFF ^
+                                -Djbig=OFF ^
+                                -Dzstd=OFF ^
+                                -Djpeg12=OFF
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+cmake --build temp/build --target tiff --config Release -j 8
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+
+exit /b 0

+ 32 - 0
package-system/tiff/install_tiff_android.cmd

@@ -0,0 +1,32 @@
+@rem #
+@rem # Copyright (c) Contributors to the Open 3D Engine Project.
+@rem # For complete copyright and license terms please see the LICENSE at the root of this distribution.
+@rem # 
+@rem # SPDX-License-Identifier: Apache-2.0 OR MIT
+@rem #
+@rem #
+@setlocal
+
+set OUT_PATH=%TARGET_INSTALL_ROOT%
+set SRC_PATH=temp\src
+set BLD_PATH=temp\build
+
+mkdir %OUT_PATH%\include
+mkdir %OUT_PATH%\lib
+
+copy %BLD_PATH%\libtiff\tiffconf.h %OUT_PATH%\include\tiffconf.h
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy %BLD_PATH%\libtiff\tif_config.h %OUT_PATH%\include\tif_config.h
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy %SRC_PATH%\libtiff\tiffio.h %OUT_PATH%\include\tiffio.h
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy %SRC_PATH%\libtiff\tiffvers.h %OUT_PATH%\include\tiffvers.h
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy %SRC_PATH%\COPYRIGHT %OUT_PATH%\COPYRIGHT
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy %BLD_PATH%\libtiff\libtiff.a %OUT_PATH%\lib\libtiff.a
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy FindTIFF_compat.cmake %OUT_PATH%\FindTIFF.cmake
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+
+exit /b 0

+ 27 - 0
package-system/tiff/install_tiff_ios.sh

@@ -0,0 +1,27 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+OUT_PATH=$TARGET_INSTALL_ROOT
+SRC_PATH=temp/src
+BLD_PATH=temp/build
+
+# these can fail if they are already there and we're working incrementally, this is okay
+# if they fail completely, the below checks will error anyway
+mkdir -p $OUT_PATH
+mkdir -p $OUT_PATH/lib
+mkdir -p $OUT_PATH/include
+
+cp -f $SRC_PATH/COPYRIGHT $OUT_PATH/ || exit 1
+cp $BLD_PATH/libtiff/Release-iphoneos/libtiff.a $OUT_PATH/lib/libtiff.a || exit 1
+cp $BLD_PATH/libtiff/tiffconf.h $OUT_PATH/include/tiffconf.h || exit 1
+cp $SRC_PATH/libtiff/tiff.h $OUT_PATH/include/tiff.h || exit 1
+cp $SRC_PATH/libtiff/tiffvers.h $OUT_PATH/include/tiffvers.h || exit 1
+cp $SRC_PATH/libtiff/tiffio.h $OUT_PATH/include/tiffio.h || exit 1
+cp FindTIFF_compat.cmake $OUT_PATH/FindTIFF.cmake || exit 1
+
+exit 0

+ 27 - 0
package-system/tiff/install_tiff_linux.sh

@@ -0,0 +1,27 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+OUT_PATH=$TARGET_INSTALL_ROOT
+SRC_PATH=temp/src
+BLD_PATH=temp/build
+
+# these can fail if they are already there and we're working incrementally, this is okay
+# if they fail completely, the below checks will error anyway
+mkdir -p $OUT_PATH
+mkdir -p $OUT_PATH/lib
+mkdir -p $OUT_PATH/include
+
+cp -f $SRC_PATH/COPYRIGHT $OUT_PATH/ || exit 1
+cp $BLD_PATH/libtiff/libtiff.a $OUT_PATH/lib/libtiff.a || exit 1
+cp $BLD_PATH/libtiff/tiffconf.h $OUT_PATH/include/tiffconf.h || exit 1
+cp $SRC_PATH/libtiff/tiff.h $OUT_PATH/include/tiff.h || exit 1
+cp $SRC_PATH/libtiff/tiffvers.h $OUT_PATH/include/tiffvers.h || exit 1
+cp $SRC_PATH/libtiff/tiffio.h $OUT_PATH/include/tiffio.h || exit 1
+cp FindTIFF_compat.cmake $OUT_PATH/FindTIFF.cmake || exit 1
+
+exit 0

+ 27 - 0
package-system/tiff/install_tiff_mac.sh

@@ -0,0 +1,27 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+OUT_PATH=$TARGET_INSTALL_ROOT
+SRC_PATH=temp/src
+BLD_PATH=temp/build
+
+# these can fail if they are already there and we're working incrementally, this is okay
+# if they fail completely, the below checks will error anyway
+mkdir -p $OUT_PATH
+mkdir -p $OUT_PATH/lib
+mkdir -p $OUT_PATH/include
+
+cp -f $SRC_PATH/COPYRIGHT $OUT_PATH/ || exit 1
+cp $BLD_PATH/libtiff/Release/libtiff.a $OUT_PATH/lib/libtiff.a || exit 1
+cp $BLD_PATH/libtiff/tiffconf.h $OUT_PATH/include/tiffconf.h || exit 1
+cp $SRC_PATH/libtiff/tiff.h $OUT_PATH/include/tiff.h || exit 1
+cp $SRC_PATH/libtiff/tiffvers.h $OUT_PATH/include/tiffvers.h || exit 1
+cp $SRC_PATH/libtiff/tiffio.h $OUT_PATH/include/tiffio.h || exit 1
+cp FindTIFF_compat.cmake $OUT_PATH/FindTIFF.cmake || exit 1
+
+exit 0

+ 32 - 0
package-system/tiff/install_tiff_windows.cmd

@@ -0,0 +1,32 @@
+@rem #
+@rem # Copyright (c) Contributors to the Open 3D Engine Project.
+@rem # For complete copyright and license terms please see the LICENSE at the root of this distribution.
+@rem # 
+@rem # SPDX-License-Identifier: Apache-2.0 OR MIT
+@rem #
+@rem #
+@setlocal
+
+set OUT_PATH=%TARGET_INSTALL_ROOT%
+set SRC_PATH=temp\src
+set BLD_PATH=temp\build
+
+mkdir %OUT_PATH%\include
+mkdir %OUT_PATH%\lib
+
+copy %BLD_PATH%\libtiff\tiffconf.h %OUT_PATH%\include\tiffconf.h
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy %SRC_PATH%\libtiff\tiff.h %OUT_PATH%\include\tiff.h
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy %SRC_PATH%\libtiff\tiffvers.h %OUT_PATH%\include\tiffvers.h
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy %SRC_PATH%\libtiff\tiffio.h %OUT_PATH%\include\tiffio.h
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy %SRC_PATH%\COPYRIGHT %OUT_PATH%\COPYRIGHT
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy %BLD_PATH%\libtiff\Release\tiff.lib %OUT_PATH%\lib\tiff.lib
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+copy FindTIFF_compat.cmake %OUT_PATH%\FindTIFF.cmake
+@if %errorlevel% NEQ 0 ( exit /b 1 )
+
+exit /b 0

+ 46 - 0
package-system/tiff/o3de_patch.patch

@@ -0,0 +1,46 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index efe857df..28de8759 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -309,28 +309,32 @@ elseif(SIZEOF_UNSIGNED_LONG EQUAL 4)
+   set(TIFF_UINT32_FORMAT "%lu")
+ endif()
+ 
+-if(SIZEOF_SIGNED_LONG EQUAL 8)
+-  set(TIFF_INT64_T "signed long")
+-  set(TIFF_INT64_FORMAT "%ld")
+-elseif(SIZEOF_SIGNED_LONG_LONG EQUAL 8)
++# Open 3d Engine change: always choose the 'longest long'
++# so that its compatible with other code choosing long long
++# to represent i64 since that is the same size across
++# more platforms.
++if(SIZEOF_SIGNED_LONG_LONG EQUAL 8)
+   set(TIFF_INT64_T "signed long long")
+   if (MINGW)
+     set(TIFF_INT64_FORMAT "%I64d")
+   else()
+     set(TIFF_INT64_FORMAT "%lld")
+   endif()
++elseif(SIZEOF_SIGNED_LONG EQUAL 8)
++  set(TIFF_INT64_T "signed long")
++  set(TIFF_INT64_FORMAT "%ld")
+ endif()
+ 
+-if(SIZEOF_UNSIGNED_LONG EQUAL 8)
+-  set(TIFF_UINT64_T "unsigned long")
+-  set(TIFF_UINT64_FORMAT "%lu")
+-elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL 8)
+-  set(TIFF_UINT64_T "unsigned long long")
++if(SIZEOF_UNSIGNED_LONG_LONG EQUAL 8)
++set(TIFF_UINT64_T "unsigned long long")
+   if (MINGW)
+     set(TIFF_UINT64_FORMAT "%I64u")
+   else()
+     set(TIFF_UINT64_FORMAT "%llu")
+   endif()
++elseif(SIZEOF_UNSIGNED_LONG EQUAL 8)
++  set(TIFF_UINT64_T "unsigned long")
++  set(TIFF_UINT64_FORMAT "%lu")
+ endif()
+ 
+ if(SIZEOF_UNSIGNED_INT EQUAL SIZEOF_SIZE_T)

+ 6 - 6
package_build_list_host_darwin.json

@@ -32,16 +32,16 @@
         "squish-ccr-deb557d-rev1-mac" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/squish-ccr --platform-name Mac --package-root ../../package-system --clean",
         "squish-ccr-deb557d-rev1-mac" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/squish-ccr --platform-name Mac --package-root ../../package-system --clean",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Mac --package-root ../../package-system --clean",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Mac --package-root ../../package-system --clean",
         "azslc-1.7.23-rev2-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/azslc --platform-name Mac --package-root ../../package-system --clean",
         "azslc-1.7.23-rev2-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/azslc --platform-name Mac --package-root ../../package-system --clean",
-        "tiff-4.2.0.10-mac": "package-system/tiff/build_package_image.py --platform mac",
-        "tiff-4.2.0.10-ios": "package-system/tiff/build_package_image.py --platform ios",
-        "python-3.7.10-rev1-darwin": "package-system/python/build_package_image.py",
+        "python-3.7.10-rev1-darwin" : "package-system/python/build_package_image.py",
         "mcpp-2.7.2_az.1-rev1-mac": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.1-rev1",
         "mcpp-2.7.2_az.1-rev1-mac": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.1-rev1",
         "mikkelsen-1.0.0.4-mac": "package-system/mikkelsen/build_package_image.py --platform mac",
         "mikkelsen-1.0.0.4-mac": "package-system/mikkelsen/build_package_image.py --platform mac",
         "mikkelsen-1.0.0.4-ios": "package-system/mikkelsen/build_package_image.py --platform ios",
         "mikkelsen-1.0.0.4-ios": "package-system/mikkelsen/build_package_image.py --platform ios",
         "zlib-1.2.11-rev2-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Mac --package-root ../../package-system --clean",
         "zlib-1.2.11-rev2-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Mac --package-root ../../package-system --clean",
         "zlib-1.2.11-rev2-ios": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name iOS --package-root ../../package-system --clean",
         "zlib-1.2.11-rev2-ios": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name iOS --package-root ../../package-system --clean",
         "lz4-1.9.3-vcpkg-rev4-mac": "package-system/lz4/build_package_image.py --platform-name mac",
         "lz4-1.9.3-vcpkg-rev4-mac": "package-system/lz4/build_package_image.py --platform-name mac",
-        "lz4-1.9.3-vcpkg-rev4-ios": "package-system/lz4/build_package_image.py --platform-name ios"
+        "lz4-1.9.3-vcpkg-rev4-ios": "package-system/lz4/build_package_image.py --platform-name ios",
+        "tiff-4.2.0.15-rev2-mac" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/tiff --platform-name Mac --package-root ../../package-system --clean",
+        "tiff-4.2.0.15-rev2-ios" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/tiff --platform-name iOS --package-root ../../package-system --clean"
     },
     },
     "build_from_folder": {
     "build_from_folder": {
         "AWSNativeSDK-1.7.167-rev5-mac": "package-system/AWSNativeSDK-mac",
         "AWSNativeSDK-1.7.167-rev5-mac": "package-system/AWSNativeSDK-mac",
@@ -62,8 +62,8 @@
         "OpenSSL-1.1.1b-rev2-mac": "package-system/OpenSSL-mac",
         "OpenSSL-1.1.1b-rev2-mac": "package-system/OpenSSL-mac",
         "OpenSSL-1.1.1b-rev2-ios": "package-system/OpenSSL-ios",
         "OpenSSL-1.1.1b-rev2-ios": "package-system/OpenSSL-ios",
         "ilmbase-2.3.0-rev4-mac": "package-system/ilmbase-mac",
         "ilmbase-2.3.0-rev4-mac": "package-system/ilmbase-mac",
-        "tiff-4.2.0.10-mac" : "package-system/tiff-mac",
-        "tiff-4.2.0.10-ios" : "package-system/tiff-ios",
+        "tiff-4.2.0.15-rev2-mac": "package-system/tiff-mac",
+        "tiff-4.2.0.15-rev2-ios": "package-system/tiff-ios",
         "python-3.7.10-rev1-darwin" : "package-system/python/darwin_x64/package",
         "python-3.7.10-rev1-darwin" : "package-system/python/darwin_x64/package",
         "asn1-0.9.27-rev2-ios" : "package-system/asn1-ios",
         "asn1-0.9.27-rev2-ios" : "package-system/asn1-ios",
         "ASTCEncoder-2017_11_14-rev2-multiplatform" : "package-system/ASTCEncoder-multiplatform",
         "ASTCEncoder-2017_11_14-rev2-multiplatform" : "package-system/ASTCEncoder-multiplatform",

+ 2 - 2
package_build_list_host_linux.json

@@ -24,7 +24,7 @@
         "squish-ccr-deb557d-rev1-linux" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/squish-ccr --platform-name Linux --package-root ../../package-system --clean",
         "squish-ccr-deb557d-rev1-linux" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/squish-ccr --platform-name Linux --package-root ../../package-system --clean",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Linux --package-root ../../package-system --clean",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Linux --package-root ../../package-system --clean",
         "azslc-1.7.23-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/azslc --platform-name Linux --package-root ../../package-system --clean",
         "azslc-1.7.23-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/azslc --platform-name Linux --package-root ../../package-system --clean",
-        "tiff-4.2.0.10-linux": "package-system/tiff/build_package_image.py --platform linux",
+        "tiff-4.2.0.15-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/tiff --platform-name Linux --package-root ../../package-system --clean",
         "python-3.7.10-rev2-linux": "package-system/python/build_package_image.py",
         "python-3.7.10-rev2-linux": "package-system/python/build_package_image.py",
         "mikkelsen-1.0.0.4-linux": "package-system/mikkelsen/build_package_image.py",
         "mikkelsen-1.0.0.4-linux": "package-system/mikkelsen/build_package_image.py",
         "zlib-1.2.11-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Linux --package-root ../../package-system --clean",
         "zlib-1.2.11-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Linux --package-root ../../package-system --clean",
@@ -48,7 +48,7 @@
         "squish-ccr-deb557d-rev1-linux" : "package-system/squish-ccr-linux",
         "squish-ccr-deb557d-rev1-linux" : "package-system/squish-ccr-linux",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-linux": "package-system/DirectXShaderCompilerDxc-linux",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-linux": "package-system/DirectXShaderCompilerDxc-linux",
         "azslc-1.7.23-rev2-linux": "package-system/azslc-linux",
         "azslc-1.7.23-rev2-linux": "package-system/azslc-linux",
-        "tiff-4.2.0.10-linux": "package-system/tiff-linux",
+        "tiff-4.2.0.15-rev2-linux": "package-system/tiff-linux",
         "python-3.7.10-rev2-linux": "package-system/python/linux_x64/package",
         "python-3.7.10-rev2-linux": "package-system/python/linux_x64/package",
         "PhysX-4.1.2.29882248-rev3-linux": "package-system/PhysX-linux",
         "PhysX-4.1.2.29882248-rev3-linux": "package-system/PhysX-linux",
         "NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux": "package-system/NvCloth-linux",
         "NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux": "package-system/NvCloth-linux",

+ 5 - 5
package_build_list_host_windows.json

@@ -43,7 +43,9 @@
         "zlib-1.2.11-rev2-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Windows --package-root ../../package-system --clean",
         "zlib-1.2.11-rev2-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Windows --package-root ../../package-system --clean",
         "zlib-1.2.11-rev2-android": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Android --package-root ../../package-system --clean",
         "zlib-1.2.11-rev2-android": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Android --package-root ../../package-system --clean",
         "lz4-1.9.3-vcpkg-rev4-windows": "package-system/lz4/build_package_image.py --platform-name windows",
         "lz4-1.9.3-vcpkg-rev4-windows": "package-system/lz4/build_package_image.py --platform-name windows",
-        "lz4-1.9.3-vcpkg-rev4-android": "package-system/lz4/build_package_image.py --platform-name android"
+        "lz4-1.9.3-vcpkg-rev4-android": "package-system/lz4/build_package_image.py --platform-name android",
+        "tiff-4.2.0.15-rev2-windows" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/tiff --platform-name Windows --package-root ../../package-system --clean",
+        "tiff-4.2.0.15-rev2-android" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/tiff --platform-name Android --package-root ../../package-system --clean"
       },
       },
   "build_from_folder": {
   "build_from_folder": {
     "AWSGameLiftServerSDK-3.4.1-rev1-windows" : "package-system/AWSGameLiftServerSDK/windows",
     "AWSGameLiftServerSDK-3.4.1-rev1-windows" : "package-system/AWSGameLiftServerSDK/windows",
@@ -66,10 +68,8 @@
     "libsamplerate-0.2.1-rev2-android": "package-system/libsamplerate-android",
     "libsamplerate-0.2.1-rev2-android": "package-system/libsamplerate-android",
     "OpenSSL-1.1.1b-rev2-windows": "package-system/OpenSSL-windows",
     "OpenSSL-1.1.1b-rev2-windows": "package-system/OpenSSL-windows",
     "OpenSSL-1.1.1b-rev1-android": "package-system/OpenSSL-android",
     "OpenSSL-1.1.1b-rev1-android": "package-system/OpenSSL-android",
-    "tiff-4.2.0.14-android": "package-system/tiff-android",
-    "tiff-4.2.0.15-linux": "package-system/tiff-linux",
-    "tiff-4.2.0.15-mac-ios": "package-system/tiff-mac-ios",
-    "tiff-4.2.0.14-windows": "package-system/tiff-windows",
+    "tiff-4.2.0.15-rev2-android": "package-system/tiff-android",
+    "tiff-4.2.0.15-rev2-windows": "package-system/tiff-windows",
     "lux_core-2.2-rev5-multiplatform": "package-system/luxcore-multiplatform",
     "lux_core-2.2-rev5-multiplatform": "package-system/luxcore-multiplatform",
     "python-3.7.10-rev2-windows": "package-system/python/win_x64/package",
     "python-3.7.10-rev2-windows": "package-system/python/win_x64/package",
     "pybind11-2.4.3-rev1-multiplatform": "package-system/pybind11-multiplatform",
     "pybind11-2.4.3-rev1-multiplatform": "package-system/pybind11-multiplatform",