4117N/A#
4117N/A# CDDL HEADER START
4117N/A#
4117N/A# The contents of this file are subject to the terms of the
4117N/A# Common Development and Distribution License (the "License").
4117N/A# You may not use this file except in compliance with the License.
4117N/A#
4117N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4117N/A# or http://www.opensolaris.org/os/licensing.
4117N/A# See the License for the specific language governing permissions
4117N/A# and limitations under the License.
4117N/A#
4117N/A# When distributing Covered Code, include this CDDL HEADER in each
4117N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4117N/A# If applicable, add the following below this CDDL HEADER, with the
4117N/A# fields enclosed by brackets "[]" replaced with your own identifying
4117N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4117N/A#
4117N/A# CDDL HEADER END
4117N/A#
5680N/A
5680N/A#
5402N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4117N/A#
5680N/ABUILD_BITS= 64_and_32
4117N/Ainclude ../../make-rules/shared-macros.mk
4117N/A
4117N/ACOMPONENT_NAME= gsl
5248N/ACOMPONENT_VERSION= 2.1
4117N/ACOMPONENT_ARCHIVE_HASH= \
5248N/A sha256:59ad06837397617f698975c494fe7b2b698739a59e2fcf830b776428938a0c66
4117N/ACOMPONENT_BUGDB= library/libgsl
4117N/A
5248N/ATPNO= 26006
4117N/A
5680N/ATEST_TARGET=
5680N/ASYSTEM_TEST_TARGET=
5680N/Ainclude $(WS_MAKE_RULES)/gnu-component.mk
4117N/A
5402N/A# NOTE:
5402N/A# The libgsl package on Solaris is getting GSL CBLAS routines from
5402N/A# libsunperf.so. Programs wishing to use this functionality should use the
5402N/A# /usr/include/sunperf.h header file for the associated definitions and
5402N/A# function prototypes and link against -lsunperf.
5402N/A#
5402N/A# To retain compatibility with libgsl on other platforms, and to require
5402N/A# no changes to FOSS software being ported to Solaris, the libgsl package
5402N/A# manifest will also include the /usr/include/gsl/gsl_cblas.h header file
5402N/A# and provide links from /usr/lib/libgslcblas.so and
5402N/A# /usr/lib/$(MACH64)/libgslcblas.so to their equivalent libsunperf.so
5402N/A# library files.
5402N/A
4156N/A# By default, tests in each GSL sub-directory are linked statically against
4156N/A# a set of .la files. We don't deliver those in the GSL package, so we
4156N/A# adjust all the tests to link against the dynamic GSL library instead.
5248N/ACOMPONENT_POST_UNPACK_ACTION += \
4156N/A (cd $(COMPONENT_SRC); \
4156N/A for f in `ls */Makefile.am` ; do \
4156N/A $(GSED) -i -e \
4156N/A 's|^test_LDADD.*$$|test_LDFLAGS = -L`pwd`/../.libs/ -R`pwd`/../.libs/\ntest_LDADD = -lgsl|' \
4156N/A $$f ; \
5248N/A done) ;
5248N/A
5248N/A# Remove ../../cblas/libgslcblas.la from LDADD definition in
5248N/A# .../doc/examples/Makefile.am
5248N/ACOMPONENT_POST_UNPACK_ACTION += \
5248N/A $(GSED) -i -e 's|^LDADD.*$$|LDADD = ../../libgsl.la|' \
5248N/A $(COMPONENT_SRC)/doc/examples/Makefile.am ;
4156N/A
4156N/A# Recreate configure and top-level Makefile to pickup libsunperf changes.
6926N/ACOMPONENT_PREP_ACTION = (cd $(@D) ; autoreconf -fiv)
4117N/A
4117N/ALDFLAGS += $(CC_BITS)
4117N/ALDFLAGS += $(studio_PIC)
4117N/ALDFLAGS += $(studio_OPT)
4117N/ALDFLAGS += $(LD_Z_TEXT)
4117N/ALDFLAGS += $(LD_Z_DEFS)
4117N/ALDFLAGS += $(LD_DEF_LIBS)
4117N/A
5680N/ASTUDIO_LIBS_PATH.32 = $(USRLIBDIR)/studio
5680N/ASTUDIO_LIBS_PATH.64 = $(USRLIBDIR)/studio/64
4117N/A
4117N/ALDFLAGS += -L$(STUDIO_LIBS_PATH.$(BITS)) -R$(STUDIO_LIBS_PATH.$(BITS)) \
4117N/A -lsunperf -lfsu -lmtsk -lpicl -lkstat
4117N/A
4117N/ACOMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
4117N/ACOMPONENT_BUILD_ARGS += LDFLAGS="$(LDFLAGS)"
4117N/A
4745N/ACOMPONENT_TEST_ARGS = -k -i
4745N/ACOMPONENT_SYSTEM_TEST_ARGS = -k -i
4117N/A
4117N/A# Master test results are different not only between 32-bit and 64-bit, but
4117N/A# also between x86 and SPARC (different # of tests run).
4117N/ACOMPONENT_TEST_MASTER = \
4117N/A $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master
4117N/A
4117N/ACOMPONENT_TEST_TRANSFORMS += \
4117N/A '-e "s|^.*$(CC).*$$|XXX_CC_XXX|g" ' \
4117N/A '-e "s|^.*source=.*libtool=no.*$$|XXX_CC_XXX|g" ' \
4117N/A '-e "s|^.*DEPDIR=.deps.*$$|XXX_CC_XXX|g" ' \
4745N/A '-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
4745N/A '-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
4745N/A '-e "s|^make.*: Nothing to be.*$$|XXX_CC_XXX|g" ' \
4745N/A '-e "s|^.*warning:.*$$|XXX_CC_XXX|g" ' \
4745N/A '-e "s|^.*s up to date.*$$|XXX_CC_XXX|g" ' \
4117N/A '-e "/^XXX_CC_XXX$$/d" '
4117N/A
4745N/A# Get correct libgsl.so from the proto area.
4745N/ATEST_LIBPATH.32 = $(PROTOUSRLIBDIR)
4745N/ATEST_LIBPATH.64 = $(PROTOUSRLIBDIR64)
4745N/ACOMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS))
4745N/A
4117N/A# Needed for "gmake test" to work successfully.
4117N/A# If SHELLOPTS is exported (as it is by the userland makefiles),
4117N/A# then all shell options get exported to child invocations of bash,
4117N/A# which results in test failures due to nounset and xtrace being
4117N/A# set unexpectedly, and errors such as "$1: unbound variable" and
4117N/A# diffs failing due to script tracing in output files.
4117N/Aunexport SHELLOPTS
4117N/A
4156N/A# There are known problems in libsunperf that are causing GSL test failures
4156N/A# in Solaris 12 with Studio 12.4 just on the x86 platform:
4156N/A# linalg: FAIL: LQ_update m(5,3) [88] (32-bit)
4156N/A# caused by 20914954 cblas_gemm differences between x86 and sparcv7
4156N/A# linalg: FAIL: cholesky_invert hilbert(4) (64-bit)
4156N/A# caused by 20909151 cblas_dsymm differences between amd64 and sparcv9.
4745N/Atest: install $(TEST_32_and_64)
4117N/A
4745N/Asystem-test: build $(SYSTEM_TEST_32_and_64)
4337N/A
4117N/AREQUIRED_PACKAGES += shell/ksh93
4117N/AREQUIRED_PACKAGES += system/library/math
4117N/AREQUIRED_PACKAGES += system/library/openmp
4117N/AREQUIRED_PACKAGES += system/library/sunperf