blob: 48242513182d354e65f59f1c8aedb41448a7e3d1 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#
2# This is free software, licensed under the GNU General Public License v2.
3# See /LICENSE for more information.
4#
5
6include $(TOPDIR)/rules.mk
7
8PKG_NAME:=imagemagick
9PKG_VERSION:=7.0.9
10PKG_REVISION:=5
11PKG_RELEASE:=2
12PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REVISION).tar.gz
15PKG_SOURCE_URL:=http://github.com/ImageMagick/ImageMagick/archive/$(PKG_VERSION)-$(PKG_REVISION)
16PKG_HASH:=d15abd31e7e18f7edec47df156773a23e5100386e55c6ce50f5353e9572d3413
17PKG_BUILD_DIR:=$(BUILD_DIR)/ImageMagick-$(PKG_VERSION)-$(PKG_REVISION)
18
19PKG_LICENSE:=Apache-2.0
20PKG_LICENSE_FILES:=LICENSE
21PKG_CPE_ID:=cpe:/a:imagemagick:imagemagick
22
23PKG_USE_MIPS16:=0
24PKG_INSTALL:=1
25
26include $(INCLUDE_DIR)/package.mk
27
28define Package/imagemagick/Default
29 SECTION:=multimedia
30 CATEGORY:=Multimedia
31 TITLE:=Image manipulation tools
32 URL:=https://www.imagemagick.org/
33endef
34
35define Package/imagemagick
36 $(call Package/imagemagick/Default)
37 DEPENDS:=+libltdl +libpthread +zlib +libfreetype +libpng +libjpeg +libtiff
38endef
39
40define Package/imagemagick/description
41ImageMagick is a free and open-source software suite for displaying,
42converting, and editing raster image and vector image files.
43NOTE: this package may not be suitable for many embedded devices because
44of its large size. Consider using extroot or alternatively consider
45graphicsmagick which is smaller but similar in functionality.
46endef
47
48define Package/imagemagick/conffiles
49/etc/ImageMagick-7/colors.xml
50/etc/ImageMagick-7/delegates.xml
51/etc/ImageMagick-7/log.xml
52/etc/ImageMagick-7/mime.xml
53/etc/ImageMagick-7/policy.xml
54/etc/ImageMagick-7/quantization-table.xml
55/etc/ImageMagick-7/thresholds.xml
56/etc/ImageMagick-7/type-apple.xml
57/etc/ImageMagick-7/type-dejavu.xml
58/etc/ImageMagick-7/type-ghostscript.xml
59/etc/ImageMagick-7/type-urw-base35.xml
60/etc/ImageMagick-7/type-windows.xml
61/etc/ImageMagick-7/type.xml
62endef
63
64CONFIGURE_ARGS += \
65 --enable-shared \
66 --disable-static \
67 --disable-docs \
68 --enable-dependency-tracking \
69 --with-modules \
70 --with-threads \
71 --with-ltdl \
72 --with-zlib \
73 --disable-hdri \
74 --with-quantum-depth=8 \
75 --disable-deprecated \
76 --disable-cipher \
77 --without-bzlib \
78 --without-autotrace \
79 --without-djvu \
80 --without-dps \
81 --without-fftw \
82 --without-flif \
83 --without-fpx \
84 --without-fontconfig \
85 --without-gslib \
86 --without-gvc \
87 --without-heic \
88 --without-jbig \
89 --without-lcms \
90 --without-lqr \
91 --without-lzma \
92 --without-magick-plus-plus \
93 --without-openexr \
94 --without-openjp2 \
95 --without-raqm \
96 --without-raw \
97 --without-webp \
98 --without-x \
99 --without-zstd \
100 --without-gslib \
101 --without-gvc \
102 --without-pango \
103 --without-perl \
104 --without-rsvg \
105 --without-wmf \
106 --without-xml \
107 --with-freetype \
108 --with-jpeg \
109 --with-png \
110 --with-tiff
111
112TARGET_CFLAGS += $(if $(CONFIG_GCC_USE_VERSION_10),,-flto)
113
114define Build/InstallDev
115 $(INSTALL_DIR) $(1)/usr/include
116 $(CP) \
117 $(PKG_INSTALL_DIR)/usr/include/* \
118 $(1)/usr/include/
119
120 $(INSTALL_DIR) $(1)/usr/lib
121 $(CP) \
122 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
123 $(1)/usr/lib/
124
125 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
126 $(INSTALL_DATA) \
127 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
128 $(1)/usr/lib/pkgconfig/
129endef
130
131IMlibdir:=usr/lib/ImageMagick-$(PKG_VERSION)
132define Package/imagemagick/install
133 $(INSTALL_DIR) $(1)/etc $(1)/usr/bin $(1)/$(IMlibdir)
134 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
135 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
136 $(RM) $(1)/usr/bin/*-config
137 $(CP) $(PKG_INSTALL_DIR)/etc/ImageMagick-* $(1)/etc/
138 $(CP) $(PKG_INSTALL_DIR)/$(IMlibdir)/* $(1)/$(IMlibdir)/
139endef
140
141$(eval $(call BuildPackage,imagemagick))