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.
24 # Copyright (c) 2020, Andreas Wacknitz
28 USE_DEFAULT_TEST_TRANSFORMS
= yes
29 include ..
/..
/..
/make-rules
/shared-macros.mk
32 COMPONENT_VERSION
= 6.3.0
34 COMPONENT_SUMMARY
= GNU Multiple Precision Bignum Library
35 COMPONENT_PROJECT_URL
= https
://gmplib.org
/
36 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
37 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.bz2
38 COMPONENT_ARCHIVE_URL
= https
://ftp.gnu.org
/gnu
/gmp
/$(COMPONENT_ARCHIVE
)
39 COMPONENT_ARCHIVE_HASH
= sha256
:ac28211a7cfb609bae2e2c8d6058d66c8fe96434f740cf6fe2e47b000d1c20cb
40 COMPONENT_FMRI
= library
/gmp
41 COMPONENT_CLASSIFICATION
=Development
/High Performance Computing
42 COMPONENT_LICENSE
= LGPLv3
,GPLv3
,FDLv1.3
44 include $(WS_MAKE_RULES
)/common.mk
48 PATH
=$(dir $(CC
)):/usr
/bin
:/usr
/gnu
/bin
50 CLOBBER_PATHS
+= libgmp.
pc libgmpxx.
pc
52 CFLAGS
+= $(CPP_C99_EXTENDED_MATH
)
54 CFLAGS
+= -fexceptions
55 CPPFLAGS
+= $(CPP_POSIX
) $(CPP_LARGEFILES
)
56 LDFLAGS
+= $(LD_Z_REDLOCSYM
) $(LD_Z_RESCAN_NOW
)
58 # assembler detection for GNU MP and GNU MPFR is done via MPN_PATH
59 # at ./configure time. GNU MPFR wants to know GNU MP's MPN_PATH.
60 MPN32_i386
= x86
/pentium x86 generic
61 MPN64_i386
= x86_64
/pentium4 x86_64 generic
62 MPN32_sparc
= sparc32
/v9 sparc32 generic
63 MPN64_sparc
= sparc64
/ultrasparc34 sparc64
/ultrasparc1234 sparc64 generic
64 MPN_32
= $(MPN32_
$(MACH
))
65 MPN_64
= $(MPN64_
$(MACH
))
67 # libgmpxx.so.4 always gets built with unnecessary paths in RUNPATH/RPATH
68 ELFEDIT
= /usr
/bin
/elfedit
70 CONFIGURE_ENV
+= CC
="$(CC)"
71 CONFIGURE_ENV
+= CXX
="$(CXX)"
72 CONFIGURE_ENV
+= CFLAGS
="$(CFLAGS)"
73 CONFIGURE_ENV
+= CPPFLAGS
="$(CPPFLAGS)"
74 CONFIGURE_ENV
+= CXXFLAGS
="$(CC_BITS) $(CXXFLAGS)"
75 CONFIGURE_ENV
+= LD
="$(CC) $(CFLAGS) $(LDFLAGS)"
76 CONFIGURE_ENV
+= LDFLAGS
="$(LDFLAGS)"
77 CONFIGURE_ENV
+= CXXLD
="$(CXX) $(CC_BITS) $(CXXFLAGS) $(LDFLAGS)"
78 CONFIGURE_ENV
+= CPP
="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
79 CONFIGURE_ENV
+= CPP_FOR_BUILD
="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
80 CONFIGURE_ENV
+= CXXCPP
="$(CXX) $(CC_BITS) $(CPPFLAGS) $(CXXFLAGS) -E"
81 CONFIGURE_ENV
+= INSTALL
="$(INSTALL)"
82 CONFIGURE_ENV
+= CC_FOR_BUILD
="$(CC) $(CPPFLAGS) $(CFLAGS)"
83 CONFIGURE_ENV
+= M4
="$(GM4)"
84 CONFIGURE_ENV
+= SED
="$(GSED)"
85 CONFIGURE_ENV
+= ABI
="$(BITS)"
86 CONFIGURE_ENV
+= "MPN_PATH=$(MPN_$(BITS))"
88 CONFIGURE_OPTIONS
+= --localstatedir
=/var
89 CONFIGURE_OPTIONS
+= --enable-shared
90 CONFIGURE_OPTIONS
+= --disable-static
91 CONFIGURE_OPTIONS
+= --disable-libtool-lock
92 CONFIGURE_OPTIONS
+= --disable-alloca
93 CONFIGURE_OPTIONS
+= --enable-cxx
94 CONFIGURE_OPTIONS
+= --enable-fft
95 CONFIGURE_OPTIONS
+= --disable-fat
96 CONFIGURE_OPTIONS
+= --with-pic
98 PROTOUSRSHAREINFODIR
= $(PROTOUSRSHAREDIR
)/info
99 PROTOUSRSHAREHTMLDIR
= $(PROTOUSRSHAREDIR
)/doc
/gmp
/html
100 PROTOUSRSHAREMAN3DIR
= $(PROTOUSRSHAREDIR
)/man
/man3
101 PROTOUSRINCLUDEDIR
= $(PROTOUSRDIR
)/include
102 PROTOPKGCONFIGDIR
= $(PROTOUSRLIBDIR
)/pkgconfig
103 PROTOPKGCONFIGDIR64
= $(PROTOUSRLIBDIR64
)/pkgconfig
107 GCCLIBDIR
=$(GCC_ROOT
)/lib
108 GCCLIBDIR64
=$(GCC_ROOT
)/lib
/$(MACH64
)
110 COMPONENT_POST_INSTALL_ACTION
= \
111 ( $(MKDIR
) $(PROTOUSRSHAREHTMLDIR
) ; \
112 $(MKDIR
) $(PROTOUSRSHAREMAN3DIR
) ; \
113 $(MKDIR
) $(PROTOPKGCONFIGDIR
) ; \
114 $(MKDIR
) $(PROTOPKGCONFIGDIR64
) ; \
115 $(ELFEDIT
) -e
"dyn:runpath $(GCCLIBDIR)" \
116 $(PROTOUSRLIBDIR
)/libgmpxx.so.
$(GMP_SOVERSION
) ; \
117 $(ELFEDIT
) -e
"dyn:runpath $(GCCLIBDIR64)" \
118 $(PROTOUSRLIBDIR64
)/libgmpxx.so.
$(GMP_SOVERSION
) ; \
119 $(ELFEDIT
) -e
"dyn:rpath $(GCCLIBDIR)" \
120 $(PROTOUSRLIBDIR
)/libgmpxx.so.
$(GMP_SOVERSION
) ; \
121 $(ELFEDIT
) -e
"dyn:rpath $(GCCLIBDIR64)" \
122 $(PROTOUSRLIBDIR64
)/libgmpxx.so.
$(GMP_SOVERSION
) ; \
123 $(GSED
) -e
"s/MACH64/$(MACH64)/g" \
124 $(COMPONENT_DIR
)/Solaris
/libgmp-64.
pc > $(COMPONENT_DIR
)/libgmp.
pc ; \
125 $(GSED
) -e
"s/MACH64/$(MACH64)/g" \
126 $(COMPONENT_DIR
)/Solaris
/libgmpxx-64.
pc > \
127 $(COMPONENT_DIR
)/libgmpxx.
pc ; \
128 $(INSTALL
) -m
0644 $(COMPONENT_DIR
)/Solaris
/libgmp.
pc \
129 $(PROTOPKGCONFIGDIR
) ; \
130 $(INSTALL
) -m
0644 $(COMPONENT_DIR
)/Solaris
/libgmpxx.
pc \
131 $(PROTOPKGCONFIGDIR
) ; \
132 $(INSTALL
) -m
0644 $(COMPONENT_DIR
)/libgmp.
pc \
133 $(PROTOPKGCONFIGDIR64
) ; \
134 $(INSTALL
) -m
0644 $(COMPONENT_DIR
)/libgmpxx.
pc \
135 $(PROTOPKGCONFIGDIR64
) ; \
136 $(INSTALL
) -m
0644 $(COMPONENT_DIR
)/Solaris
/libgmp
.3 \
137 $(PROTOUSRSHAREMAN3DIR
)/ )
141 # Auto-generated dependencies
142 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
143 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
144 REQUIRED_PACKAGES
+= system
/library