Browse Source

boringssl: Add boringssl library

Add boringssl library. BoringSSL is Google's fork of OpenSSL.
Amongst other features, it adds support for QUIC.

Signed-off-by: Martin Schneider <martschneider@google.com>
lilik-openwrt-22.03
Martin Schneider 4 years ago
committed by Rosen Penev
parent
commit
4fde0fdad5
3 changed files with 91 additions and 0 deletions
  1. +52
    -0
      libs/boringssl/Makefile
  2. +21
    -0
      libs/boringssl/patches/300-support-mipsel-arch.patch
  3. +18
    -0
      libs/boringssl/patches/900-add-install-target.patch

+ 52
- 0
libs/boringssl/Makefile View File

@ -0,0 +1,52 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2021 Martin Schneider <martschneider@google.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=boringssl
PKG_VERSION:=20210608
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://boringssl.googlesource.com/boringssl
PKG_SOURCE_DATE:=2021-06-08
PKG_SOURCE_VERSION:=1f54fd9864c054dc33e15b1144e2a6a19fa0a52e
PKG_MIRROR_HASH:=a60c79ca40d1a73639d4c1bba3431ca630ab1d670ab06307e8442b69cfaf0cc7
PKG_MAINTAINER:=Martin Schneider <martschneider@google.com>
PKG_LICENSE:=OpenSSL ISC
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=golang/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
include ../../lang/golang/golang-values.mk
define Package/boringssl
SECTION:=libs
CATEGORY:=Libraries
TITLE:=An implementation of the TLS protocol
URL:=https://boringssl.googlesource.com/boringssl/
DEPENDS:=+libstdcpp $(GO_ARCH_DEPENDS) @!(mips||mips64)
endef
define Package/boringssl/description
An implementation of the TLS protocol
endef
CMAKE_OPTIONS+=-DBUILD_SHARED_LIBS=ON
define Package/boringssl/install
$(INSTALL_DIR) $(1)/usr/lib/boringssl
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/bin/lib{crypto,ssl}.so $(1)/usr/lib/boringssl
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib/boringssl
$(INSTALL_DIR) $(1)/usr/include/boringssl
$(CP) $(PKG_INSTALL_DIR)/usr/bin/lib{crypto,ssl}.so $(1)/usr/lib/boringssl
$(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/boringssl
endef
$(eval $(call BuildPackage,boringssl))

+ 21
- 0
libs/boringssl/patches/300-support-mipsel-arch.patch View File

@ -0,0 +1,21 @@
From 425b44bc6f6abcd4c12e2fb72f42622e825ad700 Mon Sep 17 00:00:00 2001
From: Martin Schneider <martschneider@google.com>
Date: Mon, 25 Oct 2021 09:53:33 +0800
Subject: [PATCH] Support mipsel architecture.
Signed-off-by: Martin Schneider <martschneider@google.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -489,7 +489,7 @@ elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUA
set(ARCH "aarch64")
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm*")
set(ARCH "arm")
-elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "mips")
+elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^mips*")
# Just to avoid the “unknown processor” error.
set(ARCH "generic")
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le")

+ 18
- 0
libs/boringssl/patches/900-add-install-target.patch View File

@ -0,0 +1,18 @@
From 8f62d432745a65671332281363409229c238cd1e Mon Sep 17 00:00:00 2001
From: Martin Schneider <martschneider@google.com>
Date: Mon, 25 Oct 2021 10:53:01 +0800
Subject: [PATCH] Add install target to CMakeLists.txt
Signed-off-by: Martin Schneider <martschneider@google.com>
---
CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -649,3 +649,5 @@ add_custom_target(
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS all_tests bssl_shim handshaker fips_specific_tests_if_any
USES_TERMINAL)
+
+install(TARGETS ssl crypto DESTINATION bin)

Loading…
Cancel
Save