build-tool 0.0.3 → 0.1.0
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.tar.gz.sig +0 -0
 - data/History.txt +28 -1
 - data/Manifest.txt +91 -52
 - data/README.txt +63 -0
 - data/Rakefile +20 -23
 - data/bin/build-tool +53 -0
 - data/lib/build-tool.rb +7 -0
 - data/lib/build-tool/GUI.rb +360 -0
 - data/lib/build-tool/application.rb +84 -0
 - data/lib/build-tool/build-system/autoconf.rb +60 -0
 - data/lib/build-tool/build-system/base.rb +142 -0
 - data/lib/build-tool/build-system/cmake.rb +119 -0
 - data/lib/build-tool/build-system/custom.rb +115 -0
 - data/lib/build-tool/build-system/qt.rb +113 -0
 - data/lib/build-tool/cfg/lexer.rb +558 -0
 - data/lib/build-tool/cfg/lexer.rex +248 -0
 - data/lib/build-tool/cfg/lexer_base.rb +82 -0
 - data/lib/build-tool/cfg/node.rb +94 -0
 - data/lib/build-tool/cfg/parser.rb +871 -0
 - data/lib/build-tool/cfg/parser.y +279 -0
 - data/lib/build-tool/cfg/visitor.rb +471 -0
 - data/lib/build-tool/commands.rb +639 -0
 - data/lib/build-tool/commands/build.rb +120 -0
 - data/lib/build-tool/commands/configure.rb +73 -0
 - data/lib/build-tool/commands/ctags.rb +46 -0
 - data/lib/build-tool/commands/environments.rb +29 -0
 - data/lib/build-tool/commands/environments/list.rb +37 -0
 - data/lib/build-tool/commands/environments/set.rb +33 -0
 - data/lib/build-tool/commands/fetch.rb +50 -0
 - data/lib/build-tool/commands/files.rb +73 -0
 - data/lib/build-tool/commands/help.rb +22 -0
 - data/lib/build-tool/commands/info.rb +48 -0
 - data/lib/build-tool/commands/install.rb +56 -0
 - data/lib/build-tool/commands/modules.rb +29 -0
 - data/lib/build-tool/commands/modules/info.rb +75 -0
 - data/lib/build-tool/commands/modules/list.rb +49 -0
 - data/lib/build-tool/commands/modules/shell.rb +40 -0
 - data/lib/build-tool/commands/rebase.rb +46 -0
 - data/lib/build-tool/commands/recipes.rb +32 -0
 - data/lib/build-tool/commands/recipes/info.rb +46 -0
 - data/lib/build-tool/commands/recipes/install.rb +184 -0
 - data/lib/build-tool/commands/recipes/list.rb +33 -0
 - data/lib/build-tool/configuration.rb +115 -0
 - data/lib/build-tool/environment.rb +119 -0
 - data/lib/build-tool/errors.rb +9 -0
 - data/lib/build-tool/module.rb +366 -0
 - data/lib/build-tool/pluginbase.rb +43 -0
 - data/lib/build-tool/recipe.rb +180 -0
 - data/lib/build-tool/repository.rb +59 -0
 - data/lib/build-tool/server.rb +43 -0
 - data/lib/build-tool/singleton.rb +50 -0
 - data/lib/build-tool/sshkey.rb +22 -0
 - data/lib/build-tool/vcs/base.rb +105 -0
 - data/lib/build-tool/vcs/git-svn.rb +154 -0
 - data/lib/build-tool/vcs/git.rb +187 -0
 - data/lib/build-tool/vcs/svn.rb +136 -0
 - data/lib/mj/logging.rb +31 -0
 - data/lib/mj/tools/ssh.rb +64 -0
 - data/lib/{kde-build → mj/tools}/subprocess.rb +21 -16
 - data/lib/mj/visitor.rb +21 -0
 - data/recipes/kde/files/finish_installation.sh +16 -0
 - data/recipes/kde/files/kde4.desktop +22 -0
 - data/recipes/kde/files/xsession +89 -0
 - data/recipes/kde/info.yaml +10 -0
 - data/recipes/kde/recipe +585 -0
 - data/recipes/kde/recipe-local +90 -0
 - data/recipes/kde/settings.yaml +52 -0
 - data/recipes/kde43/info.yaml +10 -0
 - data/recipes/kde43/recipe +256 -0
 - data/recipes/kde43/recipe-local +90 -0
 - data/recipes/kde43/settings.yaml +32 -0
 - data/recipes/kdeqt4.6/custom/qt/qtscriptgenerator/compile.sh +77 -0
 - data/recipes/kdeqt4.6/custom/qt/qtscriptgenerator/configure.sh +70 -0
 - data/recipes/kdeqt4.6/custom/qt/qtscriptgenerator/install.sh +39 -0
 - data/recipes/kdeqt4.6/info.yaml +7 -0
 - data/recipes/kdeqt4.6/recipe +155 -0
 - data/recipes/kdeqt4.6/recipe-local +30 -0
 - data/recipes/kdeqt4.6/settings.yaml +27 -0
 - data/tags +745 -0
 - data/tasks/genfiles.rake +28 -0
 - data/tasks/rdoc.rake +34 -0
 - data/tasks/rspec.rake +21 -0
 - data/test.rb +28 -0
 - data/test/commands/test_build.rb +29 -0
 - data/test/test_build_system.rb +98 -0
 - data/test/test_cli.rb +61 -0
 - data/test/test_command.rb +175 -0
 - data/test/test_configuration_parser.rb +542 -0
 - data/test/test_environment.rb +82 -0
 - data/test/test_helper.rb +39 -7
 - data/test/test_module.rb +158 -0
 - data/test/test_repository.rb +75 -0
 - data/test/test_singleton.rb +51 -0
 - data/test/test_ssh_key.rb +14 -0
 - data/test/test_svn_parser.rb +28 -0
 - data/test/test_vcs.rb +33 -0
 - metadata +139 -90
 - metadata.gz.sig +0 -0
 - data/PostInstall.txt +0 -3
 - data/TODO +0 -2
 - data/bin/kde-build.rb +0 -21
 - data/config/website.yml +0 -2
 - data/config/website.yml.sample +0 -2
 - data/lib/kde-build.rb +0 -18
 - data/lib/kde-build/application.rb +0 -270
 - data/lib/kde-build/build_system.rb +0 -28
 - data/lib/kde-build/build_system/autoconf.rb +0 -108
 - data/lib/kde-build/build_system/base.rb +0 -139
 - data/lib/kde-build/build_system/cmake.rb +0 -94
 - data/lib/kde-build/build_system/qtcopy.rb +0 -127
 - data/lib/kde-build/command.rb +0 -42
 - data/lib/kde-build/command/build.rb +0 -106
 - data/lib/kde-build/command/compile.rb +0 -39
 - data/lib/kde-build/command/configure.rb +0 -48
 - data/lib/kde-build/command/ctags.rb +0 -41
 - data/lib/kde-build/command/fetch.rb +0 -33
 - data/lib/kde-build/command/help.rb +0 -71
 - data/lib/kde-build/command/info.rb +0 -45
 - data/lib/kde-build/command/install.rb +0 -39
 - data/lib/kde-build/command/module_based.rb +0 -44
 - data/lib/kde-build/command/rebase.rb +0 -50
 - data/lib/kde-build/command/version.rb +0 -43
 - data/lib/kde-build/configuration.rb +0 -209
 - data/lib/kde-build/exception.rb +0 -6
 - data/lib/kde-build/metaaid.rb +0 -18
 - data/lib/kde-build/module.rb +0 -227
 - data/lib/kde-build/module_configuration.rb +0 -107
 - data/lib/kde-build/moduleregistry.rb +0 -85
 - data/lib/kde-build/tools/ctags.rb +0 -59
 - data/lib/kde-build/tools/logging.rb +0 -49
 - data/lib/kde-build/tools/make.rb +0 -58
 - data/lib/kde-build/tools/ssh.rb +0 -47
 - data/lib/kde-build/vcs.rb +0 -28
 - data/lib/kde-build/vcs/base.rb +0 -85
 - data/lib/kde-build/vcs/git-svn.rb +0 -139
 - data/lib/kde-build/vcs/git.rb +0 -121
 - data/lib/kde-build/vcs/svn.rb +0 -102
 - data/script/console +0 -10
 - data/script/destroy +0 -14
 - data/script/generate +0 -14
 - data/script/txt2html +0 -71
 - data/test.yaml.tmpl +0 -632
 - data/test/test_kde-build.rb +0 -11
 - data/test/test_vcs_svn.rb +0 -44
 - data/website/index.html +0 -84
 - data/website/index.txt +0 -59
 - data/website/javascripts/rounded_corners_lite.inc.js +0 -285
 - data/website/stylesheets/screen.css +0 -159
 - data/website/template.html.erb +0 -50
 
