# HG changeset patch # User Volker Grabsch # Date 1292104257 -3600 # Node ID c16a0b13337d7f048091a44f0d2a50759e5b9327 # Parent f4ddc2aa91e398cc0c2519e18dfe1b87453e5f38 new package: graphicsmagick diff -r f4ddc2aa91e3 -r c16a0b13337d src/graphicsmagick-1-fix-xml2-config.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/graphicsmagick-1-fix-xml2-config.patch Sat Dec 11 22:50:57 2010 +0100 @@ -0,0 +1,44 @@ +This file is part of mingw-cross-env. +See doc/index.html for further information. + +This patch has been taken from: +http://sourceforge.net/tracker/?func=detail&aid=3130497&group_id=73485&atid=537937 + +diff -r 89c7abc7139f configure.ac +--- a/configure.ac Mon Dec 06 15:42:37 2010 +0100 ++++ b/configure.ac Mon Dec 06 16:39:59 2010 +0100 +@@ -2135,12 +2135,13 @@ + # Debian installs libxml headers under /usr/include/libxml2/libxml with + # the shared library installed under /usr/lib, whereas the package + # installs itself under $prefix/libxml and $prefix/lib. +- xml2_prefix=`xml2-config --prefix` ++ xml2_prefix=`"$xml2_config" --prefix` + if test -d "${xml2_prefix}/include/libxml2" + then + CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2" + fi + LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib" ++ LIBS="$LIBS `"$xml2_config" --libs`" + fi + failed=0 + passed=0 +@@ -2156,8 +2157,9 @@ + LDFLAGS="$OLD_LDFLAGS" + CPPFLAGS="$OLD_CPPFLAGS" + else +- LIB_XML='-lxml2' ++ LIB_XML=`"$xml2_config" --libs` + LIBS="$LIB_XML $LIBS" ++ CPPFLAGS="$CPPFLAGS `"$xml2_config" --cflags`" + AC_DEFINE(HasXML,1,Define if you have XML library) + AC_MSG_RESULT(yes) + have_xml='yes' +diff -r 89c7abc7139f magick/GraphicsMagick.pc.in +--- a/magick/GraphicsMagick.pc.in Mon Dec 06 15:42:37 2010 +0100 ++++ b/magick/GraphicsMagick.pc.in Mon Dec 06 16:39:59 2010 +0100 +@@ -8,4 +8,5 @@ + Version: @PACKAGE_VERSION@ + Description: GraphicsMagick image processing library + Libs: -L${libdir} -lGraphicsMagick ++Libs.private: @MAGICK_API_LDFLAGS@ @MAGICK_API_LIBS@ + Cflags: -I${includedir} @MAGICK_API_PC_CPPFLAGS@ diff -r f4ddc2aa91e3 -r c16a0b13337d src/graphicsmagick-test.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/graphicsmagick-test.cpp Sat Dec 11 22:50:57 2010 +0100 @@ -0,0 +1,17 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include + +int main(int argc, char *argv[]) +{ + (void)argc; + (void)argv; + + Magick::InitializeMagick(0); + + Magick::Image image; + image.quality(90); + + return 0; +} diff -r f4ddc2aa91e3 -r c16a0b13337d src/graphicsmagick.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/graphicsmagick.mk Sat Dec 11 22:50:57 2010 +0100 @@ -0,0 +1,56 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +# GraphicsMagick +PKG := graphicsmagick +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.3.12 +$(PKG)_CHECKSUM := 6b8a414af162ad8679f2f04b10f128edc8ee3233 +$(PKG)_SUBDIR := GraphicsMagick-$($(PKG)_VERSION) +$(PKG)_FILE := $($(PKG)_SUBDIR).tar.bz2 +$(PKG)_WEBSITE := http://www.graphicsmagick.org/ +$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc pthreads libtool zlib bzip2 jpeg jasper lcms1 libpng tiff freetype libxml2 + +define $(PKG)_UPDATE + wget -q -O- 'http://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/' | \ + $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + # This can be removed once the patch "graphicsmagick-1-fix-xml2-config.patch" is accepted by upstream + cd '$(1)' && autoconf + cd '$(1)' && ./configure \ + --host='$(TARGET)' \ + --disable-shared \ + --prefix='$(PREFIX)/$(TARGET)' \ + --without-modules \ + --with-threads \ + --with-magick-plus-plus \ + --without-perl \ + --with-bzlib \ + --without-dps \ + --without-fpx \ + --without-gslib \ + --without-jbig \ + --with-jpeg \ + --with-jp2 \ + --with-lcms \ + --with-png \ + --with-tiff \ + --without-trio \ + --with-ttf='$(PREFIX)/$(TARGET)' \ + --without-wmf \ + --with-xml \ + --with-zlib \ + --without-x \ + ac_cv_prog_xml2_config='$(PREFIX)/$(TARGET)/bin/xml2-config' + $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= + $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= + + '$(TARGET)-g++' \ + -W -Wall -Werror -pedantic -std=gnu++0x \ + '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-graphicsmagick.exe' \ + `'$(TARGET)-pkg-config' GraphicsMagick++ --cflags --libs` +endef