[packages] normalize PKG_FIXUP - the "libtool" fixup is merely an alias for "autoreco...
[openwrt/svn-archive/archive.git] / multimedia / imagemagick / Makefile
1 #
2 # Copyright (C) 2010 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:=imagemagick
11 PKG_VERSION:=6.6.7
12 PKG_REVISION:=3
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/ImageMagick-$(PKG_VERSION)-$(PKG_REVISION)
16 PKG_SOURCE:=ImageMagick-$(PKG_VERSION)-$(PKG_REVISION).tar.bz2
17 PKG_SOURCE_URL:=ftp://ftp.fifi.org/pub/ImageMagick/
18 PKG_MD5SUM:=
19
20 PKG_FIXUP:=autoreconf
21 PKG_REMOVE_FILES:=aclocal.m4 m4/libtool.m4
22
23 include $(INCLUDE_DIR)/package.mk
24
25 PKG_INSTALL=1
26
27 define Package/imagemagick/Default
28 SECTION:=multimedia
29 CATEGORY:=Multimedia
30 TITLE:=imagemagick
31 URL:=http://image_magick.veidrodis.com/
32 endef
33
34 define Package/imagemagick
35 $(call Package/imagemagick/Default)
36 endef
37
38 define Package/imagemagick/description
39 An image manipulation library.
40 endef
41
42 define Package/imagemagick-jpeg
43 $(call Package/imagemagick/Default)
44 TITLE+= (jpeg)
45 DEPENDS:=+imagemagick +libjpeg +zlib
46 endef
47
48 define Package/imagemagick-jpeg/description
49 imagemagick JPEG module
50 endef
51
52 define Package/imagemagick-png
53 $(call Package/imagemagick/Default)
54 TITLE+= (png)
55 DEPENDS:=+imagemagick +libpng +zlib
56 endef
57
58 define Package/imagemagick-png/description
59 imagemagick PNG module
60 endef
61
62 define Package/imagemagick-tools
63 $(call Package/imagemagick/Default)
64 TITLE+= (tools)
65 DEPENDS:=+imagemagick
66 endef
67
68 define Package/imagemagick-png/description
69 imagemagick tools (mogrify,convert)
70 endef
71
72 define Package/imagemagick-tiff
73 $(call Package/imagemagick/Default)
74 TITLE+= (tiff)
75 DEPENDS:=+imagemagick +libtiff +zlib
76 endef
77
78 define Package/imagemagick-tiff/description
79 imagemagick TIFF module
80 endef
81
82
83 CONFIGURE_ARGS += \
84 --with-modules \
85 --enable-shared \
86 --enable-static \
87 --without-xml \
88 --without-x
89
90 define Build/Compile
91 $(MAKE) -C $(PKG_BUILD_DIR) \
92 CC="$(TARGET_CC)" \
93 CFLAGS="$(TARGET_CFLAGS) -Wall -I$(PKG_BUILD_DIR)/include/linux -I$(PKG_BUILD_DIR)/include"
94 endef
95
96 define Build/InstallDev
97 $(INSTALL_DIR) $(1)/usr/include/magick
98 $(INSTALL_DIR) $(1)/usr/include/Magick++
99 $(INSTALL_DIR) $(1)/usr/include/wand
100 $(CP) \
101 $(PKG_INSTALL_DIR)/usr/include/* \
102 $(1)/usr/include/
103
104 $(INSTALL_DIR) $(1)/usr/lib/
105 $(CP) \
106 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
107 $(1)/usr/lib/
108
109 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
110 $(INSTALL_DATA) \
111 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
112 $(1)/usr/lib/pkgconfig/
113 endef
114
115 define Package/imagemagick/install
116 $(INSTALL_DIR) $(1)/usr/lib/
117 $(CP) \
118 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
119 $(1)/usr/lib/
120 endef
121
122 define Package/imagemagick-tools/install
123 $(INSTALL_DIR) $(1)/usr/bin/
124 $(CP) \
125 $(PKG_INSTALL_DIR)/usr/bin/mogrify \
126 $(1)/usr/bin/
127 $(CP) \
128 $(PKG_INSTALL_DIR)/usr/bin/convert \
129 $(1)/usr/bin/
130 endef
131
132 define BuildPlugin
133 define Package/imagemagick-$(1)/install
134 $(INSTALL_DIR) $$(1)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders
135 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders/$(1).so \
136 $$(1)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders
137 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders/$(1).la \
138 $$(1)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders
139 endef
140
141 $$(eval $$(call BuildPackage,imagemagick-$(1)))
142 endef
143
144 $(eval $(call BuildPackage,imagemagick))
145 $(eval $(call BuildPackage,imagemagick-tools))
146 $(eval $(call BuildPlugin,jpeg))
147 $(eval $(call BuildPlugin,png))
148 $(eval $(call BuildPlugin,tiff))
149