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