Makefile revision 4744
6191N/A#
6191N/A# CDDL HEADER START
6191N/A#
6191N/A# The contents of this file are subject to the terms of the
6191N/A# Common Development and Distribution License (the "License").
6191N/A# You may not use this file except in compliance with the License.
6191N/A#
6191N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6191N/A# or http://www.opensolaris.org/os/licensing.
6191N/A# See the License for the specific language governing permissions
6191N/A# and limitations under the License.
6191N/A#
6191N/A# When distributing Covered Code, include this CDDL HEADER in each
6191N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6191N/A# If applicable, add the following below this CDDL HEADER, with the
6191N/A# fields enclosed by brackets "[]" replaced with your own identifying
6191N/A# information: Portions Copyright [yyyy] [name of copyright owner]
6191N/A#
6191N/A# CDDL HEADER END
6191N/A#
6191N/A
6191N/A#
6191N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
6191N/A#
6191N/A
6191N/APERL_VERSION = 5.20
6191N/Ainclude ../../make-rules/shared-macros.mk
6191N/A
6191N/ACOMPONENT_NAME= graphviz
6191N/ACOMPONENT_VERSION= 2.28.0
6191N/ACOMPONENT_PROJECT_URL= http://www.graphviz.org/
6191N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
6191N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
6191N/ACOMPONENT_ARCHIVE_HASH= \
6191N/A sha256:d3aa7973c578cae4cc26d9d6498c57ed06680cab9a4e940d0357a3c6527afc76
6191N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)pub/graphviz/stable/SOURCES/$(COMPONENT_ARCHIVE)
6191N/ACOMPONENT_BUGDB= utility/graphviz
6191N/A
6191N/ATPNO= 17707
6191N/A
6191N/Ainclude $(WS_MAKE_RULES)/prep.mk
6191N/Ainclude $(WS_MAKE_RULES)/configure.mk
6191N/Ainclude $(WS_MAKE_RULES)/ips.mk
6191N/A
6191N/APATH = /usr/php/5.3/bin:/usr/bin:/usr/gnu/bin
6191N/A
6191N/A# GMP header files for the guile extension (no --with- flag)
6191N/A# The guile build is broken with studio (15732452), so we disable this for now.
6191N/A# CPPFLAGS += -I/usr/include/gmp
6191N/A# Java header files (--with-javaincludedir allows for only one directory)
6191N/ACPPFLAGS += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/solaris
# PHP header files (no --with- flag)
CPPFLAGS += $(shell PATH=$(PATH) php-config --includes)
CXX += $(studio_NORUNPATH)
CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
CONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
# Make sure to use the right python, depending on the 32/64-bit build.
CONFIGURE_ENV += PYTHON26=$(PYTHON.2.6)
CONFIGURE_ENV += PYTHON27=$(PYTHON.2.7)
CONFIGURE_OPTIONS += --without-included-ltdl
CONFIGURE_OPTIONS += --enable-python=no
CONFIGURE_OPTIONS += --enable-python26=yes
CONFIGURE_OPTIONS += --enable-python27=yes
CONFIGURE_OPTIONS += --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
COMPONENT_BUILD_ARGS += GREP=/usr/bin/ggrep
# Both perl and ruby ship 64-bit only.
$(CONFIGURE_32): CONFIGURE_OPTIONS += --enable-perl=no
$(CONFIGURE_32): CONFIGURE_OPTIONS += --enable-ruby=no
$(CONFIGURE_64): CONFIGURE_ENV += PERL=$(PERL)
$(CONFIGURE_64): CONFIGURE_ENV += RUBY=$(RUBY.1.9)
# PHP ships 32-bit only.
$(CONFIGURE_64): CONFIGURE_OPTIONS += --enable-php=no
$(INSTALL_64): COMPONENT_INSTALL_ARGS += PHP_INSTALL_DIR=$(shell PATH=$(PATH) php-config --extension-dir)
# tcl ships both 32 and 64 bit, but even though /usr/bin/tclsh is 64-bit, there
# is no place to stick 64-bit modules, so skip it. On the other hand, make
# sure to find the right tcl bits when building 32-bit.
$(CONFIGURE_64): CONFIGURE_OPTIONS += --enable-tcl=no
$(CONFIGURE_32): CONFIGURE_OPTIONS += --with-tclsh=/usr/bin/$(MACH32)/tclsh
$(CONFIGURE_32): CONFIGURE_ENV += TCLCONFIG=/usr/lib/tclConfig.sh
# Put the 64-bit lua module in a 64-bit directory.
$(INSTALL_32): COMPONENT_INSTALL_ARGS += LUA_INSTALL_DIR=/usr/lib/lua/5.2
$(INSTALL_64): COMPONENT_INSTALL_ARGS += LUA_INSTALL_DIR=/usr/lib/lua/5.2/64
# Use GNU ln, which supports the -r (--relative) option.
COMPONENT_INSTALL_ARGS += LN_S="gln -s"
ASLR_MODE = $(ASLR_ENABLE)
# We build 32 and 64 bit because we build libraries, and we build modules for
# runtimes which provide 64 or 32 (or both) bit environments.
configure: $(CONFIGURE_32_and_64)
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
env LD_LIBRARY_PATH=$(PROTO_DIR)/usr/lib GVBINDIR=$(PROTO_DIR)/usr/lib/graphviz $(PROTO_DIR)/usr/bin/dot -c
$(PYTHON.2.6.32) -m compileall $(PROTO_DIR)/$(PYTHON.2.6.VENDOR_PACKAGES)
$(PYTHON.2.7.32) -m compileall $(PROTO_DIR)/$(PYTHON.2.7.VENDOR_PACKAGES)
# The test infrastructure doesn't run in a VPATHed environment.
COMPONENT_PRE_TEST_ACTION = \
(cd $(@D)/rtest; ln -s $(SOURCE_DIR)/rtest/* .)
# There are tests, but they fail consistently because the test samples are out
# of date and not generated with a known configuration. See
# http://graphviz.org/bugs/b2063.html
test: $(NO_TESTS)
system-test: $(NO_TESTS)
REQUIRED_PACKAGES += image/graphviz
REQUIRED_PACKAGES += image/library/libjpeg
REQUIRED_PACKAGES += image/library/libpng
REQUIRED_PACKAGES += image/library/librsvg
REQUIRED_PACKAGES += library/desktop/atk
REQUIRED_PACKAGES += library/desktop/cairo
REQUIRED_PACKAGES += library/desktop/gdk-pixbuf
REQUIRED_PACKAGES += library/desktop/gtk2
REQUIRED_PACKAGES += library/desktop/pango
REQUIRED_PACKAGES += library/expat
REQUIRED_PACKAGES += library/gd
REQUIRED_PACKAGES += library/glib2
REQUIRED_PACKAGES += library/libtool/libltdl
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += print/filter/ghostscript
REQUIRED_PACKAGES += runtime/lua
REQUIRED_PACKAGES += runtime/ocaml
REQUIRED_PACKAGES += runtime/perl-520
REQUIRED_PACKAGES += runtime/ruby-19
REQUIRED_PACKAGES += runtime/tk-8
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library
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/linker
REQUIRED_PACKAGES += web/php-53
REQUIRED_PACKAGES += x11/library/libx11
REQUIRED_PACKAGES += x11/library/libxcursor
REQUIRED_PACKAGES += x11/library/libxmu
REQUIRED_PACKAGES += x11/library/libxrender
REQUIRED_PACKAGES += x11/library/toolkit/libxaw7
REQUIRED_PACKAGES += x11/library/toolkit/libxt