mirror of
https://github.com/outbackdingo/openwrt-passwall-packages.git
synced 2026-01-27 10:19:59 +00:00
trojan-plus: Optimize whether to automatically configure boost-system based on the boost version (#497)
* trojan-plus: Optimize whether to automatically configure `boost-system` based on the `boost version`
This commit is contained in:
@@ -25,6 +25,7 @@ PKG_MAINTAINER:=Trojan-Plus-Group
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
include ./boost-version.mk
|
||||
|
||||
TARGET_CXXFLAGS += -Wall -Wextra
|
||||
TARGET_CXXFLAGS += $(FPIC)
|
||||
@@ -59,16 +60,7 @@ define Package/trojan-plus
|
||||
DEPENDS:= \
|
||||
+libpthread +libstdcpp +libopenssl \
|
||||
+boost +boost-program_options \
|
||||
+@TROJAN_PLUS_BOOST_SYSTEM:boost-system
|
||||
endef
|
||||
|
||||
define Package/trojan-plus/config
|
||||
config TROJAN_PLUS_BOOST_SYSTEM
|
||||
bool "Include boost-system depends (required for Boost < 1.89.0)"
|
||||
default y if PACKAGE_boost-system
|
||||
help
|
||||
Select this option if your Boost version is lower than 1.89.0.
|
||||
For Boost versions 1.89.0 and above, the system library is integrated into the main boost library.
|
||||
$(if $(filter y,$(BOOST_SYSTEM)),,+boost-system)
|
||||
endef
|
||||
|
||||
define Package/trojan-plus/install
|
||||
|
||||
11
trojan-plus/boost-version.mk
Normal file
11
trojan-plus/boost-version.mk
Normal file
@@ -0,0 +1,11 @@
|
||||
# boost-version.mk
|
||||
BOOST_MAKEFILE:= $(TOPDIR)/feeds/packages/libs/boost/Makefile
|
||||
BOOST_VER := $(shell grep '^PKG_VERSION' $(BOOST_MAKEFILE) 2>/dev/null | sed -E 's/^PKG_VERSION[^0-9]*//')
|
||||
|
||||
BOOST_VER_MAJOR := $(word 1,$(subst ., ,$(BOOST_VER)))
|
||||
BOOST_VER_MINOR := $(word 2,$(subst ., ,$(BOOST_VER)))
|
||||
BOOST_VER_PATCH := $(word 3,$(subst ., ,$(BOOST_VER)))
|
||||
|
||||
BOOST_VERSION := $(shell echo $$(($(BOOST_VER_MAJOR)*100000 + $(BOOST_VER_MINOR)*100 + $(BOOST_VER_PATCH))))
|
||||
|
||||
BOOST_SYSTEM := $(if $(shell [ $(BOOST_VERSION) -ge 108900 ] && echo y),y,n)
|
||||
Reference in New Issue
Block a user