Skip to content

Commit b3c27e9

Browse files
test
1 parent 9e15329 commit b3c27e9

3 files changed

Lines changed: 44 additions & 28 deletions

File tree

depends/packages/boost.mk

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ $(package)_download_path=https://archives.boost.io/release/1.74.0/source/
44
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
55
$(package)_sha256_hash=83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1
66

7-
# Optional patch
7+
# Optional patch (ok to leave)
88
$(package)_patches += bootstrap-clang-darwin.patch
99

10+
# Darwin-only libc++ v1 patch
1011
ifeq ($(host_os),darwin)
1112
$(package)_patches += use-libcxx-v1.patch
1213
endif
1314

14-
1515
define $(package)_set_vars
1616
$(package)_config_opts_release=variant=release
1717
$(package)_config_opts_debug=variant=debug
1818
$(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
1919
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
2020

21-
# per-platform
21+
# ===== per-platform =====
2222
$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
23-
$(package)_config_opts_darwin=toolset=clang runtime-link=shared
23+
$(package)_config_opts_darwin=toolset=clang-darwin runtime-link=shared
2424

2525
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
2626
$(package)_config_opts_x86_64_mingw32=address-model=64
@@ -31,62 +31,63 @@ $(package)_toolset_$(host_os)=gcc
3131
$(package)_archiver_$(host_os)=$($(package)_ar)
3232

3333
# Darwin override
34-
$(package)_toolset_darwin=clang
34+
$(package)_toolset_darwin=clang-darwin
3535
$(package)_archiver_darwin=$($(package)_ar)
3636

37-
boost_toolset_darwin=$($(package)_toolset_darwin)
38-
boost_archiver_darwin=$($(package)_archiver_darwin)
39-
40-
# real library list
37+
# Libraries to build
4138
$(package)_config_libraries=chrono,filesystem,program_options,system,thread
4239

4340
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
4441
$(package)_cxxflags_linux=-fPIC
4542

46-
# sysroot is passed by toolchain, NOT duplicated here
43+
# linker flags only (sysroot handled by toolchain or preprocess)
4744
$(package)_ldflags+= -Wl,-syslibroot,$(OSX_SDK_PATH)
4845
endef
4946

5047
# ==================================================================
51-
# PREPROCESS
48+
# PREPROCESS — CREATE user-config.jam
5249
# ==================================================================
5350

5451
ifeq ($(host_os),darwin)
5552

5653
define $(package)_preprocess_cmds
57-
echo "using clang : : clang++ -target x86_64-apple-darwin11 --sysroot=$(OSX_SDK_PATH) -stdlib=libc++ -mmacosx-version-min=10.8 \
58-
: <cxxflags>\"$($(package)_cxxflags) -stdlib=libc++ -isystem$(OSX_SDK_PATH)/usr/include/c++/v1\" \
59-
<linkflags>\"$($(package)_ldflags) -stdlib=libc++\" \
60-
<archiver>\"$(host_AR)\" \
61-
<ranlib>\"$(host_RANLIB)\" \
62-
<striper>\"$(host_STRIP)\" \
63-
;" > user-config.jam
54+
echo "using clang-darwin : : clang++ -target x86_64-apple-darwin11 \
55+
--sysroot=$(OSX_SDK_PATH) \
56+
-mmacosx-version-min=10.8 \
57+
-stdlib=libc++ \
58+
: <cxxflags>\"-nostdinc++ -std=c++11 \
59+
-isystem$(OSX_SDK_PATH)/usr/include/c++/v1\" \
60+
<linkflags>\"-stdlib=libc++ -Wl,-syslibroot,$(OSX_SDK_PATH)\" \
61+
<archiver>\"$(host_AR)\" \
62+
<ranlib>\"$(host_RANLIB)\" \
63+
<striper>\"$(host_STRIP)\" \
64+
;" > user-config.jam
6465
endef
6566

6667
else
6768

6869
define $(package)_preprocess_cmds
6970
echo "using gcc : : $($(package)_cxx) \
70-
: <cxxflags>\"$($(package)_cxxflags)\" \
71-
<linkflags>\"$($(package)_ldflags)\" \
72-
<archiver>\"$($(package)_ar)\" \
73-
<ranlib>\"$(host_RANLIB)\" \
74-
<striper>\"$(host_STRIP)\" \
75-
;" > user-config.jam
71+
: <cxxflags>\"$($(package)_cxxflags)\" \
72+
<linkflags>\"$($(package)_ldflags)\" \
73+
<archiver>\"$($(package)_ar)\" \
74+
<ranlib>\"$(host_RANLIB)\" \
75+
<striper>\"$(host_STRIP)\" \
76+
;" > user-config.jam
7677
endef
7778

7879
endif
7980

8081
# ==================================================================
81-
# CONFIG — BUILD B2 ENGINE WITH HOST COMPILER
82+
# CONFIG — BUILD B2 ENGINE
8283
# ==================================================================
8384

8485
ifeq ($(host_os),darwin)
8586

8687
define $(package)_config_cmds
8788
PATH="$(BOOST_NO_WRAP_PATH)" CC="$(CC_FOR_BUILD)" CXX="$(CXX_FOR_BUILD)" \
8889
./bootstrap.sh --without-icu \
89-
--with-toolset=gcc \
90+
--with-toolset=clang-darwin \
9091
--with-libraries=$($(package)_config_libraries) \
9192
|| ( echo "=== BOOST BOOTSTRAP.LOG ===" \
9293
&& cat bootstrap.log \
@@ -108,9 +109,11 @@ endif
108109
# ==================================================================
109110

110111
define $(package)_build_cmds
111-
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
112+
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) \
113+
$($(package)_config_opts) stage
112114
endef
113115

114116
define $(package)_stage_cmds
115-
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
117+
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) \
118+
$($(package)_config_opts) install
116119
endef

depends/packages/qt.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ $(package)_qt_libs=corelib network widgets gui plugins testlib
1111
$(package)_patches=mac-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch
1212
$(package)_patches+=fix_qt_pkgconfig.patch fix-cocoahelpers-macos.patch qfixed-coretext.patch
1313

14+
ifeq ($(host_os),darwin)
15+
$(package)_patches += fix-darwin-cpp-headers.patch
16+
endif
17+
18+
1419
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
1520
$(package)_qttranslations_sha256_hash=3a15aebd523c6d89fb97b2d3df866c94149653a26d27a00aac9b6d3020bc5a1d
1621

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
--- a/mkspecs/common/clang.conf
2+
+++ b/mkspecs/common/clang.conf
3+
@@ -10,7 +10,7 @@
4+
QMAKE_CXXFLAGS += -stdlib=libc++
5+
QMAKE_LFLAGS += -stdlib=libc++
6+
7+
-QMAKE_CXXFLAGS += -isystem $$[QT_SYSROOT]/usr/include/c++/4.2.1
8+
+QMAKE_CXXFLAGS += -isystem $$[QT_SYSROOT]/usr/include/c++/v1

0 commit comments

Comments
 (0)