Merge pull request #15 from petrov-adg/video-libdouble-conversion
[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
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/host-build.mk
29 include $(INCLUDE_DIR)/cmake.mk
30
31 define Package/libdouble-conversion
32 SECTION:=libs
33 CATEGORY:=Libraries
34 TITLE:=Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles
35 URL:=https://github.com/google/double-conversion
36 DEPENDS:=+libstdcpp
37 endef
38
39 define Package/libdouble-conversion/description
40 double-conversion provides binary-decimal and decimal-binary routines for IEEE doubles.
41
42 The library consists of efficient conversion routines that have been extracted
43 from the V8 JavaScript engine. The code has been refactored and improved so that
44 it can be used more easily in other projects.
45 endef
46
47 CMAKE_OPTIONS += \
48 -DBUILD_SHARED_LIBS=ON \
49 -DBUILD_TESTING=OFF
50
51 TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -fno-rtti -flto
52 TARGET_LDFLAGS += -Wl,--gc-sections
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))