summaryrefslogtreecommitdiffstats
path: root/libs/libdouble-conversion/Makefile
blob: 414a2422a6e4e2aba96984f825d554cf64e16287 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# Copyright (C) 2008-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=libdouble-conversion
PKG_VERSION:=3.3.1
PKG_RELEASE:=1

PKG_SOURCE:=double-conversion-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/google/double-conversion/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=fe54901055c71302dcdc5c3ccbe265a6c191978f3761ce1414d0895d6b0ea90e

HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/double-conversion-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/double-conversion-$(PKG_VERSION)

PKG_MAINTAINER:=Yaroslav Petrov <info@lank.me>
PKG_LICENSE:=BSD-3c
PKG_LICENSE_FILES:=COPYING LICENSE

CMAKE_INSTALL:=1
PKG_BUILD_FLAGS:=gc-sections lto

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk

define Package/libdouble-conversion
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles
  URL:=https://github.com/google/double-conversion
  DEPENDS:=+libstdcpp
endef

define Package/libdouble-conversion/description
  double-conversion provides binary-decimal and decimal-binary routines for IEEE doubles.

  The library consists of efficient conversion routines that have been extracted
  from the V8 JavaScript engine. The code has been refactored and improved so that
  it can be used more easily in other projects.
endef

CMAKE_OPTIONS += \
	-DBUILD_SHARED_LIBS=ON \
	-DBUILD_TESTING=OFF

TARGET_CXXFLAGS += -fno-rtti

define Package/libdouble-conversion/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,libdouble-conversion))
$(eval $(call HostBuild))