Merge pull request #20747 from blocktrron/respondd-20230330
[feed/packages.git] / libs / mpfr / Makefile
1 #
2 # Copyright (C) 2023 Jeffery To
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mpfr
11 PKG_VERSION:=4.2.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=@GNU/mpfr http://www.mpfr.org/mpfr-$(PKG_VERSION)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_HASH:=06a378df13501248c1b2db5aa977a2c8126ae849a9d9b7be2546fb4a9c26d993
17
18 PKG_LICENSE:=LGPL-3.0-or-later
19 PKG_LICENSE_FILES:=COPYING.LESSER
20 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
21 PKG_CPE_ID:=cpe:/a:mpfr:gnu_mpfr
22
23 PKG_BUILD_PARALLEL:=1
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libmpfr
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=GNU MPFR library
33 URL:=https://www.mpfr.org/
34 DEPENDS:=+libgmp
35 ABI_VERSION:=6
36 endef
37
38 define Package/libmpfr/description
39 MPFR is a portable library written in C for arbitrary precision
40 arithmetic on floating-point numbers. It is based on the GNU MP library.
41 It aims to provide a class of floating-point numbers with precise
42 semantics.
43 endef
44
45 CONFIGURE_ARGS += \
46 --enable-thread-safe
47
48 define Build/InstallDev
49 $(INSTALL_DIR) $(1)/usr/include
50 $(CP) $(PKG_INSTALL_DIR)/usr/include/mpf* $(1)/usr/include/
51
52 $(INSTALL_DIR) $(1)/usr/lib
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmpfr.{a,so*} $(1)/usr/lib/
54
55 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mpfr.pc $(1)/usr/lib/pkgconfig/
57 endef
58
59 define Package/libmpfr/install
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmpfr.so.* $(1)/usr/lib/
62 endef
63
64 $(eval $(call BuildPackage,libmpfr))