3 # The contents of this file are subject to the terms of the
4 # Common Development and Distribution License (the "License").
5 # You may not use this file except in compliance with the License.
7 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8 # or http://www.opensolaris.org/os/licensing.
9 # See the License for the specific language governing permissions
10 # and limitations under the License.
12 # When distributing Covered Code, include this CDDL HEADER in each
13 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14 # If applicable, add the following below this CDDL HEADER, with the
15 # fields enclosed by brackets "[]" replaced with your own identifying
16 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
23 # Copyright (c) 2016, Aurelien Larcher. All rights reserved.
26 include ..
/..
/..
/make-rules
/shared-macros.mk
29 COMPONENT_VERSION
= 3.1.5
30 COMPONENT_SUMMARY
= The GNU Multiple Precision with IEEE Rounding Floating-Point Library
31 COMPONENT_PROJECT_URL
= http
://www.mpfr.org
/
32 COMPONENT_FMRI
= library
/mpfr
33 COMPONENT_CLASSIFICATION
=Development
/High Performance Computing
34 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
35 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.bz2
36 COMPONENT_ARCHIVE_URL
= $(COMPONENT_PROJECT_URL
)$(COMPONENT_SRC
)/$(COMPONENT_ARCHIVE
)
37 COMPONENT_ARCHIVE_HASH
= \
38 sha256
:ca498c1c7a74dd37a576f353312d1e68d490978de4395fa28f1cbd46a364e658
39 COMPONENT_LICENSE
= LGPLv2.1
,GPLv2
,FDLv1.2
41 include $(WS_MAKE_RULES
)/prep.mk
42 include $(WS_MAKE_RULES
)/configure.mk
43 include $(WS_MAKE_RULES
)/ips.mk
45 PATH
=$(dir $(CC
)):/usr
/bin
:/usr
/gnu
/bin
47 CLOBBER_PATHS
+= libmpfr.
pc
50 CFLAGS
+= $(CPP_C99_EXTENDED_MATH
)
51 CFLAGS
+= -std
=c99
$(CPP_XPG6MODE
)
52 LDFLAGS
+= $(LD_Z_REDLOCSYM
) $(LD_Z_RESCAN_NOW
)
54 MPN32_i386
= x86
/pentium x86 generic
55 MPN64_i386
= x86_64
/pentium4 x86_64 generic
56 MPN32_sparc
= sparc32
/v9 sparc32 generic
57 MPN64_sparc
= sparc64 generic
58 MPN32
= $(MPN32_
$(MACH
))
59 MPN64
= $(MPN64_
$(MACH
))
61 GMPINCDIR
= /usr
/include/gmp
62 GMPLIBDIR_32
= /usr
/lib
63 GMPLIBDIR_64
= /usr
/lib
/$(MACH64
)
66 CONFIGURE_ENV
+= CPPFLAGS
="$(CPPFLAGS)"
67 CONFIGURE_ENV
+= LD
="$(CC) $(CFLAGS) $(LDFLAGS)"
68 CONFIGURE_ENV
+= CPP
="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
69 CONFIGURE_ENV
+= INSTALL
="$(INSTALL)"
70 CONFIGURE_ENV
+= ABI
="$(BITS)"
71 CONFIGURE_ENV
+= "MPN_PATH=$(MPN_$(BITS))"
73 CONFIGURE_OPTIONS
+= --includedir=/usr
/include/mpfr
74 CONFIGURE_OPTIONS
+= --localstatedir
=/var
75 CONFIGURE_OPTIONS
+= --enable-shared
76 CONFIGURE_OPTIONS
+= --disable-static
77 CONFIGURE_OPTIONS
+= --disable-libtool-lock
78 CONFIGURE_OPTIONS
+= --disable-thread-safe
79 CONFIGURE_OPTIONS
+= --enable-tests-timeout
=0
80 CONFIGURE_OPTIONS
+= --with-gmp-include
=$(GMPINCDIR
)
81 CONFIGURE_OPTIONS
+= --with-gmp-lib
=$(GMPLIBDIR_
$(BITS
))
82 CONFIGURE_OPTIONS
+= --with-mulhigh-size
=$(MPFRMULHIGH
)
83 CONFIGURE_OPTIONS
+= --with-pic
85 LINT_FLAGS
+= -I
/usr
/include/gmp
87 PROTOUSRSHAREINFODIR
= $(PROTOUSRSHAREDIR
)/info
88 PROTOUSRSHAREHTMLDIR
= $(PROTOUSRSHAREDIR
)/doc
/mpfr
/html
89 PROTOUSRSHAREMAN3DIR
= $(PROTOUSRSHAREDIR
)/man
/man3
90 PROTOUSRINCLUDEDIR
= $(PROTOUSRDIR
)/include
91 PROTOPKGCONFIGDIR
= $(PROTOUSRLIBDIR
)/pkgconfig
92 PROTOPKGCONFIGDIR64
= $(PROTOUSRLIBDIR64
)/pkgconfig
94 COMPONENT_POST_INSTALL_ACTION
= \
95 ( $(GSED
) -e
"s^\#include <gmp.h>^\#include <gmp/gmp.h>^g" \
96 $(PROTOUSRINCLUDEDIR
)/mpfr
/mpfr.h
> \
97 $(PROTOUSRINCLUDEDIR
)/mpfr
/mpfr.h.sed
; \
98 $(CP
) -fp
$(PROTOUSRINCLUDEDIR
)/mpfr
/mpfr.h.sed \
99 $(PROTOUSRINCLUDEDIR
)/mpfr
/mpfr.h
; \
100 $(RM
) -f
$(PROTOUSRINCLUDEDIR
)/mpfr
/mpfr.h.sed
)
102 build
: $(BUILD_32_and_64
)
104 install: $(INSTALL_32_and_64
)
106 test: $(TEST_32_and_64
)
108 REQUIRED_PACKAGES
+= library
/gmp
109 REQUIRED_PACKAGES
+= system
/library