219N/A# CDDL HEADER START
219N/A#
219N/A# The contents of this file are subject to the terms of the
219N/A# Common Development and Distribution License (the "License").
219N/A# You may not use this file except in compliance with the License.
219N/A#
219N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
219N/A# or http://www.opensolaris.org/os/licensing.
219N/A# See the License for the specific language governing permissions
219N/A# and limitations under the License.
219N/A#
219N/A# When distributing Covered Code, include this CDDL HEADER in each
219N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
219N/A# If applicable, add the following below this CDDL HEADER, with the
219N/A# fields enclosed by brackets "[]" replaced with your own identifying
219N/A# information: Portions Copyright [yyyy] [name of copyright owner]
219N/A#
219N/A# CDDL HEADER END
219N/A#
219N/A
219N/A#
5680N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
219N/A#
5680N/ABUILD_BITS= 64_and_32
219N/Ainclude ../../make-rules/shared-macros.mk
219N/A
5680N/APATH=$(dir $(CC)):$(USRBINDIR):$(GNUBIN)
219N/A
219N/ACOMPONENT_NAME= mpfr
219N/ACOMPONENT_VERSION= 2.4.2
618N/ACOMPONENT_PROJECT_URL= http://www.mpfr.org/
844N/ACOMPONENT_ARCHIVE_HASH= \
844N/A sha256:246d7e184048b1fc48d3696dd302c9774e24e921204221540745e5464022b637
618N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
1258N/ACOMPONENT_BUGDB= library/libmpfr
219N/A
2899N/ATPNO= 17709
2899N/A
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
219N/A
4250N/ACLEAN_PATHS += libmpfr.pc
219N/APATCH_LEVEL = 0
219N/A
219N/ACFLAGS += -features=extinl,extensions
219N/ACFLAGS += -xustr=ascii_utf16_ushort -xcsi
219N/A# -xthreadvar=%all: allow thread-local storage via __thread
219N/A# qualifier for all types of variables (global, static and dynamic)
219N/ACFLAGS += -xthreadvar=%all -mt $(CPP_C99_EXTENDED_MATH)
219N/ACFLAGS += $(studio_C99_ENABLE) $(CPP_XPG6MODE)
219N/ACFLAGS += $(studio_PIC)
219N/ALDFLAGS += $(LD_Z_REDLOCSYM) $(LD_Z_RESCAN_NOW)
219N/A
219N/AMPN32_i386 = x86/pentium x86 generic
219N/AMPN64_i386 = x86_64/pentium4 x86_64 generic
219N/AMPN32_sparc = sparc32/v9 sparc32 generic
219N/AMPN64_sparc = sparc64 generic
219N/AMPN32 = $(MPN32_$(MACH))
219N/AMPN64 = $(MPN64_$(MACH))
219N/A
5680N/AGMPINCDIR = $(USRINCDIR)/gmp
219N/AMPFRMULHIGH = 2048
219N/A
3823N/ACOMPONENT_TEST_TRANSFORMS += \
3823N/A '-e "/libtool/d"' \
3823N/A '-e "/-m32/d"' \
3823N/A '-e "/-m64/d"' \
3823N/A '-e "/DEPDIR=/d"' \
3823N/A '-e "s/^make\[[0-9]\{1,\}\]/make/g"'
3823N/A
219N/ACONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
219N/ACONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
219N/ACONFIGURE_ENV += INSTALL="$(INSTALL)"
219N/ACONFIGURE_ENV += SED="$(GSED)"
219N/ACONFIGURE_ENV += ABI="$(BITS)"
219N/ACONFIGURE_ENV += "MPN_PATH=$(MPN_$(BITS))"
219N/A
5680N/ACONFIGURE_OPTIONS += --includedir=$(USRINCDIR)/mpfr
5680N/ACONFIGURE_OPTIONS += --localstatedir=$(VARDIR)
219N/ACONFIGURE_OPTIONS += --enable-shared
219N/ACONFIGURE_OPTIONS += --disable-static
219N/ACONFIGURE_OPTIONS += --disable-libtool-lock
219N/ACONFIGURE_OPTIONS += --enable-thread-safe
219N/ACONFIGURE_OPTIONS += --enable-tests-timeout=0
219N/ACONFIGURE_OPTIONS += --with-gmp-include=$(GMPINCDIR)
5680N/ACONFIGURE_OPTIONS += --with-gmp-lib=$(USRLIB.$(BITS))
219N/ACONFIGURE_OPTIONS += --with-mulhigh-size=$(MPFRMULHIGH)
219N/ACONFIGURE_OPTIONS += --with-pic
219N/A
5680N/ALINT_FLAGS += -I$(GMPINCDIR)
219N/A
5680N/APROTOUSRSHAREHTMLDIR = $(PROTOUSRSHAREDOCDIR)/mpfr/html
219N/A
219N/ACOMPONENT_POST_INSTALL_ACTION = \
219N/A ( $(MKDIR) $(PROTOUSRSHAREHTMLDIR) ; \
219N/A $(MKDIR) $(PROTOUSRSHAREMAN3DIR) ; \
219N/A $(MKDIR) $(PROTOPKGCONFIGDIR) ; \
219N/A $(MKDIR) $(PROTOPKGCONFIGDIR64) ; \
219N/A $(GSED) -e "s^\#include <gmp.h>^\#include <gmp/gmp.h>^g" \
5680N/A $(PROTOUSRINCDIR)/mpfr/mpfr.h > \
5680N/A $(PROTOUSRINCDIR)/mpfr/mpfr.h.sed ; \
5680N/A $(CP) -fp $(PROTOUSRINCDIR)/mpfr/mpfr.h.sed \
5680N/A $(PROTOUSRINCDIR)/mpfr/mpfr.h ; \
5680N/A $(RM) -f $(PROTOUSRINCDIR)/mpfr/mpfr.h.sed ; \
219N/A $(GSED) -e "s/MACH64/$(MACH64)/g" \
219N/A $(COMPONENT_DIR)/Solaris/libmpfr-64.pc > $(COMPONENT_DIR)/libmpfr.pc ; \
219N/A $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/index.html \
219N/A $(PROTOUSRSHAREHTMLDIR)/ ; \
219N/A $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libmpfr.pc \
219N/A $(PROTOPKGCONFIGDIR) ; \
219N/A $(INSTALL) -m 0644 $(COMPONENT_DIR)/libmpfr.pc \
219N/A $(PROTOPKGCONFIGDIR64) ; \
219N/A $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libmpfr.3 \
219N/A $(PROTOUSRSHAREMAN3DIR)/ )
219N/A
3817N/AREQUIRED_PACKAGES += library/gmp