| 
         @@ -1,28 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'kde-build/build_system/cmake'
         
     | 
| 
       2 
     | 
    
         
            -
            require 'kde-build/build_system/qtcopy'
         
     | 
| 
       3 
     | 
    
         
            -
            require 'kde-build/build_system/autoconf'
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            module BuildTool; module BuildSystem
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            @mapping = {
         
     | 
| 
       8 
     | 
    
         
            -
                'cmake'   => CMake,
         
     | 
| 
       9 
     | 
    
         
            -
                'qtcopy'   => QtCopy,
         
     | 
| 
       10 
     | 
    
         
            -
                'autoconf' => AutoConf
         
     | 
| 
       11 
     | 
    
         
            -
            }
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            module_function
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            def available
         
     | 
| 
       16 
     | 
    
         
            -
                @mapping.keys
         
     | 
| 
       17 
     | 
    
         
            -
            end
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
            class UnknownBuildSystemError < Exception; end
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
            def get( name )
         
     | 
| 
       22 
     | 
    
         
            -
                if !available.include? name
         
     | 
| 
       23 
     | 
    
         
            -
                    raise UnknownBuildSystemError, "Buildsystem '#{name}' is not supported"
         
     | 
| 
       24 
     | 
    
         
            -
                end
         
     | 
| 
       25 
     | 
    
         
            -
                @mapping[name]
         
     | 
