!41 Remove dependencies on header-only libraries
From: @sdlzx Reviewed-by: @liqingqing_1229 Signed-off-by: @liqingqing_1229
This commit is contained in:
commit
ea1d727a50
355
boost-1.77-locale-remove-linking-with-boost-system.patch
Normal file
355
boost-1.77-locale-remove-linking-with-boost-system.patch
Normal file
@ -0,0 +1,355 @@
|
||||
From aebac1401f9ddabb84c222481301d25beea1988d Mon Sep 17 00:00:00 2001
|
||||
From: Andrey Semashev <andrey.semashev@gmail.com>
|
||||
Date: Mon, 14 Jan 2019 21:08:25 +0300
|
||||
Subject: [PATCH 1/2] Remove linking with Boost.System.
|
||||
|
||||
Since Boost.System is header-only now, no need to link with the library.
|
||||
---
|
||||
build/Jamfile.v2 | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/libs/locale/build/Jamfile.v2 b/libs/locale/build/Jamfile.v2
|
||||
index 578e722e..43ab0014 100644
|
||||
--- a/libs/locale/build/Jamfile.v2
|
||||
+++ b/libs/locale/build/Jamfile.v2
|
||||
@@ -382,9 +382,6 @@ rule configure-full ( properties * : flags-only )
|
||||
result += <source>util/gregorian.cpp ;
|
||||
}
|
||||
|
||||
- result += <library>../../system/build//boost_system ;
|
||||
-
|
||||
-
|
||||
if "$(flags-only)" = "flags"
|
||||
{
|
||||
return $(flags-result) ;
|
||||
|
||||
From b01aab1d28c9b32d107ae39c76c9af988420d476 Mon Sep 17 00:00:00 2001
|
||||
From: Andrey Semashev <andrey.semashev@gmail.com>
|
||||
Date: Mon, 14 Jan 2019 21:10:38 +0300
|
||||
Subject: [PATCH 2/2] Trim trailing spaces.
|
||||
|
||||
---
|
||||
build/Jamfile.v2 | 119 +++++++++++++++++++++++------------------------
|
||||
1 file changed, 59 insertions(+), 60 deletions(-)
|
||||
|
||||
diff --git a/libs/locale/build/Jamfile.v2 b/libs/locale/build/Jamfile.v2
|
||||
index 43ab0014..97dd68c7 100644
|
||||
--- a/libs/locale/build/Jamfile.v2
|
||||
+++ b/libs/locale/build/Jamfile.v2
|
||||
@@ -1,6 +1,6 @@
|
||||
# copyright John Maddock 2003, Artyom Beilis 2010
|
||||
-# Distributed under the Boost Software License, Version 1.0.
|
||||
-# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
+# Distributed under the Boost Software License, Version 1.0.
|
||||
+# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt.
|
||||
|
||||
|
||||
@@ -32,11 +32,11 @@ explicit has_iconv ;
|
||||
|
||||
ICONV_PATH = [ modules.peek : ICONV_PATH ] ;
|
||||
|
||||
-lib iconv
|
||||
- :
|
||||
+lib iconv
|
||||
+ :
|
||||
: <search>$(ICONV_PATH)/lib <link>shared <runtime-link>shared
|
||||
:
|
||||
- : <include>$(ICONV_PATH)/include
|
||||
+ : <include>$(ICONV_PATH)/include
|
||||
;
|
||||
|
||||
explicit iconv ;
|
||||
@@ -45,8 +45,8 @@ obj has_iconv_libc_ext : ../build/has_iconv.cpp iconv ;
|
||||
exe has_external_iconv : has_iconv_libc_ext iconv ;
|
||||
explicit has_external_iconv ;
|
||||
|
||||
-exe accepts_shared_option : ../build/option.cpp
|
||||
- : <cxxflags>-shared-libstdc++
|
||||
+exe accepts_shared_option : ../build/option.cpp
|
||||
+ : <cxxflags>-shared-libstdc++
|
||||
<cxxflags>-shared-libgcc
|
||||
<linkflags>-shared-libstdc++
|
||||
<linkflags>-shared-libgcc
|
||||
@@ -71,8 +71,8 @@ if $(ICU_LINK)
|
||||
else
|
||||
{
|
||||
searched-lib icuuc : : <name>icuuc
|
||||
- <search>$(ICU_PATH)/lib
|
||||
- <link>shared
|
||||
+ <search>$(ICU_PATH)/lib
|
||||
+ <link>shared
|
||||
<runtime-link>shared ;
|
||||
|
||||
searched-lib icuuc : : <toolset>msvc
|
||||
@@ -120,9 +120,9 @@ else
|
||||
|
||||
explicit icuuc icudt icuin ;
|
||||
|
||||
- ICU_OPTS = <include>$(ICU_PATH)/include
|
||||
- <library>icuuc/<link>shared/<runtime-link>shared
|
||||
- <library>icudt/<link>shared/<runtime-link>shared
|
||||
+ ICU_OPTS = <include>$(ICU_PATH)/include
|
||||
+ <library>icuuc/<link>shared/<runtime-link>shared
|
||||
+ <library>icudt/<link>shared/<runtime-link>shared
|
||||
<library>icuin/<link>shared/<runtime-link>shared
|
||||
<dll-path>$(ICU_PATH)/bin
|
||||
<runtime-link>shared ;
|
||||
@@ -130,8 +130,8 @@ else
|
||||
|
||||
|
||||
searched-lib icuuc_64 : : <name>icuuc
|
||||
- <search>$(ICU_PATH)/lib64
|
||||
- <link>shared
|
||||
+ <search>$(ICU_PATH)/lib64
|
||||
+ <link>shared
|
||||
<runtime-link>shared ;
|
||||
|
||||
searched-lib icuuc_64 : : <toolset>msvc
|
||||
@@ -179,14 +179,14 @@ else
|
||||
|
||||
explicit icuuc_64 icudt_64 icuin_64 ;
|
||||
|
||||
- ICU64_OPTS = <include>$(ICU_PATH)/include
|
||||
- <library>icuuc_64/<link>shared/<runtime-link>shared
|
||||
- <library>icudt_64/<link>shared/<runtime-link>shared
|
||||
+ ICU64_OPTS = <include>$(ICU_PATH)/include
|
||||
+ <library>icuuc_64/<link>shared/<runtime-link>shared
|
||||
+ <library>icudt_64/<link>shared/<runtime-link>shared
|
||||
<library>icuin_64/<link>shared/<runtime-link>shared
|
||||
<dll-path>$(ICU_PATH)/bin64
|
||||
<runtime-link>shared ;
|
||||
-
|
||||
-
|
||||
+
|
||||
+
|
||||
}
|
||||
|
||||
obj has_icu_obj : ../build/has_icu_test.cpp : $(ICU_OPTS) ;
|
||||
@@ -206,11 +206,11 @@ rule configure-full ( properties * : flags-only )
|
||||
|
||||
local result ;
|
||||
local flags-result ;
|
||||
-
|
||||
+
|
||||
local found-iconv ;
|
||||
-
|
||||
+
|
||||
if <boost.locale.iconv>on in $(properties)
|
||||
- || ! <boost.locale.iconv> in $(properties:G)
|
||||
+ || ! <boost.locale.iconv> in $(properties:G)
|
||||
&& ! <target-os>solaris in $(properties)
|
||||
{
|
||||
# See if iconv is bundled with standard library.
|
||||
@@ -218,7 +218,7 @@ rule configure-full ( properties * : flags-only )
|
||||
{
|
||||
found-iconv = true ;
|
||||
}
|
||||
- else
|
||||
+ else
|
||||
{
|
||||
if [ configure.builds has_external_iconv : $(properties) : "iconv (separate)" ]
|
||||
{
|
||||
@@ -226,8 +226,8 @@ rule configure-full ( properties * : flags-only )
|
||||
result += <library>iconv ;
|
||||
}
|
||||
}
|
||||
- }
|
||||
- if $(found-iconv)
|
||||
+ }
|
||||
+ if $(found-iconv)
|
||||
{
|
||||
flags-result += <define>BOOST_LOCALE_WITH_ICONV=1 ;
|
||||
}
|
||||
@@ -249,7 +249,7 @@ rule configure-full ( properties * : flags-only )
|
||||
|
||||
if $(found-icu)
|
||||
{
|
||||
- ICU_SOURCES =
|
||||
+ ICU_SOURCES =
|
||||
boundary
|
||||
codecvt
|
||||
collator
|
||||
@@ -260,20 +260,20 @@ rule configure-full ( properties * : flags-only )
|
||||
numeric
|
||||
time_zone
|
||||
;
|
||||
-
|
||||
- result += <source>icu/$(ICU_SOURCES).cpp
|
||||
- <library>../../thread/build//boost_thread
|
||||
+
|
||||
+ result += <source>icu/$(ICU_SOURCES).cpp
|
||||
+ <library>../../thread/build//boost_thread
|
||||
;
|
||||
}
|
||||
|
||||
}
|
||||
-
|
||||
- if ! $(found-iconv) && ! $(found-icu) && ! <target-os>windows in $(properties) && ! <target-os>cygwin in $(properties)
|
||||
+
|
||||
+ if ! $(found-iconv) && ! $(found-icu) && ! <target-os>windows in $(properties) && ! <target-os>cygwin in $(properties)
|
||||
{
|
||||
ECHO "- Boost.Locale needs either iconv or ICU library to be built." ;
|
||||
result += <build>no ;
|
||||
}
|
||||
-
|
||||
+
|
||||
if ! <boost.locale.std> in $(properties:G)
|
||||
{
|
||||
if <toolset>sun in $(properties)
|
||||
@@ -283,9 +283,9 @@ rule configure-full ( properties * : flags-only )
|
||||
else
|
||||
{
|
||||
properties += <boost.locale.std>on ;
|
||||
- }
|
||||
+ }
|
||||
}
|
||||
-
|
||||
+
|
||||
if <boost.locale.std>off in $(properties)
|
||||
{
|
||||
flags-result += <define>BOOST_LOCALE_NO_STD_BACKEND=1 ;
|
||||
@@ -301,38 +301,38 @@ rule configure-full ( properties * : flags-only )
|
||||
;
|
||||
result += <source>std/$(STD_SOURCES).cpp ;
|
||||
}
|
||||
-
|
||||
+
|
||||
if ! <boost.locale.winapi> in $(properties:G)
|
||||
{
|
||||
- if <target-os>windows in $(properties)
|
||||
+ if <target-os>windows in $(properties)
|
||||
|| <target-os>cygwin in $(properties)
|
||||
{
|
||||
properties += <boost.locale.winapi>on ;
|
||||
- }
|
||||
+ }
|
||||
else
|
||||
{
|
||||
properties += <boost.locale.winapi>off ;
|
||||
- }
|
||||
+ }
|
||||
}
|
||||
- if <target-os>windows in $(properties)
|
||||
- && <toolset>gcc in $(properties)
|
||||
+ if <target-os>windows in $(properties)
|
||||
+ && <toolset>gcc in $(properties)
|
||||
&& <link>shared in $(properties)
|
||||
&& [ configure.builds accepts_shared_option : $(properties) : "g++ -shared-* supported" ]
|
||||
{
|
||||
- flags-result += <cxxflags>-shared-libstdc++
|
||||
+ flags-result += <cxxflags>-shared-libstdc++
|
||||
<cxxflags>-shared-libgcc
|
||||
<linkflags>-shared-libstdc++
|
||||
<linkflags>-shared-libgcc
|
||||
;
|
||||
}
|
||||
-
|
||||
+
|
||||
if <boost.locale.winapi>off in $(properties)
|
||||
{
|
||||
flags-result += <define>BOOST_LOCALE_NO_WINAPI_BACKEND=1 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
- WINAPI_SOURCES =
|
||||
+ WINAPI_SOURCES =
|
||||
collate
|
||||
converter
|
||||
numeric
|
||||
@@ -340,34 +340,34 @@ rule configure-full ( properties * : flags-only )
|
||||
;
|
||||
result += <source>win32/$(WINAPI_SOURCES).cpp ;
|
||||
}
|
||||
-
|
||||
+
|
||||
if ( ! <boost.locale.winapi>off in $(properties) || ! <boost.locale.std>off in $(properties) )
|
||||
&& ( <target-os>windows in $(properties) || <target-os>cygwin in $(properties) )
|
||||
{
|
||||
result += <source>win32/lcid.cpp ;
|
||||
}
|
||||
-
|
||||
+
|
||||
if ! <boost.locale.posix> in $(properties:G)
|
||||
{
|
||||
- if <target-os>linux in $(properties)
|
||||
- || <target-os>darwin in $(properties)
|
||||
+ if <target-os>linux in $(properties)
|
||||
+ || <target-os>darwin in $(properties)
|
||||
|| ( <target-os>freebsd in $(properties) && [ configure.builds has_xlocale : $(properties) : "xlocale supported" ] )
|
||||
{
|
||||
properties += <boost.locale.posix>on ;
|
||||
}
|
||||
else
|
||||
{
|
||||
- properties += <boost.locale.posix>off ;
|
||||
- }
|
||||
+ properties += <boost.locale.posix>off ;
|
||||
+ }
|
||||
}
|
||||
-
|
||||
+
|
||||
if <boost.locale.posix>off in $(properties)
|
||||
{
|
||||
- flags-result += <define>BOOST_LOCALE_NO_POSIX_BACKEND=1 ;
|
||||
+ flags-result += <define>BOOST_LOCALE_NO_POSIX_BACKEND=1 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
- POSIX_SOURCES =
|
||||
+ POSIX_SOURCES =
|
||||
collate
|
||||
converter
|
||||
numeric
|
||||
@@ -381,12 +381,13 @@ rule configure-full ( properties * : flags-only )
|
||||
{
|
||||
result += <source>util/gregorian.cpp ;
|
||||
}
|
||||
-
|
||||
- if "$(flags-only)" = "flags"
|
||||
+
|
||||
+ if "$(flags-only)" = "flags"
|
||||
{
|
||||
return $(flags-result) ;
|
||||
}
|
||||
- else {
|
||||
+ else
|
||||
+ {
|
||||
result += $(flags-result) ;
|
||||
return $(result) ;
|
||||
}
|
||||
@@ -396,7 +397,6 @@ rule configure ( properties * )
|
||||
{
|
||||
local result = [ configure-full $(properties) : "all" ] ;
|
||||
return $(result) ;
|
||||
-
|
||||
}
|
||||
|
||||
rule configure-flags ( properties * )
|
||||
@@ -404,15 +404,14 @@ rule configure-flags ( properties * )
|
||||
local result ;
|
||||
result = [ configure-full $(properties) : "flags" ] ;
|
||||
return $(result) ;
|
||||
-
|
||||
}
|
||||
|
||||
|
||||
alias build_options : : : : <conditional>@configure ;
|
||||
alias build_flags : : : : <conditional>@configure-flags ;
|
||||
|
||||
-lib boost_locale
|
||||
- :
|
||||
+lib boost_locale
|
||||
+ :
|
||||
encoding/codepage.cpp
|
||||
shared/date_time.cpp
|
||||
shared/format.cpp
|
||||
@@ -425,7 +424,7 @@ lib boost_locale
|
||||
util/codecvt_converter.cpp
|
||||
util/default_locale.cpp
|
||||
util/info.cpp
|
||||
- util/locale_data.cpp
|
||||
+ util/locale_data.cpp
|
||||
:
|
||||
# Don't link explicitly, not required
|
||||
<define>BOOST_THREAD_NO_LIB=1
|
||||
24
boost-1.77-type_erasure-remove-boost-system-linkage.patch
Normal file
24
boost-1.77-type_erasure-remove-boost-system-linkage.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From d96af5c5060f02d35a70f57d971b539258279634 Mon Sep 17 00:00:00 2001
|
||||
From: sdlzx <hdu_sdlzx@163.com>
|
||||
Date: Tue, 5 Oct 2021 17:14:02 +0800
|
||||
Subject: [PATCH] Remove boost.system linkage
|
||||
|
||||
---
|
||||
libs/type_erasure/build/Jamfile.v2 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libs/type_erasure/build/Jamfile.v2 b/libs/type_erasure/build/Jamfile.v2
|
||||
index 2408e6bd8..3a77b5e57 100644
|
||||
--- a/libs/type_erasure/build/Jamfile.v2
|
||||
+++ b/libs/type_erasure/build/Jamfile.v2
|
||||
@@ -12,6 +12,6 @@ project /boost/type_erasure
|
||||
: usage-requirements <link>shared:<define>BOOST_TYPE_ERASURE_DYN_LINK
|
||||
;
|
||||
|
||||
-lib boost_type_erasure : dynamic_binding.cpp /boost//thread /boost//system ;
|
||||
+lib boost_type_erasure : dynamic_binding.cpp /boost//thread ;
|
||||
|
||||
boost-install boost_type_erasure ;
|
||||
--
|
||||
2.31.1
|
||||
|
||||
19
boost.spec
19
boost.spec
@ -18,7 +18,7 @@
|
||||
|
||||
Name: boost
|
||||
Version: 1.77.0
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: The free peer-reviewed portable C++ source libraries
|
||||
License: Boost Software License 1.0
|
||||
URL: http://www.boost.org
|
||||
@ -38,6 +38,12 @@ Patch2: boost-1.77-build-drop-rpath.patch
|
||||
# https://github.com/boostorg/locale/issues/52
|
||||
Patch3: boost-1.73-locale-empty-vector.patch
|
||||
|
||||
# https://github.com/boostorg/locale/pull/38
|
||||
Patch4: boost-1.77-locale-remove-linking-with-boost-system.patch
|
||||
|
||||
# https://github.com/boostorg/type_erasure/pull/19
|
||||
Patch5: boost-1.77-type_erasure-remove-boost-system-linkage.patch
|
||||
|
||||
Requires: %{name}-atomic%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-chrono%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-container%{?_isa} = %{version}-%{release}
|
||||
@ -109,7 +115,6 @@ for this particular C++11 feature.
|
||||
|
||||
%package chrono
|
||||
Summary: Useful time utilities C++11
|
||||
Requires: boost-system%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description chrono
|
||||
|
||||
@ -174,7 +179,6 @@ and synchronize fibers similiarly to standard thread support library.
|
||||
|
||||
%package filesystem
|
||||
Summary: Run-time component of boost filesystem library
|
||||
Requires: boost-system%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description filesystem
|
||||
|
||||
@ -210,7 +214,6 @@ simply "JSON"
|
||||
%package locale
|
||||
Summary: Run-time component of boost locale library
|
||||
Requires: boost-chrono%{?_isa} = %{version}-%{release}
|
||||
Requires: boost-system%{?_isa} = %{version}-%{release}
|
||||
Requires: boost-thread%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description locale
|
||||
@ -344,7 +347,6 @@ execution monitoring.
|
||||
|
||||
%package thread
|
||||
Summary: Run-time component of boost thread library
|
||||
Requires: boost-system%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description thread
|
||||
|
||||
@ -357,7 +359,6 @@ threads.
|
||||
%package timer
|
||||
Summary: Event timer, progress timer, and progress display classes
|
||||
Requires: boost-chrono%{?_isa} = %{version}-%{release}
|
||||
Requires: boost-system%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description timer
|
||||
|
||||
@ -368,7 +369,6 @@ with as little as one #include and one additional line of code.
|
||||
%package type_erasure
|
||||
Summary: Run-time component of boost type erasure library
|
||||
Requires: boost-chrono%{?_isa} = %{version}-%{release}
|
||||
Requires: boost-system%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description type_erasure
|
||||
|
||||
@ -378,9 +378,7 @@ that is more flexible than that provided by the core language.
|
||||
%package wave
|
||||
Summary: Run-time component of boost C99/C++ preprocessing library
|
||||
Requires: boost-chrono%{?_isa} = %{version}-%{release}
|
||||
Requires: boost-date-time%{?_isa} = %{version}-%{release}
|
||||
Requires: boost-filesystem%{?_isa} = %{version}-%{release}
|
||||
Requires: boost-system%{?_isa} = %{version}-%{release}
|
||||
Requires: boost-thread%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description wave
|
||||
@ -1075,6 +1073,9 @@ fi
|
||||
%{_mandir}/man1/bjam.1*
|
||||
|
||||
%changelog
|
||||
* Wed Oct 06 2021 Liu Zixian <liuzixian4@huawei.com> - 1.77.0-4
|
||||
- Remove dependencies on header-only libraries
|
||||
|
||||
* Sun Sep 26 2021 Liu Zixian <liuzixian4@huawei.com> - 1.77.0-3
|
||||
- Remove linking script which is fixed in upstream PR266
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user