You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

557 lines
19 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. #
  6. # Original Boost 1.51 Makefile by Mirko Vogt <mirko@openwrt.org>
  7. # Dude, this "boost" is really one of the most crude stuff I ported yet.
  8. #
  9. include $(TOPDIR)/rules.mk
  10. PKG_NAME:=boost
  11. PKG_VERSION:=1.70.0
  12. PKG_SOURCE_VERSION:=1_70_0
  13. PKG_RELEASE:=5
  14. PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
  15. PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
  17. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
  18. PKG_HASH:=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
  19. PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
  20. PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
  21. PKG_BUILD_PARALLEL:=1
  22. PKG_USE_MIPS16:=0
  23. include $(INCLUDE_DIR)/package.mk
  24. include $(INCLUDE_DIR)/nls.mk
  25. define Package/boost/Default
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE:=Boost C++ source library
  29. URL:=http://www.boost.org
  30. DEPENDS:=+libstdcpp +libpthread +librt
  31. endef
  32. define Package/boost/description
  33. This package provides the Boost v1.70.0 libraries.
  34. Boost is a set of free, peer-reviewed, portable C++ source libraries.
  35. -----------------------------------------------------------------------------
  36. | Warning |
  37. | In order to build all of the Boost Libraries, it is necessary |
  38. | to use, at least, GCC version 5 (C++14 support) and, it is necessary to |
  39. | compile the kernel with Full Language Support. |
  40. | Without these requirerements, the following libs will not be available: |
  41. | - Boost.Locale |
  42. | - Boost.Coroutine2 (header-only library - requires C++11) |
  43. | - Boost.Fiber (requires C++14) |
  44. -----------------------------------------------------------------------------
  45. This package provides the following run-time libraries:
  46. - atomic
  47. - chrono
  48. - container
  49. - context
  50. - contract
  51. - coroutine (Deprecated - use Coroutine2)
  52. - - coroutine2 (Requires GCC v5 and up)
  53. - date_time
  54. - exception
  55. - filesystem
  56. - fiber (Requires GCC v5 and up)
  57. - graph
  58. - - graph-parallel
  59. - iostreams
  60. - locale (Requires kernel being compiled with full language support)
  61. - log
  62. - math
  63. - program_options
  64. - python
  65. - python3
  66. - random
  67. - regex
  68. - serialization and wserialization
  69. - stackstrace
  70. - system
  71. - thread
  72. - timer
  73. - type_erasure
  74. - wave
  75. There are many more header-only libraries supported by Boost.
  76. See more at http://www.boost.org/doc/libs/1_70_0/
  77. endef
  78. PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
  79. include ../../lang/python/python-version.mk
  80. BOOST_PYTHON_VER=$(PYTHON_VERSION)
  81. include ../../lang/python/python3-version.mk
  82. BOOST_PYTHON3_VER=$(PYTHON3_VERSION)
  83. BOOST_LIBS =
  84. define Package/boost-libs
  85. $(call Package/boost/Default)
  86. TITLE+= (all libs)
  87. DEPENDS+= $(BOOST_DEPENDS)
  88. HIDDEN:=1
  89. endef
  90. define Package/boost-libs/description
  91. This meta package contains only dependencies to the other libraries from
  92. the boost libraries collection.
  93. endef
  94. # Create a meta-package of dependent libraries (for ALL)
  95. define Package/boost-libs/install
  96. true
  97. endef
  98. define Package/boost/install
  99. true
  100. endef
  101. define Package/boost
  102. $(call Package/boost/Default)
  103. TITLE+= packages
  104. endef
  105. define Package/boost/config
  106. menu "Select Boost Options"
  107. depends on PACKAGE_boost
  108. comment "Boost compilation options."
  109. choice
  110. prompt "Compile Visibility."
  111. default boost-compile-visibility-hidden
  112. help
  113. Choose Boost symbols compilation visibility.
  114. -> Global:
  115. - a.k.a. "default" in gcc documentation. Global symbols are considered public,
  116. they are exported from shared libraries and can be redefined by another
  117. shared library or executable.
  118. -> Protected:
  119. - a.k.a. "symbolic". Protected symbols are exported from shared libraries but
  120. cannot be redefined by another shared library or executable. This mode is
  121. not supported on some platforms, for example OS X.
  122. -> Hidden:
  123. - Hidden symbols are not exported from shared libraries and cannot be
  124. redefined by a different shared library or executable loaded in a process.
  125. In this mode, public symbols have to be explicitly marked in the source code
  126. to be exported from shared libraries. This is the recommended mode.
  127. config boost-compile-visibility-global
  128. bool "Global"
  129. config boost-compile-visibility-protected
  130. bool "Protected"
  131. config boost-compile-visibility-hidden
  132. bool "Hidden"
  133. endchoice
  134. choice
  135. prompt "Compile Boost libraries."
  136. default boost-static-and-shared-libs
  137. help
  138. Choose which version to compile.
  139. -> Shared:
  140. - Only Shared libs will be compiled.
  141. -> Static:
  142. - Only Static libs will be compiled.
  143. -> Both:
  144. - Both Static and Shared libs will be compiled.
  145. config boost-shared-libs
  146. bool "Shared"
  147. config boost-static-libs
  148. bool "Static"
  149. config boost-static-and-shared-libs
  150. bool "Both"
  151. endchoice
  152. choice
  153. prompt "Selects Boost Runtime linkage."
  154. default boost-runtime-shared
  155. help
  156. Choose which C and C++ runtimes to use:
  157. -> Use Shared runtimes.
  158. -> Use Static runtimes.
  159. - Not available if Shared libs are to be built.
  160. -> Use both runtimes.
  161. - Not available if Shared libs are to be built.
  162. - Two separate versions of Boost are built, linking each to a different runtime.
  163. - This option requires "Use tagged names" option to be active.
  164. config boost-runtime-shared
  165. bool "Shared"
  166. config boost-runtime-static
  167. depends on @(!boost-shared-libs&&!boost-static-and-shared-libs)
  168. bool "Static"
  169. config boost-runtime-static-and-shared
  170. depends on @(boost-use-name-tags&&!boost-shared-libs&&!boost-static-and-shared-libs)
  171. bool "Both"
  172. endchoice
  173. choice
  174. prompt "Select a Variant."
  175. default boost-variant-release
  176. help
  177. Chooses which boost variant should be selected:
  178. -> Release: Optimizes Boost for release.
  179. - Optimization: Speed; Debug Symbols: Off; Inlining: Full; Runtime Debugging: Off.
  180. -> Debug:
  181. - Optimization: Off; Debug Symbols: On; Inlining: Off; Runtime Debugging: On.
  182. -> Profile:
  183. - Profiling: On; Debug Symbols: On.
  184. config boost-variant-release
  185. bool "Release"
  186. config boost-variant-debug
  187. bool "Debug"
  188. config boost-variant-profile
  189. bool "Profile"
  190. endchoice
  191. config boost-use-name-tags
  192. bool "Use tagged names."
  193. help
  194. Add name tags the lib files, to diferentiate each library version:
  195. "-mt" for multi-threading.
  196. "-d" for debugging.
  197. "-s" for runtime static link".
  198. Might break compatibility with libraries that expect boost libs with default names.
  199. default n
  200. config boost-single-thread
  201. depends on @boost-use-name-tags
  202. bool "Single thread Support."
  203. help
  204. Compile Boost libraries in single-thread mode.
  205. default n
  206. config boost-build-type-complete
  207. depends on @boost-use-name-tags
  208. bool "Complete Boost Build."
  209. help
  210. Builds both release and debug libs. It will take much longer to compile.
  211. default n
  212. endmenu
  213. menu "Select Boost libraries"
  214. depends on PACKAGE_boost
  215. comment "Libraries"
  216. config boost-libs-all
  217. bool "Include all Boost libraries."
  218. default m if ALL
  219. select PACKAGE_boost-libs
  220. select boost-test-pkg
  221. select boost-coroutine2
  222. select boost-graph-parallel
  223. # Invisible config dependency
  224. config boost-fiber-exclude
  225. bool
  226. default y if (CPU_TYPE=mips32 || CPU_TYPE=mips64)
  227. config boost-test-pkg
  228. bool "Boost test package."
  229. default m if ALL
  230. select PACKAGE_boost-test
  231. config boost-coroutine2
  232. depends on !@GCC_VERSION_4_8
  233. bool "Boost couroutine2 support."
  234. select PACKAGE_boost-coroutine
  235. default n
  236. config boost-graph-parallel
  237. bool "Boost parallel graph support."
  238. select PACKAGE_boost-graph
  239. default n
  240. $(foreach lib,$(BOOST_LIBS), \
  241. config PACKAGE_boost-$(lib)
  242. prompt "Boost $(lib) $(if $(findstring python,$(lib)),$(paren_left)v$(if $(findstring 3,$(lib)),$(BOOST_PYTHON3_VER),$(BOOST_PYTHON_VER))$(paren_right) ,)library."
  243. default m if ALL
  244. $(if $(findstring locale,$(lib)),depends on BUILD_NLS,)\
  245. $(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)\
  246. $(if $(findstring fiber,$(lib)),depends on (CPU_TYPE!=mips32 && CPU_TYPE!=mips64),)
  247. )
  248. endmenu
  249. menu "Select Boost libraries for Host build"
  250. comment "Libraries for Host build"
  251. $(foreach lib,$(BOOST_LIBS), \
  252. config boost-host-build-$(lib)
  253. bool "Boost $(lib) $(if $(findstring python,$(lib)),$(paren_left)v$(if $(findstring 3,$(lib)),$(BOOST_PYTHON3_VER),$(BOOST_PYTHON_VER))$(paren_right) ,)library."
  254. default n
  255. )
  256. endmenu
  257. endef
  258. PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_boost-test
  259. define Package/boost-test
  260. $(call Package/boost/Default)
  261. TITLE+= (test)
  262. HIDDEN:=1
  263. DEPENDS+=+boost-system +boost-timer
  264. endef
  265. define Build/Configure
  266. endef
  267. # 1: short name
  268. # 2: dependencies on other boost libraries (short name)
  269. # 3: dependencies on other packages
  270. # 4: conditional/inward dependencies
  271. define DefineBoostLibrary
  272. BOOST_DEPENDS+= +$(if $(4),$(4):boost-$(1),boost-$(1))
  273. PKG_CONFIG_DEPENDS+= CONFIG_PACKAGE_boost-$(1)
  274. HOST_CONFIG_DEPENDS+= CONFIG_boost-host-build-$(1)
  275. BOOST_LIBS+= $(1)
  276. define Package/boost-$(1)
  277. $(call Package/boost/Default)
  278. TITLE+= ($(1))
  279. DEPENDS+= $$(foreach lib,$(2),+boost-$$(lib)) $(3) $(if $(4),@$(4),)
  280. HIDDEN:=1
  281. endef
  282. define Package/boost-$(1)/description
  283. This package contains the Boost $(1) library.
  284. endef
  285. endef
  286. $(eval $(call DefineBoostLibrary,atomic,system,))
  287. $(eval $(call DefineBoostLibrary,chrono,system,))
  288. $(eval $(call DefineBoostLibrary,container,,))
  289. $(eval $(call DefineBoostLibrary,context,chrono system thread,))
  290. $(eval $(call DefineBoostLibrary,contract,system,))
  291. $(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,))
  292. $(eval $(call DefineBoostLibrary,date_time,,))
  293. #$(eval $(call DefineBoostLibrary,exception,,))
  294. $(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,!boost-fiber-exclude))
  295. $(eval $(call DefineBoostLibrary,filesystem,system,))
  296. $(eval $(call DefineBoostLibrary,graph,regex,))
  297. $(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2 +zstd))
  298. $(eval $(call DefineBoostLibrary,locale,system,$(ICONV_DEPENDS),BUILD_NLS))
  299. $(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex,))
  300. $(eval $(call DefineBoostLibrary,math,,))
  301. #$(eval $(call DefineBoostLibrary,mpi,,)) # OpenMPI does no exist in OpenWRT at this time.
  302. $(eval $(call DefineBoostLibrary,program_options,,))
  303. $(eval $(call DefineBoostLibrary,python,,,PACKAGE_python))
  304. $(eval $(call DefineBoostLibrary,python3,,,PACKAGE_python3))
  305. $(eval $(call DefineBoostLibrary,random,system,))
  306. $(eval $(call DefineBoostLibrary,regex,,))
  307. $(eval $(call DefineBoostLibrary,serialization,,))
  308. $(eval $(call DefineBoostLibrary,wserialization,serialization,))
  309. $(eval $(call DefineBoostLibrary,stacktrace,,))
  310. $(eval $(call DefineBoostLibrary,system,,))
  311. $(eval $(call DefineBoostLibrary,thread,system chrono atomic,))
  312. $(eval $(call DefineBoostLibrary,timer,chrono))
  313. $(eval $(call DefineBoostLibrary,type_erasure,chrono system thread,))
  314. $(eval $(call DefineBoostLibrary,wave,date_time thread filesystem,))
  315. include $(INCLUDE_DIR)/host-build.mk
  316. define Host/Compile
  317. # b2 does not provide a configure-script nor a Makefile
  318. ( cd $(HOST_BUILD_DIR)/tools/build/src/engine ; ./build.sh gcc )
  319. ( cd $(HOST_BUILD_DIR) ; \
  320. ./bootstrap.sh --prefix=$(STAGING_DIR_HOST) \
  321. --with-libraries=$(subst $() $(),$(comma),$(strip \
  322. headers \
  323. $(foreach lib,$(BOOST_LIBS), \
  324. $(if $(findstring python,$(lib)),,$(if $(CONFIG_boost-host-build-$(lib)),$(lib)))))) ; \
  325. ./b2 --ignore-site-config install )
  326. endef
  327. CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
  328. TARGET_LDFLAGS += -pthread -lrt
  329. TARGET_CFLAGS += \
  330. $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
  331. EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_USE_VERSION_5),-std=gnu++14,-std=gnu++17)
  332. ifneq ($(findstring mips,$(ARCH)),)
  333. BOOST_ABI = o32
  334. ifneq ($(findstring 64,$(ARCH)),)
  335. BOOST_ABI = o64
  336. endif
  337. else ifneq ($(findstring arm,$(ARCH)),)
  338. BOOST_ABI = aapcs
  339. else ifeq ($(ARCH),aarch64)
  340. BOOST_ABI = aapcs
  341. else
  342. BOOST_ABI = sysv
  343. endif
  344. comma := ,
  345. define Build/Compile
  346. $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu type $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
  347. ( cd $(PKG_BUILD_DIR) ; \
  348. echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
  349. tools/build/src/user-config.jam ; \
  350. b2 \
  351. $(CONFIGURE_ARGS) \
  352. --ignore-site-config \
  353. --toolset=gcc abi=$(BOOST_ABI) \
  354. --disable-long-double \
  355. $(if $(CONFIG_boost-compile-visibility-global), visibility=global,) \
  356. $(if $(CONFIG_boost-compile-visibility-protected), visibility=protected,) \
  357. $(if $(CONFIG_boost-compile-visibility-hidden), visibility=hidden,) \
  358. $(if $(CONFIG_boost-variant-release), variant=release,) \
  359. $(if $(CONFIG_boost-variant-debug), variant=debug,) \
  360. $(if $(CONFIG_boost-variant-profile), variant=profile,) \
  361. $(if $(CONFIG_boost-use-name-tags),--layout=tagged,--layout=system) \
  362. $(if $(CONFIG_boost-build-type-complete),--build-type=complete,--build-type=minimal) \
  363. $(if $(CONFIG_boost-shared-libs),link=shared,) \
  364. $(if $(CONFIG_boost-static-libs),link=static,) \
  365. $(if $(CONFIG_boost-static-and-shared-libs),link=static$(comma)shared,) \
  366. $(if $(CONFIG_boost-runtime-shared),runtime-link=shared,) \
  367. $(if $(CONFIG_boost-runtime-static),runtime-link=static,) \
  368. $(if $(CONFIG_boost-runtime-static-and-shared),runtime-link=shared$(comma)static,) \
  369. $(if $(CONFIG_boost-single-thread),threading=single,) \
  370. threading=multi \
  371. --without-mpi \
  372. $(if $(CONFIG_boost-graph-parallel),,--without-graph_parallel) \
  373. $(if $(CONFIG_PACKAGE_boost-test),,--without-test) \
  374. --without-python \
  375. $(foreach lib,$(BOOST_LIBS), \
  376. $(if $(findstring python,$(lib)),, \
  377. $(if $(CONFIG_PACKAGE_boost-$(lib)),, \
  378. $(if $(findstring wserialization,$(lib)),,--without-$(lib)) \
  379. ) \
  380. ) \
  381. ) \
  382. $(if $(CONFIG_PACKAGE_boost-locale),boost.locale.iconv=on -sICONV_PATH=$(ICONV_PREFIX) boost.locale.posix=$(if $(USE_MUSL),on,off), \
  383. boost.locale.iconv=off) \
  384. \
  385. $(if $(CONFIG_PACKAGE_boost-iostreams),-sNO_BZIP2=1 -sZLIB_INCLUDE=$(STAGING_DIR)/usr/include \
  386. -sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
  387. install ;\
  388. $(if $(CONFIG_PACKAGE_boost-python), \
  389. echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
  390. tools/build/src/user-config.jam ; \
  391. echo "using python : $(BOOST_PYTHON_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON_VER).so ;" >> \
  392. tools/build/src/user-config.jam; \
  393. b2 -a \
  394. $(CONFIGURE_ARGS) \
  395. --ignore-site-config \
  396. --toolset=gcc abi=$(BOOST_ABI) \
  397. --disable-long-double \
  398. $(if $(CONFIG_boost-variant-release), variant=release,) \
  399. $(if $(CONFIG_boost-variant-debug), variant=debug,) \
  400. $(if $(CONFIG_boost-variant-profile), variant=profile,) \
  401. $(if $(CONFIG_boost-use-name-tags),--layout=tagged,--layout=system) \
  402. $(if $(CONFIG_boost-build-type-complete),--build-type=complete,--build-type=minimal) \
  403. $(if $(CONFIG_boost-shared-libs),link=shared,) \
  404. $(if $(CONFIG_boost-static-libs),link=static,) \
  405. $(if $(CONFIG_boost-static-and-shared-libs),link=static$(comma)shared,) \
  406. $(if $(CONFIG_boost-runtime-shared),runtime-link=shared,) \
  407. $(if $(CONFIG_boost-runtime-static),runtime-link=static,) \
  408. $(if $(CONFIG_boost-runtime-static-and-shared),runtime-link=shared$(comma)static,) \
  409. $(if $(CONFIG_boost-single-thread),threading=single,) \
  410. threading=multi \
  411. --with-python \
  412. install ;\
  413. ,) \
  414. $(if $(CONFIG_PACKAGE_boost-python3), \
  415. echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
  416. tools/build/src/user-config.jam ; \
  417. echo "using python : $(BOOST_PYTHON3_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON3_VER).so ;" >> \
  418. tools/build/src/user-config.jam; \
  419. b2 -a \
  420. $(CONFIGURE_ARGS) \
  421. --ignore-site-config \
  422. --toolset=gcc abi=$(BOOST_ABI) \
  423. --disable-long-double \
  424. $(if $(CONFIG_boost-variant-release), variant=release,) \
  425. $(if $(CONFIG_boost-variant-debug), variant=debug,) \
  426. $(if $(CONFIG_boost-variant-profile), variant=profile,) \
  427. $(if $(CONFIG_boost-use-name-tags),--layout=tagged,--layout=system) \
  428. $(if $(CONFIG_boost-build-type-complete),--build-type=complete,--build-type=minimal) \
  429. $(if $(CONFIG_boost-shared-libs),link=shared,) \
  430. $(if $(CONFIG_boost-static-libs),link=static,) \
  431. $(if $(CONFIG_boost-static-and-shared-libs),link=static$(comma)shared,) \
  432. $(if $(CONFIG_boost-runtime-shared),runtime-link=shared,) \
  433. $(if $(CONFIG_boost-runtime-static),runtime-link=static,) \
  434. $(if $(CONFIG_boost-runtime-static-and-shared),runtime-link=shared$(comma)static,) \
  435. $(if $(CONFIG_boost-single-thread),threading=single,) \
  436. threading=multi \
  437. --with-python \
  438. install ;\
  439. ,) \
  440. )
  441. endef
  442. define Build/InstallDev
  443. $(INSTALL_DIR) \
  444. $(1)/usr/include/boost/
  445. $(CP) \
  446. $(PKG_INSTALL_DIR)/include/boost/* \
  447. $(1)/usr/include/boost/ \
  448. # copies _all_ header files - independent of <--with-library>-argument above
  449. $(INSTALL_DIR) $(1)/usr/lib
  450. # copies all cmake files, compiled archive and shared object files
  451. $(CP) -v $(PKG_INSTALL_DIR)/lib/{*.{a,so*},cmake} $(1)/usr/lib/ || :
  452. endef
  453. define Host/Install
  454. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  455. $(CP) $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 $(STAGING_DIR_HOSTPKG)/bin/
  456. endef
  457. define Package/boost/Default/install
  458. $(INSTALL_DIR) $(1)/usr/lib
  459. $(if $(findstring python,$(2)), $(if $(findstring 3,$(2)), \
  460. $(CP) $(PKG_INSTALL_DIR)/lib/libboost_python3*.so* $(1)/usr/lib/ , \
  461. $(CP) $(PKG_INSTALL_DIR)/lib/libboost_python2*.so* $(1)/usr/lib/ ), \
  462. $(CP) $(PKG_INSTALL_DIR)/lib/libboost_$(2)*.so* $(1)/usr/lib/ )
  463. endef
  464. define Package/boost-test/install
  465. $(INSTALL_DIR) $(1)/usr/lib
  466. $(CP) $(PKG_INSTALL_DIR)/lib/libboost_unit_test_framework*.so* $(1)/usr/lib/
  467. $(CP) $(PKG_INSTALL_DIR)/lib/libboost_prg_exec_monitor*.so* $(1)/usr/lib/
  468. endef
  469. define BuildBoostLibrary
  470. define Package/boost-$(1)/install
  471. $(call Package/boost/Default/install,$$(1),$(1))
  472. endef
  473. $$(eval $$(call BuildPackage,boost-$(1)))
  474. endef
  475. $(eval $(call HostBuild))
  476. $(foreach lib,$(BOOST_LIBS),$(eval $(call BuildBoostLibrary,$(lib))))
  477. $(eval $(call BuildPackage,boost-test))
  478. $(eval $(call BuildPackage,boost-libs))
  479. $(eval $(call BuildPackage,boost))