imagemagick: update to 7.1.1.31
[feed/packages.git] / multimedia / imagemagick / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=imagemagick
9 PKG_VERSION:=7.1.1.31
10 PKG_RELEASE:=1
11 PKG_MAINTAINER:=Aleksey Vasilenko <aleksey.vasilenko@gmail.com>
12
13 _PKGVER:=$(basename $(PKG_VERSION))
14 _PKGREV:=$(_PKGVER)-$(subst .,,$(suffix $(PKG_VERSION)))
15
16 PKG_SOURCE:=ImageMagick-$(_PKGREV).tar.xz
17 PKG_SOURCE_URL:=https://imagemagick.org/archive
18 PKG_HASH:=7e5c8db53dd90a0cfc5cc7ca6d34728ed86054b4bc86e9787902285fec1107a8
19 PKG_BUILD_DIR:=$(BUILD_DIR)/ImageMagick-$(_PKGREV)
20 PKG_FIXUP:=autoreconf
21
22 PKG_LICENSE:=Apache-2.0
23 PKG_LICENSE_FILES:=LICENSE
24 PKG_CPE_ID:=cpe:/a:imagemagick:imagemagick
25
26 PKG_BUILD_FLAGS:=no-mips16 lto
27 PKG_INSTALL:=1
28
29 include $(INCLUDE_DIR)/package.mk
30
31 define Package/imagemagick/Default
32 SECTION:=multimedia
33 CATEGORY:=Multimedia
34 TITLE:=Image manipulation tools
35 URL:=https://www.imagemagick.org/
36 endef
37
38 define Package/imagemagick
39 $(call Package/imagemagick/Default)
40 DEPENDS:=+libltdl +libpthread +zlib +libfreetype +libpng +libjpeg +libtiff +libzip
41 endef
42
43 define Package/imagemagick/description
44 ImageMagick is a free and open-source software suite for displaying,
45 converting, and editing raster image and vector image files.
46 NOTE: this package may not be suitable for many embedded devices because
47 of its large size. Consider using extroot or alternatively consider
48 graphicsmagick which is smaller but similar in functionality.
49 endef
50
51 define Package/imagemagick/conffiles
52 /etc/ImageMagick-7/colors.xml
53 /etc/ImageMagick-7/delegates.xml
54 /etc/ImageMagick-7/log.xml
55 /etc/ImageMagick-7/mime.xml
56 /etc/ImageMagick-7/policy.xml
57 /etc/ImageMagick-7/quantization-table.xml
58 /etc/ImageMagick-7/thresholds.xml
59 /etc/ImageMagick-7/type-apple.xml
60 /etc/ImageMagick-7/type-dejavu.xml
61 /etc/ImageMagick-7/type-ghostscript.xml
62 /etc/ImageMagick-7/type-urw-base35.xml
63 /etc/ImageMagick-7/type-windows.xml
64 /etc/ImageMagick-7/type.xml
65 endef
66
67 CONFIGURE_ARGS += \
68 --disable-static \
69 --disable-docs \
70 --enable-dependency-tracking \
71 --with-modules \
72 --disable-hdri \
73 --with-quantum-depth=8 \
74 --disable-cipher \
75 --without-bzlib \
76 --without-djvu \
77 --without-fontconfig \
78 --without-gvc \
79 --without-heic \
80 --without-jbig \
81 --without-lcms \
82 --without-lqr \
83 --without-lzma \
84 --without-magick-plus-plus \
85 --without-openexr \
86 --without-openjp2 \
87 --without-raqm \
88 --without-raw \
89 --without-webp \
90 --without-x \
91 --without-zstd \
92 --without-pango \
93 --without-wmf \
94 --without-xml
95
96 ## Avoid linking with libstdcpp
97 TARGET_LDFLAGS+= -Wl,--as-needed
98
99 define Build/InstallDev
100 $(INSTALL_DIR) $(1)/usr/include
101 $(CP) \
102 $(PKG_INSTALL_DIR)/usr/include/* \
103 $(1)/usr/include/
104
105 $(INSTALL_DIR) $(1)/usr/lib
106 $(CP) \
107 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
108 $(1)/usr/lib/
109
110 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
111 $(INSTALL_DATA) \
112 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
113 $(1)/usr/lib/pkgconfig/
114
115 $(INSTALL_DIR) $(1)/usr/bin
116 $(INSTALL_BIN) \
117 $(PKG_INSTALL_DIR)/usr/bin/*-config \
118 $(1)/usr/bin/
119 $(SED) 's|prefix=/usr|prefix=$(STAGING_DIR)/usr|' \
120 $(1)/usr/bin/*-config
121 endef
122
123 IMlibdir:=usr/lib/ImageMagick-$(_PKGVER)
124 define Package/imagemagick/install
125 $(INSTALL_DIR) $(1)/etc $(1)/usr/bin $(1)/$(IMlibdir)
126 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
127 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
128 $(RM) $(1)/usr/bin/*-config
129 $(CP) $(PKG_INSTALL_DIR)/etc/ImageMagick-* $(1)/etc/
130 $(CP) $(PKG_INSTALL_DIR)/$(IMlibdir)/* $(1)/$(IMlibdir)/
131 endef
132
133 $(eval $(call BuildPackage,imagemagick))