| 
       26 
     | 
    
         
            -
            end
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
            end; end
         
     | 
| 
         @@ -1,108 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'kde-build/build_system/base'
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            require 'kde-build/tools/make'
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            module BuildTool
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
                module BuildSystem
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
                    class AutoConfError < Exception
         
     | 
| 
       10 
     | 
    
         
            -
                    end
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
                    class AutoConfConfiguration < BaseConfiguration
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
                        option( 'options', "Command line options for autoconf" )
         
     | 
| 
       15 
     | 
    
         
            -
                        option( 'autogen-options', "Command line options for autogen.sh." ).required
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
                        def initialize
         
     | 
| 
       18 
     | 
    
         
            -
                            super
         
     | 
| 
       19 
     | 
    
         
            -
                            self.name = "autoconf"
         
     | 
| 
       20 
     | 
    
         
            -
                        end
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
                    end
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
                    class AutoConf < Base
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
                        def initialize( mod )
         
     | 
| 
       27 
     | 
    
         
            -
                            super
         
     | 
| 
       28 
     | 
    
         
            -
                        end
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
                        def self.config
         
     | 
| 
       31 
     | 
    
         
            -
                            AutoConfConfiguration
         
     | 
| 
       32 
     | 
    
         
            -
                        end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                        def self.guess( path )
         
     | 
| 
       35 
     | 
    
         
            -
                            return File.exist? "#{path}/configure.in"
         
     | 
| 
       36 
     | 
    
         
            -
                        end
         
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                        def bootstrap_with_autogen
         
     | 
| 
       40 
     | 
    
         
            -
                            self.class.execute( "#{source_directory}/autogen.sh #{configuration.autogen_options}", build_directory, env )
         
     | 
| 
       41 
     | 
    
         
            -
                        end
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                        def bootstrap_with_bootstrap
         
     | 
| 
       44 
     | 
    
         
            -
                            raise NotImplementedError, "#{self.class}.bootstrap_with_bootstrap"
         
     | 
| 
       45 
     | 
    
         
            -
                        end
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
                        def bootstrap_with_makefile
         
     | 
| 
       48 
     | 
    
         
            -
                            raise NotImplementedError, "#{self.class}.bootstrap_with_Makefile"
         
     | 
| 
       49 
     | 
    
         
            -
                        end
         
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
                        def bootstrap( force = false )
         
     | 
| 
       52 
     | 
    
         
            -
                            # Check if we need to bootstrap
         
     | 
| 
       53 
     | 
    
         
            -
                            if !force and File.exist? "#{source_directory}/configure"
         
     | 
| 
       54 
     | 
    
         
            -
                                return
         
     | 
| 
       55 
     | 
    
         
            -
                            end
         
     | 
| 
       56 
     | 
    
         
            -
                            if File.exist? "#{source_directory}/bootstrap"
         
     | 
| 
       57 
     | 
    
         
            -
                                return bootstrap_with_bootstrap
         
     | 
| 
       58 
     | 
    
         
            -
                            elsif File.exist? "#{source_directory}/autogen.sh"
         
     | 
| 
       59 
     | 
    
         
            -
                                return bootstrap_with_autogen
         
     | 
| 
       60 
     | 
    
         
            -
                            elsif File.exist? "#{source_directory}/Makefile.cvs"
         
     | 
| 
       61 
     | 
    
         
            -
                                return bootstrap_with_makefile
         
     | 
| 
       62 
     | 
    
         
            -
                            end
         
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
                            throw :AUTOCONF_FAILED_TO_BOOTSTRAP
         
     | 
| 
       65 
     | 
    
         
            -
                        end
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
                        def reconfigure( clean )
         
     | 
| 
       68 
     | 
    
         
            -
                            if clean
         
     | 
| 
       69 
     | 
    
         
            -
                                return false if make( "clean" ) != 0
         
     | 
| 
       70 
     | 
    
         
            -
                                return false if !bootstrap( true ) != 0
         
     | 
| 
       71 
     | 
    
         
            -
                            end
         
     | 
| 
       72 
     | 
    
         
            -
                            configure
         
     | 
| 
       73 
     | 
    
         
            -
                        end
         
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
                        def configure
         
     | 
| 
       76 
     | 
    
         
            -
                            check_build_directory( true )
         
     | 
| 
       77 
     | 
    
         
            -
                            bootstrap
         
     | 
| 
       78 
     | 
    
         
            -
                            opt = options || ""
         
     | 
| 
       79 
     | 
    
         
            -
                            opt += " --prefix=#{prefix}" if prefix
         
     | 
| 
       80 
     | 
    
         
            -
                            rc = self.class.execute( "#{source_directory}/configure #{opt}", build_directory, env )
         
     | 
| 
       81 
     | 
    
         
            -
                            rc
         
     | 
| 
       82 
     | 
    
         
            -
                        end
         
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
                        def configured?
         
     | 
| 
       85 
     | 
    
         
            -
                            File.exist? "#{build_directory}/config.status"
         
     | 
| 
       86 
     | 
    
         
            -
                        end
         
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
                        def make( command = "", wd = build_directory )
         
     | 
| 
       89 
     | 
    
         
            -
                            BuildTool::Make.new.make "#{command}", wd
         
     | 
| 
       90 
     | 
    
         
            -
                        end
         
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
                        def name
         
     | 
| 
       93 
     | 
    
         
            -
                            "AutoConf"
         
     | 
| 
       94 
     | 
    
         
            -
                        end
         
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
                        def options
         
     | 
| 
       97 
     | 
    
         
            -
                            configuration.options
         
     | 
| 
       98 
     | 
    
         
            -
                        end
         
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
                        Registry.register( 'AutoConf', AutoConf )
         
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
                    end
         
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
                end
         
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
            end
         
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
             
     | 
| 
         @@ -1,139 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'kde-build/subprocess'
         
     | 
| 
       2 
     | 
    
         
            -
            require 'kde-build/configuration'
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            require 'singleton'
         
     | 
| 
       5 
     | 
    
         
            -
            require 'pathname'
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            module BuildTool
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
                module BuildSystem
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                    class Registry
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
                        include Singleton
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
                        @@tools = Hash.new
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
                        def self.register( name, klass )
         
     | 
| 
       18 
     | 
    
         
            -
                            @@tools[name] = klass
         
     | 
| 
       19 
     | 
    
         
            -
                        end
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
                        def self.guess( source_directory )
         
     | 
| 
       23 
     | 
    
         
            -
                            @@tools.each do |name, bt|
         
     | 
| 
       24 
     | 
    
         
            -
                                return bt if bt.guess( source_directory )
         
     | 
| 
       25 
     | 
    
         
            -
                            end
         
     | 
| 
       26 
     | 
    
         
            -
                            return nil
         
     | 
| 
       27 
     | 
    
         
            -
                        end
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
                    end
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                    class BaseConfiguration
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                        include MJ::Configuration::Configurable
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                        option( 'name', "Name" )
         
     | 
| 
       36 
     | 
    
         
            -
                        option( 'inplace', 'Do not use out of source build' ).
         
     | 
| 
       37 
     | 
    
         
            -
                            default = false
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                    end
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
                    class Base
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
                        include MJ::Tools::SubProcess
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
                        attr_accessor :configuration
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
                        def initialize( mod )
         
     | 
