Makefile revision 5636
c313914d0e66b20969215e519bbf2ab4ecf39512Tinderbox User#
c80e152862cc3e3207dc837fde7116bd4c0e4b9dTinderbox User# CDDL HEADER START
c80e152862cc3e3207dc837fde7116bd4c0e4b9dTinderbox User#
8d1b3ceb4d491ce32572f1702f37ed585eede993Evan Hunt# The contents of this file are subject to the terms of the
8d1b3ceb4d491ce32572f1702f37ed585eede993Evan Hunt# Common Development and Distribution License (the "License").
d77cb075aae5595e460e3299bfc1e8ea5d42b560Evan Hunt# You may not use this file except in compliance with the License.
d77cb075aae5595e460e3299bfc1e8ea5d42b560Evan Hunt#
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# or http://www.opensolaris.org/os/licensing.
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# See the License for the specific language governing permissions
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# and limitations under the License.
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews#
701a93f5a592e4652343e049aa495d409c3ee133Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
7ec97ae74e42ec21b354fd2d1366313b41d947d6Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
701a93f5a592e4652343e049aa495d409c3ee133Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
701a93f5a592e4652343e049aa495d409c3ee133Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
002f1373374a0b72fc0329baa682917929bef168Tony Finch# information: Portions Copyright [yyyy] [name of copyright owner]
002f1373374a0b72fc0329baa682917929bef168Tony Finch#
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews# CDDL HEADER END
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews#
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews#
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
73cf0ba4e82c6baef638ecc4e31321223f841d28Mark Andrews#
73cf0ba4e82c6baef638ecc4e31321223f841d28Mark Andrews
73cf0ba4e82c6baef638ecc4e31321223f841d28Mark Andrewsinclude ../../make-rules/shared-macros.mk
d8351dfc9b725b0d727be7acab6247d7d501d9a0Mark Andrews
d8351dfc9b725b0d727be7acab6247d7d501d9a0Mark AndrewsCOMPONENT_NAME= ImageMagick
d8351dfc9b725b0d727be7acab6247d7d501d9a0Mark AndrewsCOMPONENT_VERSION= 6.8.3
3a29ce9c08dd31709c73e7187aebda0d360c537bEvan HuntCOMPONENT_SUBVERSION= 5
3a29ce9c08dd31709c73e7187aebda0d360c537bEvan HuntHUMAN_VERSION= $(COMPONENT_VERSION)-$(COMPONENT_SUBVERSION)
5c78f1f50e53d8e2ed51a187efc2c9a0f43b4b1bMark AndrewsCOMPONENT_PROJECT_URL= http://www.imagemagick.org/
f1740da065d4555039fe8bb53beb4153e3f94de3Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
f1740da065d4555039fe8bb53beb4153e3f94de3Mark AndrewsCOMPONENT_ARCHIVE= $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION).tar.gz
f1740da065d4555039fe8bb53beb4153e3f94de3Mark AndrewsCOMPONENT_ARCHIVE_HASH= \
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark Andrews sha256:daead80170bc6d44cf6a54b4817446cbb7211b8ee445532b64033af190265fe3
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark AndrewsCOMPONENT_ARCHIVE_URL= http://image_magick.veidrodis.com/image_magick/$(COMPONENT_ARCHIVE)
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark AndrewsCOMPONENT_BUGDB= utility/imagemagick
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark Andrews
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark AndrewsTPNO= 17708
ad309e8dfa0601d6053aaa12770a98a6940f89deEvan Hunt
ad309e8dfa0601d6053aaa12770a98a6940f89deEvan Huntinclude $(WS_MAKE_RULES)/prep.mk
635e4351b04fd61ca6d853bdac6268c090b55129Mark Andrewsinclude $(WS_MAKE_RULES)/configure.mk
635e4351b04fd61ca6d853bdac6268c090b55129Mark Andrewsinclude $(WS_MAKE_RULES)/ips.mk
fc04365d2f83f197c8a54545dd9cd4ce6a209940Mark Andrews
fc04365d2f83f197c8a54545dd9cd4ce6a209940Mark AndrewsPATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin
7cbac360bf98c0a52b2d6866ad887616c32d4d3aMark Andrews
7cbac360bf98c0a52b2d6866ad887616c32d4d3aMark Andrews# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but in
7cbac360bf98c0a52b2d6866ad887616c32d4d3aMark Andrews# this case we need to replace the '-' by '.'.
1cf118a656f5fd210787908b845362077fc507f8Evan HuntIPS_COMPONENT_VERSION= $(COMPONENT_VERSION).$(COMPONENT_SUBVERSION)
1cf118a656f5fd210787908b845362077fc507f8Evan Hunt
1cf118a656f5fd210787908b845362077fc507f8Evan HuntCOMPONENT_POST_UNPACK_ACTION= ( $(MV) $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION) \
1cf118a656f5fd210787908b845362077fc507f8Evan Hunt $(COMPONENT_SRC))
1cf118a656f5fd210787908b845362077fc507f8Evan Hunt
1cf118a656f5fd210787908b845362077fc507f8Evan Hunt# To get the Perl modules built it is necessary to copy the PerlMagick
1cf118a656f5fd210787908b845362077fc507f8Evan Hunt# directory to the build directory
1cf118a656f5fd210787908b845362077fc507f8Evan HuntCOMPONENT_PRE_CONFIGURE_ACTION= ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D))
6fb3db01acad7f5c1f4e23789fb0f2ce56cc07deMukund Sivaraman
6fb3db01acad7f5c1f4e23789fb0f2ce56cc07deMukund Sivaramanifeq ($(OS_VERSION),5.11)
6fb3db01acad7f5c1f4e23789fb0f2ce56cc07deMukund SivaramanLIBS += -lsocket -lnsl
fd82c70695888c134287b8018296028c252d100eMukund SivaramanCONFIGURE_ENV += LIBS="$(LIBS)"
fd82c70695888c134287b8018296028c252d100eMukund Sivaramanendif
fd82c70695888c134287b8018296028c252d100eMukund Sivaraman
fd82c70695888c134287b8018296028c252d100eMukund Sivaraman# Show name of "error tag" as part of the warning
4a53e3c2b83c476a93148eaee0272649beb221caMark AndrewsCFLAGS += -errtags=yes
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# To remove the compiler complaints about __restrict keyword,
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# -D_magickcore_restrict should be used.
2cf0fe3b8092f64f8f68ae3693fe2e73e90ad1a4Mark AndrewsCFLAGS += -xc99=%all -D_magickcore_restrict=
2cf0fe3b8092f64f8f68ae3693fe2e73e90ad1a4Mark Andrews
2cf0fe3b8092f64f8f68ae3693fe2e73e90ad1a4Mark Andrews# Needed to generate a decent RUNPATH for Magick.so
2cf0fe3b8092f64f8f68ae3693fe2e73e90ad1a4Mark Andrews#
4221d9cd1d02311fbf9b5f08a038f5af78b10b4aEvan HuntCOMPONENT_BUILD_ARGS += LD="$(CC)"
4221d9cd1d02311fbf9b5f08a038f5af78b10b4aEvan HuntCOMPONENT_BUILD_ARGS += LD_RUN_PATH="$(CONFIGURE_LIBDIR.$(BITS))"
4221d9cd1d02311fbf9b5f08a038f5af78b10b4aEvan Hunt
4221d9cd1d02311fbf9b5f08a038f5af78b10b4aEvan HuntCONFIGURE_OPTIONS+= CFLAGS="$(CFLAGS)"
4221d9cd1d02311fbf9b5f08a038f5af78b10b4aEvan HuntCONFIGURE_OPTIONS+= CXXFLAGS="$(CXXFLAGS)"
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis DupontCONFIGURE_OPTIONS+= --with-modules
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis DupontCONFIGURE_OPTIONS+= --enable-shared=yes
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis DupontCONFIGURE_OPTIONS+= --enable-static=no
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis DupontCONFIGURE_OPTIONS+= --without-gvc
e526027287b849f0b6ab6e069156697cbafa22c1Michał KępieńCONFIGURE_OPTIONS+= --disable-openmp
e526027287b849f0b6ab6e069156697cbafa22c1Michał Kępień# Using option 'with-fontconfig=no' so that the fonts/fonts path specified in
e526027287b849f0b6ab6e069156697cbafa22c1Michał Kępień# configuration file 'type-ghostscript.xml' is being used.
e526027287b849f0b6ab6e069156697cbafa22c1Michał KępieńCONFIGURE_OPTIONS+= --with-fontconfig=no
929329d2d66a7e1083c70a9c918381935bf12799Mukund Sivaraman# Configure option 'with-gs-font-dir' is required because some build systems
929329d2d66a7e1083c70a9c918381935bf12799Mukund Sivaraman# might not have ghostscript fonts installed.
929329d2d66a7e1083c70a9c918381935bf12799Mukund SivaramanCONFIGURE_OPTIONS+= --with-gs-font-dir="/usr/share/ghostscript/fonts"
7e1a62eea2e4ba9d6c3fc718e679b965fa514f69Mark AndrewsCONFIGURE_OPTIONS+= --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
ec29d217ba3a2bf3e617a7b5b6708ae221bee999Mark AndrewsCONFIGURE_OPTIONS.32+= --without-perl
ec29d217ba3a2bf3e617a7b5b6708ae221bee999Mark AndrewsCONFIGURE_OPTIONS.64+= --with-perl=$(PERL)
afefd754734f896bf3e0590177fff83e7cdfdf35Mark AndrewsCONFIGURE_OPTIONS.64+= --with-perl-options="INSTALLDIRS=vendor"
afefd754734f896bf3e0590177fff83e7cdfdf35Mark Andrews
afefd754734f896bf3e0590177fff83e7cdfdf35Mark Andrews# Needed for "gmake test" to work successfully. If SHELLOPTS is exported (as
f0353a586c2bfbae999193cb644b6bc94c7944d8Mark Andrews# it is by the Userland Makefiles), then all shell options get exported to
f0353a586c2bfbae999193cb644b6bc94c7944d8Mark Andrews# child invocations of bash, which results in test failures due to nounset and
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt# xtrace being set unexpectedly, and errors such as "$1: unbound variable" and
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt# diffs failing due to script tracing in output files.
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Huntunexport SHELLOPTS
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt# Tests hang waiting for input unless stdin is redirected.
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan HuntCOMPONENT_TEST_TARGETS = check < /dev/null
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan HuntASLR_MODE = $(ASLR_ENABLE)
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt# Master test transforms
cad79077bd5b2616bc4a7a6b3cbc0953bef8917fMark AndrewsCOMPONENT_TEST_TRANSFORMS += \
cad79077bd5b2616bc4a7a6b3cbc0953bef8917fMark Andrews '-n '\
cad79077bd5b2616bc4a7a6b3cbc0953bef8917fMark Andrews '-e "/TOTAL/p" ' \
cad79077bd5b2616bc4a7a6b3cbc0953bef8917fMark Andrews '-e "/SKIP/p" ' \
adfe58e8e5cd1890585e92b67f1fd01989a1fa7dMark Andrews '-e "/PASS/p" ' \
adfe58e8e5cd1890585e92b67f1fd01989a1fa7dMark Andrews '-e "/FAIL/p" ' \
adfe58e8e5cd1890585e92b67f1fd01989a1fa7dMark Andrews '-e "/ERROR/p" '
c3237dec879f82855403ff7e3ba87b298172efd5Mark Andrews
c3237dec879f82855403ff7e3ba87b298172efd5Mark Andrewsconfigure: $(CONFIGURE_32_and_64)
c3237dec879f82855403ff7e3ba87b298172efd5Mark Andrews
c3237dec879f82855403ff7e3ba87b298172efd5Mark Andrewsbuild: $(BUILD_32_and_64)
c3237dec879f82855403ff7e3ba87b298172efd5Mark Andrews
cb616c6d5c2ece1fac37fa6e0bca2b53d4043098Mark Andrews# Remove build machine runpath from libMagick++-6.Q16.so.1.0.0 and
cb616c6d5c2ece1fac37fa6e0bca2b53d4043098Mark Andrews# libMagickCore-6.Q16.so.1.0.0
cb616c6d5c2ece1fac37fa6e0bca2b53d4043098Mark Andrewsinstall: $(INSTALL_32_and_64)
c0a2210466dec0cc81ebf2ffbe21693b57b9c29cMark Andrews /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
c0a2210466dec0cc81ebf2ffbe21693b57b9c29cMark Andrews $(PROTO_DIR)/usr/lib/libMagick++-6.Q16.so.1.0.0; \
c0a2210466dec0cc81ebf2ffbe21693b57b9c29cMark Andrews /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
534057c9f91a3eb6e0541f3526459c716239b337Mark Andrews $(PROTO_DIR)/usr/lib/$(MACH64)/libMagick++-6.Q16.so.1.0.0; \
534057c9f91a3eb6e0541f3526459c716239b337Mark Andrews /usr/bin/elfedit -e 'dyn:delete RPATH' \
534057c9f91a3eb6e0541f3526459c716239b337Mark Andrews $(PROTO_DIR)/usr/lib/libMagick++-6.Q16.so.1.0.0; \
0f14b041328c062b1fa391887376388dfc8b2fe5Mark Andrews /usr/bin/elfedit -e 'dyn:delete RPATH' \
0f14b041328c062b1fa391887376388dfc8b2fe5Mark Andrews $(PROTO_DIR)/usr/lib/$(MACH64)/libMagick++-6.Q16.so.1.0.0
0f14b041328c062b1fa391887376388dfc8b2fe5Mark Andrews /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
0f14b041328c062b1fa391887376388dfc8b2fe5Mark Andrews $(PROTO_DIR)/usr/lib/libMagickCore-6.Q16.so.1.0.0; \
f7f4730e563a2749629fe7fef4cd9513cd2bfab7Mark Andrews /usr/bin/elfedit -e 'dyn:delete RUNPATH' \
f7f4730e563a2749629fe7fef4cd9513cd2bfab7Mark Andrews $(PROTO_DIR)/usr/lib/$(MACH64)/libMagickCore-6.Q16.so.1.0.0; \
1848d38f441ebf70ab21f6151bc3487a92d25b63Mark Andrews /usr/bin/elfedit -e 'dyn:delete RPATH' \
1848d38f441ebf70ab21f6151bc3487a92d25b63Mark Andrews $(PROTO_DIR)/usr/lib/libMagickCore-6.Q16.so.1.0.0; \
2d82ed9456e72dc4373bea19d63411afe1c48962Mark Andrews /usr/bin/elfedit -e 'dyn:delete RPATH' \
2d82ed9456e72dc4373bea19d63411afe1c48962Mark Andrews $(PROTO_DIR)/usr/lib/$(MACH64)/libMagickCore-6.Q16.so.1.0.0
2d82ed9456e72dc4373bea19d63411afe1c48962Mark Andrews
a5a1cbece45e6ca68aafe3b9b995eac6b0f45dd2Mark Andrewstest: $(TEST_32_and_64)
a5a1cbece45e6ca68aafe3b9b995eac6b0f45dd2Mark Andrews
0d6328ce5f6b799f8e7c6cbbb3b965cf29bfb7baMark Andrewssystem-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
0d6328ce5f6b799f8e7c6cbbb3b965cf29bfb7baMark Andrews
0d6328ce5f6b799f8e7c6cbbb3b965cf29bfb7baMark AndrewsREQUIRED_PACKAGES += compress/bzip2
e01ef6f01c7e8f80122cd80a2e011425a0135489Mark AndrewsREQUIRED_PACKAGES += compress/xz
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += image/library/libjpeg
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += image/library/libpng
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += image/library/libtiff
124cc0660c7eff8021c2422fb47441e9ca08b3f9Tinderbox UserREQUIRED_PACKAGES += library/desktop/cairo
e01ef6f01c7e8f80122cd80a2e011425a0135489Mark AndrewsREQUIRED_PACKAGES += library/desktop/pango
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += library/fftw-3
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += library/glib2
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += library/lcms
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += library/libtool/libltdl
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += library/libxml2
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += library/zlib
bf459d24a117ae2c54c37016430b41cd6d73491cMark AndrewsREQUIRED_PACKAGES += shell/ksh93
bf459d24a117ae2c54c37016430b41cd6d73491cMark AndrewsREQUIRED_PACKAGES += system/library
bf459d24a117ae2c54c37016430b41cd6d73491cMark AndrewsREQUIRED_PACKAGES += system/library/c++-runtime
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += system/library/fontconfig
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += system/library/freetype-2
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsREQUIRED_PACKAGES += system/library/math
bf459d24a117ae2c54c37016430b41cd6d73491cMark AndrewsREQUIRED_PACKAGES += system/library/openmp
f53e0bda467d96dfeeba1b4da30c37b37766bb75Evan HuntREQUIRED_PACKAGES += x11/library/libx11
f53e0bda467d96dfeeba1b4da30c37b37766bb75Evan HuntREQUIRED_PACKAGES += x11/library/libxext
f53e0bda467d96dfeeba1b4da30c37b37766bb75Evan Hunt