"Fossies" - the Fresh Open Source Software Archive

Member "freeipa-4.8.8/install/ui/util/build/patches/01-Make-dojo-builder-buildable-by-itself.patch" (15 Jun 2020, 5040 Bytes) of package /linux/misc/freeipa-4.8.8.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 From be32e8039fca859a8fc9202c50dcd8663023dd53 Mon Sep 17 00:00:00 2001
    2 From: Petr Vobornik <pvoborni@redhat.com>
    3 Date: Thu, 8 Nov 2012 13:22:30 +0100
    4 Subject: [PATCH 1/2] Make dojo builder buildable by itself
    5 
    6 Dojo builder is now buildable by itself. It just needed a packackage information,
    7 profile and separating of internal definition of commanLineArgs module to separate
    8 file.
    9 
   10 It allows to use a builder as a single file in rhino with only one dependency
   11 (_base/configRhino) copied from dojo/dojo. We would need an additional patch to
   12 get rid of this dependency.
   13 ---
   14  build/argv.js            |  2 +-
   15  build/build.profile.js   | 32 ++++++++++++++++++++++++++++++++
   16  build/commandLineArgs.js |  7 +++++++
   17  build/main.js            | 26 ++++++++++----------------
   18  build/package.json       | 23 +++++++++++++++++++++++
   19  5 files changed, 73 insertions(+), 17 deletions(-)
   20  create mode 100644 build/build.profile.js
   21  create mode 100644 build/commandLineArgs.js
   22  create mode 100644 build/package.json
   23 
   24 diff --git a/build/argv.js b/build/argv.js
   25 index c6589afb..98d95bf8 100644
   26 --- a/build/argv.js
   27 +++ b/build/argv.js
   28 @@ -5,7 +5,7 @@ define([
   29     "./fs",
   30     "./fileUtils",
   31     "./process",
   32 -   "commandLineArgs",
   33 +   "./commandLineArgs",
   34     "./stringify",
   35     "./version",
   36     "./messages",
   37 diff --git a/build/build.profile.js b/build/build.profile.js
   38 new file mode 100644
   39 index 00000000..507728c2
   40 --- /dev/null
   41 +++ b/build/build.profile.js
   42 @@ -0,0 +1,32 @@
   43 +//
   44 +// Dojo builder profile file
   45 +//
   46 +
   47 +
   48 +var profile = (function(){
   49 +
   50 +    var examples = /^build\/examples\//;
   51 +    var ignore = {
   52 +        'build/transforms/dojoBoot':1,
   53 +        'build/optimizeRunner':1
   54 +    };
   55 +
   56 +    return {
   57 +        resourceTags: {
   58 +
   59 +            // all JavaScript files are AMD modules
   60 +            amd: function(filename, mid) {
   61 +                var amd =  (!examples.test(mid) &&
   62 +                        !(mid in ignore) &&
   63 +                        /\.js$/.test(filename));
   64 +                //if (amd)print("'"+mid+"',");
   65 +                return amd;
   66 +            },
   67 +            miniExclude: function(filename, mid) {
   68 +                return (examples.test(mid) ||
   69 +                         !/\.js$/.test(filename) ||
   70 +                        (mid in ignore));
   71 +            }
   72 +        }
   73 +    };
   74 +})();
   75 \ No newline at end of file
   76 diff --git a/build/commandLineArgs.js b/build/commandLineArgs.js
   77 new file mode 100644
   78 index 00000000..41df62e3
   79 --- /dev/null
   80 +++ b/build/commandLineArgs.js
   81 @@ -0,0 +1,7 @@
   82 +
   83 +define([], function(){
   84 +
   85 +    var args = [];
   86 +
   87 +    return args;
   88 +});
   89 \ No newline at end of file
   90 diff --git a/build/main.js b/build/main.js
   91 index 131ed644..c0eb36e9 100644
   92 --- a/build/main.js
   93 +++ b/build/main.js
   94 @@ -33,16 +33,14 @@
   95  // github: https://github.com/altoviso/bdBuild
   96  // docs: http://bdframework.org/bdBuild/docs
   97  
   98 -define(["require", "dojo/has"], function(require, has){
   99 +define(["require", "dojo/has", "./commandLineArgs"], function(require, has, commandLineArgs){
  100  
  101     // host-dependent environment initialization
  102     if(has("host-node")){
  103 -       define("commandLineArgs", function(){
  104 -           //arg[0] is node; argv[1] is dojo.js; therefore, start with argv[2]
  105 -           return process.argv.slice(2);
  106 -       });
  107 +        //arg[0] is node; argv[1] is dojo.js; therefore, start with argv[2]
  108 +        commandLineArgs.push.apply(commandLineArgs, process.argv.slice(2));
  109  
  110 -       // helps during dev or heavily async node...
  111 +       // helps during dev or heavily async node
  112         var util = require.nodeRequire("util");
  113         debug = function(it, depth, inspect){
  114             util.debug(inspect ? util.inspect(it, false, depth) : it);
  115 @@ -50,16 +48,12 @@ define(["require", "dojo/has"], function(require, has){
  116  
  117         has.add("is-windows", process.platform == "win32");
  118     }else if(has("host-rhino")){
  119 -       define("commandLineArgs", [], function(){
  120 -           var result = [];
  121 -           require.rawConfig.commandLineArgs.forEach(function(item){
  122 -               var parts = item.split("=");
  123 -               if(parts[0]!="baseUrl"){
  124 -                   result.push(item);
  125 -               }
  126 -           });
  127 -           return result;
  128 -       });
  129 +        require.rawConfig.commandLineArgs.forEach(function(item){
  130 +            var parts = item.split("=");
  131 +            if(parts[0]!="baseUrl"){
  132 +                commandLineArgs.push(item);
  133 +            }
  134 +        });
  135         // TODO: make this real
  136         has.add("is-windows", /indows/.test(environment["os.name"]));
  137     }else{
  138 diff --git a/build/package.json b/build/package.json
  139 new file mode 100644
  140 index 00000000..576030f2
  141 --- /dev/null
  142 +++ b/build/package.json
  143 @@ -0,0 +1,23 @@
  144 +{
  145 +   "name": "build",
  146 +   "version":"1.13.0",
  147 +   "directories": {
  148 +       "lib": "."
  149 +   },
  150 +   "main": "main",
  151 +   "description": "Dojo build system.",
  152 +   "licenses": [
  153 +        {
  154 +                "type": "AFLv2.1",
  155 +                "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43"
  156 +        },
  157 +        {
  158 +                "type": "BSD",
  159 +                "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13"
  160 +        }
  161 +   ],
  162 +   "bugs": "http://bugs.dojotoolkit.org/",
  163 +   "keywords": ["JavaScript", "Dojo", "Toolkit"],
  164 +   "homepage": "http://dojotoolkit.org/",
  165 +   "dojoBuild": "build.profile.js"
  166 +}
  167 -- 
  168 2.14.3
  169