| 
       49 
     | 
    
         
            -
                            @module = mod
         
     | 
| 
       50 
     | 
    
         
            -
                        end
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
                        def info
         
     | 
| 
       53 
     | 
    
         
            -
                            puts "Build System:      #{name}"
         
     | 
| 
       54 
     | 
    
         
            -
                            puts "  Out Of Source Build: #{!inplace}"
         
     | 
| 
       55 
     | 
    
         
            -
                            puts "  Options:             #{options}"
         
     | 
| 
       56 
     | 
    
         
            -
                        end
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                        def source_directory
         
     | 
| 
       59 
     | 
    
         
            -
                            @module.source_directory
         
     | 
| 
       60 
     | 
    
         
            -
                        end
         
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
                        def build_directory
         
     | 
| 
       63 
     | 
    
         
            -
                            if configuration.inplace
         
     | 
| 
       64 
     | 
    
         
            -
                                @module.source_directory
         
     | 
| 
       65 
     | 
    
         
            -
                            else
         
     | 
| 
       66 
     | 
    
         
            -
                                @module.build_directory
         
     | 
| 
       67 
     | 
    
         
            -
                            end
         
     | 
| 
       68 
     | 
    
         
            -
                        end
         
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
                        def inplace
         
     | 
| 
       71 
     | 
    
         
            -
                            configuration.inplace
         
     | 
| 
       72 
     | 
    
         
            -
                        end
         
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
                        def prefix
         
     | 
| 
       75 
     | 
    
         
            -
                            @module.prefix
         
     | 
| 
       76 
     | 
    
         
            -
                        end
         
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
                        def env
         
     | 
| 
       79 
     | 
    
         
            -
                            @module.env
         
     | 
| 
       80 
     | 
    
         
            -
                        end
         
     | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
       82 
     | 
    
         
            -
                        def build
         
     | 
| 
       83 
     | 
    
         
            -
                            raise NotImplementedError, "#{self.class}::build in #{self.class}"
         
     | 
| 
       84 
     | 
    
         
            -
                        end
         
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
                        def self.config
         
     | 
| 
       87 
     | 
    
         
            -
                            raise NotImplementedError, "#{self.class}::name in #{self}"
         
     | 
| 
       88 
     | 
    
         
            -
                        end
         
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
                        def configure
         
     | 
| 
       91 
     | 
    
         
            -
                            raise NotImplementedError, "#{self.class}::configure in #{self.class}"
         
     | 
| 
       92 
     | 
    
         
            -
                        end
         
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
                        def configured?
         
     | 
| 
       95 
     | 
    
         
            -
                            raise NotImplementedError, "#{self.class}::configured? in #{self.class}"
         
     | 
| 
       96 
     | 
    
         
            -
                        end
         
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
                        def name
         
     | 
| 
       99 
     | 
    
         
            -
                            raise NotImplementedError, "#{self.class}::name in #{self.class}"
         
     | 
| 
       100 
     | 
    
         
            -
                        end
         
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
                        def remove_build_directory
         
     | 
| 
       103 
     | 
    
         
            -
                            self.class.execute "rm -rf #{build_directory}"
         
     | 
| 
       104 
     | 
    
         
            -
                        end
         
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
                    #########
         
     | 
| 
       107 
     | 
    
         
            -
                    protected
         
     | 
| 
       108 
     | 
    
         
            -
                    #########
         
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
                        def check_build_directory( create = false )
         
     | 
| 
       111 
     | 
    
         
            -
                            if inplace
         
     | 
| 
       112 
     | 
    
         
            -
                                if File.exist? @module.build_directory
         
     | 
| 
       113 
     | 
    
         
            -
                                    if !File.symlink?( @module.build_directory )
         
     | 
| 
       114 
     | 
    
         
            -
                                       $log.warn( "Could not link build directory to source directory for inplace build of #{@module.name}." )
         
     | 
| 
       115 
     | 
    
         
            -
                                    end
         
     | 
| 
       116 
     | 
    
         
            -
                                else
         
     | 
| 
       117 
     | 
    
         
            -
                                    FileUtils.mkdir_p( Pathname.new( @module.build_directory ).parent )
         
     | 
| 
       118 
     | 
    
         
            -
                                    File.symlink( @module.source_directory, @module.build_directory )
         
     | 
| 
       119 
     | 
    
         
            -
                                end
         
     | 
