Makefile revision 6691
3b4098640dd85040270f39b9a5ee5e22de99d3d6Mark Andrews# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Common Development and Distribution License (the "License").
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You may not use this file except in compliance with the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews sha256:d3aa7973c578cae4cc26d9d6498c57ed06680cab9a4e940d0357a3c6527afc76
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)pub/graphviz/stable/SOURCES/$(COMPONENT_ARCHIVE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# publish for only one version of perl
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# There are tests, but they fail consistently because the test samples are out
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# of date and not generated with a known configuration. See
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# We want to build a couple of extra things after the installs are done, so set
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# the install targets appropriately.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINSTALL_TARGET += $(PROTOUSRLIBDIR)/graphviz/config6
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsINSTALL_TARGET += $(PROTO_DIR)/$(PYTHON.2.7.VENDOR_PACKAGES)/gv.pyc
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews# Depends on newer cairo, which cannot be updated in S11.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# GMP header files for the guile extension (no --with- flag)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The guile build is broken with studio (15732452), so we disable this for now.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CPPFLAGS += -I/usr/include/gmp
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Java header files (--with-javaincludedir allows for only one directory)
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark AndrewsCPPFLAGS += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/solaris
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PHP header files (no --with- flag)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCPPFLAGS += $(shell PATH=$(PATH) php-config --includes)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Make sure to use the right python, depending on the 32/64-bit build.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# perl, ruby, php ship 64-bit only.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(CONFIGURE_32): CONFIGURE_OPTIONS += --enable-perl=no
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(CONFIGURE_32): CONFIGURE_OPTIONS += --enable-ruby=no
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(CONFIGURE_32): CONFIGURE_OPTIONS += --enable-php=no
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(CONFIGURE_64): CONFIGURE_ENV += RUBY=$(RUBY.2.1)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(INSTALL_64): COMPONENT_INSTALL_ARGS += PHP_INSTALL_DIR=$(shell PATH=$(PATH) php-config --extension-dir)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# tcl ships both 32 and 64 bit, but even though /usr/bin/tclsh is 64-bit, there
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# is no place to stick 64-bit modules, so skip it. On the other hand, make
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# sure to find the right tcl bits when building 32-bit.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(CONFIGURE_64): CONFIGURE_OPTIONS += --enable-tcl=no
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(CONFIGURE_32): CONFIGURE_OPTIONS += --with-tclsh=$(USRBINDIR)/$(MACH32)/tclsh
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(CONFIGURE_32): CONFIGURE_ENV += TCLCONFIG=$(USRLIBDIR)/tclConfig.sh
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Put the 64-bit lua module in a 64-bit directory.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(INSTALL_32): COMPONENT_INSTALL_ARGS += LUA_INSTALL_DIR=$(USRLIBDIR)/lua/5.2
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(INSTALL_64): COMPONENT_INSTALL_ARGS += LUA_INSTALL_DIR=$(USRLIBDIR)/lua/5.2/64
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Use GNU ln, which supports the -r (--relative) option.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Create the config file once the 32-bit build is complete. This runs the bits
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# we just built, so we have to set a handful of variables to the right place.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The 32-bit executables are in their own directory, so we have to point to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# that version of dot explicitly.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(PROTOUSRLIBDIR)/graphviz/config6: $(INSTALL_32)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews env LD_LIBRARY_PATH=$(PROTOUSRLIBDIR) GVBINDIR=$(PROTOUSRLIBDIR)/graphviz \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Once the build is complete, compile the .py file. There's no need to compile
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# the one in the "64" directory, so don't recurse. And make sure that the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# build path doesn't get embedded in the .pyc file.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(PROTO_DIR)/$(PYTHON.2.7.VENDOR_PACKAGES)/gv.pyc: $(INSTALL_32)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PYTHON.2.7.32) -m compileall -l -d $(PYTHON.2.7.VENDOR_PACKAGES) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPKG_MACROS += PERL_VERSION_NODOT=$(PERL_VERSION_NODOT)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The test infrastructure doesn't run in a VPATHed environment.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (cd $(@D)/rtest; ln -s $(SOURCE_DIR)/rtest/* .)