[packages] clean fixups
[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-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)/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 +uclibcxx
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 MAKE_FLAGS += \
60     CXX="g++-uc"
61
62 define Build/Configure
63         $(call Build/Configure/Default, \
64                 $(if $(CONFIG_PACKAGE_libtiffxx), \
65                         --enable-cxx, \
66                         --disable-cxx \
67                 ) \
68                 --enable-ccitt \
69                 --enable-packbits \
70                 --enable-lzw \
71                 --enable-thunder \
72                 --enable-next \
73                 --enable-logluv \
74                 --enable-mdi \
75                 --enable-zlib \
76                 --enable-jpeg \
77                 --disable-old-jpeg \
78                 --disable-jbig \
79                 --without-x \
80                 --with-apple-opengl-framework \
81                 , \
82                 CXX="g++-uc" \
83         )
84 endef
85
86 define Build/InstallDev
87         $(INSTALL_DIR) $(1)/usr/{lib,include}
88         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/
89         $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
90 endef
91
92 define Package/libtiff/install
93         $(INSTALL_DIR) $(1)/usr/lib
94         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiff.so.* $(1)/usr/lib/
95 endef
96
97 define Package/libtiffxx/install
98         $(INSTALL_DIR) $(1)/usr/lib
99         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiffxx.so.* $(1)/usr/lib/
100 endef
101
102 define Package/tiff-utils/install
103         $(INSTALL_DIR) $(1)/usr/bin
104         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
105 endef
106
107 $(eval $(call BuildPackage,libtiff))
108 $(eval $(call BuildPackage,libtiffxx))
109 $(eval $(call BuildPackage,tiff-utils))