| 
       120 
     | 
    
         
            -
                            else
         
     | 
| 
       121 
     | 
    
         
            -
                                if File.exist? build_directory
         
     | 
| 
       122 
     | 
    
         
            -
                                    if File.directory? build_directory
         
     | 
| 
       123 
     | 
    
         
            -
                                        return true
         
     | 
| 
       124 
     | 
    
         
            -
                                    else
         
     | 
| 
       125 
     | 
    
         
            -
                                        raise BuildError, "Build directory #{build_directory} exists and is no directory!"
         
     | 
| 
       126 
     | 
    
         
            -
                                    end
         
     | 
| 
       127 
     | 
    
         
            -
                                elsif create
         
     | 
| 
       128 
     | 
    
         
            -
                                    FileUtils.mkdir_p( build_directory )
         
     | 
| 
       129 
     | 
    
         
            -
                                    return true
         
     | 
| 
       130 
     | 
    
         
            -
                                else
         
     | 
| 
       131 
     | 
    
         
            -
                                    return false
         
     | 
| 
       132 
     | 
    
         
            -
                                end
         
     | 
| 
       133 
     | 
    
         
            -
                            end
         
     | 
| 
       134 
     | 
    
         
            -
                        end
         
     | 
| 
       135 
     | 
    
         
            -
             
     | 
| 
       136 
     | 
    
         
            -
                    end
         
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
            end; end
         
     | 
| 
       139 
     | 
    
         
            -
             
     | 
| 
         @@ -1,94 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'kde-build/build_system/base'
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            require 'kde-build/tools/make'
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            module BuildTool
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
                module BuildSystem
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
                    class CMakeConfiguration < BaseConfiguration
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                        option( 'options', "Command line options for cmake" )
         
     | 
| 
       12 
     | 
    
         
            -
                        option( 'cmake-prefix-path', "CMAKE_PREFIX_PATH environment variable" )
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
                        def initialize
         
     | 
| 
       15 
     | 
    
         
            -
                            super
         
     | 
| 
       16 
     | 
    
         
            -
                            self.name = "cmake"
         
     | 
| 
       17 
     | 
    
         
            -
                        end
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                    end
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
                    class CMake < BuildSystem::Base
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
                        def initialize( mod )
         
     | 
| 
       24 
     | 
    
         
            -
                            super
         
     | 
| 
       25 
     | 
    
         
            -
                        end
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                        def self.guess( path )
         
     | 
| 
       28 
     | 
    
         
            -
                            return File.exist? "#{path}/CMakeLists.txt"
         
     | 
| 
       29 
     | 
    
         
            -
                        end
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                        def self.config
         
     | 
| 
       32 
     | 
    
         
            -
                            CMakeConfiguration
         
     | 
| 
       33 
     | 
    
         
            -
                        end
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                        # Execute a cmake command in the context of the build directory
         
     | 
| 
       36 
     | 
    
         
            -
                        def cmake( command, wd = build_directory )
         
     | 
| 
       37 
     | 
    
         
            -
                            myenv = env
         
     | 
| 
       38 
     | 
    
         
            -
                            myenv['CMAKE_PREFIX_PATH'] = cmake_prefix_path
         
     | 
| 
       39 
     | 
    
         
            -
                            self.class.execute "cmake #{command}", wd, env
         
     | 
| 
       40 
     | 
    
         
            -
                        end
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
                        def cmake_prefix_path
         
     | 
| 
       43 
     | 
    
         
            -
                            @configuration.cmake_prefix_path
         
     | 
| 
       44 
     | 
    
         
            -
                        end
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
                        def make( command = "", wd = build_directory )
         
     | 
| 
       47 
     | 
    
         
            -
                            BuildTool::Make.new.make "#{command}", wd
         
     | 
| 
       48 
     | 
    
         
            -
                        end
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
                        def build( target )
         
     | 
| 
       51 
     | 
    
         
            -
                            check_build_directory( true )
         
     | 
| 
       52 
     | 
    
         
            -
                            make target
         
     | 
| 
       53 
     | 
    
         
            -
                        end
         
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
                        def reconfigure( clean )
         
     | 
| 
       56 
     | 
    
         
            -
                            if clean
         
     | 
| 
       57 
     | 
    
         
            -
                                return false if make( "clean" ) != 0
         
     | 
| 
       58 
     | 
    
         
            -
                            end
         
     | 
