aboutsummaryrefslogtreecommitdiff
path: root/package/mpdecimal
diff options
context:
space:
mode:
Diffstat (limited to 'package/mpdecimal')
-rw-r--r--package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch48
-rw-r--r--package/mpdecimal/mpdecimal.hash4
-rw-r--r--package/mpdecimal/mpdecimal.mk8
3 files changed, 56 insertions, 4 deletions
diff --git a/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch b/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
index 630bbd6642..60d6b4bb02 100644
--- a/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
+++ b/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch
@@ -9,6 +9,8 @@ that building the shared library can be disabled in pure static
library contexts.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+[Fabrice: update for 2.5.0 (add libmpdec++)]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Makefile.in | 6 ++++++
configure.ac | 13 +++++++++++++
@@ -37,11 +39,25 @@ index 2c91891..0c44f36 100644
+endif
+ifeq ($(BUILD_SHARED),yes)
$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir)
- cd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so
+ cd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) $(LIBNAME)
+endif
$(INSTALL) -d -m 755 $(DESTDIR)$(docdir)
cp -R doc/* $(DESTDIR)$(docdir)
+@@ -74,9 +80,13 @@ install_libcxx: install_lib
+ $(INSTALL) -d -m 755 $(DESTDIR)$(includedir)
+ $(INSTALL) -m 644 libmpdec++/decimal.hh $(DESTDIR)$(includedir)
+ $(INSTALL) -d -m 755 $(DESTDIR)$(libdir)
++ifeq ($(BUILD_STATIC),yes)
+ $(INSTALL) -m 644 libmpdec++/$(LIBSTATIC_CXX) $(DESTDIR)$(libdir)
++endif
++ifeq ($(BUILD_SHARED),yes)
+ $(INSTALL) -m 755 libmpdec++/$(LIBSHARED_CXX) $(DESTDIR)$(libdir)
+ cd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED_CXX) $(LIBSONAME_CXX) && ln -sf $(LIBSHARED_CXX) $(LIBNAME_CXX)
++endif
+ cp -R doc/libmpdec++ $(DESTDIR)$(docdir)
+
+
diff --git a/configure.ac b/configure.ac
index 7ee8f86..2b3e505 100644
--- a/configure.ac
@@ -96,6 +112,36 @@ index d9619a3..985c73c 100644
OBJS := basearith.o context.o constants.o convolute.o crt.o mpdecimal.o \
+diff --git a/libmpdec/Makefile.in b/libmpdec/Makefile.in
+index d9619a3..985c73c 100644
+--- a/libmpdec++/Makefile.in
++++ b/libmpdec++/Makefile.in
+@@ -13,6 +13,8 @@ LIBSTATIC_CXX = @LIBSTATIC_CXX@
+ LIBNAME_CXX = @LIBNAME_CXX@
+ LIBSONAME_CXX = @LIBSONAME_CXX@
+ LIBSHARED_CXX = @LIBSHARED_CXX@
++BUILD_SHARED = @BUILD_SHARED@
++BUILD_STATIC = @BUILD_STATIC@
+
+ CXX = @CXX@
+ LDXX = @LDXX@
+@@ -39,8 +41,15 @@ ifeq ($(MAKECMDGOALS), profile_use)
+ MPD_LDXXFLAGS += $(MPD_PUSE)
+ endif
+
++ifeq ($(BUILD_SHARED),yes)
++TARGETS += $(LIBSHARED_CXX)
++endif
++
++ifeq ($(BUILD_STATIC),yes)
++TARGETS += $(LIBSTATIC_CXX)
++endif
+
+-default: $(LIBSTATIC_CXX) $(LIBSHARED_CXX)
++default: $(TARGETS)
+
+
+ OBJS := decimal.o
--
2.1.0
diff --git a/package/mpdecimal/mpdecimal.hash b/package/mpdecimal/mpdecimal.hash
index e152243230..c931ee4a6d 100644
--- a/package/mpdecimal/mpdecimal.hash
+++ b/package/mpdecimal/mpdecimal.hash
@@ -1,4 +1,4 @@
# From http://www.bytereef.org/mpdecimal/download.html
-sha256 83c628b90f009470981cf084c5418329c88b19835d8af3691b930afccb7d79c7 mpdecimal-2.4.2.tar.gz
+sha256 15417edc8e12a57d1d9d75fa7e3f22b158a3b98f44db9d694cfd2acde8dfa0ca mpdecimal-2.5.0.tar.gz
# Locally computed
-sha256 e384413a13f061a50f6fadceefc0f326c22d83c13ae94978e1f86d0468332c19 LICENSE.txt
+sha256 b07528d8b1dbf1e2d2741052996f0876e23342ce2d30d0effa39c5457716c25a LICENSE.txt
diff --git a/package/mpdecimal/mpdecimal.mk b/package/mpdecimal/mpdecimal.mk
index 2d06d0f6b4..fa310a2274 100644
--- a/package/mpdecimal/mpdecimal.mk
+++ b/package/mpdecimal/mpdecimal.mk
@@ -5,7 +5,7 @@
################################################################################
MPDECIMAL_SITE = http://www.bytereef.org/software/mpdecimal/releases
-MPDECIMAL_VERSION = 2.4.2
+MPDECIMAL_VERSION = 2.5.0
MPDECIMAL_INSTALL_STAGING = YES
MPDECIMAL_LICENSE = BSD-2-Clause
MPDECIMAL_LICENSE_FILES = LICENSE.txt
@@ -22,4 +22,10 @@ MPDECIMAL_CONF_ENV += MACHINE=ansi32
endif
endif
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+MPDECIMAL_CONF_OPTS += --enable-cxx
+else
+MPDECIMAL_CONF_OPTS += --disable-cxx
+endif
+
$(eval $(autotools-package))