components/imagemagick/Makefile
changeset 168 5884bc1edfdf
child 171 dbff1afe6b31
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/imagemagick/Makefile	Tue Apr 05 05:36:00 2011 -0700
@@ -0,0 +1,87 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+
+include ../../make-rules/shared-macros.mk
+
+# The archive untars to directory without the '-2' suffix, so
+# COMPONENT_SUBVERSION had to be introduced
+#
+COMPONENT_NAME=			ImageMagick
+COMPONENT_VERSION=		6.3.4
+COMPONENT_SUBVERSION=	2
+COMPONENT_SRC=			$(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE=		$(COMPONENT_SRC)-$(COMPONENT_SUBVERSION).tar.gz
+COMPONENT_ARCHIVE_HASH=	sha1:516bb273afb007fb08f15c2747862d819a94d391
+COMPONENT_ARCHIVE_URL=	http://image_magick.veidrodis.com/image_magick/$(COMPONENT_ARCHIVE)
+
+include ../../make-rules/prep.mk
+include ../../make-rules/configure.mk
+include ../../make-rules/ips.mk
+
+# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but in
+# this case we need to replace the '-' by '.'.
+#
+IPS_COMPONENT_VERSION=	$(COMPONENT_VERSION).$(COMPONENT_SUBVERSION)
+
+# The archive contains pre-generated magick-config.h header, which is later on
+# being used and the build fails.  However, we want to use the header generated
+# by configure from BUILD_DIR_32 / BUILD_DIR_64 directory, so the pre-generated
+# header file needs to be deleted.
+#
+COMPONENT_PREP_ACTION= (cd $(@D) ; $(RM) magick/magick-config.h)
+
+# To get the Perl modules built it is necessary to copy the PerlMagick directory
+# to the build directory
+#
+COMPONENT_PRE_CONFIGURE_ACTION= ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D))
+
+# Show name of "error tag" as part of the warning
+#
+CFLAGS+= -errtags
+
+CONFIGURE_OPTIONS+= CFLAGS="$(CFLAGS)"
+CONFIGURE_OPTIONS+= CPPFLAGS="$(CFLAGS)"
+CONFIGURE_OPTIONS+= --with-modules
+CONFIGURE_OPTIONS+= --enable-shared=yes
+CONFIGURE_OPTIONS+= --enable-static=no
+CONFIGURE_OPTIONS+= --without-gvc
+CONFIGURE_OPTIONS.64+= --without-perl
+
+# common targets
+#
+build:		$(BUILD_32_and_64)
+
+install:	$(INSTALL_32_and_64)
+
+# ImageMagick tests have hard-coded absolute paths inside, so essentially they
+# can be run only after ImageMagick is actually installed and this is not 
+# possible, so the tests are not invoked.
+#
+test:
+	@echo "Tests can be run only after ImageMagick is installed."
+
+BUILD_PKG_DEPENDENCIES= $(BUILD_TOOLS)
+
+include ../../make-rules/depend.mk