| 
       59 
     | 
    
         
            -
                            return false if self.class.execute( "rm #{build_directory}/CMakeCache.txt" ) != 0
         
     | 
| 
       60 
     | 
    
         
            -
                            configure
         
     | 
| 
       61 
     | 
    
         
            -
                        end
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                        def configure
         
     | 
| 
       64 
     | 
    
         
            -
                            check_build_directory( true )
         
     | 
| 
       65 
     | 
    
         
            -
                            opt = options
         
     | 
| 
       66 
     | 
    
         
            -
                            opt += " -DCMAKE_INSTALL_PREFIX=#{prefix}" if prefix
         
     | 
| 
       67 
     | 
    
         
            -
                            rc = cmake "#{self.source_directory} #{opt}"
         
     | 
| 
       68 
     | 
    
         
            -
                            rc
         
     | 
| 
       69 
     | 
    
         
            -
                        end
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
                        def configured?
         
     | 
| 
       72 
     | 
    
         
            -
                            File.exist? "#{build_directory}/Makefile"
         
     | 
| 
       73 
     | 
    
         
            -
                        end
         
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
                        def info
         
     | 
| 
       76 
     | 
    
         
            -
                            super
         
     | 
| 
       77 
     | 
    
         
            -
                            puts "  CMAKE_PREFIX_PATH:   #{cmake_prefix_path}"
         
     | 
| 
       78 
     | 
    
         
            -
                        end
         
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
                        def name
         
     | 
| 
       81 
     | 
    
         
            -
                            "CMake"
         
     | 
| 
       82 
     | 
    
         
            -
                        end
         
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
                        def options
         
     | 
| 
       85 
     | 
    
         
            -
                            @configuration.options
         
     | 
| 
       86 
     | 
    
         
            -
                        end
         
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
                        Registry.register( 'CMake', CMake )
         
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
                    end
         
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
                end
         
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,127 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'kde-build/build_system/base'
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            require 'kde-build/tools/make'
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            module BuildTool
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
                module BuildSystem
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
                    class QtCopyConfiguration < BaseConfiguration
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                        option( 'options', "Command line options for qmake" )
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
                        def initialize
         
     | 
| 
       14 
     | 
    
         
            -
                            super
         
     | 
| 
       15 
     | 
    
         
            -
                            self.name = "qmake"
         
     | 
| 
       16 
     | 
    
         
            -
                        end
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
                    end
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
                    class QtCopyError < Exception
         
     | 
| 
       21 
     | 
    
         
            -
                    end
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
                    class QtCopy < BuildSystem::Base
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
                        def initialize( mod )
         
     | 
| 
       27 
     | 
    
         
            -
                            super
         
     | 
| 
       28 
     | 
    
         
            -
                        end
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
                        def self.guess( path )
         
     | 
| 
       31 
     | 
    
         
            -
                            return File.exist? "#{path}/qmake/qmake.pro"
         
     | 
| 
       32 
     | 
    
         
            -
                        end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                        def self.config
         
     | 
| 
       35 
     | 
    
         
            -
                            QtCopyConfiguration
         
     | 
| 
       36 
     | 
    
         
            -
                        end
         
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
                        # Execute a qmake command in the context of the build directory
         
     | 
| 
       39 
     | 
    
         
            -
                        def qmake( command, wd = build_directory )
         
     | 
| 
       40 
     | 
    
         
            -
                            execute "qmake #{command}", wd, env
         
     | 
| 
       41 
     | 
    
         
            -
                        end
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                        def make( command = "", wd = build_directory )
         
     | 
| 
       44 
     | 
    
         
            -
                            BuildTool::Make.new.make "#{command}", wd
         
     | 
| 
       45 
     | 
    
         
            -
                        end
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
                        def build( target )
         
     | 
| 
       48 
     | 
    
         
            -
                            check_build_directory( true )
         
     | 
| 
       49 
     | 
    
         
            -
                            make target
         
     | 
| 
       50 
     | 
    
         
            -
                        end
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
                        def reconfigure( clean = false )
         
     | 
| 
       54 
     | 
    
         
            -
                            make "confclean" if clean
         
     | 
| 
       55 
     | 
    
         
            -
                            configure
         
     | 
| 
       56 
     | 
    
         
            -
                        end
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                        def configure
         
     | 
| 
       59 
     | 
    
         
            -
                            check_build_directory( true )
         
     | 
| 
       60 
     | 
    
         
            -
                            create_configure_new_if_necessary
         
     | 
