168N/A#
168N/A# CDDL HEADER START
168N/A#
168N/A# The contents of this file are subject to the terms of the
168N/A# Common Development and Distribution License (the "License").
168N/A# You may not use this file except in compliance with the License.
168N/A#
168N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
168N/A# or http://www.opensolaris.org/os/licensing.
168N/A# See the License for the specific language governing permissions
168N/A# and limitations under the License.
168N/A#
168N/A# When distributing Covered Code, include this CDDL HEADER in each
168N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
168N/A# If applicable, add the following below this CDDL HEADER, with the
168N/A# fields enclosed by brackets "[]" replaced with your own identifying
168N/A# information: Portions Copyright [yyyy] [name of copyright owner]
168N/A#
168N/A# CDDL HEADER END
168N/A#
168N/A
168N/A#
5636N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
168N/A#
5680N/ABUILD_BITS= 64_and_32
6018N/ACOMPILER=gcc
168N/Ainclude ../../make-rules/shared-macros.mk
168N/A
168N/ACOMPONENT_NAME= ImageMagick
6407N/ACOMPONENT_VERSION= 6.9.5
6018N/ACOMPONENT_MAJOR_VERSION= $(shell echo $(COMPONENT_VERSION) | $(GSED) -e 's/\([0-9]\+\)\.[0-9]\+\.[0-9]\+/\1/')
7030N/ACOMPONENT_SUBVERSION= 10
586N/AHUMAN_VERSION= $(COMPONENT_VERSION)-$(COMPONENT_SUBVERSION)
618N/ACOMPONENT_PROJECT_URL= http://www.imagemagick.org/
168N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION).tar.gz
844N/ACOMPONENT_ARCHIVE_HASH= \
7030N/A sha256:468419fea538ba1dcd2dc69334e8981cf41417f9a9938973884dccaedc403b39
6018N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/download/$(COMPONENT_ARCHIVE)
1258N/ACOMPONENT_BUGDB= utility/imagemagick
168N/A
6407N/ATPNO= 29915
2899N/A
7243N/A# Enable adiheap security extension.
7243N/A# adistack fails with libgcc exception unwinding code.
7243N/AADIHEAP_MODE = $(ADIHEAP_ENABLE)
7243N/AADISTACK_MODE = $(ADISTACK_DISABLE)
7243N/A
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
168N/A
5680N/APATH=$(SPRO_VROOT)/bin:$(USRBINDIR):$(GNUBIN)
519N/A
168N/A# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but in
168N/A# this case we need to replace the '-' by '.'.
168N/AIPS_COMPONENT_VERSION= $(COMPONENT_VERSION).$(COMPONENT_SUBVERSION)
168N/A
1589N/ACOMPONENT_POST_UNPACK_ACTION= ( $(MV) $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION) \
1589N/A $(COMPONENT_SRC))
168N/A
5636N/A# To get the Perl modules built it is necessary to copy the PerlMagick
5636N/A# directory to the build directory
5680N/ACOMPONENT_PRE_CONFIGURE_ACTION += ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D))
1589N/A
6018N/A# Don't use rpath, or relink!
6018N/ACOMPONENT_POST_CONFIGURE_ACTION = \
6018N/A (cd $(BUILD_DIR_$(BITS)) ; \
6018N/A $(GSED) -i \
6018N/A -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
6018N/A -e 's|need_relink=yes|need_relink=not_on_solaris|' \
6018N/A libtool)
6018N/A
4957N/Aifeq ($(OS_VERSION),5.11)
4957N/ALIBS += -lsocket -lnsl
4957N/ACONFIGURE_ENV += LIBS="$(LIBS)"
4957N/Aendif
4957N/A
6018N/A# Prevent older versions of libMagick{Core,Wand}-6.Q16.so from the build
6018N/A# machine from being found ahead of new versions from the proto area.
6018N/ALD_OPTIONS_SO= -L. -L../../magick/.libs
6018N/ACOMPONENT_BUILD_ENV += LD_OPTIONS_SO="$(LD_OPTIONS_SO)"
5680N/A
3798N/A# To remove the compiler complaints about __restrict keyword,
1589N/A# -D_magickcore_restrict should be used.
6018N/ACPPFLAGS_USER += -D_magickcore_restrict=
6018N/ACONFIGURE_ENV += CPPFLAGS_USER=$(CPPFLAGS_USER)
485N/A
168N/ACONFIGURE_OPTIONS+= --with-modules
5680N/ACONFIGURE_OPTIONS+= --enable-shared
5680N/ACONFIGURE_OPTIONS+= --disable-static
168N/ACONFIGURE_OPTIONS+= --without-gvc
1596N/ACONFIGURE_OPTIONS+= --disable-openmp
7030N/ACONFIGURE_OPTIONS+= --without-openjp2 # tests do not pass
1589N/A# Using option 'with-fontconfig=no' so that the fonts/fonts path specified in
1589N/A# configuration file 'type-ghostscript.xml' is being used.
1589N/ACONFIGURE_OPTIONS+= --with-fontconfig=no
3798N/A# Configure option 'with-gs-font-dir' is required because some build systems
3798N/A# might not have ghostscript fonts installed.
1589N/ACONFIGURE_OPTIONS+= --with-gs-font-dir="/usr/share/ghostscript/fonts"
577N/ACONFIGURE_OPTIONS+= --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
5636N/ACONFIGURE_OPTIONS.32+= --without-perl
5636N/ACONFIGURE_OPTIONS.64+= --with-perl=$(PERL)
5636N/ACONFIGURE_OPTIONS.64+= --with-perl-options="INSTALLDIRS=vendor"
168N/A
3798N/A# Needed for "gmake test" to work successfully. If SHELLOPTS is exported (as
3798N/A# it is by the Userland Makefiles), then all shell options get exported to
3798N/A# child invocations of bash, which results in test failures due to nounset and
3798N/A# xtrace being set unexpectedly, and errors such as "$1: unbound variable" and
3798N/A# diffs failing due to script tracing in output files.
3798N/Aunexport SHELLOPTS
3798N/A
3798N/A# Tests hang waiting for input unless stdin is redirected.
3798N/ACOMPONENT_TEST_TARGETS = check < /dev/null
3798N/A
4867N/A# Master test transforms
4867N/ACOMPONENT_TEST_TRANSFORMS += \
4867N/A '-n '\
4867N/A '-e "/TOTAL/p" ' \
4867N/A '-e "/SKIP/p" ' \
4867N/A '-e "/PASS/p" ' \
4867N/A '-e "/FAIL/p" ' \
4867N/A '-e "/ERROR/p" '
4867N/A
6018N/APKG_MACROS += COMPONENT_MAJOR_VERSION=$(COMPONENT_MAJOR_VERSION)
6018N/APKG_MACROS += PERL_PKG=$(PERL_PKG)
4337N/A
3817N/AREQUIRED_PACKAGES += compress/bzip2
3817N/AREQUIRED_PACKAGES += compress/xz
3817N/AREQUIRED_PACKAGES += image/library/libjpeg
3817N/AREQUIRED_PACKAGES += image/library/libpng
3817N/AREQUIRED_PACKAGES += image/library/libtiff
3817N/AREQUIRED_PACKAGES += library/desktop/cairo
3817N/AREQUIRED_PACKAGES += library/desktop/pango
3817N/AREQUIRED_PACKAGES += library/fftw-3
3817N/AREQUIRED_PACKAGES += library/glib2
6018N/AREQUIRED_PACKAGES += library/lcms2
3817N/AREQUIRED_PACKAGES += library/libtool/libltdl
3817N/AREQUIRED_PACKAGES += library/libxml2
3817N/AREQUIRED_PACKAGES += library/zlib
3817N/AREQUIRED_PACKAGES += shell/ksh93
3817N/AREQUIRED_PACKAGES += system/library/c++-runtime
3817N/AREQUIRED_PACKAGES += system/library/fontconfig
3817N/AREQUIRED_PACKAGES += system/library/freetype-2
6018N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
6018N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
3817N/AREQUIRED_PACKAGES += system/library/math
3817N/AREQUIRED_PACKAGES += system/library/openmp
3817N/AREQUIRED_PACKAGES += x11/library/libx11
3817N/AREQUIRED_PACKAGES += x11/library/libxext