[packages] add libotr package
[packages.git] / libs / tiff / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # blogic@openwrt.org
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=tiff
12 PKG_VERSION:=4.0.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://download.osgeo.org/libtiff
17 PKG_MD5SUM:=051c1068e6a0627f461948c365290410
18
19 PKG_FIXUP:=libtool-ucxx
20 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
21
22 PKG_INSTALL:=1
23
24 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libtiffxx
25
26 include $(INCLUDE_DIR)/uclibc++.mk
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/tiff/Default
30   TITLE:=TIFF
31   URL:=http://www.remotesensing.org/libtiff/
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                 --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                 --with-apple-opengl-framework \
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))