Makefile revision 586
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# CDDL HEADER START
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance with the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# or http://www.opensolaris.org/os/licensing.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If applicable, add the following below this CDDL HEADER, with the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# fields enclosed by brackets "[]" replaced with your own identifying
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# information: Portions Copyright [yyyy] [name of copyright owner]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER END
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininclude ../../make-rules/shared-macros.mk
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The archive untars to directory without the '-2' suffix, so
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# COMPONENT_SUBVERSION had to be introduced
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_NAME= ImageMagick
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_VERSION= 6.3.4
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_SUBVERSION= 2
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserHUMAN_VERSION= $(COMPONENT_VERSION)-$(COMPONENT_SUBVERSION)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_ARCHIVE= $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION).tar.gz
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_ARCHIVE_HASH= sha1:516bb273afb007fb08f15c2747862d819a94d391
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCOMPONENT_ARCHIVE_URL= http://image_magick.veidrodis.com/image_magick/$(COMPONENT_ARCHIVE)
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininclude ../../make-rules/prep.mk
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox Userinclude ../../make-rules/configure.mk
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox Userinclude ../../make-rules/ips.mk
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntPATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but in
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# this case we need to replace the '-' by '.'.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinIPS_COMPONENT_VERSION= $(COMPONENT_VERSION).$(COMPONENT_SUBVERSION)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater# The archive contains pre-generated magick-config.h header, which is later on
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# being used and the build fails. However, we want to use the header generated
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# by configure from BUILD_DIR_32 / BUILD_DIR_64 directory, so the pre-generated
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# header file needs to be deleted.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCOMPONENT_PREP_ACTION= (cd $(@D) ; $(RM) magick/magick-config.h)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# To get the Perl modules built it is necessary to copy the PerlMagick directory
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# to the build directory
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_PRE_CONFIGURE_ACTION= ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D); cd $(SOURCE_DIR); $(AUTORECONF) -f)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Show name of "error tag" as part of the warning
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCFLAGS+= -errtags
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# Needed to generate a decent RUNPATH for Magick.so
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_BUILD_ARGS += LD="$(CC)"
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserCOMPONENT_BUILD_ARGS += LD_RUN_PATH="$(CONFIGURE_LIBDIR.$(BITS))"
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserCONFIGURE_OPTIONS+= CFLAGS="$(CFLAGS)"
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserCONFIGURE_OPTIONS+= CXXFLAGS="$(CXXFLAGS)"
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserCONFIGURE_OPTIONS+= --with-modules
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS+= --enable-shared=yes
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserCONFIGURE_OPTIONS+= --enable-static=no
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_OPTIONS+= --without-gvc
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_OPTIONS+= --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
ac93437301f55ed69bf85883a497a75598c628f9Automatic UpdaterCONFIGURE_OPTIONS.32+= --with-perl=$(PERL)
ac93437301f55ed69bf85883a497a75598c628f9Automatic UpdaterCONFIGURE_OPTIONS.32+= --with-perl-options="INSTALLDIRS=vendor"
ac93437301f55ed69bf85883a497a75598c628f9Automatic UpdaterCONFIGURE_OPTIONS.64+= --without-perl
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater# common targets
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsbuild: $(BUILD_32_and_64)
47012ae6dbf18a2503d7b33c1c9583dc38625cb7Mark Andrews
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updaterinstall: $(INSTALL_32_and_64)
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# ImageMagick tests have hard-coded absolute paths inside, so essentially they
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# can be run only after ImageMagick is actually installed and this is not
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# possible, so the tests are not invoked.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce#
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucetest: $(NO_TESTS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @echo "Tests can be run only after ImageMagick is installed."
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceBUILD_PKG_DEPENDENCIES= $(BUILD_TOOLS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceinclude ../../make-rules/depend.mk
47012ae6dbf18a2503d7b33c1c9583dc38625cb7Mark Andrews