[package] add imagemagick (#8430)
authorFlorian Fainelli <florian@openwrt.org>
Sat, 29 Jan 2011 22:09:22 +0000 (22:09 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 29 Jan 2011 22:09:22 +0000 (22:09 +0000)
SVN-Revision: 25250

multimedia/imagemagick/Makefile [new file with mode: 0644]

diff --git a/multimedia/imagemagick/Makefile b/multimedia/imagemagick/Makefile
new file mode 100644 (file)
index 0000000..8cd427b
--- /dev/null
@@ -0,0 +1,115 @@
+#\r
+# Copyright (C) 2010 OpenWrt.org\r
+#\r
+# This is free software, licensed under the GNU General Public License v2.\r
+# See /LICENSE for more information.\r
+#\r
+\r
+include $(TOPDIR)/rules.mk\r
+\r
+PKG_NAME:=imagemagick\r
+PKG_VERSION:=6.6.7\r
+PKG_REVISION:=3\r
+PKG_RELEASE:=1\r
+\r
+PKG_BUILD_DIR:=$(BUILD_DIR)/ImageMagick-$(PKG_VERSION)-$(PKG_REVISION)\r
+PKG_SOURCE:=ImageMagick-$(PKG_VERSION)-$(PKG_REVISION).tar.bz2\r
+PKG_SOURCE_URL:=ftp://ftp.fifi.org/pub/ImageMagick/\r
+PKG_MD5SUM:=\r
+\r
+PKG_FIXUP:=libtool\r
+PKG_REMOVE_FILES:=aclocal.m4 m4/libtool.m4\r
+\r
+include $(INCLUDE_DIR)/package.mk\r
+\r
+PKG_INSTALL=1\r
+\r
+define Package/imagemagick/Default\r
+  SECTION:=multimedia\r
+  CATEGORY:=Multimedia\r
+  TITLE:=imagemagick\r
+  URL:=http://image_magick.veidrodis.com/\r
+endef\r
+\r
+define Package/imagemagick\r
+  $(call Package/imagemagick/Default)\r
+endef\r
+\r
+define Package/imagemagick/description\r
+  An image manipulation library.\r
+endef\r
+\r
+define Package/imagemagick-jpeg\r
+  $(call Package/imagemagick/Default)\r
+  TITLE+= (jpeg)\r
+  DEPENDS:=+imagemagick +libjpeg +zlib\r
+endef\r
+\r
+define Package/imagemagick-jpeg/description\r
+  imagemagick JPEG module\r
+endef\r
+\r
+define Package/imagemagick-png\r
+  $(call Package/imagemagick/Default)\r
+  TITLE+= (png)\r
+  DEPENDS:=+imagemagick +libpng +zlib\r
+endef\r
+\r
+define Package/imagemagick-png/description\r
+  imagemagick PNG module\r
+endef\r
+\r
+\r
+CONFIGURE_ARGS += \\r
+         --with-modules \\r
+         --enable-shared \\r
+         --enable-static \\r
+         --without-xml \\r
+         --without-x\r
+\r
+define Build/Compile\r
+       $(MAKE) -C $(PKG_BUILD_DIR) \\r
+               CC="$(TARGET_CC)" \\r
+               CFLAGS="$(TARGET_CFLAGS) -Wall -I$(PKG_BUILD_DIR)/include/linux -I$(PKG_BUILD_DIR)/include"\r
+endef\r
+\r
+define Build/InstallDev\r
+       $(INSTALL_DIR) $(1)/usr/include/magick\r
+       $(INSTALL_DIR) $(1)/usr/include/Magick++\r
+       $(INSTALL_DIR) $(1)/usr/include/wand\r
+       $(CP) \\r
+               $(PKG_INSTALL_DIR)/usr/include/* \\r
+               $(1)/usr/include/\r
+\r
+       $(INSTALL_DIR) $(1)/usr/lib/\r
+       $(CP) \\r
+               $(PKG_INSTALL_DIR)/usr/lib/*.so* \\r
+               $(1)/usr/lib/\r
+\r
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/\r
+       $(INSTALL_DATA) \\r
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \\r
+               $(1)/usr/lib/pkgconfig/\r
+endef\r
+\r
+define Package/imagemagick/install\r
+       $(INSTALL_DIR) $(1)/usr/lib/\r
+       $(CP) \\r
+               $(PKG_INSTALL_DIR)/usr/lib/*.so* \\r
+               $(1)/usr/lib/\r
+endef\r
+\r
+define BuildPlugin\r
+  define Package/imagemagick-$(1)/install\r
+       $(INSTALL_DIR) $$(1)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders\r
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders/$(1).so \\r
+               $$(1)/usr/lib/ImageMagick-$(PKG_VERSION)/modules-Q16/coders\r
+  endef\r
+\r
+  $$(eval $$(call BuildPackage,imagemagick-$(1)))\r
+endef\r
+\r
+$(eval $(call BuildPackage,imagemagick))\r
+$(eval $(call BuildPlugin,jpeg))\r
+$(eval $(call BuildPlugin,png))\r
+\r