source: packages/multimedia/imagemagick/Makefile @ 27456

Last change on this file since 27456 was 27456, checked in by florian, 5 years ago

[package] imagemagick: add tiff plugin (#8430)

File size: 3.4 KB
Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=imagemagick
11PKG_VERSION:=6.6.7
12PKG_REVISION:=3
13PKG_RELEASE:=1
14
15PKG_BUILD_DIR:=$(BUILD_DIR)/ImageMagick-$(PKG_VERSION)-$(PKG_REVISION)
16PKG_SOURCE:=ImageMagick-$(PKG_VERSION)-$(PKG_REVISION).tar.bz2
17PKG_SOURCE_URL:=ftp://ftp.fifi.org/pub/ImageMagick/
18PKG_MD5SUM:=
19
20PKG_FIXUP:=libtool
21PKG_REMOVE_FILES:=aclocal.m4 m4/libtool.m4
22
23include $(INCLUDE_DIR)/package.mk
24
25PKG_INSTALL=1
26
27define Package/imagemagick/Default
28  SECTION:=multimedia
29  CATEGORY:=Multimedia
30  TITLE:=imagemagick
31  URL:=http://image_magick.veidrodis.com/
32endef
33
34define Package/imagemagick
35  $(call Package/imagemagick/Default)
36endef
37
38define Package/imagemagick/description
39  An image manipulation library.
40endef
41
42define Package/imagemagick-jpeg
43  $(call Package/imagemagick/Default)
44  TITLE+= (jpeg)
45  DEPENDS:=+imagemagick +libjpeg +zlib
46endef
47
48define Package/imagemagick-jpeg/description
49  imagemagick JPEG module
50endef
51
52define Package/imagemagick-png
53  $(call Package/imagemagick/Default)
54  TITLE+= (png)
55  DEPENDS:=+imagemagick +libpng +zlib
56endef
57
58define Package/imagemagick-png/description
59  imagemagick PNG module
60endef
61
62define Package/imagemagick-tools
63  $(call Package/imagemagick/Default)
64  TITLE+= (tools)
65  DEPENDS:=+imagemagick
66endef
67
68define Package/imagemagick-png/description
69  imagemagick tools (mogrify,convert)
70endef
71
72define Package/imagemagick-tiff
73  $(call Package/imagemagick/Default)
74  TITLE+= (tiff)
75  DEPENDS:=+imagemagick +libtiff +zlib
76endef
77
78define Package/imagemagick-tiff/description
79  imagemagick TIFF module
80endef
81
82
83CONFIGURE_ARGS += \
84          --with-modules \
85          --enable-shared \
86          --enable-static \
87          --without-xml \
88          --without-x
89
90define 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"
94endef
95
96define 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/
113endef
114
115define Package/imagemagick/install
116        $(INSTALL_DIR) $(1)/usr/lib/
117        $(CP) \
118                $(PKG_INSTALL_DIR)/usr/lib/*.so* \
119                $(1)/usr/lib/
120endef
121
122define 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/
130endef
131
132define 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)))
142endef
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
Note: See TracBrowser for help on using the repository browser.