[packages] Move libtiff c++ bindings into it's own package
[packages.git] / libs / tiff / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=3.9.2
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:=93e56e421679c591de7552db13384cb8
18
19 PKG_FIXUP:=libtool-uclibcxx
20 PKG_INSTALL:=1
21
22 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libtiffxx
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/tiff/Default
27   TITLE:=TIFF
28   URL:=http://www.remotesensing.org/libtiff/
29 endef
30
31 define Package/libtiff
32 $(call Package/tiff/Default)
33   SECTION:=libs
34   CATEGORY:=Libraries
35   TITLE+= library
36   DEPENDS:=+zlib +libjpeg
37 endef
38
39 define Package/libtiffxx
40 $(call Package/tiff/Default)
41   SECTION:=libs
42   CATEGORY:=Libraries
43   TITLE+= library(c++ bindings)
44   DEPENDS:=+libtiff +uclibcxx
45 endef
46
47 define Package/tiff-utils
48 $(call Package/tiff/Default)
49   SECTION:=utils
50   CATEGORY:=Utilities
51   TITLE+= utilities
52   DEPENDS:=+libtiff
53 endef
54
55 TARGET_CFLAGS += $(FPIC)
56
57 MAKE_FLAGS += \
58     CXX="g++-uc"
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                 CXX="g++-uc" \
81         )
82 endef
83
84 define Build/InstallDev
85         $(INSTALL_DIR) $(1)/usr/{lib,include}
86         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/
87         $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
88 endef
89
90 define Package/libtiff/install
91         $(INSTALL_DIR) $(1)/usr/lib
92         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiff.so.* $(1)/usr/lib/
93 endef
94
95 define Package/libtiffxx/install
96         $(INSTALL_DIR) $(1)/usr/lib
97         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiffxx.so.* $(1)/usr/lib/
98 endef
99
100 define Package/tiff-utils/install
101         $(INSTALL_DIR) $(1)/usr/bin
102         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
103 endef
104
105 $(eval $(call BuildPackage,libtiff))
106 $(eval $(call BuildPackage,libtiffxx))
107 $(eval $(call BuildPackage,tiff-utils))