|
@@ -0,0 +1,64 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2006-2012 OpenWrt.org
|
|
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:=gmp
|
|
11
|
+PKG_VERSION:=5.1.3
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
15
|
+PKG_SOURCE_URL:=ftp://ftp.gmplib.org/pub/$(PKG_NAME)-$(PKG_VERSION)/
|
|
16
|
+PKG_MD5SUM:=a082867cbca5e898371a97bb27b31fea
|
|
17
|
+
|
|
18
|
+PKG_BUILD_PARALLEL:=1
|
|
19
|
+PKG_INSTALL:=1
|
|
20
|
+PKG_FIXUP:=autoreconf
|
|
21
|
+
|
|
22
|
+PKG_USE_MIPS16:=0
|
|
23
|
+
|
|
24
|
+include $(INCLUDE_DIR)/package.mk
|
|
25
|
+
|
|
26
|
+define Package/libgmp
|
|
27
|
+ SECTION:=libs
|
|
28
|
+ CATEGORY:=Libraries
|
|
29
|
+ TITLE:=GNU multiprecision arithmetic library
|
|
30
|
+ URL:=http://gmplib.org/
|
|
31
|
+endef
|
|
32
|
+
|
|
33
|
+define Package/libgmp/description
|
|
34
|
+ GMP is a free library for arbitrary precision arithmetic, operating on
|
|
35
|
+ signed integers, rational numbers, and floating point numbers.
|
|
36
|
+endef
|
|
37
|
+
|
|
38
|
+TARGET_CFLAGS += $(FPIC)
|
|
39
|
+CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
|
|
40
|
+CONFIGURE_ARGS += \
|
|
41
|
+ --enable-shared \
|
|
42
|
+ --enable-static \
|
|
43
|
+
|
|
44
|
+define Build/Compile
|
|
45
|
+ $(call Build/Compile/Default, \
|
|
46
|
+ DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
47
|
+ CC="$(TARGET_CC)" \
|
|
48
|
+ all \
|
|
49
|
+ )
|
|
50
|
+endef
|
|
51
|
+
|
|
52
|
+define Build/InstallDev
|
|
53
|
+ $(INSTALL_DIR) $(1)/usr/include
|
|
54
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
|
|
55
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
56
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
|
|
57
|
+endef
|
|
58
|
+
|
|
59
|
+define Package/libgmp/install
|
|
60
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
61
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
|
|
62
|
+endef
|
|
63
|
+
|
|
64
|
+$(eval $(call BuildPackage,libgmp))
|