Makefile revision 7044
452d2fd15cebd2da9331d5d765558a60b488c1a9rbb#
022cff78006f698453640e0a0e97cc5f8c9de59drbb# CDDL HEADER START
9278d5393ef084f4fc6d7ec8641af5959442c157jwoolley#
9278d5393ef084f4fc6d7ec8641af5959442c157jwoolley# The contents of this file are subject to the terms of the
9278d5393ef084f4fc6d7ec8641af5959442c157jwoolley# Common Development and Distribution License (the "License").
022cff78006f698453640e0a0e97cc5f8c9de59drbb# You may not use this file except in compliance with the License.
022cff78006f698453640e0a0e97cc5f8c9de59drbb#
022cff78006f698453640e0a0e97cc5f8c9de59drbb# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
022cff78006f698453640e0a0e97cc5f8c9de59drbb# or http://www.opensolaris.org/os/licensing.
526a776292f420ffeea0d081c61971ed381fad20stoddard# See the License for the specific language governing permissions
526a776292f420ffeea0d081c61971ed381fad20stoddard# and limitations under the License.
526a776292f420ffeea0d081c61971ed381fad20stoddard#
526a776292f420ffeea0d081c61971ed381fad20stoddard# When distributing Covered Code, include this CDDL HEADER in each
526a776292f420ffeea0d081c61971ed381fad20stoddard# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
526a776292f420ffeea0d081c61971ed381fad20stoddard# If applicable, add the following below this CDDL HEADER, with the
526a776292f420ffeea0d081c61971ed381fad20stoddard# fields enclosed by brackets "[]" replaced with your own identifying
526a776292f420ffeea0d081c61971ed381fad20stoddard# information: Portions Copyright [yyyy] [name of copyright owner]
526a776292f420ffeea0d081c61971ed381fad20stoddard#
526a776292f420ffeea0d081c61971ed381fad20stoddard# CDDL HEADER END
526a776292f420ffeea0d081c61971ed381fad20stoddard#
452d2fd15cebd2da9331d5d765558a60b488c1a9rbb
62ddc9851530478919d169ba9c34b80f60cf7718trawick#
62ddc9851530478919d169ba9c34b80f60cf7718trawick# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
62ddc9851530478919d169ba9c34b80f60cf7718trawick#
62ddc9851530478919d169ba9c34b80f60cf7718trawick
62ddc9851530478919d169ba9c34b80f60cf7718trawickCOMPILER=gcc
904d7bf799c6216beb34519463596b4fce630308wroweinclude ../../make-rules/shared-macros.mk
904d7bf799c6216beb34519463596b4fce630308wrowe
904d7bf799c6216beb34519463596b4fce630308wroweCOMPONENT_NAME= ImageMagick
904d7bf799c6216beb34519463596b4fce630308wroweCOMPONENT_VERSION= 6.9.5
904d7bf799c6216beb34519463596b4fce630308wroweCOMPONENT_MAJOR_VERSION= $(shell echo $(COMPONENT_VERSION) | $(GSED) -e 's/\([0-9]\+\)\.[0-9]\+\.[0-9]\+/\1/')
904d7bf799c6216beb34519463596b4fce630308wroweCOMPONENT_SUBVERSION= 10
904d7bf799c6216beb34519463596b4fce630308wroweHUMAN_VERSION= $(COMPONENT_VERSION)-$(COMPONENT_SUBVERSION)
904d7bf799c6216beb34519463596b4fce630308wroweCOMPONENT_PROJECT_URL= http://www.imagemagick.org/
904d7bf799c6216beb34519463596b4fce630308wroweCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
17a4c6968b2fa692ff4dde12fe305230ee6b0421aaronCOMPONENT_ARCHIVE= $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION).tar.gz
17a4c6968b2fa692ff4dde12fe305230ee6b0421aaronCOMPONENT_ARCHIVE_HASH= \
17a4c6968b2fa692ff4dde12fe305230ee6b0421aaron sha256:468419fea538ba1dcd2dc69334e8981cf41417f9a9938973884dccaedc403b39
17a4c6968b2fa692ff4dde12fe305230ee6b0421aaronCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/download/$(COMPONENT_ARCHIVE)
83b031099aa3dc8a5fd2f708e397818cbd16c9aajerenkrantzCOMPONENT_BUGDB= utility/imagemagick
83b031099aa3dc8a5fd2f708e397818cbd16c9aajerenkrantz
83b031099aa3dc8a5fd2f708e397818cbd16c9aajerenkrantzTPNO= 29915
01e77cadbd9ad4962993380245bcc033dde523e4rbb
01e77cadbd9ad4962993380245bcc033dde523e4rbbinclude $(WS_MAKE_RULES)/prep.mk
01e77cadbd9ad4962993380245bcc033dde523e4rbbinclude $(WS_MAKE_RULES)/configure.mk
8ea9794272347cfdd92861f46295406649f01afatrawickinclude $(WS_MAKE_RULES)/ips.mk
8ea9794272347cfdd92861f46295406649f01afatrawick
8ea9794272347cfdd92861f46295406649f01afatrawickPATH=$(SPRO_VROOT)/bin:$(USRBINDIR):$(GNUBIN)
8ea9794272347cfdd92861f46295406649f01afatrawick
b900452c9c36031434d318880f023c0fb9143325rbb# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but in
b900452c9c36031434d318880f023c0fb9143325rbb# this case we need to replace the '-' by '.'.
b900452c9c36031434d318880f023c0fb9143325rbbIPS_COMPONENT_VERSION= $(COMPONENT_VERSION).$(COMPONENT_SUBVERSION)
b900452c9c36031434d318880f023c0fb9143325rbb
b900452c9c36031434d318880f023c0fb9143325rbbCOMPONENT_POST_UNPACK_ACTION= ( $(MV) $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION) \
b900452c9c36031434d318880f023c0fb9143325rbb $(COMPONENT_SRC))
b900452c9c36031434d318880f023c0fb9143325rbb
b900452c9c36031434d318880f023c0fb9143325rbb# To get the Perl modules built it is necessary to copy the PerlMagick
b900452c9c36031434d318880f023c0fb9143325rbb# directory to the build directory
43053faf24ffe7657bb32bc06d4058dedf3ef053rbbCOMPONENT_PRE_CONFIGURE_ACTION += ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D))
8b666e1fb772b6fe45de3604b224f3e1f2cfd620rbb
c453a141db60a5b19649eac508f4851a8729c556rbb# Don't use rpath, or relink!
c453a141db60a5b19649eac508f4851a8729c556rbbCOMPONENT_POST_CONFIGURE_ACTION = \
c453a141db60a5b19649eac508f4851a8729c556rbb (cd $(BUILD_DIR_$(BITS)) ; \
8b91dcac0e1ef7796c72d16b0962267313cac486jerenkrantz $(GSED) -i \
8b91dcac0e1ef7796c72d16b0962267313cac486jerenkrantz -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
8b91dcac0e1ef7796c72d16b0962267313cac486jerenkrantz -e 's|need_relink=yes|need_relink=not_on_solaris|' \
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe libtool)
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe
6ce942b017db75b559a42bdc2d7b8ea9e869a956wroweLIBS += -lsocket -lnsl
6ce942b017db75b559a42bdc2d7b8ea9e869a956wroweCONFIGURE_ENV += LIBS="$(LIBS)"
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# This is needed by our modified Magick++/demo/demos.tap and
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# Magic++/tests/tests.tap
6ce942b017db75b559a42bdc2d7b8ea9e869a956wroweCOMPONENT_TEST_ENV += BITS=$(BITS)
7dfed2b71c9c4223996cbd7c5c0c85c7c8fef2a4rbb
7dfed2b71c9c4223996cbd7c5c0c85c7c8fef2a4rbb# Prevent older versions of libMagick{Core,Wand}-6.Q16.so from the build
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# machine from being found ahead of new versions from the proto area.
7dfed2b71c9c4223996cbd7c5c0c85c7c8fef2a4rbbLD_OPTIONS_SO= -L. -L../../magick/.libs
574f6ff9ee80ef4f772649c5c8319b764a8abe42jerenkrantzCOMPONENT_BUILD_ENV += LD_OPTIONS_SO="$(LD_OPTIONS_SO)"
574f6ff9ee80ef4f772649c5c8319b764a8abe42jerenkrantz
574f6ff9ee80ef4f772649c5c8319b764a8abe42jerenkrantz# S11 does not support .a files so we have to modify the test script in a way
6d7d70dbda8e461d87f2d41e323755496ae3ebc7trawick# that it finds the libraries in .libs dir
6d7d70dbda8e461d87f2d41e323755496ae3ebc7trawick$(BUILD_32): COMPONENT_POST_BUILD_ACTION= \
6d7d70dbda8e461d87f2d41e323755496ae3ebc7trawick perl -pi -e 's,"$$,/.libs", if m/^MAGICK_(CODER|FILTER)_MODULE_PATH/' "$(BUILD_DIR_32)/common.shi"
22a25f3393393b781e214f4abef17950bcb8bbe3jerenkrantz
22a25f3393393b781e214f4abef17950bcb8bbe3jerenkrantz$(BUILD_64): COMPONENT_POST_BUILD_ACTION= \
22a25f3393393b781e214f4abef17950bcb8bbe3jerenkrantz perl -pi -e 's,"$$,/.libs", if m/^MAGICK_(CODER|FILTER)_MODULE_PATH/' "$(BUILD_DIR_64)/common.shi"
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwrowe
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwrowe# To remove the compiler complaints about __restrict keyword,
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwrowe# -D_magickcore_restrict should be used.
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwroweCPPFLAGS_USER += -D_magickcore_restrict=
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwroweCONFIGURE_ENV += CPPFLAGS_USER=$(CPPFLAGS_USER)
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwrowe
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwroweCONFIGURE_OPTIONS+= CFLAGS="$(CFLAGS)"
8bda0627eb2aca9e678c1303a0423d33069388dfwroweCONFIGURE_OPTIONS+= CXXFLAGS="$(CXXFLAGS)"
de63b1eeff87cd19cf42bb83cca85381026965ddjerenkrantzCONFIGURE_OPTIONS+= --with-modules
f00bc25ff5027f3a40e9cd0ade782641bd0bf1d0wroweCONFIGURE_OPTIONS+= --enable-shared
e36ef0d081aa59867688bcbb3da65952ec16fae3rbbCONFIGURE_OPTIONS+= --disable-static
e36ef0d081aa59867688bcbb3da65952ec16fae3rbbCONFIGURE_OPTIONS+= --without-gvc
e36ef0d081aa59867688bcbb3da65952ec16fae3rbbCONFIGURE_OPTIONS+= --disable-openmp
e36ef0d081aa59867688bcbb3da65952ec16fae3rbb# Using option 'with-fontconfig=no' so that the fonts/fonts path specified in
e36ef0d081aa59867688bcbb3da65952ec16fae3rbb# configuration file 'type-ghostscript.xml' is being used.
e36ef0d081aa59867688bcbb3da65952ec16fae3rbbCONFIGURE_OPTIONS+= --with-fontconfig=no
e36ef0d081aa59867688bcbb3da65952ec16fae3rbb# Configure option 'with-gs-font-dir' is required because some build systems
e36ef0d081aa59867688bcbb3da65952ec16fae3rbb# might not have ghostscript fonts installed.
e36ef0d081aa59867688bcbb3da65952ec16fae3rbbCONFIGURE_OPTIONS+= --with-gs-font-dir="/usr/share/ghostscript/fonts"
e36ef0d081aa59867688bcbb3da65952ec16fae3rbbCONFIGURE_OPTIONS+= --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
e36ef0d081aa59867688bcbb3da65952ec16fae3rbbCONFIGURE_OPTIONS.32+= --with-perl=$(PERL)
52df98b165194a0ad68885f49f81fdaf56ece568wroweCONFIGURE_OPTIONS.32+= --with-perl-options="INSTALLDIRS=vendor"
52df98b165194a0ad68885f49f81fdaf56ece568wroweCONFIGURE_OPTIONS.64+= --without-perl
52df98b165194a0ad68885f49f81fdaf56ece568wrowe
2c294c31addd5c957bafe6e78c4a30d423ad6e80rbbbuild: $(BUILD_32_and_64)
2c294c31addd5c957bafe6e78c4a30d423ad6e80rbb
2c294c31addd5c957bafe6e78c4a30d423ad6e80rbbinstall: $(INSTALL_32_and_64)
2c294c31addd5c957bafe6e78c4a30d423ad6e80rbb
7e44dd5082cd865068285e8f915bb5f045e0bb80larsPKG_MACROS += COMPONENT_MAJOR_VERSION=$(COMPONENT_MAJOR_VERSION)
7e44dd5082cd865068285e8f915bb5f045e0bb80larsPKG_MACROS += PERL_PKG=$(PERL_PKG)
7e44dd5082cd865068285e8f915bb5f045e0bb80lars
7e44dd5082cd865068285e8f915bb5f045e0bb80lars# Needed for "gmake test" to work successfully. If SHELLOPTS is exported (as
44a4ee1140769173da7bc2b42d1a686e3260ad84wrowe# it is by the Userland Makefiles), then all shell options get exported to
44a4ee1140769173da7bc2b42d1a686e3260ad84wrowe# child invocations of bash, which results in test failures due to nounset and
44a4ee1140769173da7bc2b42d1a686e3260ad84wrowe# xtrace being set unexpectedly, and errors such as "$1: unbound variable" and
44a4ee1140769173da7bc2b42d1a686e3260ad84wrowe# diffs failing due to script tracing in output files.
44a4ee1140769173da7bc2b42d1a686e3260ad84wroweunexport SHELLOPTS
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantztest: $(TEST_32_and_64)
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz
978faa9e29e0f0c42e66c07240e562325a4717b0jerenkrantzREQUIRED_PACKAGES += compress/bzip2
978faa9e29e0f0c42e66c07240e562325a4717b0jerenkrantzREQUIRED_PACKAGES += compress/xz
978faa9e29e0f0c42e66c07240e562325a4717b0jerenkrantzREQUIRED_PACKAGES += image/library/libjpeg
978faa9e29e0f0c42e66c07240e562325a4717b0jerenkrantzREQUIRED_PACKAGES += image/library/libpng
976501adbc040220270f7d1d77c4b8373033be69wroweREQUIRED_PACKAGES += image/library/libtiff
976501adbc040220270f7d1d77c4b8373033be69wroweREQUIRED_PACKAGES += library/desktop/cairo
976501adbc040220270f7d1d77c4b8373033be69wroweREQUIRED_PACKAGES += library/desktop/pango
976501adbc040220270f7d1d77c4b8373033be69wroweREQUIRED_PACKAGES += library/fftw-3
976501adbc040220270f7d1d77c4b8373033be69wroweREQUIRED_PACKAGES += library/glib2
976501adbc040220270f7d1d77c4b8373033be69wroweREQUIRED_PACKAGES += library/lcms
10a00688adcf1df367b1243810beedaabe6b1abeminfrinREQUIRED_PACKAGES += library/libtool/libltdl
10a00688adcf1df367b1243810beedaabe6b1abeminfrinREQUIRED_PACKAGES += library/libxml2
10a00688adcf1df367b1243810beedaabe6b1abeminfrinREQUIRED_PACKAGES += library/zlib
8a3a703eae0e35f674b189181609545c6fc77a09rbbREQUIRED_PACKAGES += shell/ksh93
8a3a703eae0e35f674b189181609545c6fc77a09rbbREQUIRED_PACKAGES += system/library
8a3a703eae0e35f674b189181609545c6fc77a09rbbREQUIRED_PACKAGES += system/library/c++-runtime
8a3a703eae0e35f674b189181609545c6fc77a09rbbREQUIRED_PACKAGES += system/library/fontconfig
9af1ccb223d0669b3c3a43eed070d815afde9084mjcREQUIRED_PACKAGES += system/library/freetype-2
9af1ccb223d0669b3c3a43eed070d815afde9084mjcREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
9af1ccb223d0669b3c3a43eed070d815afde9084mjcREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
9d41fafe32b324c197f25224207fc6ce34f085bfrbbREQUIRED_PACKAGES += system/library/math
9d41fafe32b324c197f25224207fc6ce34f085bfrbbREQUIRED_PACKAGES += system/library/openmp
9d41fafe32b324c197f25224207fc6ce34f085bfrbbREQUIRED_PACKAGES += x11/library/libx11
9d41fafe32b324c197f25224207fc6ce34f085bfrbbREQUIRED_PACKAGES += x11/library/libxext
9d41fafe32b324c197f25224207fc6ce34f085bfrbb