Makefile revision 7292
457N/A#
457N/A# CDDL HEADER START
457N/A#
457N/A# The contents of this file are subject to the terms of the
457N/A# Common Development and Distribution License (the "License").
457N/A# You may not use this file except in compliance with the License.
457N/A#
457N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
457N/A# or http://www.opensolaris.org/os/licensing.
457N/A# See the License for the specific language governing permissions
457N/A# and limitations under the License.
457N/A#
457N/A# When distributing Covered Code, include this CDDL HEADER in each
457N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
457N/A# If applicable, add the following below this CDDL HEADER, with the
457N/A# fields enclosed by brackets "[]" replaced with your own identifying
457N/A# information: Portions Copyright [yyyy] [name of copyright owner]
457N/A#
457N/A# CDDL HEADER END
457N/A#
457N/A
457N/A#
5636N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
457N/A#
5680N/ABUILD_BITS= 64_and_32
457N/Ainclude ../../make-rules/shared-macros.mk
457N/A
457N/ACOMPONENT_NAME= graphviz
457N/ACOMPONENT_VERSION= 2.28.0
618N/ACOMPONENT_PROJECT_URL= http://www.graphviz.org/
844N/ACOMPONENT_ARCHIVE_HASH= \
844N/A sha256:d3aa7973c578cae4cc26d9d6498c57ed06680cab9a4e940d0357a3c6527afc76
618N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)pub/graphviz/stable/SOURCES/$(COMPONENT_ARCHIVE)
457N/A
2899N/ATPNO= 17707
2899N/A
5795N/A# publish for only one version of perl
5636N/APERL_VERSIONS = $(PERL_VERSION)
5636N/A
5680N/A# There are tests, but they fail consistently because the test samples are out
5680N/A# of date and not generated with a known configuration. See
5680N/A# http://graphviz.org/bugs/b2063.html
5680N/ATEST_TARGET= $(SKIP_TEST)
5759N/A
6691N/Aifneq ($(BUILD_TYPE), evaluation)
5759N/A# We want to build a couple of extra things after the installs are done, so set
5759N/A# the install targets appropriately.
5759N/AINSTALL_TARGET = $(INSTALL_$(MK_BITS))
5759N/AINSTALL_TARGET += $(PROTOUSRLIBDIR)/graphviz/config6
5759N/AINSTALL_TARGET += $(PROTO_DIR)/$(PYTHON.2.7.VENDOR_PACKAGES)/gv.pyc
6691N/Aendif
6691N/A
6691N/A# Depends on newer cairo, which cannot be updated in S11.
6691N/Ainclude $(WS_MAKE_RULES)/no-evaluation.mk
5759N/A
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
457N/A
4947N/APATH = /usr/php/5.6/bin:/usr/bin:/usr/gnu/bin
457N/A
457N/A# GMP header files for the guile extension (no --with- flag)
3014N/A# The guile build is broken with studio (15732452), so we disable this for now.
457N/A# CPPFLAGS += -I/usr/include/gmp
457N/A# Java header files (--with-javaincludedir allows for only one directory)
1030N/ACPPFLAGS += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/solaris
457N/A# PHP header files (no --with- flag)
457N/ACPPFLAGS += $(shell PATH=$(PATH) php-config --includes)
457N/ACXX += $(studio_NORUNPATH)
7292N/ACXX += -std=sun03
457N/A
3014N/A# Make sure to use the right python, depending on the 32/64-bit build.
3014N/ACONFIGURE_ENV += PYTHON27=$(PYTHON.2.7)
457N/ACONFIGURE_OPTIONS += --without-included-ltdl
457N/ACONFIGURE_OPTIONS += --enable-python=no
727N/ACONFIGURE_OPTIONS += --enable-python27=yes
634N/ACONFIGURE_OPTIONS += --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
457N/A
5680N/ACOMPONENT_BUILD_ARGS += GREP=$(USRBINDIR)/ggrep
457N/A
6691N/Aifneq ($(BUILD_TYPE), evaluation)
4947N/A# perl, ruby, php ship 64-bit only.
3014N/A$(CONFIGURE_32): CONFIGURE_OPTIONS += --enable-perl=no
3014N/A$(CONFIGURE_32): CONFIGURE_OPTIONS += --enable-ruby=no
4947N/A$(CONFIGURE_32): CONFIGURE_OPTIONS += --enable-php=no
3014N/A$(CONFIGURE_64): CONFIGURE_ENV += PERL=$(PERL)
5175N/A$(CONFIGURE_64): CONFIGURE_ENV += RUBY=$(RUBY.2.1)
3014N/A$(INSTALL_64): COMPONENT_INSTALL_ARGS += PHP_INSTALL_DIR=$(shell PATH=$(PATH) php-config --extension-dir)
3014N/A# tcl ships both 32 and 64 bit, but even though /usr/bin/tclsh is 64-bit, there
3014N/A# is no place to stick 64-bit modules, so skip it. On the other hand, make
3014N/A# sure to find the right tcl bits when building 32-bit.
3014N/A$(CONFIGURE_64): CONFIGURE_OPTIONS += --enable-tcl=no
5680N/A$(CONFIGURE_32): CONFIGURE_OPTIONS += --with-tclsh=$(USRBINDIR)/$(MACH32)/tclsh
5680N/A$(CONFIGURE_32): CONFIGURE_ENV += TCLCONFIG=$(USRLIBDIR)/tclConfig.sh
3014N/A# Put the 64-bit lua module in a 64-bit directory.
5680N/A$(INSTALL_32): COMPONENT_INSTALL_ARGS += LUA_INSTALL_DIR=$(USRLIBDIR)/lua/5.2
5680N/A$(INSTALL_64): COMPONENT_INSTALL_ARGS += LUA_INSTALL_DIR=$(USRLIBDIR)/lua/5.2/64
3014N/A# Use GNU ln, which supports the -r (--relative) option.
3014N/ACOMPONENT_INSTALL_ARGS += LN_S="gln -s"
6691N/Aendif
457N/A
5759N/A# Create the config file once the 32-bit build is complete. This runs the bits
5759N/A# we just built, so we have to set a handful of variables to the right place.
5759N/A# The 32-bit executables are in their own directory, so we have to point to
5759N/A# that version of dot explicitly.
5759N/A$(PROTOUSRLIBDIR)/graphviz/config6: $(INSTALL_32)
5680N/A env LD_LIBRARY_PATH=$(PROTOUSRLIBDIR) GVBINDIR=$(PROTOUSRLIBDIR)/graphviz \
5759N/A $(PROTOUSRBINDIR)/$(MACH32)/dot -c
5759N/A
5759N/A# Once the build is complete, compile the .py file. There's no need to compile
5759N/A# the one in the "64" directory, so don't recurse. And make sure that the
5759N/A# build path doesn't get embedded in the .pyc file.
5759N/A$(PROTO_DIR)/$(PYTHON.2.7.VENDOR_PACKAGES)/gv.pyc: $(INSTALL_32)
5759N/A $(PYTHON.2.7.32) -m compileall -l -d $(PYTHON.2.7.VENDOR_PACKAGES) \
5759N/A $(PROTO_DIR)/$(PYTHON.2.7.VENDOR_PACKAGES)
457N/A
5795N/APKG_MACROS += PERL_PKG=$(PERL_PKG)
5795N/APKG_MACROS += PERL_VERSION_NODOT=$(PERL_VERSION_NODOT)
5795N/A
457N/A# The test infrastructure doesn't run in a VPATHed environment.
457N/ACOMPONENT_PRE_TEST_ACTION = \
457N/A (cd $(@D)/rtest; ln -s $(SOURCE_DIR)/rtest/* .)
457N/A
3817N/AREQUIRED_PACKAGES += image/graphviz
3817N/AREQUIRED_PACKAGES += image/library/libjpeg
3817N/AREQUIRED_PACKAGES += image/library/libpng
3817N/AREQUIRED_PACKAGES += image/library/librsvg
3817N/AREQUIRED_PACKAGES += library/desktop/atk
3817N/AREQUIRED_PACKAGES += library/desktop/cairo
3817N/AREQUIRED_PACKAGES += library/desktop/gdk-pixbuf
3817N/AREQUIRED_PACKAGES += library/desktop/gtk2
3817N/AREQUIRED_PACKAGES += library/desktop/pango
3817N/AREQUIRED_PACKAGES += library/expat
3817N/AREQUIRED_PACKAGES += library/gd
3817N/AREQUIRED_PACKAGES += library/glib2
3817N/AREQUIRED_PACKAGES += library/libtool/libltdl
3817N/AREQUIRED_PACKAGES += library/zlib
3817N/AREQUIRED_PACKAGES += print/filter/ghostscript
7120N/AREQUIRED_PACKAGES += print/filter/ghostscript-core
3817N/AREQUIRED_PACKAGES += runtime/lua
3817N/AREQUIRED_PACKAGES += runtime/ocaml
5636N/AREQUIRED_PACKAGES += $(PERL_PKG)
5175N/AREQUIRED_PACKAGES += runtime/ruby-21
3817N/AREQUIRED_PACKAGES += runtime/tk-8
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
3817N/AREQUIRED_PACKAGES += system/library/math
4947N/AREQUIRED_PACKAGES += web/php-56
3817N/AREQUIRED_PACKAGES += x11/library/libx11
3817N/AREQUIRED_PACKAGES += x11/library/libxcursor
3817N/AREQUIRED_PACKAGES += x11/library/libxmu
3817N/AREQUIRED_PACKAGES += x11/library/libxrender
3817N/AREQUIRED_PACKAGES += x11/library/toolkit/libxaw7
3817N/AREQUIRED_PACKAGES += x11/library/toolkit/libxt