Browse Source

Merge pull request #531 from 1715173329/naive

naiveproxy: Update to 90.0.4430.85-10
coolsnowwolf 4 years ago
parent
commit
71caf8b6bd

+ 18 - 22
naiveproxy/Makefile

@@ -1,25 +1,22 @@
+# SPDX-License-Identifier: GPL-3.0-only
 #
 #
-# Copyright (C) 2021 ImmortalWrt
-# <https://immortalwrt.org>
-#
-# This is free software, licensed under the GNU General Public License v3.
-# See /LICENSE for more information.
-#
+# Copyright (C) 2021 ImmortalWrt.org
+
 include $(TOPDIR)/rules.mk
 include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=naiveproxy
 PKG_NAME:=naiveproxy
-PKG_VERSION:=90.0.4430.85-6
-PKG_RELEASE:=1
+PKG_VERSION:=90.0.4430.85-10
+PKG_RELEASE:=2
 
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?
 PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=cc216c958a996e0d45db26d3a4ebf3faa93494c98bd24475ed3a2b63687311dd
+PKG_HASH:=d4e3d6d5a3205fff910e5fcbe64e9aeaa92f66078615ca4a525144a487eeef15
 
 
 PKG_LICENSE:=BSD 3-Clause
 PKG_LICENSE:=BSD 3-Clause
 PKG_LICENSE_FILES:=LICENSE
 PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=CN_SZTL <[email protected]>
+PKG_MAINTAINER:=Tianling Shen <[email protected]>
 
 
-PKG_BUILD_DEPENDS:=ncurses/host ninja/host python3/host
+PKG_BUILD_DEPENDS:=ninja/host python3/host
 PKG_USE_MIPS16:=0
 PKG_USE_MIPS16:=0
 PKG_BUILD_PARALLEL:=1
 PKG_BUILD_PARALLEL:=1
 
 
@@ -41,25 +38,25 @@ define Package/naiveproxy/config
 endef
 endef
 
 
 define Package/naiveproxy
 define Package/naiveproxy
-	SECTION:=net
-	CATEGORY:=Network
-	SUBMENU:=Web Servers/Proxies
-	URL:=https://github.com/klzgrad/naiveproxy
-	TITLE:=Make a fortune quietly
-	DEPENDS:=+libatomic +libnss
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Web Servers/Proxies
+  URL:=https://github.com/klzgrad/naiveproxy
+  TITLE:=Make a fortune quietly
+  DEPENDS:=+libatomic
 endef
 endef
 
 
 define Package/naiveproxy/description
 define Package/naiveproxy/description
-	NaïveProxy uses Chrome's network stack to camouflage traffic with strong
-	censorship resistance and low detectability. Reusing Chrome's stack also
-	ensures best practices in performance and security.
+  NaïveProxy uses Chrome's network stack to camouflage traffic with strong
+  censorship resistance and low detectability. Reusing Chrome's stack also
+  ensures best practices in performance and security.
 endef
 endef
 
 
 ifneq ($(CONFIG_CCACHE),)
 ifneq ($(CONFIG_CCACHE),)
 	export CCACHE_SLOPPINESS=time_macros
 	export CCACHE_SLOPPINESS=time_macros
 	export CCACHE_BASEDIR=$(PKG_BUILD_DIR)/src
 	export CCACHE_BASEDIR=$(PKG_BUILD_DIR)/src
 	export CCACHE_CPP2=yes
 	export CCACHE_CPP2=yes
-	export naive_ccache_flags=cc_wrapper="ccache"
+	export naive_ccache_flags=cc_wrapper="$(CCACHE)"
 endif
 endif
 
 
 AFDO_VER:=90.0.4430.53_rc-r1-merged
 AFDO_VER:=90.0.4430.53_rc-r1-merged
