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#
6070N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
168N/A#
168N/A
6070N/ACOMPILER=gcc
168N/Ainclude ../../make-rules/shared-macros.mk
168N/A
168N/ACOMPONENT_NAME= ImageMagick
6441N/ACOMPONENT_VERSION= 6.9.5
6070N/ACOMPONENT_MAJOR_VERSION= $(shell echo $(COMPONENT_VERSION) | $(GSED) -e 's/\([0-9]\+\)\.[0-9]\+\.[0-9]\+/\1/')
7044N/ACOMPONENT_SUBVERSION= 10
586N/AHUMAN_VERSION= $(COMPONENT_VERSION)-$(COMPONENT_SUBVERSION)
618N/ACOMPONENT_PROJECT_URL= http://www.imagemagick.org/
168N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
168N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION).tar.gz
844N/ACOMPONENT_ARCHIVE_HASH= \
7044N/A sha256:468419fea538ba1dcd2dc69334e8981cf41417f9a9938973884dccaedc403b39
6070N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/download/$(COMPONENT_ARCHIVE)
1273N/ACOMPONENT_BUGDB= utility/imagemagick
168N/A
6441N/ATPNO= 29915
3661N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
168N/A
6070N/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
1921N/ACOMPONENT_POST_UNPACK_ACTION= ( $(MV) $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION) \
1921N/A $(COMPONENT_SRC))
168N/A
6070N/A# To get the Perl modules built it is necessary to copy the PerlMagick
6070N/A# directory to the build directory
6070N/ACOMPONENT_PRE_CONFIGURE_ACTION += ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D))
6070N/A
6070N/A# Don't use rpath, or relink!
6070N/ACOMPONENT_POST_CONFIGURE_ACTION = \
6070N/A (cd $(BUILD_DIR_$(BITS)) ; \
6070N/A $(GSED) -i \
6070N/A -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
6070N/A -e 's|need_relink=yes|need_relink=not_on_solaris|' \
6070N/A libtool)
1921N/A
1921N/ALIBS += -lsocket -lnsl
1921N/ACONFIGURE_ENV += LIBS="$(LIBS)"
168N/A
7044N/A# This is needed by our modified Magick++/demo/demos.tap and
7044N/A# Magic++/tests/tests.tap
7044N/ACOMPONENT_TEST_ENV += BITS=$(BITS)
7044N/A
6070N/A# Prevent older versions of libMagick{Core,Wand}-6.Q16.so from the build
6070N/A# machine from being found ahead of new versions from the proto area.
6070N/ALD_OPTIONS_SO= -L. -L../../magick/.libs
6070N/ACOMPONENT_BUILD_ENV += LD_OPTIONS_SO="$(LD_OPTIONS_SO)"
6070N/A
7044N/A# S11 does not support .a files so we have to modify the test script in a way
7044N/A# that it finds the libraries in .libs dir
7044N/A$(BUILD_32): COMPONENT_POST_BUILD_ACTION= \
7044N/A perl -pi -e 's,"$$,/.libs", if m/^MAGICK_(CODER|FILTER)_MODULE_PATH/' "$(BUILD_DIR_32)/common.shi"
7044N/A
7044N/A$(BUILD_64): COMPONENT_POST_BUILD_ACTION= \
7044N/A perl -pi -e 's,"$$,/.libs", if m/^MAGICK_(CODER|FILTER)_MODULE_PATH/' "$(BUILD_DIR_64)/common.shi"
7044N/A
6070N/A# To remove the compiler complaints about __restrict keyword,
1921N/A# -D_magickcore_restrict should be used.
6070N/ACPPFLAGS_USER += -D_magickcore_restrict=
6070N/ACONFIGURE_ENV += CPPFLAGS_USER=$(CPPFLAGS_USER)
485N/A
168N/ACONFIGURE_OPTIONS+= CFLAGS="$(CFLAGS)"
206N/ACONFIGURE_OPTIONS+= CXXFLAGS="$(CXXFLAGS)"
168N/ACONFIGURE_OPTIONS+= --with-modules
6070N/ACONFIGURE_OPTIONS+= --enable-shared
6070N/ACONFIGURE_OPTIONS+= --disable-static
168N/ACONFIGURE_OPTIONS+= --without-gvc
1921N/ACONFIGURE_OPTIONS+= --disable-openmp
1921N/A# Using option 'with-fontconfig=no' so that the fonts/fonts path specified in
1921N/A# configuration file 'type-ghostscript.xml' is being used.
1921N/ACONFIGURE_OPTIONS+= --with-fontconfig=no
6070N/A# Configure option 'with-gs-font-dir' is required because some build systems
6070N/A# might not have ghostscript fonts installed.
1921N/ACONFIGURE_OPTIONS+= --with-gs-font-dir="/usr/share/ghostscript/fonts"
577N/ACONFIGURE_OPTIONS+= --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
277N/ACONFIGURE_OPTIONS.32+= --with-perl=$(PERL)
383N/ACONFIGURE_OPTIONS.32+= --with-perl-options="INSTALLDIRS=vendor"
168N/ACONFIGURE_OPTIONS.64+= --without-perl
168N/A
168N/Abuild: $(BUILD_32_and_64)
7044N/A
168N/Ainstall: $(INSTALL_32_and_64)
6070N/A
6070N/APKG_MACROS += COMPONENT_MAJOR_VERSION=$(COMPONENT_MAJOR_VERSION)
6070N/APKG_MACROS += PERL_PKG=$(PERL_PKG)
168N/A
7044N/A# Needed for "gmake test" to work successfully. If SHELLOPTS is exported (as
7044N/A# it is by the Userland Makefiles), then all shell options get exported to
7044N/A# child invocations of bash, which results in test failures due to nounset and
7044N/A# xtrace being set unexpectedly, and errors such as "$1: unbound variable" and
7044N/A# diffs failing due to script tracing in output files.
7044N/Aunexport SHELLOPTS
7044N/A
7044N/Atest: $(TEST_32_and_64)
168N/A
3996N/AREQUIRED_PACKAGES += compress/bzip2
3996N/AREQUIRED_PACKAGES += compress/xz
3996N/AREQUIRED_PACKAGES += image/library/libjpeg
3996N/AREQUIRED_PACKAGES += image/library/libpng
3996N/AREQUIRED_PACKAGES += image/library/libtiff
3996N/AREQUIRED_PACKAGES += library/desktop/cairo
3996N/AREQUIRED_PACKAGES += library/desktop/pango
3996N/AREQUIRED_PACKAGES += library/fftw-3
3996N/AREQUIRED_PACKAGES += library/glib2
3996N/AREQUIRED_PACKAGES += library/lcms
3996N/AREQUIRED_PACKAGES += library/libtool/libltdl
3996N/AREQUIRED_PACKAGES += library/libxml2
3996N/AREQUIRED_PACKAGES += library/zlib
3996N/AREQUIRED_PACKAGES += shell/ksh93
3996N/AREQUIRED_PACKAGES += system/library
3996N/AREQUIRED_PACKAGES += system/library/c++-runtime
3996N/AREQUIRED_PACKAGES += system/library/fontconfig
3996N/AREQUIRED_PACKAGES += system/library/freetype-2
6070N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
6070N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
3996N/AREQUIRED_PACKAGES += system/library/math
3996N/AREQUIRED_PACKAGES += system/library/openmp
3996N/AREQUIRED_PACKAGES += x11/library/libx11
3996N/AREQUIRED_PACKAGES += x11/library/libxext