components/imagemagick/Makefile
author Shawn Walker-Salas <shawn.walker@oracle.com>
Wed, 30 Mar 2016 13:33:31 -0700
changeset 5682 94c0ca64c022
parent 5638 b88b6c00208e
child 6020 83b3789e8d88
permissions -rw-r--r--
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh 22228656 remove redundant declarations and additions from makefiles 22252545 simplify build rules for components from common upstream 22378457 tclConfig.sh compiler settings are too specific 22727315 httping curses gui missing 22750630 procmail ignores userland cflags and may use private strstr function 22758725 wdiff uses diff from PATH instead of /usr/gnu/bin/diff 22926847 cloog Makefile typo when setting ASLR_MODE 22935090 tk config script has wrong linker flags

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
#
BUILD_BITS= 64_and_32
include ../../make-rules/shared-macros.mk

COMPONENT_NAME=			ImageMagick
COMPONENT_VERSION=		6.8.3
COMPONENT_SUBVERSION=		5
HUMAN_VERSION=			$(COMPONENT_VERSION)-$(COMPONENT_SUBVERSION)
COMPONENT_PROJECT_URL=		http://www.imagemagick.org/
COMPONENT_ARCHIVE=		$(COMPONENT_SRC)-$(COMPONENT_SUBVERSION).tar.gz
COMPONENT_ARCHIVE_HASH=	\
    sha256:daead80170bc6d44cf6a54b4817446cbb7211b8ee445532b64033af190265fe3
COMPONENT_ARCHIVE_URL=	http://image_magick.veidrodis.com/image_magick/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB=	utility/imagemagick

TPNO=			17708

include $(WS_MAKE_RULES)/common.mk

PATH=$(SPRO_VROOT)/bin:$(USRBINDIR):$(GNUBIN)

# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but in
# this case we need to replace the '-' by '.'.
IPS_COMPONENT_VERSION=	$(COMPONENT_VERSION).$(COMPONENT_SUBVERSION)

COMPONENT_POST_UNPACK_ACTION= ( $(MV) $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION) \
    $(COMPONENT_SRC))

# To get the Perl modules built it is necessary to copy the PerlMagick
# directory to the build directory
COMPONENT_PRE_CONFIGURE_ACTION += ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D))

ifeq ($(OS_VERSION),5.11)
LIBS += -lsocket -lnsl
CONFIGURE_ENV += LIBS="$(LIBS)"
endif

# Show name of "error tag" as part of the warning
CFLAGS.studio += -errtags=yes

studio_C99MODE= $(studio_C99_ENABLE)

# To remove the compiler complaints about __restrict keyword,
# -D_magickcore_restrict should be used.
CFLAGS += -D_magickcore_restrict=

# Needed to generate a decent RUNPATH for Magick.so
#
COMPONENT_BUILD_ARGS += LD="$(CC)"
COMPONENT_BUILD_ARGS += LD_RUN_PATH="$(CONFIGURE_LIBDIR.$(BITS))"

CONFIGURE_OPTIONS+= --with-modules
CONFIGURE_OPTIONS+= --enable-shared
CONFIGURE_OPTIONS+= --disable-static
CONFIGURE_OPTIONS+= --without-gvc
CONFIGURE_OPTIONS+= --disable-openmp
# Using option 'with-fontconfig=no' so that the fonts/fonts path specified in
# configuration file 'type-ghostscript.xml' is being used.
CONFIGURE_OPTIONS+= --with-fontconfig=no
# Configure option 'with-gs-font-dir' is required because some build systems
# might not have ghostscript fonts installed.
CONFIGURE_OPTIONS+= --with-gs-font-dir="/usr/share/ghostscript/fonts"
CONFIGURE_OPTIONS+= --x-libraries=$(CONFIGURE_LIBDIR.$(BITS)) 
CONFIGURE_OPTIONS.32+= --without-perl
CONFIGURE_OPTIONS.64+= --with-perl=$(PERL)
CONFIGURE_OPTIONS.64+= --with-perl-options="INSTALLDIRS=vendor"

# Needed for "gmake test" to work successfully.  If SHELLOPTS is exported (as
# it is by the Userland Makefiles), then all shell options get exported to
# child invocations of bash, which results in test failures due to nounset and
# xtrace being set unexpectedly, and errors such as "$1: unbound variable" and
# diffs failing due to script tracing in output files.
unexport SHELLOPTS

# Tests hang waiting for input unless stdin is redirected.
COMPONENT_TEST_TARGETS = check < /dev/null

# Master test transforms
COMPONENT_TEST_TRANSFORMS += \
	'-n '\
	'-e "/TOTAL/p" ' \
	'-e "/SKIP/p" ' \
	'-e "/PASS/p" ' \
	'-e "/FAIL/p" ' \
	'-e "/ERROR/p" ' 

# Remove build machine runpath from libMagick++-6.Q16.so.1.0.0 and
# libMagickCore-6.Q16.so.1.0.0
COMPONENT_POST_INSTALL_ACTION.32 += \
	$(ELFEDIT) -e 'dyn:delete RUNPATH' \
	    $(PROTOUSRLIBDIR)/libMagick++-6.Q16.so.1.0.0; \
	$(ELFEDIT) -e 'dyn:delete RPATH' \
	    $(PROTOUSRLIBDIR)/libMagick++-6.Q16.so.1.0.0; \
	$(ELFEDIT) -e 'dyn:delete RUNPATH' \
	    $(PROTOUSRLIBDIR)/libMagickCore-6.Q16.so.1.0.0; \
	$(ELFEDIT) -e 'dyn:delete RPATH' \
	    $(PROTOUSRLIBDIR)/libMagickCore-6.Q16.so.1.0.0

COMPONENT_POST_INSTALL_ACTION.64 += \
	$(ELFEDIT) -e 'dyn:delete RUNPATH' \
	    $(PROTOUSRLIBDIR64)/libMagick++-6.Q16.so.1.0.0; \
	$(ELFEDIT) -e 'dyn:delete RPATH' \
	    $(PROTOUSRLIBDIR64)/libMagick++-6.Q16.so.1.0.0; \
	$(ELFEDIT) -e 'dyn:delete RUNPATH' \
	    $(PROTOUSRLIBDIR64)/libMagickCore-6.Q16.so.1.0.0; \
	$(ELFEDIT) -e 'dyn:delete RPATH' \
	    $(PROTOUSRLIBDIR64)/libMagickCore-6.Q16.so.1.0.0

REQUIRED_PACKAGES += compress/bzip2
REQUIRED_PACKAGES += compress/xz
REQUIRED_PACKAGES += image/library/libjpeg
REQUIRED_PACKAGES += image/library/libpng
REQUIRED_PACKAGES += image/library/libtiff
REQUIRED_PACKAGES += library/desktop/cairo
REQUIRED_PACKAGES += library/desktop/pango
REQUIRED_PACKAGES += library/fftw-3
REQUIRED_PACKAGES += library/glib2
REQUIRED_PACKAGES += library/lcms
REQUIRED_PACKAGES += library/libtool/libltdl
REQUIRED_PACKAGES += library/libxml2
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library/c++-runtime
REQUIRED_PACKAGES += system/library/fontconfig
REQUIRED_PACKAGES += system/library/freetype-2
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += system/library/openmp
REQUIRED_PACKAGES += x11/library/libx11
REQUIRED_PACKAGES += x11/library/libxext