@@ -119,7 +116,6 @@ define Build/Compile
 ( \
 ( \
 	cd "$(PKG_BUILD_DIR)/src" ; \
 	cd "$(PKG_BUILD_DIR)/src" ; \
 	. ../init_env.sh "$(ARCH)" "$(BOARD)" $(CPU_TYPE) $(CPU_SUBTYPE) "$(TOOLCHAIN_DIR)" ; \
 	. ../init_env.sh "$(ARCH)" "$(BOARD)" $(CPU_TYPE) $(CPU_SUBTYPE) "$(TOOLCHAIN_DIR)" ; \
-	export naive_flags="$$$${naive_flags} pgo_data_path=\"$(PKG_BUILD_DIR)/src/chrome/build/pgo_profiles/$(PGO_FILE)\"" ; \
 	export naive_flags="$$$${naive_flags} $$$${naive_ccache_flags}" ; \
 	export naive_flags="$$$${naive_flags} $$$${naive_ccache_flags}" ; \
 	export OP_STAGING_DIR="$(STAGING_DIR)" ; \
 	export OP_STAGING_DIR="$(STAGING_DIR)" ; \
 	mkdir -p "out" ; \
 	mkdir -p "out" ; \

+ 1 - 1
naiveproxy/patches/001-Remove-concurrency-limit.patch

@@ -18,7 +18,7 @@ Subject: [PATCH] Remove concurrency limit
  #include <utility>
  #include <utility>
  
  
  #include "base/bind.h"
  #include "base/bind.h"
-@@ -39,7 +38,7 @@ NaiveProxy::NaiveProxy(std::unique_ptr<ServerSocket> listen_socket,
+@@ -39,7 +38,7 @@ NaiveProxy::NaiveProxy(std::unique_ptr<S
        protocol_(protocol),
        protocol_(protocol),
        listen_user_(listen_user),
        listen_user_(listen_user),
        listen_pass_(listen_pass),
        listen_pass_(listen_pass),

+ 0 - 29
naiveproxy/patches/100-build-add-OpenWrt-staging-libraries.patch

@@ -1,29 +0,0 @@
-From 5b476d92f8dbee8b83061faa8cd18a46e5ab4aae Mon Sep 17 00:00:00 2001
-From: CN_SZTL <[email protected]>
-Date: Tue, 18 Aug 2020 20:36:39 +0000
-Subject: [PATCH] build: add OpenWrt staging libraries
-
----
- src/build/config/posix/BUILD.gn | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/src/build/config/posix/BUILD.gn
-+++ b/src/build/config/posix/BUILD.gn
-@@ -28,6 +28,9 @@ config("runtime_library") {
-   if (!is_apple && sysroot != "") {
-     # Pass the sysroot to all C compiler variants, the assembler, and linker.
-     sysroot_flags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ]
-+    sysroot_flags += [ "-I" + getenv("OP_STAGING_DIR") + "/usr/include" ]
-+    sysroot_flags += [ "-I" + getenv("OP_STAGING_DIR") + "/usr/include/nss" ]
-+    sysroot_flags += [ "-I" + getenv("OP_STAGING_DIR") + "/usr/include/nspr" ]
-     if (is_linux || is_chromeos) {
-       # This is here so that all files get recompiled after a sysroot roll and
-       # when turning the sysroot on or off. (defines are passed via the command
-@@ -57,6 +60,7 @@ config("runtime_library") {
-     cflags_objcc += sysroot_flags
- 
-     # Need to get some linker flags out of the sysroot.
-+    ldflags += [ "-L" + getenv("OP_STAGING_DIR") + "/usr/lib" ]
-     ld_paths = exec_script("sysroot_ld_path.py",
-                            [
-                              rebase_path("//build/linux/sysroot_ld_path.sh",

+ 0 - 27
naiveproxy/patches/101-build-drop-useless-deps-simd_asm.patch

@@ -1,27 +0,0 @@
-From dd07b78f561914ccc6cbe076ae66c380304bf92c Mon Sep 17 00:00:00 2001
-From: CN_SZTL <[email protected]>
-Date: Wed, 19 Aug 2020 12:42:45 +0000
-Subject: [PATCH] build: drop useless deps simd_asm
-
-libjpeg_turbo itself has alreadly set the dependency "simd_asm",
-and this will cause cross-compile failed:
-```
-ERROR Unresolved dependencies.
-//:gn_all(//build/toolchain/linux:clang_arm64_openwrt)
-  needs //third_party/libjpeg_turbo:simd_asm(//build/toolchain/linux:clang_arm64_openwrt)
-```
-So, let's drop it in global build file.
----
- src/BUILD.gn | 1 -
- 1 file changed, 1 deletion(-)
-
---- a/src/BUILD.gn
-+++ b/src/BUILD.gn
-@@ -749,7 +749,6 @@ group("gn_all") {
-       if (enable_nacl) {
-         deps += [ "//native_client/src/trusted/platform_qualify:vcpuid" ]
-       }
--      deps += [ "//third_party/libjpeg_turbo:simd_asm" ]
-     }
-     if ((is_linux || is_chromeos) && current_toolchain == host_toolchain) {
-       deps += [ "//v8:v8_shell" ]

+ 16 - 31
naiveproxy/src/init_env.sh

@@ -1,6 +1,7 @@
 #!/bin/bash
 #!/bin/bash
-# Project ImmortalWrt
-# Use it under GPLv3.
+# SPDX-License-Identifier: GPL-3.0-only
+#
+# Copyright (C) 2021 ImmortalWrt.org
 # --------------------------------------------------------
 # --------------------------------------------------------
 # Init build dependencies for naiveproxy
 # Init build dependencies for naiveproxy
 
 
@@ -41,26 +42,14 @@ use_allocator_shim=false
 fatal_linker_warnings=false
 fatal_linker_warnings=false
 treat_warnings_as_errors=false
 treat_warnings_as_errors=false
 
 
-fieldtrial_testing_like_official_build=true
-
 enable_base_tracing=false
 enable_base_tracing=false
-enable_nacl=false
-enable_print_preview=false
-enable_remoting=false
-use_alsa=false
-use_cups=false
-use_dbus=false
+use_udev=false
+use_aura=false
+use_ozone=false
+use_x11=false
 use_gio=false
 use_gio=false
 use_platform_icu_alternatives=true
 use_platform_icu_alternatives=true
-use_gtk=false
-use_system_libdrm=false
-use_gnome_keyring=false
-use_libpci=false
-use_pangocairo=false
 use_glib=false
 use_glib=false
-use_pulseaudio=false
-use_udev=false
-use_x11=false
 
 
 disable_file_support=true
 disable_file_support=true
 enable_websockets=false
 enable_websockets=false
@@ -69,23 +58,19 @@ use_kerberos=false
 enable_mdns=false
 enable_mdns=false
 enable_reporting=false
 enable_reporting=false
 include_transport_security_state_preload_list=false
 include_transport_security_state_preload_list=false
-rtc_use_pipewire=false
-
-use_xkbcommon=false
-use_system_libdrm=false
-use_ozone=true
-ozone_auto_platforms=false
-ozone_platform=\"headless\"
-ozone_platform_headless=true
 
 
-current_os=\"linux\"
-current_cpu=\"${naive_arch}\"
-sysroot=\"${toolchain_dir}\"
-custom_toolchain=\"//build/toolchain/linux:clang_${naive_arch}_openwrt\""
+target_os=\"openwrt\"
+target_cpu=\"${naive_arch}\"
+target_sysroot=\"${toolchain_dir}\""
 # ldso_path=\"${ldso_path}\""
 # ldso_path=\"${ldso_path}\""
 [ "${target_arch}" == "arm" ] && {
 [ "${target_arch}" == "arm" ] && {
 	naive_flags="${naive_flags} arm_version=0 arm_cpu=\"${cpu_type}\""
 	naive_flags="${naive_flags} arm_version=0 arm_cpu=\"${cpu_type}\""
-	[ -n "${cpu_subtype}" ] && { echo "${cpu_subtype}" | grep -q "neon" && neon_flag="arm_use_neon=true" || neon_flag="arm_use_neon=false"; naive_flags="${naive_flags} arm_fpu=\"${cpu_subtype}\" arm_float_abi=\"hard\" ${neon_flag}"; } || naive_flags="${naive_flags} arm_float_abi=\"soft\" arm_use_neon=false"
+	if [ -n "${cpu_subtype}" ]; then
+		echo "${cpu_subtype}" | grep -q "neon" && neon_flag="arm_use_neon=true" || neon_flag="arm_use_neon=false"
+		naive_flags="${naive_flags} arm_fpu=\"${cpu_subtype}\" arm_float_abi=\"hard\" ${neon_flag}"
+	else
+		naive_flags="${naive_flags} arm_float_abi=\"soft\" arm_use_neon=false"
+	fi
 }
 }
 [[ "mips mips64 mipsel mips64el" =~ (^|[[:space:]])"${target_arch}"($|[[:space:]]) ]] && {
 [[ "mips mips64 mipsel mips64el" =~ (^|[[:space:]])"${target_arch}"($|[[:space:]]) ]] && {
 	naive_flags="${naive_flags} use_gold=false is_cfi=false use_cfi_icall=false use_thin_lto=false mips_arch_variant=\"r2\""
 	naive_flags="${naive_flags} use_gold=false is_cfi=false use_cfi_icall=false use_thin_lto=false mips_arch_variant=\"r2\""