| 
       61 
     | 
    
         
            -
                            opt = options
         
     | 
| 
       62 
     | 
    
         
            -
                            opt += " --prefix=#{prefix}" if prefix
         
     | 
| 
       63 
     | 
    
         
            -
                            rc = self.class.execute( "sh #{self.source_directory}/configure.new #{opt}", wd = build_directory, env )
         
     | 
| 
       64 
     | 
    
         
            -
                            rc
         
     | 
| 
       65 
     | 
    
         
            -
                        end
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
                        def configured?
         
     | 
| 
       69 
     | 
    
         
            -
                            return File.exist? "#{build_directory}/bin/qmake"
         
     | 
| 
       70 
     | 
    
         
            -
                        end
         
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
                        def create_configure_new
         
     | 
| 
       73 
     | 
    
         
            -
                            if $noop
         
     | 
| 
       74 
     | 
    
         
            -
                                $log.info("Creating configure.new")
         
     | 
| 
       75 
     | 
    
         
            -
                                return
         
     | 
| 
       76 
     | 
    
         
            -
                            end
         
     | 
| 
       77 
     | 
    
         
            -
                            begin
         
     | 
| 
       78 
     | 
    
         
            -
                                confnew = File.new( "#{source_directory}/configure.new", "w" )
         
     | 
| 
       79 
     | 
    
         
            -
                                conf    = File.new( "#{source_directory}/configure", "r" )
         
     | 
| 
       80 
     | 
    
         
            -
                                conf.each do |line|
         
     | 
| 
       81 
     | 
    
         
            -
                                    confnew.write(
         
     | 
| 
       82 
     | 
    
         
            -
                                        line.
         
     | 
| 
       83 
     | 
    
         
            -
                                            sub("read acceptance", "acceptance=yes").
         
     | 
| 
       84 
     | 
    
         
            -
                                            sub("read commercial", "commercial=o") )
         
     | 
| 
       85 
     | 
    
         
            -
                                end
         
     | 
| 
       86 
     | 
    
         
            -
                                confnew.chmod( 0744 )
         
     | 
| 
       87 
     | 
    
         
            -
                            ensure
         
     | 
| 
       88 
     | 
    
         
            -
                                conf.close
         
     | 
| 
       89 
     | 
    
         
            -
                                confnew.close
         
     | 
| 
       90 
     | 
    
         
            -
                            end
         
     | 
| 
       91 
     | 
    
         
            -
                        end
         
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
                        def create_configure_new_if_necessary
         
     | 
| 
       94 
     | 
    
         
            -
                            confnew_name =      "#{source_directory}/configure.new"
         
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
                            if File.exist? confnew_name
         
     | 
| 
       97 
     | 
    
         
            -
                                begin
         
     | 
| 
       98 
     | 
    
         
            -
                                    confnew = File.new( "#{source_directory}/configure.new", "r" )
         
     | 
| 
       99 
     | 
    
         
            -
                                    conf    = File.new( "#{source_directory}/configure", "r" )
         
     | 
| 
       100 
     | 
    
         
            -
                                    if ( confnew.mtime > conf.mtime )
         
     | 
| 
       101 
     | 
    
         
            -
                                        return
         
     | 
| 
       102 
     | 
    
         
            -
                                    end
         
     | 
| 
       103 
     | 
    
         
            -
                                ensure
         
     | 
| 
       104 
     | 
    
         
            -
                                    confnew.close
         
     | 
| 
       105 
     | 
    
         
            -
                                    conf.close
         
     | 
| 
       106 
     | 
    
         
            -
                                end
         
     | 
| 
       107 
     | 
    
         
            -
                            end
         
     | 
| 
       108 
     | 
    
         
            -
                            create_configure_new
         
     | 
| 
       109 
     | 
    
         
            -
                        end
         
     | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
       111 
     | 
    
         
            -
                        def name
         
     | 
| 
       112 
     | 
    
         
            -
                            "QtCopy"
         
     | 
| 
       113 
     | 
    
         
            -
                        end
         
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
                        def options
         
     | 
| 
       116 
     | 
    
         
            -
                            @configuration.options
         
     | 
| 
       117 
     | 
    
         
            -
                        end
         
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
                        Registry.register( 'QtCopy', QtCopy )
         
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
                    end
         
     | 
| 
       122 
     | 
    
         
            -
             
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
                end
         
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
            end
         
     | 
| 
       127 
     | 
    
         
            -
             
     |