| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 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:=2 |
| 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 | |
| 19 | PKG_LICENSE:=Apache-2.0 |
| 20 | PKG_LICENSE_FILES:=LICENSE |
| 21 | PKG_CPE_ID:=cpe:/a:imagemagick:imagemagick |
| 22 | |
| 23 | PKG_USE_MIPS16:=0 |
| 24 | PKG_INSTALL:=1 |
| 25 | |
| 26 | include $(INCLUDE_DIR)/package.mk |
| 27 | |
| 28 | define Package/imagemagick/Default |
| 29 | SECTION:=multimedia |
| 30 | CATEGORY:=Multimedia |
| 31 | TITLE:=Image manipulation tools |
| 32 | URL:=https://www.imagemagick.org/ |
| 33 | endef |
| 34 | |
| 35 | define Package/imagemagick |
| 36 | $(call Package/imagemagick/Default) |
| 37 | DEPENDS:=+libltdl +libpthread +zlib +libfreetype +libpng +libjpeg +libtiff |
| 38 | endef |
| 39 | |
| 40 | define Package/imagemagick/description |
| 41 | ImageMagick is a free and open-source software suite for displaying, |
| 42 | converting, and editing raster image and vector image files. |
| 43 | NOTE: this package may not be suitable for many embedded devices because |
| 44 | of its large size. Consider using extroot or alternatively consider |
| 45 | graphicsmagick which is smaller but similar in functionality. |
| 46 | endef |
| 47 | |
| 48 | define 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 |
| 62 | endef |
| 63 | |
| 64 | CONFIGURE_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 | |
| 112 | TARGET_CFLAGS += $(if $(CONFIG_GCC_USE_VERSION_10),,-flto) |
| 113 | |
| 114 | define 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/ |
| 129 | endef |
| 130 | |
| 131 | IMlibdir:=usr/lib/ImageMagick-$(PKG_VERSION) |
| 132 | define 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)/ |
| 139 | endef |
| 140 | |
| 141 | $(eval $(call BuildPackage,imagemagick)) |