summaryrefslogtreecommitdiff
path: root/package/libtommath
diff options
context:
space:
mode:
authorFrancois Perrad <fperrad@gmail.com>2016-04-10 16:55:24 +0200
committerPeter Korsgaard <peter@korsgaard.com>2016-04-28 19:41:09 +0200
commitc2282f8276776144802b85cdf9f65aabdc178ea5 (patch)
treee841c84bd2c3c33337d53ca6c03754f46136d065 /package/libtommath
parent506662f74a9980640f046294fcb5b17a8710ca7e (diff)
libtommath: new package
Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/libtommath')
-rw-r--r--package/libtommath/Config.in7
-rw-r--r--package/libtommath/libtommath.hash2
-rw-r--r--package/libtommath/libtommath.mk23
3 files changed, 32 insertions, 0 deletions
diff --git a/package/libtommath/Config.in b/package/libtommath/Config.in
new file mode 100644
index 000000000..b2ffc722a
--- /dev/null
+++ b/package/libtommath/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LIBTOMMATH
+ bool "libtommath"
+ help
+ LibTomMath is a free open source portable number theoretic
+ multiple-precision integer library written entirely in C.
+
+ http://www.libtom.net
diff --git a/package/libtommath/libtommath.hash b/package/libtommath/libtommath.hash
new file mode 100644
index 000000000..fcf2ddc9e
--- /dev/null
+++ b/package/libtommath/libtommath.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 993a7df9ee091fca430cdde3263df57d88ef62af8103903214da49fc51bbb56c ltm-1.0.tar.xz
diff --git a/package/libtommath/libtommath.mk b/package/libtommath/libtommath.mk
new file mode 100644
index 000000000..463ea7bd2
--- /dev/null
+++ b/package/libtommath/libtommath.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# libtommath
+#
+################################################################################
+
+LIBTOMMATH_VERSION = 1.0
+LIBTOMMATH_SITE = https://github.com/libtom/libtommath/releases/download/v$(LIBTOMMATH_VERSION)
+LIBTOMMATH_SOURCE = ltm-$(LIBTOMMATH_VERSION).tar.xz
+LIBTOMMATH_LICENSE = WTFPL
+LIBTOMMATH_LICENSE_FILES = LICENSE
+LIBTOMMATH_INSTALL_STAGING = YES
+LIBTOMMATH_INSTALL_TARGET = NO # only static library
+
+define LIBTOMMATH_BUILD_CMDS
+ $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="-I./ $(TARGET_CFLAGS)"
+endef
+
+define LIBTOMMATH_INSTALL_STAGING_CMDS
+ $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" install
+endef
+
+$(eval $(generic-package))