components/r/Makefile
changeset 4739 fe9f7b631d54
child 4741 5ab3f0c9276b
equal deleted inserted replaced
4738:13359949837d 4739:fe9f7b631d54
       
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 
       
    22 #
       
    23 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 
       
    26 include ../../make-rules/shared-macros.mk
       
    27 
       
    28 COMPONENT_NAME=		R
       
    29 COMPONENT_VERSION=	3.2.0
       
    30 COMPONENT_PROJECT_URL=	http://www.r-project.org/
       
    31 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    32 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
       
    33 COMPONENT_ARCHIVE_HASH=	\
       
    34     sha256:f5ae953f18ba6f3d55b46556bbbf73441350f9fd22625402b723a2b81ff64f35
       
    35 COMPONENT_ARCHIVE_URL=	http://cran.mtu.edu/src/base/R-3/$(COMPONENT_ARCHIVE)
       
    36 COMPONENT_BUGDB=	utility/r
       
    37 
       
    38 TPNO=			22535
       
    39 
       
    40 include $(WS_MAKE_RULES)/prep.mk
       
    41 include $(WS_MAKE_RULES)/configure.mk
       
    42 include $(WS_MAKE_RULES)/ips.mk
       
    43 
       
    44 COMPONENT_PRE_CONFIGURE_ACTION = \
       
    45 	($(CLONEY) $(SOURCE_DIR) $(@D))
       
    46 
       
    47 # Get rid of compiler path set in RUNPATH
       
    48 LDFLAGS += $(studio_NORUNPATH)
       
    49 
       
    50 LDFLAGS += $(CC_BITS)
       
    51 
       
    52 LDFLAGS += $(studio_PIC)
       
    53 LDFLAGS += $(LD_Z_TEXT)
       
    54 LDFLAGS += $(LD_DEF_LIBS)
       
    55 
       
    56 STUDIO_LIBS_PATH =	/usr/lib/studio/64
       
    57 R_LIBS_PATH =		/usr/lib/$(MACH64)/R/lib
       
    58 JAVA_LIBS_PATH =	$(JAVA8_HOME)/jre/lib/$(MACH64)/server
       
    59 
       
    60 LDFLAGS += -L$(STUDIO_LIBS_PATH) -R$(STUDIO_LIBS_PATH) \
       
    61 		-lsunperf -lfsu -lmtsk -lpicl -lkstat
       
    62 
       
    63 F95 =			$(SPRO_VROOT)/bin/f95
       
    64 
       
    65 CONFIGURE_ENV += CC="$(CC)"
       
    66 CONFIGURE_ENV += CXX="$(CXX)"
       
    67 CONFIGURE_ENV += F77="$(F95) $(CC_BITS)"
       
    68 CONFIGURE_ENV += FC="$(F95) $(CC_BITS)"
       
    69 
       
    70 CONFIGURE_ENV += CPPFLAGS=""
       
    71 CONFIGURE_ENV += CPICFLAGS="$(studio_PIC)"
       
    72 CONFIGURE_ENV += CFLAGS="-xO3 -xc99 -xlibmieee $(CC_BITS)"
       
    73 CONFIGURE_ENV += CXXFLAGS="-xO3 $(CC_BITS)"
       
    74 CONFIGURE_ENV += FPICFLAGS="$(studio_PIC)"
       
    75 CONFIGURE_ENV += FFLAGS="-xO3 $(CC_BITS)"
       
    76 CONFIGURE_ENV += FCFLAGS="-xO3 $(CC_BITS)"
       
    77 CONFIGURE_ENV += FCLIBS="-lsunperf -lfsu -lsunmath"
       
    78 CONFIGURE_ENV += FLIBS="-lsunperf -lfsu -lsunmath"
       
    79 CONFIGURE_ENV += LDFLAGS="$(LDFLAGS) -L$(R_LIBS_PATH) -R$(R_LIBS_PATH)"
       
    80 
       
    81 # Set the various Java variables otherwise it auto-detects the 32-bit ones.
       
    82 CONFIGURE_ENV += JAVA_CPPFLAGS="-I$(JAVA8_HOME)/jre/../include -I$(JAVA8_HOME)/jre/../include/solaris"
       
    83 CONFIGURE_ENV += JAVA_LIBS="-L$(JAVA_LIBS_PATH) -R$(JAVA_LIBS_PATH) -ljvm"
       
    84 
       
    85 # From Brian Whitney:
       
    86 # You need to define this option on SPARC, otherwise you will get quad
       
    87 # arithmetic on SPARC but not on x86.  Really makes some R functions run
       
    88 # very slow on SPARC (COR path).
       
    89 CONFIGURE_OPTIONS.i386 =
       
    90 CONFIGURE_OPTIONS.sparc =	--disable-long-double
       
    91 CONFIGURE_OPTIONS +=		$(CONFIGURE_OPTIONS.$(MACH))
       
    92 
       
    93 CONFIGURE_OPTIONS += --enable-R-shlib
       
    94 CONFIGURE_OPTIONS += --with-blas='-lsunperf'
       
    95 CONFIGURE_OPTIONS += --with-ICU
       
    96 CONFIGURE_OPTIONS += --with-lapack
       
    97 CONFIGURE_OPTIONS += --with-recommended-packages
       
    98 CONFIGURE_OPTIONS += --with-tcltk
       
    99 CONFIGURE_OPTIONS += --enable-prebuilt-html
       
   100 
       
   101 COMPONENT_PRE_TEST_ACTION = \
       
   102 	$(RM) $(BUILD_DIR_64)/tests/Examples/*.prev
       
   103 
       
   104 # Increase stack limit to allow the "infinite recursion" test to work.
       
   105 COMPONENT_TEST_ENV_CMD =	ulimit -Ss 32768 ; $(ENV)
       
   106 
       
   107 # Master test results are different between x86 and SPARC.
       
   108 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
       
   109 
       
   110 COMPONENT_TEST_TRANSFORMS += \
       
   111 	'-n ' \
       
   112 	'-e "/^Testing examples for package /p" ' \
       
   113 	'-e "/^  comparing /p" ' \
       
   114 	'-e "/^running /p" ' \
       
   115 	'-e "/^  expect some differences/p" '
       
   116 
       
   117 ASLR_MODE = $(ASLR_ENABLE)
       
   118 
       
   119 COMPONENT_TEST_ARGS =   -k -i
       
   120 
       
   121 build:		$(BUILD_64)
       
   122 
       
   123 install:	$(INSTALL_64)
       
   124 
       
   125 test:		$(TEST_64)
       
   126 
       
   127 system-test:	$(SYSTEM_TESTS_NOT_IMPLEMENTED)
       
   128 
       
   129 REQUIRED_PACKAGES += image/library/libjpeg
       
   130 REQUIRED_PACKAGES += image/library/libpng
       
   131 REQUIRED_PACKAGES += image/library/libtiff
       
   132 REQUIRED_PACKAGES += library/desktop/cairo
       
   133 REQUIRED_PACKAGES += library/desktop/pango
       
   134 REQUIRED_PACKAGES += library/glib2
       
   135 REQUIRED_PACKAGES += library/pcre
       
   136 REQUIRED_PACKAGES += library/zlib
       
   137 REQUIRED_PACKAGES += shell/bash
       
   138 REQUIRED_PACKAGES += system/library
       
   139 REQUIRED_PACKAGES += system/library/fortran-runtime
       
   140 REQUIRED_PACKAGES += system/library/math
       
   141 REQUIRED_PACKAGES += system/library/readline
       
   142 REQUIRED_PACKAGES += system/library/sunperf
       
   143 REQUIRED_PACKAGES += web/curl
       
   144 REQUIRED_PACKAGES += x11/library/libx11
       
   145 REQUIRED_PACKAGES += x11/library/libxmu
       
   146 REQUIRED_PACKAGES += x11/library/toolkit/libxt