Branch oldpackages for 14.07
[14.07/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:=1
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 endef
32
33 define Package/libtiff
34 $(call Package/tiff/Default)
35   SECTION:=libs
36   CATEGORY:=Libraries
37   TITLE+= library
38   DEPENDS:=+zlib +libjpeg
39 endef
40
41 define Package/libtiffxx
42 $(call Package/tiff/Default)
43   SECTION:=libs
44   CATEGORY:=Libraries
45   TITLE+= library(c++ bindings)
46   DEPENDS:=+libtiff $(CXX_DEPENDS)
47 endef
48
49 define Package/tiff-utils
50 $(call Package/tiff/Default)
51   SECTION:=utils
52   CATEGORY:=Utilities
53   TITLE+= utilities
54   DEPENDS:=+libtiff
55 endef
56
57 TARGET_CFLAGS += $(FPIC)
58
59 define Build/Configure
60         $(call Build/Configure/Default, \
61                 $(if $(CONFIG_PACKAGE_libtiffxx), \
62                         --enable-cxx, \
63                         --disable-cxx \
64                 ) \
65                 --disable-lzma \
66                 --enable-ccitt \
67                 --enable-packbits \
68                 --enable-lzw \
69                 --enable-thunder \
70                 --enable-next \
71                 --enable-logluv \
72                 --enable-mdi \
73                 --enable-zlib \
74                 --enable-jpeg \
75                 --disable-old-jpeg \
76                 --disable-jbig \
77                 --without-x \
78         )
79 endef
80
81 define Build/InstallDev
82         $(INSTALL_DIR) $(1)/usr/{lib,include}
83         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/
84         $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
85 endef
86
87 define Package/libtiff/install
88         $(INSTALL_DIR) $(1)/usr/lib
89         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiff.so.* $(1)/usr/lib/
90 endef
91
92 define Package/libtiffxx/install
93         $(INSTALL_DIR) $(1)/usr/lib
94         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiffxx.so.* $(1)/usr/lib/
95 endef
96
97 define Package/tiff-utils/install
98         $(INSTALL_DIR) $(1)/usr/bin
99         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
100 endef
101
102 $(eval $(call BuildPackage,libtiff))
103 $(eval $(call BuildPackage,libtiffxx))
104 $(eval $(call BuildPackage,tiff-utils))