Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mpfr
  9. PKG_VERSION:=4.2.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=@GNU/mpfr http://www.mpfr.org/mpfr-$(PKG_VERSION)
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_HASH:=277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2
  14. PKG_LICENSE:=LGPL-3.0-or-later
  15. PKG_LICENSE_FILES:=COPYING.LESSER
  16. PKG_MAINTAINER:=Jeffery To <[email protected]>
  17. PKG_CPE_ID:=cpe:/a:mpfr:gnu_mpfr
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_FIXUP:=autoreconf
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libmpfr
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=GNU MPFR library
  26. URL:=https://www.mpfr.org/
  27. DEPENDS:=+libgmp
  28. ABI_VERSION:=6
  29. endef
  30. define Package/libmpfr/description
  31. MPFR is a portable library written in C for arbitrary precision
  32. arithmetic on floating-point numbers. It is based on the GNU MP library.
  33. It aims to provide a class of floating-point numbers with precise
  34. semantics.
  35. endef
  36. CONFIGURE_ARGS += \
  37. --enable-thread-safe
  38. define Build/InstallDev
  39. $(INSTALL_DIR) $(1)/usr/include
  40. $(CP) $(PKG_INSTALL_DIR)/usr/include/mpf* $(1)/usr/include/
  41. $(INSTALL_DIR) $(1)/usr/lib
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmpfr.{a,so*} $(1)/usr/lib/
  43. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mpfr.pc $(1)/usr/lib/pkgconfig/
  45. endef
  46. define Package/libmpfr/install
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmpfr.so.* $(1)/usr/lib/
  49. endef
  50. $(eval $(call BuildPackage,libmpfr))