#
# Copyright (C) 2006-2014 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:=cmake
PKG_VERSION:=3.1.3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.cmake.org/files/v3.1/
PKG_MD5SUM:=5697a77503bb5636f4b4057dcc02aa32
HOST_BUILD_PARALLEL:=1
HOST_CONFIGURE_PARALLEL:=1
include $(INCLUDE_DIR)/host-build.mk
HOST_CONFIGURE_VARS :=
HOST_CONFIGURE_ARGS := \
--prefix=$(STAGING_DIR_HOST) \
$(if $(MAKE_JOBSERVER),--parallel="$(MAKE_JOBSERVER)")
$(eval $(call HostBuild))
include $(TOPDIR)/rules.mk
PKG_NAME:=leveldb
PKG_VERSION:=1.22
PKG_RELEASE:=1
PKG_INSTALL:=1
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/google/leveldb/archive/
PKG_MD5SUM:=e1dbde14dcda1b58b49f0c214464fdd9
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/leveldb/Default
SUBMENU:=database
TITLE:=(leveldb)A key/value database library
URL:=https://code.google.com/p/leveldb/
MAINTAINER:=code.google.com
endef
define Package/leveldb
DEPENDS:=+snappy
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=database
TITLE:=A fast and lightweight key/value database library
URL:=https://code.google.com/p/leveldb/
DEPENDS:=+libstdcpp +libpthread
DEFAULT:=y
endef
CMAKE_OPTIONS += \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON
TARGET_CFLAGS += \
-D_GLIBCXX_USE_C99
define Package/leveldb/Default/description
A fast and lightweight key/value database library
endef
define Build/Compile
$(call Build/Compile/Default)
endef
define Package/leveldb/install
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) DESTDIR="$(1)" install
endef
$(eval $(call BuildPackage,leveldb))
leveldb補丁patches檔案
Index: leveldb-1.22/CMakeLists.txt
===================================================================
--- leveldb-1.22.orig/CMakeLists.txt
+++ leveldb-1.22/CMakeLists.txt
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. See the AUTHORS file for names of contributors.
-cmake_minimum_required(VERSION 3.9)
+cmake_minimum_required(VERSION 3.1.13)
# Keep the version below in sync with the one in db.h
project(leveldb VERSION 1.22.0 LANGUAGES C CXX)