sproutit-narwhal 0.2.102 → 0.2.106

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -46,7 +46,7 @@ Jeweler::Tasks.new do |gemspec|
46
46
  gemspec.authors = 'Developed by Tom Robinson and contributors. Gem publish by Charles Jolley'
47
47
  gemspec.email = 'contact@sproutcore.com'
48
48
  gemspec.homepage = 'http://www.narwhaljs.org'
49
- gemspec.summary = "JavaScript Command Line"
49
+ gemspec.summary = "CommonJS Command Line"
50
50
 
51
51
  gemspec.add_development_dependency 'extlib', ">= 0.9.9"
52
52
  gemspec.add_development_dependency 'gemcutter', ">= 0.1.0"
@@ -55,7 +55,7 @@ Jeweler::Tasks.new do |gemspec|
55
55
  gemspec.rubyforge_project = "sproutit-narwhal"
56
56
 
57
57
  gemspec.files.include *%w[engines/jsc/**/* extconf.rb]
58
- gemspec.files.exclude *%w[.gitignore .gitmodules .DS_Store tmp .hashinfo .svn .git narwhal.conf Makefile]
58
+ gemspec.files.exclude *%w[.gitignore .gitmodules .DS_Store tmp .hashinfo .svn .git narwhal.conf ./Makefile]
59
59
  gemspec.files.exclude *%w[engines/jsc/**/*.dylib engines/jsc/**/*.dylib.dSYM engines/jsc/**/*.so engines/jsc/**/*.dll engines/jsc/**/*.o engines/jsc/**/*.s engines/jsc/**/*.ii engines/jsc/bin/*]
60
60
 
61
61
  gemspec.description = File.read(ROOT_PATH / 'README.md')
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :minor: 2
3
- :patch: 102
4
- :digest: 5fd28296962dbb5294603e99b60b7b8d42a78248
3
+ :patch: 106
4
+ :digest: 1fb1e1ec39f87eddb09a18304402b7c09f366bbe
5
5
  :dist:
6
6
  engines/jsc: 89097446434f3ff6763ad41b02b0ea7b9d5794eb
7
7
  :major: 0
@@ -0,0 +1,123 @@
1
+ CPP =g++
2
+ CPPFLAGS = -0s -force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc
3
+ #CPPFLAGS += -g -O0
4
+ #CPPFLAGS += -DDEBUG_ON
5
+ #CPPFLAGS += -save-temps
6
+
7
+ FRAMEWORKS_DIR=frameworks
8
+ #FRAMEWORKS=-Fframeworks
9
+ #FRAMEWORKS=-F/Users/tlrobinson/code/WebKit/WebKitBuild/Release/
10
+
11
+ LIB_DIR =lib
12
+
13
+ INCLUDES =-Iinclude
14
+ MODULES =$(patsubst %.cc,%.dylib,$(patsubst src/%,lib/%,$(shell find src -name '*.cc')))
15
+ LIBS =-framework JavaScriptCore -L/usr/lib -lreadline -liconv -L$(LIB_DIR) -lnarwhal $(FRAMEWORKS)
16
+
17
+ SOURCE =narwhal-jsc.c
18
+ EXECUTABLE=bin/narwhal-jsc
19
+
20
+ JSCORE_CONFIG=Production
21
+ JSCORE_FRAMEWORK=$(FRAMEWORKS_DIR)/JavaScriptCore.framework
22
+ JSCORE_BUILD=deps/JavaScriptCore/build/$(JSCORE_CONFIG)/JavaScriptCore.framework
23
+ JSCORE_CHECKOUT=deps/JavaScriptCore
24
+
25
+ SYSTEM_JSC=/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore
26
+ RELATIVE_JSC=@executable_path/../frameworks/JavaScriptCore.framework/JavaScriptCore
27
+
28
+ ABSOLUTE_LIBNARWHAL=$(LIB_DIR)/libnarwhal.dylib
29
+ RELATIVE_LIBNARWHAL=@executable_path/../lib/libnarwhal.dylib
30
+
31
+ JSCOCOA_FRAMEWORK=$(FRAMEWORKS_DIR)/JSCocoa.framework
32
+ JSCOCOA_BUILD=deps/JSCocoa/JSCocoa/build/Release/JSCocoa.framework
33
+ JSCOCOA_CHECKOUT=deps/JSCocoa
34
+
35
+ all: jsc modules rewrite-lib-paths
36
+ jscocoa: frameworks-jscocoa jsc-jscocoa modules rewrite-lib-paths
37
+ webkit: jsc-webkit modules rewrite-lib-paths
38
+
39
+ lib/libnarwhal.dylib: narwhal.c
40
+ $(CPP) $(CPPFLAGS) $(INCLUDES) -dynamiclib -o $@ $< $(FRAMEWORKS) -framework JavaScriptCore
41
+
42
+ jsc: $(SOURCE) lib/libnarwhal.dylib
43
+ mkdir -p `dirname $(EXECUTABLE)`
44
+ $(CPP) $(CPPFLAGS) $(INCLUDES) -o $(EXECUTABLE) $(SOURCE) $(LIBS)
45
+ install_name_tool -change "$(ABSOLUTE_LIBNARWHAL)" "$(RELATIVE_LIBNARWHAL)" "$(EXECUTABLE)"
46
+
47
+ jsc-webkit: $(SOURCE) lib/libnarwhal.dylib
48
+ mkdir -p `dirname $(EXECUTABLE)`
49
+ $(CPP) $(CPPFLAGS) $(INCLUDES) -DWEBKIT -o $(EXECUTABLE) -x objective-c $(SOURCE) $(LIBS) \
50
+ -framework WebKit -framework Foundation -ObjC
51
+ install_name_tool -change "$(ABSOLUTE_LIBNARWHAL)" "$(RELATIVE_LIBNARWHAL)" "$(EXECUTABLE)"
52
+
53
+ jsc-jscocoa: $(SOURCE) lib/libnarwhal.dylib
54
+ mkdir -p `dirname $(EXECUTABLE)`
55
+ $(CPP) $(CPPFLAGS) $(INCLUDES) -DJSCOCOA -o $(EXECUTABLE) -x objective-c $(SOURCE) $(LIBS) \
56
+ -framework JSCocoa -framework Foundation -ObjC
57
+ install_name_tool -change "$(ABSOLUTE_LIBNARWHAL)" "$(RELATIVE_LIBNARWHAL)" "$(EXECUTABLE)"
58
+
59
+ frameworks: $(JSCORE_FRAMEWORK)
60
+
61
+ frameworks-jscocoa: $(JSCORE_FRAMEWORK) $(JSCOCOA_FRAMEWORK)
62
+
63
+ modules: $(MODULES)
64
+
65
+ rewrite-lib-paths:
66
+ #find lib -name "*.dylib" \! -path "*.dSYM*" -exec install_name_tool -change "$(SYSTEM_JSC)" "$(RELATIVE_JSC)" {} \;
67
+ find lib -name "*.dylib" \! -path "*.dSYM*" -exec install_name_tool -change "$(ABSOLUTE_LIBNARWHAL)" "$(RELATIVE_LIBNARWHAL)" {} \;
68
+
69
+ mongoose.o: mongoose.c
70
+ gcc $(CPPFLAGS) -W -Wall -std=c99 -pedantic -fomit-frame-pointer -c mongoose.c
71
+
72
+ lib/jack/handler/mongoose.dylib: src/jack/handler/mongoose.cc mongoose.o
73
+ mkdir -p `dirname $@`
74
+ $(CPP) $(CPPFLAGS) $(INCLUDES) -dynamiclib -o $@ $< $(LIBS) mongoose.o
75
+ #install_name_tool -change "$(SYSTEM_JSC)" "$(RELATIVE_JSC)" "$@"
76
+
77
+ deps/http-parser/http_parser.o:
78
+ cd deps/http-parser && make http_parser.o
79
+
80
+ lib/jack/handler/jill.dylib: src/jack/handler/jill.cc deps/http-parser/http_parser.o lib/io-engine.dylib lib/binary-engine.dylib
81
+ mkdir -p `dirname $@`
82
+ $(CPP) $(CPPFLAGS) $(INCLUDES) -dynamiclib -o $@ $< $(LIBS) deps/http-parser/http_parser.o lib/io-engine.dylib lib/binary-engine.dylib
83
+ #install_name_tool -change "$(SYSTEM_JSC)" "$(RELATIVE_JSC)" "$@"
84
+ install_name_tool -change "lib/io-engine.dylib" "@executable_path/../lib/io-engine.dylib" "$@"
85
+ install_name_tool -change "lib/binary-engine.dylib" "@executable_path/../lib/binary-engine.dylib" "$@"
86
+
87
+ lib/%.dylib: src/%.cc
88
+ mkdir -p `dirname $@`
89
+ $(CPP) $(CPPFLAGS) $(INCLUDES) -dynamiclib -o $@ $< $(LIBS)
90
+ #install_name_tool -change "$(SYSTEM_JSC)" "$(RELATIVE_JSC)" "$@"
91
+
92
+ $(JSCORE_FRAMEWORK): $(JSCORE_BUILD)
93
+ mkdir -p `dirname $@`
94
+ cp -r $< $@
95
+ install_name_tool -id "@executable_path/../$(FRAMEWORKS_DIR)/JavaScriptCore.framework/JavaScriptCore" $@/JavaScriptCore
96
+ $(JSCORE_BUILD): $(JSCORE_CHECKOUT)
97
+ cd deps/JavaScriptCore && xcodebuild -target JavaScriptCore -configuration $(JSCORE_CONFIG)
98
+ $(JSCORE_CHECKOUT):
99
+ mkdir -p `dirname $@`
100
+ svn checkout http://svn.webkit.org/repository/webkit/trunk/JavaScriptCore $@
101
+
102
+ $(JSCOCOA_FRAMEWORK): $(JSCOCOA_BUILD)
103
+ mkdir -p `dirname $@`
104
+ cp -r $< $@
105
+ install_name_tool -id "@loader_path/../$(FRAMEWORKS_DIR)/JSCocoa.framework/JSCocoa" "$@/JSCocoa"
106
+ install_name_tool -change "$(SYSTEM_JSC)" "$(RELATIVE_JSC)" "$@/JSCocoa";
107
+
108
+ $(JSCOCOA_BUILD): $(JSCOCOA_CHECKOUT)
109
+ cd $(JSCOCOA_CHECKOUT)/JSCocoa && xcodebuild -project "JSCocoa (embed).xcodeproj"
110
+ $(JSCOCOA_CHECKOUT):
111
+ mkdir -p `dirname $@`
112
+ git clone git://github.com/parmanoir/jscocoa.git $@
113
+
114
+ clean:
115
+ find lib -name "*.dylib" -exec rm -rf {} \;
116
+ rm -rf bin/narwhal-jsc* bin/*.dylib bin/*.dSYM lib/*.dylib lib/*.dSYM $(EXECUTABLE) *.o *.ii *.s
117
+ cd deps/http-parser && make clean
118
+
119
+ cleaner: clean
120
+ rm -rf $(JSCORE_FRAMEWORK) $(JSCOCOA_FRAMEWORK) $(JSCORE_BUILD) $(JSCOCOA_BUILD)
121
+
122
+ pristine: cleaner
123
+ rm -rf deps
@@ -0,0 +1,27 @@
1
+ OPT=-O0 -g -Wall -Wextra -force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc #-Werror
2
+ #OPT=-O2
3
+
4
+ test: http_parser.o test.c
5
+ gcc $(OPT) http_parser.o test.c -o $@
6
+
7
+ http_parser.o: http_parser.c http_parser.h Makefile
8
+ gcc $(OPT) -c http_parser.c
9
+
10
+ http_parser.c: http_parser.rl Makefile
11
+ ragel -s -G2 http_parser.rl -o $@
12
+
13
+ tags: http_parser.rl http_parser.h test.c
14
+ ctags $^
15
+
16
+ clean:
17
+ rm -f *.o http_parser.c test http_parser.tar
18
+
19
+ package: http_parser.c
20
+ @rm -rf /tmp/http_parser && mkdir /tmp/http_parser && \
21
+ cp LICENSE README.md Makefile http_parser.c http_parser.rl \
22
+ http_parser.h test.c /tmp/http_parser && \
23
+ cd /tmp && \
24
+ tar -cf http_parser.tar http_parser/
25
+ @echo /tmp/http_parser.tar
26
+
27
+ .PHONY: clean package
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sproutit-narwhal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.102
4
+ version: 0.2.106
5
5
  platform: ruby
6
6
  authors:
7
7
  - Developed by Tom Robinson and contributors. Gem publish by Charles Jolley
@@ -162,9 +162,11 @@ files:
162
162
  - engines/default/lib/string.js
163
163
  - engines/default/lib/system.js
164
164
  - engines/default/lib/worker.js
165
+ - engines/jsc/Makefile
165
166
  - engines/jsc/README.md
166
167
  - engines/jsc/bootstrap.js
167
168
  - engines/jsc/deps/http-parser/LICENSE
169
+ - engines/jsc/deps/http-parser/Makefile
168
170
  - engines/jsc/deps/http-parser/README.md
169
171
  - engines/jsc/deps/http-parser/http_parser.c
170
172
  - engines/jsc/deps/http-parser/http_parser.h
@@ -429,6 +431,6 @@ rubyforge_project: sproutit-narwhal
429
431
  rubygems_version: 1.3.5
430
432
  signing_key:
431
433
  specification_version: 3
432
- summary: JavaScript Command Line
434
+ summary: CommonJS Command Line
433
435
  test_files: []
434
436