Mxx_ru 1.6.14.9 → 1.6.14.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mxxruexternals +8 -2
- data/lib/mxx_ru/cpp/detect_toolset.rb +3 -1
- data/lib/mxx_ru/cpp/ext_cmake_project.rb +2 -2
- data/lib/mxx_ru/cpp/toolsets/vc16.rb +2 -2
- data/lib/mxx_ru/cpp/toolsets/vc17.rb +71 -0
- data/lib/mxx_ru/externals.rb +18 -24
- data/lib/mxx_ru/util.rb +1 -1
- data/lib/mxx_ru/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00d671247fa8a2875c456acdb7872795482df1c9292742bea38653732ad2e4f5
|
4
|
+
data.tar.gz: 34039de6bfed6139cae5c57ac11ae0cce4054503cdb071c969c1f0fd5352e013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca859d9be86f523c88f7239bafa19c71591ffe222d4904139748e86f88d5beb3401ae1fed1b626f0775f50b7c04bfcb9b130eb8722f6c7782046e6cb1462e039
|
7
|
+
data.tar.gz: a7e606dc300e5e62de3be3e65d7eedf68d25ecfeece4a7b5c7bc97827a2f76de4228207652bb368164c7a155deaf288c192ebc80675ab172bcc1a61f16dcb54a
|
data/bin/mxxruexternals
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
##--
|
3
3
|
# Copyright (c) 1996-2004, Yauheni Akhotnikau
|
4
4
|
# Copyright (c) 2004-2006, JSC Intervale
|
5
|
-
# Copyright (c) 2006-
|
5
|
+
# Copyright (c) 2006-2021, The Mxx_ru Project
|
6
6
|
# All rights reserved.
|
7
7
|
#
|
8
8
|
# Redistribution and use in source and binary forms, with or without modification,
|
@@ -85,6 +85,7 @@ def Impl.parse_args
|
|
85
85
|
result = OpenStruct.new(
|
86
86
|
:externals_file => nil,
|
87
87
|
:libdirs => [],
|
88
|
+
:trace => false,
|
88
89
|
:task => :install )
|
89
90
|
|
90
91
|
parser = OptionParser.new
|
@@ -108,6 +109,10 @@ BANNER
|
|
108
109
|
result.externals_file = p
|
109
110
|
end
|
110
111
|
|
112
|
+
parser.on_head( '--trace', 'Use --trace for rake invocation' ) do
|
113
|
+
result.trace = true
|
114
|
+
end
|
115
|
+
|
111
116
|
parser.on_head( '-h', '--help', 'Show this message' ) do
|
112
117
|
puts parser
|
113
118
|
exit( 1 )
|
@@ -152,7 +157,7 @@ file PREVIOUS_FILE do
|
|
152
157
|
cp '#{options.externals_file}', PREVIOUS_FILE, :verbose => Rake.verbose
|
153
158
|
end
|
154
159
|
|
155
|
-
if File.
|
160
|
+
if File.exist?(PREVIOUS_FILE)
|
156
161
|
prev_digest = Digest::MD5.file(PREVIOUS_FILE)
|
157
162
|
curr_digest = Digest::MD5.file('#{options.externals_file}')
|
158
163
|
|
@@ -188,6 +193,7 @@ EOF
|
|
188
193
|
end
|
189
194
|
|
190
195
|
cmdline = "rake ";
|
196
|
+
cmdline += '--trace ' if options.trace
|
191
197
|
options.libdirs.each do |l| cmdline += "-I \"#{l}\" " end
|
192
198
|
cmdline += "-f #{script_name} #{options.task}"
|
193
199
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#--
|
2
2
|
# Copyright (c) 1996-2004, Yauheni Akhotnikau
|
3
3
|
# Copyright (c) 2004-2006, JSC Intervale
|
4
|
-
# Copyright (c) 2006-
|
4
|
+
# Copyright (c) 2006-2021, The Mxx_ru Project
|
5
5
|
# All rights reserved.
|
6
6
|
#
|
7
7
|
# Redistribution and use in source and binary forms, with or without modification,
|
@@ -152,6 +152,8 @@ module MxxRu
|
|
152
152
|
else
|
153
153
|
if ENV[ 'COMP_ENV' ] and ENV[ 'VC_ARCH' ]
|
154
154
|
'icc_win'
|
155
|
+
elsif ENV[ 'VS170COMNTOOLS' ]
|
156
|
+
'vc17'
|
155
157
|
elsif ENV[ 'VS160COMNTOOLS' ]
|
156
158
|
'vc16'
|
157
159
|
elsif ENV[ 'VS140COMNTOOLS' ]
|
@@ -272,7 +272,7 @@ private
|
|
272
272
|
clean_installed_files
|
273
273
|
run_native_clean
|
274
274
|
end
|
275
|
-
FileUtils.rm_r( ctx.cmake_build_dir, file_utils_options )
|
275
|
+
FileUtils.rm_r( ctx.cmake_build_dir, **file_utils_options )
|
276
276
|
end
|
277
277
|
end
|
278
278
|
|
@@ -336,7 +336,7 @@ private
|
|
336
336
|
def clean_installed_files
|
337
337
|
do_with_install_manifest_content do |file_to_remove|
|
338
338
|
if File.exists?( file_to_remove )
|
339
|
-
FileUtils.rm( file_to_remove, file_utils_options )
|
339
|
+
FileUtils.rm( file_to_remove, **file_utils_options )
|
340
340
|
end
|
341
341
|
end
|
342
342
|
end
|
@@ -36,10 +36,10 @@ module MxxRu
|
|
36
36
|
module Cpp
|
37
37
|
module Toolsets
|
38
38
|
|
39
|
-
# Toolset implementation for Visual C++
|
39
|
+
# Toolset implementation for Visual C++ 16.0 (Visual Studio 2019)
|
40
40
|
#
|
41
41
|
# Setups following tags:
|
42
|
-
# [_ver_hi_] high version number. Value:
|
42
|
+
# [_ver_hi_] high version number. Value: 16.
|
43
43
|
# [_ver_lo_] low version number. Value: 0.
|
44
44
|
class Vc16 < MxxRu::Cpp::Toolsets::Vc8Family
|
45
45
|
def initialize( a_name = "vc" )
|
@@ -0,0 +1,71 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 1996-2004, Yauheni Akhotnikau
|
3
|
+
# Copyright (c) 2004-2006, JSC Intervale
|
4
|
+
# Copyright (c) 2006-2021, The Mxx_ru Project
|
5
|
+
# All rights reserved.
|
6
|
+
#
|
7
|
+
# Redistribution and use in source and binary forms, with or without modification,
|
8
|
+
# are permitted provided that the following conditions are met:
|
9
|
+
#
|
10
|
+
# 1. Redistributions of source code must retain the above copyright notice,
|
11
|
+
# this list of conditions and the following disclaimer.
|
12
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
13
|
+
# this list of conditions and the following disclaimer in the documentation
|
14
|
+
# and/or other materials provided with the distribution.
|
15
|
+
# 3. The name of the author may not be used to endorse or promote products derived
|
16
|
+
# from this software without specific prior written permission.
|
17
|
+
#
|
18
|
+
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
19
|
+
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
20
|
+
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
|
21
|
+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
22
|
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
23
|
+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
25
|
+
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
26
|
+
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
#++
|
28
|
+
|
29
|
+
require 'ostruct'
|
30
|
+
require 'set'
|
31
|
+
|
32
|
+
require 'mxx_ru/cpp/target'
|
33
|
+
require 'mxx_ru/cpp/toolsets/vc8_family'
|
34
|
+
|
35
|
+
module MxxRu
|
36
|
+
module Cpp
|
37
|
+
module Toolsets
|
38
|
+
|
39
|
+
# Toolset implementation for Visual C++ 17.0 (Visual Studio 2022)
|
40
|
+
#
|
41
|
+
# Setups following tags:
|
42
|
+
# [_ver_hi_] high version number. Value: 17.
|
43
|
+
# [_ver_lo_] low version number. Value: 0.
|
44
|
+
class Vc17 < MxxRu::Cpp::Toolsets::Vc8Family
|
45
|
+
def initialize( a_name = "vc" )
|
46
|
+
super( a_name )
|
47
|
+
|
48
|
+
setup_tag( "ver_hi", "17" )
|
49
|
+
setup_tag( "ver_lo", "0" )
|
50
|
+
end
|
51
|
+
|
52
|
+
# See description at MxxRu::Cpp::Toolset#setup_mandatory_options.
|
53
|
+
def setup_mandatory_options( target )
|
54
|
+
super( target )
|
55
|
+
|
56
|
+
if CPP_STD20 == cpp_std
|
57
|
+
target.cpp_compiler_option( '/std:c++20' )
|
58
|
+
elsif CPP_STD17 == cpp_std
|
59
|
+
target.cpp_compiler_option( '/std:c++17' )
|
60
|
+
elsif CPP_STD14 == cpp_std
|
61
|
+
target.cpp_compiler_option( '/std:c++14' )
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end # class Vc17
|
65
|
+
|
66
|
+
end # module Toolsets
|
67
|
+
end # module Cpp
|
68
|
+
end # module MxxRu
|
69
|
+
|
70
|
+
MxxRu::Cpp::setup_toolset( MxxRu::Cpp::Toolsets::Vc17.new )
|
71
|
+
|
data/lib/mxx_ru/externals.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2021, The Mxx_ru Project
|
3
3
|
# All rights reserved.
|
4
4
|
#
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
@@ -238,8 +238,6 @@ end # class WebDownloader
|
|
238
238
|
|
239
239
|
module ExternalBasics
|
240
240
|
|
241
|
-
attr_reader :url
|
242
|
-
|
243
241
|
attr_reader :paths
|
244
242
|
|
245
243
|
attr_reader :name
|
@@ -290,7 +288,7 @@ private
|
|
290
288
|
end
|
291
289
|
|
292
290
|
def rm_dir_if_exists(dir_name)
|
293
|
-
rm_r(dir_name, fileop_options) if Dir.exists?(dir_name)
|
291
|
+
rm_r(dir_name, **fileop_options) if Dir.exists?(dir_name)
|
294
292
|
end
|
295
293
|
|
296
294
|
def rm_directories(dirs)
|
@@ -298,7 +296,7 @@ private
|
|
298
296
|
end
|
299
297
|
|
300
298
|
def rm_file_if_exists(file_name)
|
301
|
-
rm(file_name, fileop_options) if File.exists?(file_name)
|
299
|
+
rm(file_name, **fileop_options) if File.exists?(file_name)
|
302
300
|
end
|
303
301
|
|
304
302
|
def rm_files(files)
|
@@ -353,7 +351,7 @@ private
|
|
353
351
|
directory dir_dep
|
354
352
|
|
355
353
|
directory actual_dst => [ext_prj_sources_dir, dir_dep] do
|
356
|
-
cp_r(File.join(ext_prj_sources_dir, src), actual_dst, fileop_options)
|
354
|
+
cp_r(File.join(ext_prj_sources_dir, src), actual_dst, **fileop_options)
|
357
355
|
end
|
358
356
|
end
|
359
357
|
|
@@ -368,7 +366,7 @@ private
|
|
368
366
|
directory dir_dep
|
369
367
|
|
370
368
|
file dst => [ext_prj_sources_dir, dir_dep] do
|
371
|
-
cp(File.join(ext_prj_sources_dir, src), dst, fileop_options)
|
369
|
+
cp(File.join(ext_prj_sources_dir, src), dst, **fileop_options)
|
372
370
|
end
|
373
371
|
end
|
374
372
|
|
@@ -384,7 +382,7 @@ private
|
|
384
382
|
|
385
383
|
ext_prj_sources_tmp_dir = subdir_name(make_tmp_name(@name))
|
386
384
|
exporter.call(ext_prj_sources_tmp_dir)
|
387
|
-
mv(ext_prj_sources_tmp_dir, ext_prj_sources_dir, fileop_options)
|
385
|
+
mv(ext_prj_sources_tmp_dir, ext_prj_sources_dir, **fileop_options)
|
388
386
|
end
|
389
387
|
|
390
388
|
task @install_task_name =>
|
@@ -475,7 +473,6 @@ class Svn < Rake::TaskLib
|
|
475
473
|
Registry::handle_external(@name, self)
|
476
474
|
end
|
477
475
|
|
478
|
-
attr_reader :rev
|
479
476
|
def rev(v); @rev = v; end
|
480
477
|
alias :rev= :rev
|
481
478
|
|
@@ -498,7 +495,7 @@ class Svn < Rake::TaskLib
|
|
498
495
|
|
499
496
|
sh_args << @url << tmp_dir
|
500
497
|
|
501
|
-
sh
|
498
|
+
sh(*sh_args)
|
502
499
|
end
|
503
500
|
end
|
504
501
|
|
@@ -520,7 +517,6 @@ class Git < Rake::TaskLib
|
|
520
517
|
Registry::handle_external(@name, self)
|
521
518
|
end
|
522
519
|
|
523
|
-
attr_reader :tag
|
524
520
|
def tag(v); @tag = v; end
|
525
521
|
alias :tag= :tag
|
526
522
|
|
@@ -532,7 +528,6 @@ class Git < Rake::TaskLib
|
|
532
528
|
@recursive = true
|
533
529
|
end
|
534
530
|
|
535
|
-
attr_reader :commit
|
536
531
|
def commit(v); @commit = v; end
|
537
532
|
alias :commit= :commit
|
538
533
|
|
@@ -559,14 +554,14 @@ class Git < Rake::TaskLib
|
|
559
554
|
|
560
555
|
sh_args << @url << tmp_dir
|
561
556
|
|
562
|
-
sh
|
557
|
+
sh(*sh_args)
|
563
558
|
else
|
564
559
|
# To extract specific commit is necessary to do
|
565
560
|
# at least two commands: clone (without limitiation of depth) and
|
566
561
|
# checkout for specific commit.
|
567
562
|
|
568
563
|
# Do `clone repo tmp_dir`
|
569
|
-
sh *(push_options_to(['git', 'clone']).push(@url).push(tmp_dir))
|
564
|
+
sh( *(push_options_to(['git', 'clone']).push(@url).push(tmp_dir)) )
|
570
565
|
# Do `checkout commit` inside tmp_dir
|
571
566
|
cd tmp_dir do
|
572
567
|
sh 'git', 'checkout', @commit
|
@@ -589,7 +584,6 @@ class Hg < Rake::TaskLib
|
|
589
584
|
Registry::handle_external(@name, self)
|
590
585
|
end
|
591
586
|
|
592
|
-
attr_reader :tag
|
593
587
|
def tag(v); @tag = v; end
|
594
588
|
alias :tag= :tag
|
595
589
|
|
@@ -606,7 +600,7 @@ class Hg < Rake::TaskLib
|
|
606
600
|
|
607
601
|
sh_args << @url << tmp_dir
|
608
602
|
|
609
|
-
sh
|
603
|
+
sh(*sh_args)
|
610
604
|
end
|
611
605
|
end
|
612
606
|
|
@@ -697,7 +691,7 @@ class ArchiveAsExternals < Rake::TaskLib
|
|
697
691
|
# Temporary directory must be removed in a case of any error.
|
698
692
|
successful = false
|
699
693
|
begin
|
700
|
-
mkdir(tmp_dir, fileop_options) if !Dir.exists?(tmp_dir)
|
694
|
+
mkdir(tmp_dir, **fileop_options) if !Dir.exists?(tmp_dir)
|
701
695
|
|
702
696
|
cd tmp_dir do
|
703
697
|
download_archive
|
@@ -750,19 +744,19 @@ private
|
|
750
744
|
|
751
745
|
def download_archive_from_web
|
752
746
|
web_downloader = Impl::WebDownloader.instance.make_downloader(self)
|
753
|
-
sh *(web_downloader.make_download_sh_args(@url, archive_name))
|
747
|
+
sh( *(web_downloader.make_download_sh_args(@url, archive_name)) )
|
754
748
|
end
|
755
749
|
|
756
750
|
def download_archive_via_cp
|
757
751
|
# On Windows path can look like '/d:/...'.
|
758
752
|
# The leading slash must be removed.
|
759
753
|
path = uri_path.gsub(/^(\/)(\w:)(.+)$/, '\2\3')
|
760
|
-
cp(path, archive_name, fileop_options)
|
754
|
+
cp(path, archive_name, **fileop_options)
|
761
755
|
end
|
762
756
|
|
763
757
|
def unpack_archive
|
764
758
|
sh(*make_unpacker_args)
|
765
|
-
rm(archive_name, fileop_options)
|
759
|
+
rm(archive_name, **fileop_options)
|
766
760
|
names = Dir['*']
|
767
761
|
if 1 == names.size and Dir.exists?(names.first)
|
768
762
|
# This is the only folder in the distributive.
|
@@ -771,11 +765,11 @@ private
|
|
771
765
|
# Files like '.gitignore' won't be found without FNM_DOTMATCH.
|
772
766
|
# But in that case '.' and '..' will be found too.
|
773
767
|
Dir.glob('*', File::FNM_DOTMATCH).each do |n|
|
774
|
-
mv(n, '..', fileop_options) if n != '.' && n != '..'
|
768
|
+
mv(n, '..', **fileop_options) if n != '.' && n != '..'
|
775
769
|
end
|
776
770
|
end
|
777
771
|
# This single directory no more needed.
|
778
|
-
rm_r(names.first, fileop_options)
|
772
|
+
rm_r(names.first, **fileop_options)
|
779
773
|
end
|
780
774
|
end
|
781
775
|
|
@@ -793,7 +787,7 @@ private
|
|
793
787
|
|
794
788
|
def make_unpacker_args
|
795
789
|
handler = @@archive_handlers[@archive_type]
|
796
|
-
self.instance_eval
|
790
|
+
self.instance_eval(&handler)
|
797
791
|
end
|
798
792
|
end # class ArchiveAsExternals
|
799
793
|
|
@@ -835,7 +829,7 @@ desc "Remove and get again all external projects"
|
|
835
829
|
task :reget
|
836
830
|
|
837
831
|
local_rc_file = File.join(Dir.getwd, '.externalsrc')
|
838
|
-
if File.
|
832
|
+
if File.exist?(local_rc_file)
|
839
833
|
load local_rc_file
|
840
834
|
end
|
841
835
|
|
data/lib/mxx_ru/util.rb
CHANGED
@@ -234,7 +234,7 @@ module MxxRu
|
|
234
234
|
|
235
235
|
def initialize
|
236
236
|
if !Mode.instance.is_keep_tmps
|
237
|
-
ObjectSpace.define_finalizer(
|
237
|
+
ObjectSpace.define_finalizer( @@names, Proc.new{ TmpFiles.finalizer } )
|
238
238
|
end
|
239
239
|
|
240
240
|
# Counter to ensure unique file names.
|
data/lib/mxx_ru/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Mxx_ru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.14.
|
4
|
+
version: 1.6.14.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Mxx_ru Project
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Mxx_ru is a cross-platform build tool primarily focused to C/C++ projects
|
14
14
|
email: eao197@yahoo.com
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- lib/mxx_ru/cpp/toolsets/vc14.rb
|
119
119
|
- lib/mxx_ru/cpp/toolsets/vc15.rb
|
120
120
|
- lib/mxx_ru/cpp/toolsets/vc16.rb
|
121
|
+
- lib/mxx_ru/cpp/toolsets/vc17.rb
|
121
122
|
- lib/mxx_ru/cpp/toolsets/vc7.rb
|
122
123
|
- lib/mxx_ru/cpp/toolsets/vc8.rb
|
123
124
|
- lib/mxx_ru/cpp/toolsets/vc8_family.rb
|