treewide: refactor to use PKG_BUILD_FLAGS:=no-mips16
[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.0.9
10 PKG_REVISION:=5
11 PKG_RELEASE:=4
12 PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REVISION).tar.gz
15 PKG_SOURCE_URL:=http://github.com/ImageMagick/ImageMagick/archive/$(PKG_VERSION)-$(PKG_REVISION)
16 PKG_HASH:=d15abd31e7e18f7edec47df156773a23e5100386e55c6ce50f5353e9572d3413
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
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
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 --enable-shared \
67 --disable-static \
68 --disable-docs \
69 --enable-dependency-tracking \
70 --with-modules \
71 --with-threads \
72 --with-ltdl \
73 --with-zlib \
74 --disable-hdri \
75 --with-quantum-depth=8 \
76 --disable-deprecated \
77 --disable-cipher \
78 --without-bzlib \
79 --without-autotrace \
80 --without-djvu \
81 --without-dps \
82 --without-fftw \
83 --without-flif \
84 --without-fpx \
85 --without-fontconfig \
86 --without-gslib \
87 --without-gvc \
88 --without-heic \
89 --without-jbig \
90 --without-lcms \
91 --without-lqr \
92 --without-lzma \
93 --without-magick-plus-plus \
94 --without-openexr \
95 --without-openjp2 \
96 --without-raqm \
97 --without-raw \
98 --without-webp \
99 --without-x \
100 --without-zstd \
101 --without-gslib \
102 --without-gvc \
103 --without-pango \
104 --without-perl \
105 --without-rsvg \
106 --without-wmf \
107 --without-xml \
108 --with-freetype \
109 --with-jpeg \
110 --with-png \
111 --with-tiff
112
113 TARGET_CFLAGS += $(if $(filter-out 5 6 7 8 9,$(word 1,$(subst ., ,$(call qstrip,$(CONFIG_GCC_VERSION))))),,-flto)
114
115 define Build/InstallDev
116 $(INSTALL_DIR) $(1)/usr/include
117 $(CP) \
118 $(PKG_INSTALL_DIR)/usr/include/* \
119 $(1)/usr/include/
120
121 $(INSTALL_DIR) $(1)/usr/lib
122 $(CP) \
123 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
124 $(1)/usr/lib/
125
126 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
127 $(INSTALL_DATA) \
128 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
129 $(1)/usr/lib/pkgconfig/
130
131 $(INSTALL_DIR) $(1)/usr/bin
132 $(INSTALL_BIN) \
133 $(PKG_INSTALL_DIR)/usr/bin/*-config \
134 $(1)/usr/bin/
135 $(SED) 's|prefix=/usr|prefix=$(STAGING_DIR)/usr|' \
136 $(1)/usr/bin/*-config
137 endef
138
139 IMlibdir:=usr/lib/ImageMagick-$(PKG_VERSION)
140 define Package/imagemagick/install
141 $(INSTALL_DIR) $(1)/etc $(1)/usr/bin $(1)/$(IMlibdir)
142 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
143 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
144 $(RM) $(1)/usr/bin/*-config
145 $(CP) $(PKG_INSTALL_DIR)/etc/ImageMagick-* $(1)/etc/
146 $(CP) $(PKG_INSTALL_DIR)/$(IMlibdir)/* $(1)/$(IMlibdir)/
147 endef
148
149 $(eval $(call BuildPackage,imagemagick))