diff --git a/trojan-plus/Makefile b/trojan-plus/Makefile index a1d2437..c97e87d 100644 --- a/trojan-plus/Makefile +++ b/trojan-plus/Makefile @@ -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 diff --git a/trojan-plus/boost-version.mk b/trojan-plus/boost-version.mk new file mode 100644 index 0000000..4808900 --- /dev/null +++ b/trojan-plus/boost-version.mk @@ -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)