1db3d37391a2bd60f4dc7912395d20723371f7b5
[feed/packages.git] / libs / tiff / Makefile
1 #
2 # Copyright (C) 2006-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=tiff
11 PKG_VERSION:=4.0.3
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://download.osgeo.org/libtiff
16 PKG_MD5SUM:=051c1068e6a0627f461948c365290410
17
18 PKG_FIXUP:=autoreconf
19 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
20
21 PKG_INSTALL:=1
22
23 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libtiffxx
24
25 include $(INCLUDE_DIR)/uclibc++.mk
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/tiff/Default
29 TITLE:=TIFF
30 URL:=http://www.remotesensing.org/libtiff/
31 MAINTAINER:=Jiri Slachta <slachta@cesnet.cz>
32 endef
33
34 define Package/libtiff
35 $(call Package/tiff/Default)
36 SECTION:=libs
37 CATEGORY:=Libraries
38 TITLE+= library
39 DEPENDS:=+zlib +libjpeg
40 endef
41
42 define Package/libtiffxx
43 $(call Package/tiff/Default)
44 SECTION:=libs
45 CATEGORY:=Libraries
46 TITLE+= library(c++ bindings)
47 DEPENDS:=+libtiff $(CXX_DEPENDS)
48 endef
49
50 define Package/tiff-utils
51 $(call Package/tiff/Default)
52 SECTION:=utils
53 CATEGORY:=Utilities
54 TITLE+= utilities
55 DEPENDS:=+libtiff
56 endef
57
58 TARGET_CFLAGS += $(FPIC)
59
60 define Build/Configure
61 $(call Build/Configure/Default, \
62 $(if $(CONFIG_PACKAGE_libtiffxx), \
63 --enable-cxx, \
64 --disable-cxx \
65 ) \
66 --disable-lzma \
67 --enable-ccitt \
68 --enable-packbits \
69 --enable-lzw \
70 --enable-thunder \
71 --enable-next \
72 --enable-logluv \
73 --enable-mdi \
74 --enable-zlib \
75 --enable-jpeg \
76 --disable-old-jpeg \
77 --disable-jbig \
78 --without-x \
79 )
80 endef
81
82 define Build/InstallDev
83 $(INSTALL_DIR) $(1)/usr/{lib,include}
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/
85 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
86 endef
87
88 define Package/libtiff/install
89 $(INSTALL_DIR) $(1)/usr/lib
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiff.so.* $(1)/usr/lib/
91 endef
92
93 define Package/libtiffxx/install
94 $(INSTALL_DIR) $(1)/usr/lib
95 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiffxx.so.* $(1)/usr/lib/
96 endef
97
98 define Package/tiff-utils/install
99 $(INSTALL_DIR) $(1)/usr/bin
100 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
101 endef
102
103 $(eval $(call BuildPackage,libtiff))
104 $(eval $(call BuildPackage,libtiffxx))
105 $(eval $(call BuildPackage,tiff-utils))