Makefile revision 2362
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Common Development and Distribution License (the "License").
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You may not use this file except in compliance with the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or http://www.opensolaris.org/os/licensing.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/shared-macros.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_NAME= ImageMagick
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_VERSION= 6.8.3
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SUBVERSION= 5
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsHUMAN_VERSION= $(COMPONENT_VERSION)-$(COMPONENT_SUBVERSION)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_PROJECT_URL= http://www.imagemagick.org/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic UpdaterCOMPONENT_ARCHIVE= $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION).tar.gz
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_HASH= \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews sha256:daead80170bc6d44cf6a54b4817446cbb7211b8ee445532b64033af190265fe3
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_URL= http://image_magick.veidrodis.com/image_magick/$(COMPONENT_ARCHIVE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/prep.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/configure.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/ips.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# this case we need to replace the '-' by '.'.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsIPS_COMPONENT_VERSION= $(COMPONENT_VERSION).$(COMPONENT_SUBVERSION)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
6283056805887de88040698685b8e1936a1f7a2dAutomatic UpdaterCOMPONENT_POST_UNPACK_ACTION= ( $(MV) $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(COMPONENT_SRC))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# To get the Perl modules built it is necessary to copy the PerlMagick directory
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# to the build directory
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_PRE_CONFIGURE_ACTION= ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLIBS += -lsocket -lnsl
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_ENV += LIBS="$(LIBS)"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Show name of "error tag" as part of the warning
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCFLAGS += -errtags=yes
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# To remove the complier complaints about __restrict keyword,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# -D_magickcore_restrict should be used.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCFLAGS += -xc99=%all -D_magickcore_restrict=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Needed to generate a decent RUNPATH for Magick.so
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_BUILD_ARGS += LD="$(CC)"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_BUILD_ARGS += LD_RUN_PATH="$(CONFIGURE_LIBDIR.$(BITS))"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS+= CFLAGS="$(CFLAGS)"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS+= CXXFLAGS="$(CXXFLAGS)"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS+= --with-modules
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS+= --enable-shared=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS+= --enable-static=no
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS+= --without-gvc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS+= --disable-openmp
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Using option 'with-fontconfig=no' so that the fonts/fonts path specified in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# configuration file 'type-ghostscript.xml' is being used.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS+= --with-fontconfig=no
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Configure option 'with-gs-font-dir' is required because some build systems might
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# not have ghostscript fonts installed.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS+= --with-gs-font-dir="/usr/share/ghostscript/fonts"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS+= --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS.32+= --with-perl=$(PERL)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS.32+= --with-perl-options="INSTALLDIRS=vendor"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS.64+= --without-perl
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# common targets
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsbuild: $(BUILD_32_and_64)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Remove build machine runpath from libMagick++-6.Q16.so.1.0.0 and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# libMagickCore-6.Q16.so.1.0.0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall: $(INSTALL_32_and_64)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTO_DIR)/usr/lib/libMagick++-6.Q16.so.1.0.0; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTO_DIR)/usr/lib/$(MACH64)/libMagick++-6.Q16.so.1.0.0; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /usr/bin/elfedit -e 'dyn:delete RPATH' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTO_DIR)/usr/lib/libMagick++-6.Q16.so.1.0.0; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /usr/bin/elfedit -e 'dyn:delete RPATH' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTO_DIR)/usr/lib/$(MACH64)/libMagick++-6.Q16.so.1.0.0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTO_DIR)/usr/lib/libMagickCore-6.Q16.so.1.0.0; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTO_DIR)/usr/lib/$(MACH64)/libMagickCore-6.Q16.so.1.0.0; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /usr/bin/elfedit -e 'dyn:delete RPATH' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTO_DIR)/usr/lib/libMagickCore-6.Q16.so.1.0.0; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /usr/bin/elfedit -e 'dyn:delete RPATH' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTO_DIR)/usr/lib/$(MACH64)/libMagickCore-6.Q16.so.1.0.0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# ImageMagick tests have hard-coded absolute paths inside, so essentially they
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# can be run only after ImageMagick is actually installed and this is not
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# possible, so the tests are not invoked.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewstest: $(NO_TESTS)
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews @echo "Tests can be run only after ImageMagick is installed."
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_PKG_DEPENDENCIES= $(BUILD_TOOLS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/depend.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews