libdouble-conversion: refactor to use PKG_BUILD_FLAGS:=lto
[feed/video.git] / libs / libdouble-conversion / Makefile
1 #
2 # Copyright (C) 2008-2016 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:=libdouble-conversion
11 PKG_VERSION:=3.1.5
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=double-conversion-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/google/double-conversion/tar.gz/v$(PKG_VERSION)?
16 PKG_HASH:=a63ecb93182134ba4293fd5f22d6e08ca417caafa244afaa751cbfddf6415b13
17
18 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/double-conversion-$(PKG_VERSION)
19 PKG_BUILD_DIR:=$(BUILD_DIR)/double-conversion-$(PKG_VERSION)
20
21 PKG_MAINTAINER:=Yaroslav Petrov <info@lank.me>
22 PKG_LICENSE:=BSD-3c
23 PKG_LICENSE_FILES:=COPYING LICENSE
24
25 CMAKE_INSTALL:=1
26 PKG_BUILD_FLAGS:=gc-sections lto
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/host-build.mk
30 include $(INCLUDE_DIR)/cmake.mk
31
32 define Package/libdouble-conversion
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles
36 URL:=https://github.com/google/double-conversion
37 DEPENDS:=+libstdcpp
38 endef
39
40 define Package/libdouble-conversion/description
41 double-conversion provides binary-decimal and decimal-binary routines for IEEE doubles.
42
43 The library consists of efficient conversion routines that have been extracted
44 from the V8 JavaScript engine. The code has been refactored and improved so that
45 it can be used more easily in other projects.
46 endef
47
48 CMAKE_OPTIONS += \
49 -DBUILD_SHARED_LIBS=ON \
50 -DBUILD_TESTING=OFF
51
52 TARGET_CXXFLAGS += -fno-rtti
53
54 define Package/libdouble-conversion/install
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,libdouble-conversion))
60 $(eval $(call HostBuild))