void-packages/srcpkgs/boost/patches/install-strip-destdir.patch

34 lines
934 B
Diff
Raw Normal View History

2022-09-05 17:27:16 +02:00
boost doesn't support DESTDIR or something like that,
hence, we need --prefix=$DESTDIR/usr.
However --prefix=$DESTDIR/usr adds $DESTDIR into
its cmake config. This patch strips $DESTDIR out
of cmake config
2022-08-26 10:21:49 +02:00
--- a/tools/boost_install/boost-install.jam
+++ b/tools/boost_install/boost-install.jam
@@ -678,6 +678,16 @@ local rule path-native-fwd ( path )
return $(path) ;
}
+local rule path-strip-destdir ( path )
+{
+ local parts = [ MATCH "^(/destdir(/[^/]+)?/boost-[0-9.]+)(/.*)" : $(path) ] ;
+ if $(parts)
+ {
+ path = $(parts[3]) ;
+ }
+ return $(path) ;
+}
+
local rule get-dir ( name : dir )
{
if [ path.is-rooted $(dir) ]
@@ -756,6 +766,7 @@ rule generate-cmake-config- ( target : s
if [ path.is-rooted $(cmakedir) ]
{
local cmakedir-native = [ path-native-fwd $(cmakedir) ] ;
+ cmakedir-native = [ path-strip-destdir $(cmakedir-native) ] ;
print.text