libtiff: add HostBuild define
authorChristian Marangi <[email protected]>
Thu, 20 Nov 2025 16:02:28 +0000 (17:02 +0100)
committerChristian Marangi <[email protected]>
Thu, 20 Nov 2025 16:04:44 +0000 (17:04 +0100)
Package spandsp3 in telephony feed require this package as an host tool
for the tiffio.h header.

Add all the bits and define to compile this as an Host tool to permit
correct compilation of spandsp3 package.

Signed-off-by: Christian Marangi <[email protected]>
libs/tiff/Makefile

index 390fcd68a72b19ba2c981d08d40e0ea8d02daadb..0483ae7a43ff280bab1872e267ed3fadc4be46ef 100644 (file)
@@ -20,6 +20,7 @@ PKG_LICENSE:=libtiff
 PKG_LICENSE_FILES:=LICENSE.md
 PKG_CPE_ID:=cpe:/a:libtiff:libtiff
 
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
@@ -46,6 +47,18 @@ $(call Package/tiff/Default)
   DEPENDS:=+libtiff +libstdcpp
 endef
 
+CMAKE_HOST_OPTIONS += \
+       -DCMAKE_REQUIRED_LIBRARIES="-lm" \
+       -Dld-version-script=OFF \
+       -Dold-jpeg=OFF \
+       -Djbig=OFF \
+       -Dlzma=OFF \
+       -Dzstd=OFF \
+       -Dwebp=OFF \
+       -Djpeg12=OFF \
+       -Dcxx=OFF \
+       -Dlibdeflate=OFF
+
 CMAKE_OPTIONS += \
        -Dld-version-script=OFF \
        -Dold-jpeg=OFF \
@@ -73,5 +86,6 @@ define Package/tiff-utils/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
 endef
 
+$(eval $(call HostBuild))
 $(eval $(call BuildPackage,libtiff))
 $(eval $(call BuildPackage,tiff-utils))