Makefile revision 5851
2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2790N/A
2790N/A#
2515N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
2N/A#
2N/A# switching to parfait breaks a patch (23049278)
2N/Aexport PARFAIT_BUILD=no
2N/ABUILD_BITS= 64
2N/Ainclude ../../make-rules/shared-macros.mk
2N/A
2N/ACOMPONENT_NAME= R
2N/ACOMPONENT_VERSION= 3.2.3
2N/ACOMPONENT_PROJECT_URL= http://www.r-project.org/
2N/ACOMPONENT_ARCHIVE_HASH= \
59N/A sha256:b93b7d878138279234160f007cb9b7f81b8a72c012a15566e9ec5395cfd9b6c1
59N/ACOMPONENT_ARCHIVE_URL= http://cran.mtu.edu/src/base/R-3/$(COMPONENT_ARCHIVE)
2N/ACOMPONENT_BUGDB= utility/r
2N/A
2N/ATPNO= 26540
2N/A
26N/A# Need to build the tests before using them.
26N/ASYSTEM_TEST_TARGET= build $(SYSTEM_TEST_64)
2N/Ainclude $(WS_MAKE_RULES)/common.mk
26N/A
1470N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
38N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
1470N/A
1470N/ASTUDIO_LIBS_PATH = $(USRLIBDIR)/studio/64
1470N/A# R_LIBS_PATH is used when creating /usr/lib/64/R/etc/Makeconf
181N/A# Using a resolved pathname here (rather than say $(USRLIBDIR64)/R/lib) so
26N/A# that the Makeconf-GNU.patch patch used by the COMPONENT_POST_INSTALL_ACTION
26N/A# will just work on both platforms.
26N/AR_LIBS_PATH = /usr/lib/64/R/lib
26N/AJAVA_LIBS_PATH = $(JAVA8_HOME)/jre/lib/$(MACH64)/server
26N/A
26N/ALDFLAGS += $(CC_BITS)
26N/ALDFLAGS += -L$(STUDIO_LIBS_PATH) -R$(STUDIO_LIBS_PATH) \
26N/A -lsunperf -lfsu -lmtsk -lpicl -lkstat
700N/ALDFLAGS += -L$(R_LIBS_PATH) -R$(R_LIBS_PATH)
700N/A
26N/A# Augment the PATH and set CC/CXX/FC/F77 such that the build environment doesn't
26N/A# leak into usr/lib/64/etc/Makeconf and force consumers to have a setup like
26N/A# our build environment to build R modules.
1498N/Aexport PATH=$(GCC_ROOT)/bin:$(USRBINDIR):$(GNUBIN)
1498N/ACC = gcc
26N/ACXX = g++
1498N/AFC = gfortran
151N/AF77 = gfortran
206N/Aifeq ($(strip $(PARFAIT_BUILD)),yes)
26N/Aexport PATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:$(USRBINDIR):$(GNUBIN)
26N/Aendif
26N/A
26N/A# We can't use $(CC_PIC) here (which provides "-fPIC -DPIC" for the GNU
26N/A# compilers), because we fail at configure time with:
2790N/A# configure: error: Building R requires the 'va_copy' system call
2818N/A# .../make-rules/configure.mk:170: recipe for target
2830N/A# '.../components/r/build/amd64/.configured' failed
26N/AR_PIC = -fPIC
26N/A
2N/A# These CONFIGURE_ENV lines are here so that /usr/lib/64/R/etc/Makeconf (the
26N/A# configuration file used when building/installing the R CRAN packages),
26N/A# is in exactly the correct format to work properly with the GNU compilers for
26N/A# all the R CRAN packages containing C, C++, Fortran or Java code.
26N/ACONFIGURE_ENV += CC="$(CC) -std=gnu99 $(CC_BITS)"
883N/ACONFIGURE_ENV += CXX="$(CXX) $(CC_BITS)"
26N/ACONFIGURE_ENV += FC="$(FC) $(CC_BITS)"
26N/ACONFIGURE_ENV += F77="$(F77) $(CC_BITS)"
26N/A
26N/ACONFIGURE_ENV += C_VISIBILITY="-fvisibility=hidden"
1043N/ACONFIGURE_ENV += CFLAGS="-g -O2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2"
586N/ACONFIGURE_ENV += CPICFLAGS="$(R_PIC)"
26N/A
93N/ACONFIGURE_ENV += CXXFLAGS="$(CC_BITS) -g -O2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2"
166N/ACONFIGURE_ENV += CXXPICFLAGS="$(R_PIC)"
26N/ACONFIGURE_ENV += CXX1X="g++"
379N/ACONFIGURE_ENV += CXX1XFLAGS="$(CC_BITS) -g -O2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2"
379N/ACONFIGURE_ENV += CXX1XPICFLAGS="$(R_PIC)"
1498N/ACONFIGURE_ENV += CXX1XSTD="-std=c++11"
1498N/A
2899N/ACONFIGURE_ENV += FCFLAGS="-g -O2 $(CC_BITS)"
2899N/ACONFIGURE_ENV += F77_VISIBILITY="-fvisibility=hidden"
2899N/ACONFIGURE_ENV += FFLAGS="-g -O2 $(CC_BITS)"
2899N/ACONFIGURE_ENV += FCLIBS="-lsunperf -lfsu -lsunmath"
2899N/ACONFIGURE_ENV += FLIBS="-lsunperf -lfsu -lsunmath -lgfortran -lm"
2899N/ACONFIGURE_ENV += FCPICFLAGS="$(R_PIC)"
2236N/ACONFIGURE_ENV += FPICFLAGS="$(R_PIC)"
2236N/A
2818N/A# Set the various Java variables otherwise it auto-detects the 32-bit ones.
2N/ACONFIGURE_ENV += JAVA_CPPFLAGS="-I$(JAVA8_HOME)/jre/../include -I$(JAVA8_HOME)/jre/../include/solaris"
26N/ACONFIGURE_ENV += JAVA_LIBS="-L$(JAVA_LIBS_PATH) -R$(JAVA_LIBS_PATH) -ljvm"
26N/A
181N/A# From Brian Whitney:
181N/A# You need to define this option on SPARC, otherwise you will get quad
181N/A# arithmetic on SPARC but not on x86. Really makes some R functions run
99N/A# very slow on SPARC (COR path).
59N/ACONFIGURE_OPTIONS.sparc += --disable-long-double
12N/A
30N/ACONFIGURE_OPTIONS += --enable-R-shlib
1256N/ACONFIGURE_OPTIONS += --with-blas='-lsunperf'
1256N/ACONFIGURE_OPTIONS += --with-ICU
1256N/ACONFIGURE_OPTIONS += --with-lapack
2818N/ACONFIGURE_OPTIONS += --with-recommended-packages
1256N/ACONFIGURE_OPTIONS += --with-tcltk
1256N/ACONFIGURE_OPTIONS += --enable-prebuilt-html
1256N/A
1256N/ACOMPONENT_PRE_TEST_ACTION = \
1256N/A $(RM) $(BUILD_DIR_64)/tests/Examples/*.prev
1256N/A
1256N/ACOMPONENT_PRE_SYSTEM_TEST_ACTION = \
1256N/A $(RM) $(BUILD_DIR_64)/tests/Examples/*.prev
1256N/A
2818N/A# Increase stack limit to allow the "infinite recursion" test to work.
1256N/ACOMPONENT_TEST_ENV_CMD = ulimit -Ss 32768 ; $(ENV)
1256N/ACOMPONENT_SYSTEM_TEST_ENV_CMD = ulimit -Ss 32768 ; $(ENV)
1256N/A
1256N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
1256N/A
1256N/ACOMPONENT_TEST_TRANSFORMS += \
1256N/A '-n ' \
3109N/A '-e "/^Testing examples for package /p" ' \
3109N/A '-e "/^running /p" ' \
3109N/A '-e "/^ expect some differences/p" ' \
3109N/A '-e "/comparing.*datetime.Rout/d" ' \
3109N/A '-e "/comparing.*reg-examples3.Rout/d" ' \
3109N/A '-e "/^ comparing /p" '
3109N/A
3109N/A# Use the installed version of R, not the one in the build area.
3109N/A# These definitions override those found in .../test/Makefile.
3109N/ACOMPONENT_SYSTEM_TEST_ARGS += R="LANGUAGE=en LC_ALL=C SRCDIR=$(BUILD_DIR_64)/tests R_DEFAULT_PACKAGES= $(USRBINDIR)/R --vanilla"
3109N/ACOMPONENT_SYSTEM_TEST_ARGS += R2="R_DEFAULT_PACKAGES= $(USRBINDIR)/R --vanilla"
3109N/ACOMPONENT_SYSTEM_TEST_ARGS += R3="$(USRBINDIR)/R CMD check"
3109N/ACOMPONENT_SYSTEM_TEST_ARGS += RDIFF="$(USRBINDIR)/R CMD Rdiff"
3109N/ACOMPONENT_SYSTEM_TEST_ARGS += RDCONV="LC_CTYPE=C $(USRBINDIR)/R CMD Rdconv"
3109N/A
3109N/ACOMPONENT_TEST_ARGS = -k -i
3109N/ACOMPONENT_SYSTEM_TEST_ARGS += -k -i
1256N/A
1256N/AREQUIRED_PACKAGES += image/library/libjpeg
1256N/AREQUIRED_PACKAGES += image/library/libpng
3109N/AREQUIRED_PACKAGES += image/library/libtiff
3109N/AREQUIRED_PACKAGES += library/desktop/cairo
1256N/AREQUIRED_PACKAGES += library/desktop/pango
26N/AREQUIRED_PACKAGES += library/glib2
26N/AREQUIRED_PACKAGES += library/icu
1256N/AREQUIRED_PACKAGES += library/pcre
2N/AREQUIRED_PACKAGES += library/readline
26N/AREQUIRED_PACKAGES += library/zlib
1256N/AREQUIRED_PACKAGES += shell/bash
1256N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
185N/AREQUIRED_PACKAGES += system/library/iconv
2N/AREQUIRED_PACKAGES += system/library/math
255N/AREQUIRED_PACKAGES += system/library/sunperf
145N/AREQUIRED_PACKAGES += web/curl
7N/AREQUIRED_PACKAGES += x11/library/libx11
26N/AREQUIRED_PACKAGES += x11/library/libxmu
26N/AREQUIRED_PACKAGES += x11/library/toolkit/libxt
38N/A