Merge pull request #12637 from neheb/tiff

tiff: switch to CMake
This commit is contained in:
Jiri Slachta 2020-06-30 01:26:43 +02:00 committed by GitHub
commit c12e9b858f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,31 +9,27 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=tiff PKG_NAME:=tiff
PKG_VERSION:=4.1.0 PKG_VERSION:=4.1.0
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.osgeo.org/libtiff PKG_SOURCE_URL:=https://download.osgeo.org/libtiff
PKG_HASH:=5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634 PKG_HASH:=5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634
PKG_FIXUP:=autoreconf PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
PKG_REMOVE_FILES:=autogen.sh aclocal.m4 PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=COPYRIGHT PKG_LICENSE_FILES:=COPYRIGHT
PKG_CPE_ID:=cpe:/a:libtiff:libtiff PKG_CPE_ID:=cpe:/a:libtiff:libtiff
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libtiffxx PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libtiffxx
include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/tiff/Default define Package/tiff/Default
TITLE:=TIFF TITLE:=TIFF
URL:=http://simplesystems.org/libtiff/ URL:=http://simplesystems.org/libtiff/
MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
endef endef
define Package/libtiff define Package/libtiff
@ -42,6 +38,7 @@ $(call Package/tiff/Default)
CATEGORY:=Libraries CATEGORY:=Libraries
TITLE+= library TITLE+= library
DEPENDS:=+zlib +libjpeg DEPENDS:=+zlib +libjpeg
ABI_VERSION:=5
endef endef
define Package/libtiffxx define Package/libtiffxx
@ -61,44 +58,42 @@ $(call Package/tiff/Default)
DEPENDS:=+libtiff DEPENDS:=+libtiff
endef endef
CONFIGURE_ARGS += \ CMAKE_OPTIONS += \
$(if $(CONFIG_PACKAGE_libtiffxx),--enable-cxx,--disable-cxx) \ -Dld-version-script=OFF \
--disable-lzma \ -Dccitt=ON \
--enable-ccitt \ -Dpackbits=ON \
--enable-packbits \ -Dlzw=ON \
--enable-lzw \ -Dthunder=ON \
--enable-thunder \ -Dnext=ON \
--enable-next \ -Dlogluv=ON \
--enable-logluv \ -Dmdi=ON \
--enable-mdi \ -Dzlib=ON \
--enable-zlib \ -Dpixarlog=ON \
--enable-jpeg \ -Djpeg=ON \
--disable-old-jpeg \ -Dold-jpeg=OFF \
--disable-jbig \ -Djbig=OFF \
--disable-webp \ -Dlzma=OFF \
--disable-zstd \ -Dzstd=OFF \
--without-x -Dwebp=OFF \
-Djpeg12=OFF \
-Dcxx=O$(if $(CONFIG_PACKAGE_libtiffxx),N,FF)
define Build/InstallDev/hxx TARGET_CFLAGS += $(TARGET_CPPFLAGS)
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.hxx $(1)/usr/include/
endef
define Build/InstallDev define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/{lib,include} $(1)/usr/lib/pkgconfig $(call Build/InstallDev/cmake,$(1))
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/ $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libtiff-4.pc
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/ $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libtiff-4.pc
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(if $(CONFIG_PACKAGE_libtiffxx), $(call Build/InstallDev/hxx,$(1)))
endef endef
define Package/libtiff/install define Package/libtiff/install
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiff.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiff.so.$(ABI_VERSION)* $(1)/usr/lib
endef endef
define Package/libtiffxx/install define Package/libtiffxx/install
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiffxx.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiffxx.so.$(ABI_VERSION)* $(1)/usr/lib/
endef endef
define Package/tiff-utils/install define Package/tiff-utils/install