Makefile revision 3996
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# CDDL HEADER START
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# The contents of this file are subject to the terms of the
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Common Development and Distribution License (the "License").
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# You may not use this file except in compliance with the License.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# or http://www.opensolaris.org/os/licensing.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# See the License for the specific language governing permissions
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# and limitations under the License.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# When distributing Covered Code, include this CDDL HEADER in each
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# If applicable, add the following below this CDDL HEADER, with the
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# fields enclosed by brackets "[]" replaced with your own identifying
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# information: Portions Copyright [yyyy] [name of copyright owner]
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# CDDL HEADER END
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithinclude ../../make-rules/shared-macros.mk
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_NAME= ImageMagick
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_VERSION= 6.8.3
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_SUBVERSION= 5
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithHUMAN_VERSION= $(COMPONENT_VERSION)-$(COMPONENT_SUBVERSION)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_PROJECT_URL= http://www.imagemagick.org/
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_ARCHIVE= $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION).tar.gz
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_ARCHIVE_HASH= \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith sha256:daead80170bc6d44cf6a54b4817446cbb7211b8ee445532b64033af190265fe3
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_ARCHIVE_URL= http://image_magick.veidrodis.com/image_magick/$(COMPONENT_ARCHIVE)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_BUGDB= utility/imagemagick
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithTPNO= 17708
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithinclude $(WS_MAKE_RULES)/prep.mk
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithinclude $(WS_MAKE_RULES)/configure.mk
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithinclude $(WS_MAKE_RULES)/ips.mk
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithPATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but in
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# this case we need to replace the '-' by '.'.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithIPS_COMPONENT_VERSION= $(COMPONENT_VERSION).$(COMPONENT_SUBVERSION)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_POST_UNPACK_ACTION= ( $(MV) $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION) \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith $(COMPONENT_SRC))
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# To get the Perl modules built it is necessary to copy the PerlMagick directory
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# to the build directory
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_PRE_CONFIGURE_ACTION= ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D))
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithLIBS += -lsocket -lnsl
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_ENV += LIBS="$(LIBS)"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Show name of "error tag" as part of the warning
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCFLAGS += -errtags=yes
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# To remove the complier complaints about __restrict keyword,
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# -D_magickcore_restrict should be used.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCFLAGS += -xc99=%all -D_magickcore_restrict=
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Needed to generate a decent RUNPATH for Magick.so
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_BUILD_ARGS += LD="$(CC)"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCOMPONENT_BUILD_ARGS += LD_RUN_PATH="$(CONFIGURE_LIBDIR.$(BITS))"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS+= CFLAGS="$(CFLAGS)"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS+= CXXFLAGS="$(CXXFLAGS)"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS+= --with-modules
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS+= --enable-shared=yes
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS+= --enable-static=no
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS+= --without-gvc
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS+= --disable-openmp
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Using option 'with-fontconfig=no' so that the fonts/fonts path specified in
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# configuration file 'type-ghostscript.xml' is being used.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS+= --with-fontconfig=no
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Configure option 'with-gs-font-dir' is required because some build systems might
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# not have ghostscript fonts installed.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS+= --with-gs-font-dir="/usr/share/ghostscript/fonts"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS+= --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS.32+= --with-perl=$(PERL)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS.32+= --with-perl-options="INSTALLDIRS=vendor"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithCONFIGURE_OPTIONS.64+= --without-perl
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# common targets
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithbuild: $(BUILD_32_and_64)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Remove build machine runpath from libMagick++-6.Q16.so.1.0.0 and
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# libMagickCore-6.Q16.so.1.0.0
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithinstall: $(INSTALL_32_and_64)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith $(PROTO_DIR)/usr/lib/libMagick++-6.Q16.so.1.0.0; \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith $(PROTO_DIR)/usr/lib/$(MACH64)/libMagick++-6.Q16.so.1.0.0; \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith /usr/bin/elfedit -e 'dyn:delete RPATH' \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith $(PROTO_DIR)/usr/lib/libMagick++-6.Q16.so.1.0.0; \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith /usr/bin/elfedit -e 'dyn:delete RPATH' \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith $(PROTO_DIR)/usr/lib/$(MACH64)/libMagick++-6.Q16.so.1.0.0
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith $(PROTO_DIR)/usr/lib/libMagickCore-6.Q16.so.1.0.0; \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith $(PROTO_DIR)/usr/lib/$(MACH64)/libMagickCore-6.Q16.so.1.0.0; \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith /usr/bin/elfedit -e 'dyn:delete RPATH' \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith $(PROTO_DIR)/usr/lib/libMagickCore-6.Q16.so.1.0.0; \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith /usr/bin/elfedit -e 'dyn:delete RPATH' \
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith $(PROTO_DIR)/usr/lib/$(MACH64)/libMagickCore-6.Q16.so.1.0.0
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# ImageMagick tests have hard-coded absolute paths inside, so essentially they
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# can be run only after ImageMagick is actually installed and this is not
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# possible, so the tests are not invoked.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithtest: $(NO_TESTS)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith @echo "Tests can be run only after ImageMagick is installed."
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += compress/bzip2
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += compress/xz
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += image/library/libjpeg
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += image/library/libpng
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += image/library/libtiff
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += library/desktop/cairo
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += library/desktop/pango
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += library/fftw-3
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += library/glib2
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += library/lcms
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += library/libtool/libltdl
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += library/libxml2
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += library/zlib
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += shell/ksh93
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += system/library
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += system/library/c++-runtime
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += system/library/fontconfig
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += system/library/freetype-2
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += system/library/math
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += system/library/openmp
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += x11/library/libx11
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithREQUIRED_PACKAGES += x11/library/libxext
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith