Mxx_ru 1.4.7 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING +1 -1
- data/README +1 -1
- data/lib/mxx_ru/cpp/qt4_via_pkg_config.rb +68 -0
- data/lib/mxx_ru/cpp/qt4details.rb +56 -42
- data/lib/mxx_ru/version.rb +2 -2
- metadata +3 -2
data/COPYING
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Copyright (c) 1996-2004, Yauheni Akhotnikau
|
2
2
|
Copyright (c) 2004-2006, JSC Intervale
|
3
|
-
Copyright (c) 2006 The Mxx_ru Project
|
3
|
+
Copyright (c) 2006-2009 The Mxx_ru Project
|
4
4
|
All rights reserved.
|
5
5
|
|
6
6
|
Redistribution and use in source and binary forms, with or without modification,
|
data/README
CHANGED
@@ -0,0 +1,68 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 1996-2004, Yauheni Akhotnikau
|
3
|
+
# Copyright (c) 2004-2006, JSC Intervale
|
4
|
+
# Copyright (c) 2006-2009, 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 'pathname'
|
30
|
+
require 'rexml/document'
|
31
|
+
require 'set'
|
32
|
+
|
33
|
+
require 'mxx_ru/cpp/qt4'
|
34
|
+
|
35
|
+
module MxxRu
|
36
|
+
module Cpp
|
37
|
+
|
38
|
+
begin
|
39
|
+
IO.popen( 'pkg-config --version' ) do |file|
|
40
|
+
# A special modification for the case when configuration of Qt4
|
41
|
+
# is detected via 'pkg-config' command. For example on Debian Linux.
|
42
|
+
# (This case is detected and used by Mikhail Lyossin).
|
43
|
+
#
|
44
|
+
# Method use_module is redefined to make two calls to pkg-config:
|
45
|
+
# - the first call with argument '--cflags' to detect include path and
|
46
|
+
# necessary defines;
|
47
|
+
# - the second call with argument '--libs' to detect libraries path and
|
48
|
+
# names of necessry libraries.
|
49
|
+
#
|
50
|
+
class Qt4
|
51
|
+
def use_module( a_module )
|
52
|
+
@target.define a_module.define
|
53
|
+
|
54
|
+
IO.popen( "pkg-config #{a_module.library} --cflags" ) { |file|
|
55
|
+
@target.compiler_option( file.gets.chop )
|
56
|
+
}
|
57
|
+
IO.popen( "pkg-config #{a_module.library} --libs" ) { |file|
|
58
|
+
@target.linker_option( file.gets.chop )
|
59
|
+
}
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
rescue
|
64
|
+
end
|
65
|
+
|
66
|
+
end # module Cpp
|
67
|
+
end # module MxxRu
|
68
|
+
|
@@ -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-2009, 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,
|
@@ -38,65 +38,78 @@ module Cpp
|
|
38
38
|
# Auxilary module with classes and constants for Qt4 modules support
|
39
39
|
#
|
40
40
|
module Qt4Modules
|
41
|
-
#
|
42
|
-
# define and a library for target.
|
41
|
+
# Description of Qt4 module.
|
43
42
|
#
|
44
43
|
# Usage:
|
45
|
-
# QT_GUI =
|
44
|
+
# QT_GUI = ModuleDescription.new( 'QT_GUI_LIB', 'QtGui' )
|
46
45
|
# ...
|
47
|
-
# QT_GUI.setup( target )
|
48
46
|
#
|
49
|
-
|
50
|
-
def initialize( a_define, a_library )
|
51
|
-
@define = a_define
|
52
|
-
@library = a_library
|
53
|
-
end
|
54
|
-
|
55
|
-
def setup( a_target )
|
56
|
-
a_target.define @define
|
57
|
-
a_target.lib @library
|
58
|
-
end
|
59
|
-
end
|
47
|
+
ModuleDescription = Struct.new( :define, :library )
|
60
48
|
|
61
49
|
# Qt3Support component.
|
62
|
-
QT_QT3SUPPORT =
|
50
|
+
QT_QT3SUPPORT = ModuleDescription.new(
|
51
|
+
'QT_QT3SUPPORT_LIB',
|
52
|
+
'Qt3Support' )
|
63
53
|
# QtCore component.
|
64
|
-
QT_CORE =
|
54
|
+
QT_CORE = ModuleDescription.new(
|
55
|
+
'QT_CORE_LIB',
|
56
|
+
'QtCore' )
|
65
57
|
# QtDesigner component.
|
66
|
-
QT_DESIGNER =
|
58
|
+
QT_DESIGNER = ModuleDescription.new(
|
59
|
+
'QT_DESIGNER_LIB',
|
60
|
+
'QtDesigner' )
|
67
61
|
# QtDesignerComponents component.
|
68
|
-
QT_DESIGNER_COMPONENTS =
|
69
|
-
|
62
|
+
QT_DESIGNER_COMPONENTS = ModuleDescription.new(
|
63
|
+
'QT_DESIGNERCOMPONENTS_LIB',
|
64
|
+
'QtDesignerComponents' )
|
70
65
|
# QtGui component.
|
71
|
-
QT_GUI =
|
66
|
+
QT_GUI = ModuleDescription.new(
|
67
|
+
'QT_GUI_LIB',
|
68
|
+
'QtGui' )
|
72
69
|
# QtHelp component.
|
73
|
-
QT_HELP =
|
70
|
+
QT_HELP = ModuleDescription.new(
|
71
|
+
'QT_HELP_LIB',
|
72
|
+
'QtHelp' )
|
74
73
|
# Network component.
|
75
|
-
QT_NETWORK =
|
74
|
+
QT_NETWORK = ModuleDescription.new(
|
75
|
+
'QT_NETWORK_LIB',
|
76
|
+
'QtNetwork' )
|
76
77
|
# QtOpenGL component.
|
77
|
-
QT_OPENGL =
|
78
|
+
QT_OPENGL = ModuleDescription.new(
|
79
|
+
'QT_OPENGL_LIB',
|
80
|
+
'QtOpenGL' )
|
78
81
|
# QtScript component.
|
79
|
-
QT_SCRIPT =
|
82
|
+
QT_SCRIPT = ModuleDescription.new(
|
83
|
+
'QT_SCRIPT_LIB',
|
84
|
+
'QtScript' )
|
80
85
|
# QtSql component.
|
81
|
-
QT_SQL =
|
86
|
+
QT_SQL = ModuleDescription.new(
|
87
|
+
'QT_SQL_LIB',
|
88
|
+
'QtSql' )
|
82
89
|
# QtSvg component.
|
83
|
-
QT_SVG =
|
90
|
+
QT_SVG = ModuleDescription.new(
|
91
|
+
'QT_SVG_LIB',
|
92
|
+
'QtSvg' )
|
84
93
|
# QtTest component.
|
85
|
-
QT_TEST =
|
94
|
+
QT_TEST = ModuleDescription.new(
|
95
|
+
'QT_TEST_LIB',
|
96
|
+
'QtTest' )
|
86
97
|
# QtXml component.
|
87
|
-
QT_XML =
|
98
|
+
QT_XML = ModuleDescription.new(
|
99
|
+
'QT_XML_LIB',
|
100
|
+
'QtXml' )
|
88
101
|
# QtXmlPatterns component.
|
89
|
-
QT_XML_PATTERNS =
|
90
|
-
|
91
|
-
|
102
|
+
QT_XML_PATTERNS = ModuleDescription.new(
|
103
|
+
'QT_XMLPATTERNS_LIB',
|
104
|
+
'QtXmlPatterns' )
|
92
105
|
# QtWebKit component.
|
93
|
-
QT_WEB_KIT =
|
94
|
-
|
95
|
-
|
106
|
+
QT_WEB_KIT = ModuleDescription.new(
|
107
|
+
'QT_WEBKIT_LIB',
|
108
|
+
'QtWebKit' )
|
96
109
|
# Phonon component.
|
97
|
-
QT_PHONON =
|
98
|
-
|
99
|
-
|
110
|
+
QT_PHONON = ModuleDescription.new(
|
111
|
+
'QT_PHONON_LIB',
|
112
|
+
'phonon' )
|
100
113
|
end
|
101
114
|
|
102
115
|
# Files generator for Qt4 class.
|
@@ -266,14 +279,15 @@ module Cpp
|
|
266
279
|
|
267
280
|
# Add a Qt4 module to target.
|
268
281
|
#
|
269
|
-
# a_module -- an instance of Qt4Modules::
|
282
|
+
# a_module -- an instance of Qt4Modules::ModuleDescription.
|
270
283
|
def use_module( a_module )
|
271
|
-
|
284
|
+
@target.define a_module.define
|
285
|
+
@target.lib a_module.library + '4'
|
272
286
|
end
|
273
287
|
|
274
288
|
# Add some Qt4 modules to target.
|
275
289
|
#
|
276
|
-
# a_modules -- an enumeration of Qt4Modules::
|
290
|
+
# a_modules -- an enumeration of Qt4Modules::ModuleDescription instances.
|
277
291
|
#
|
278
292
|
def use_modules( *a_modules )
|
279
293
|
a_modules.each { |m| use_module( m ) }
|
data/lib/mxx_ru/version.rb
CHANGED
@@ -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-2009, 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,
|
@@ -34,5 +34,5 @@
|
|
34
34
|
#
|
35
35
|
# puts 'Mxx_ru version is: ' + MXX_RU_VERSION
|
36
36
|
#
|
37
|
-
MXX_RU_VERSION = '1.4.
|
37
|
+
MXX_RU_VERSION = '1.4.8'
|
38
38
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Mxx_ru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Mxx_ru Project
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-02-15 00:00:00 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -336,6 +336,7 @@ files:
|
|
336
336
|
- lib/mxx_ru/cpp/qt.rb
|
337
337
|
- lib/mxx_ru/cpp/qt4.rb
|
338
338
|
- lib/mxx_ru/cpp/qt4details.rb
|
339
|
+
- lib/mxx_ru/cpp/qt4_via_pkg_config.rb
|
339
340
|
- lib/mxx_ru/cpp/rucodegen.rb
|
340
341
|
- lib/mxx_ru/cpp/source_file.rb
|
341
342
|
- lib/mxx_ru/cpp/target.rb
|