trenni 3.11.0 → 3.13.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8508e64521a7d867908f4a7fce4d75330abd8e0139b333705b951b3612a1f79
4
- data.tar.gz: 2778994f2df2428a29c142a9b6caee348ba759a4edba7e761dcefc9cff7e91d2
3
+ metadata.gz: 208a894f51a7a73b58761e3dd8aa2741f3d6cb5e89f95fa54e44f3578257ff82
4
+ data.tar.gz: fff21e109eb1fa060ec66e6ec29de0d96c7f851b06ac8dfcda15b9949e6b6c26
5
5
  SHA512:
6
- metadata.gz: 76ad90f58c94775c28b693c31a4ab2a9b15f450a4a9bf27820d6977bf9edf77052033050c20067cb6e2281a860e6eccb8fd5d795772257b92184f91ff25b5b9b
7
- data.tar.gz: 809eeb0ed1af8e48abc3fc111a0b7da691f2e669ec359c44177a74cbb46f49f0abed4d93985385bca6dc91c45cb202adb6c5fee403ff38bbedebb03efbd2594a
6
+ metadata.gz: e17fcd2b678bcfe0cd571c63caff4db6ecd4363e3977c1b2e8e4e0e83515aa7899390baef5e7175ae1c26571af1b5e5ad4e212dd577cd6bf0dbbee524b829051
7
+ data.tar.gz: effd72e3b55e2449702f2d9fe0328a7a646879d3d2627ed79ee04fad3e48024e78df30538a0e57e2e75e681aa9d30fa0c2b3b1b2fd254373bfc46c4dd501d683
@@ -0,0 +1,267 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ # V=0 quiet, V=1 verbose. other values don't work.
5
+ V = 0
6
+ Q1 = $(V:1=)
7
+ Q = $(Q1:0=@)
8
+ ECHO1 = $(V:1=@ :)
9
+ ECHO = $(ECHO1:0=@ echo)
10
+ NULLCMD = :
11
+
12
+ #### Start of system configuration section. ####
13
+
14
+ srcdir = ../../../../trenni
15
+ topdir = /Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0
16
+ hdrdir = $(topdir)
17
+ arch_hdrdir = /Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/x86_64-darwin20
18
+ PATH_SEPARATOR = :
19
+ VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
20
+ prefix = $(DESTDIR)/Users/samuel/.rubies/ruby-3.0.0
21
+ rubysitearchprefix = $(rubylibprefix)/$(sitearch)
22
+ rubyarchprefix = $(rubylibprefix)/$(arch)
23
+ rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
24
+ exec_prefix = $(prefix)
25
+ vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
26
+ sitearchhdrdir = $(sitehdrdir)/$(sitearch)
27
+ rubyarchhdrdir = $(rubyhdrdir)/$(arch)
28
+ vendorhdrdir = $(rubyhdrdir)/vendor_ruby
29
+ sitehdrdir = $(rubyhdrdir)/site_ruby
30
+ rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
31
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
32
+ vendorlibdir = $(vendordir)/$(ruby_version)
33
+ vendordir = $(rubylibprefix)/vendor_ruby
34
+ sitearchdir = $(sitelibdir)/$(sitearch)
35
+ sitelibdir = $(sitedir)/$(ruby_version)
36
+ sitedir = $(rubylibprefix)/site_ruby
37
+ rubyarchdir = $(rubylibdir)/$(arch)
38
+ rubylibdir = $(rubylibprefix)/$(ruby_version)
39
+ sitearchincludedir = $(includedir)/$(sitearch)
40
+ archincludedir = $(includedir)/$(arch)
41
+ sitearchlibdir = $(libdir)/$(sitearch)
42
+ archlibdir = $(libdir)/$(arch)
43
+ ridir = $(datarootdir)/$(RI_BASE_NAME)
44
+ mandir = $(datarootdir)/man
45
+ localedir = $(datarootdir)/locale
46
+ libdir = $(exec_prefix)/lib
47
+ psdir = $(docdir)
48
+ pdfdir = $(docdir)
49
+ dvidir = $(docdir)
50
+ htmldir = $(docdir)
51
+ infodir = $(datarootdir)/info
52
+ docdir = $(datarootdir)/doc/$(PACKAGE)
53
+ oldincludedir = $(SDKROOT)/usr/include
54
+ includedir = $(prefix)/include
55
+ runstatedir = $(localstatedir)/run
56
+ localstatedir = $(prefix)/var
57
+ sharedstatedir = $(prefix)/com
58
+ sysconfdir = $(prefix)/etc
59
+ datadir = $(datarootdir)
60
+ datarootdir = $(prefix)/share
61
+ libexecdir = $(exec_prefix)/libexec
62
+ sbindir = $(exec_prefix)/sbin
63
+ bindir = $(exec_prefix)/bin
64
+ archdir = $(rubyarchdir)
65
+
66
+
67
+ CC_WRAPPER =
68
+ CC = clang -fdeclspec
69
+ CXX = clang++ -fdeclspec
70
+ LIBRUBY = $(LIBRUBY_A)
71
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
72
+ LIBRUBYARG_SHARED =
73
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static -framework Security -framework Foundation $(MAINLIBS)
74
+ empty =
75
+ OUTFLAG = -o $(empty)
76
+ COUTFLAG = -o $(empty)
77
+ CSRCFLAG = $(empty)
78
+
79
+ RUBY_EXTCONF_H =
80
+ cflags = $(optflags) $(debugflags) $(warnflags)
81
+ cxxflags =
82
+ optflags = -O3
83
+ debugflags = -ggdb3
84
+ warnflags = -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens
85
+ cppflags =
86
+ CCDLFLAGS = -fno-common
87
+ CFLAGS = $(CCDLFLAGS) $(cflags) -pipe -O3 -std=c99 $(ARCH_FLAG)
88
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
89
+ DEFS =
90
+ CPPFLAGS = -DHAVE_RB_SYM2STR -DHAVE_RB_STR_CAT_CSTR -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
91
+ CXXFLAGS = $(CCDLFLAGS) $(ARCH_FLAG)
92
+ ldflags = -L. -fstack-protector-strong -L/opt/local/lib
93
+ dldflags = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/opt/local/lib
94
+ ARCH_FLAG =
95
+ DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
96
+ LDSHARED = $(CC) -dynamic -bundle
97
+ LDSHAREDXX = $(CXX) -dynamic -bundle
98
+ AR = ar
99
+ EXEEXT =
100
+
101
+ RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
102
+ RUBY_SO_NAME = ruby.3.0
103
+ RUBYW_INSTALL_NAME =
104
+ RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
105
+ RUBYW_BASE_NAME = rubyw
106
+ RUBY_BASE_NAME = ruby
107
+
108
+ arch = x86_64-darwin20
109
+ sitearch = $(arch)
110
+ ruby_version = 3.0.0
111
+ ruby = $(bindir)/$(RUBY_BASE_NAME)
112
+ RUBY = $(ruby)
113
+ ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
114
+
115
+ RM = rm -f
116
+ RM_RF = $(RUBY) -run -e rm -- -rf
117
+ RMDIRS = rmdir -p
118
+ MAKEDIRS = /opt/local/bin/gmkdir -p
119
+ INSTALL = /usr/bin/install -c
120
+ INSTALL_PROG = $(INSTALL) -m 0755
121
+ INSTALL_DATA = $(INSTALL) -m 644
122
+ COPY = cp
123
+ TOUCH = exit >
124
+
125
+ #### End of system configuration section. ####
126
+
127
+ preload =
128
+ libpath = . $(libdir) /opt/local/lib
129
+ LIBPATH = -L. -L$(libdir) -L/opt/local/lib
130
+ DEFFILE =
131
+
132
+ CLEANFILES = mkmf.log
133
+ DISTCLEANFILES =
134
+ DISTCLEANDIRS =
135
+
136
+ extout =
137
+ extout_prefix =
138
+ target_prefix = /trenni
139
+ LOCAL_LIBS =
140
+ LIBS =
141
+ ORIG_SRCS = escape.c markup.c query.c tag.c template.c trenni.c
142
+ SRCS = $(ORIG_SRCS)
143
+ OBJS = escape.o markup.o query.o tag.o template.o trenni.o
144
+ HDRS = $(srcdir)/escape.h $(srcdir)/markup.h $(srcdir)/query.h $(srcdir)/tag.h $(srcdir)/template.h $(srcdir)/trenni.h
145
+ LOCAL_HDRS =
146
+ TARGET = trenni
147
+ TARGET_NAME = trenni
148
+ TARGET_ENTRY = Init_$(TARGET_NAME)
149
+ DLLIB = $(TARGET).bundle
150
+ EXTSTATIC =
151
+ STATIC_LIB =
152
+
153
+ TIMESTAMP_DIR = .
154
+ BINDIR = $(bindir)
155
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
156
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
157
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
158
+ HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
159
+ ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
160
+ TARGET_SO_DIR =
161
+ TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
162
+ CLEANLIBS = $(TARGET_SO)
163
+ CLEANOBJS = *.o *.bak
164
+
165
+ all: $(DLLIB)
166
+ static: $(STATIC_LIB)
167
+ .PHONY: all install static install-so install-rb
168
+ .PHONY: clean clean-so clean-static clean-rb
169
+
170
+ clean-static::
171
+ clean-rb-default::
172
+ clean-rb::
173
+ clean-so::
174
+ clean: clean-so clean-static clean-rb-default clean-rb
175
+ -$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
176
+
177
+ distclean-rb-default::
178
+ distclean-rb::
179
+ distclean-so::
180
+ distclean-static::
181
+ distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
182
+ -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
183
+ -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
184
+ -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
185
+
186
+ realclean: distclean
187
+ install: install-so install-rb
188
+
189
+ install-so: $(DLLIB) $(TIMESTAMP_DIR)/.sitearchdir.-.trenni.time
190
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
191
+ clean-static::
192
+ -$(Q)$(RM) $(STATIC_LIB)
193
+ install-rb: pre-install-rb do-install-rb install-rb-default
194
+ install-rb-default: pre-install-rb-default do-install-rb-default
195
+ pre-install-rb: Makefile
196
+ pre-install-rb-default: Makefile
197
+ do-install-rb:
198
+ do-install-rb-default:
199
+ pre-install-rb-default:
200
+ @$(NULLCMD)
201
+ $(TIMESTAMP_DIR)/.sitearchdir.-.trenni.time:
202
+ $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
203
+ $(Q) $(TOUCH) $@
204
+
205
+ site-install: site-install-so site-install-rb
206
+ site-install-so: install-so
207
+ site-install-rb: install-rb
208
+
209
+ .SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
210
+
211
+ .cc.o:
212
+ $(ECHO) compiling $(<)
213
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
214
+
215
+ .cc.S:
216
+ $(ECHO) translating $(<)
217
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
218
+
219
+ .mm.o:
220
+ $(ECHO) compiling $(<)
221
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
222
+
223
+ .mm.S:
224
+ $(ECHO) translating $(<)
225
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
226
+
227
+ .cxx.o:
228
+ $(ECHO) compiling $(<)
229
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
230
+
231
+ .cxx.S:
232
+ $(ECHO) translating $(<)
233
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
234
+
235
+ .cpp.o:
236
+ $(ECHO) compiling $(<)
237
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
238
+
239
+ .cpp.S:
240
+ $(ECHO) translating $(<)
241
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
242
+
243
+ .c.o:
244
+ $(ECHO) compiling $(<)
245
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
246
+
247
+ .c.S:
248
+ $(ECHO) translating $(<)
249
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
250
+
251
+ .m.o:
252
+ $(ECHO) compiling $(<)
253
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
254
+
255
+ .m.S:
256
+ $(ECHO) translating $(<)
257
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
258
+
259
+ $(TARGET_SO): $(OBJS) Makefile
260
+ $(ECHO) linking shared-object trenni/$(DLLIB)
261
+ -$(Q)$(RM) $(@)
262
+ $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
263
+ $(Q) $(POSTLINK)
264
+
265
+
266
+
267
+ $(OBJS): $(HDRS) $(ruby_headers)
@@ -0,0 +1,109 @@
1
+ have_func: checking for rb_sym2str()... -------------------- yes
2
+
3
+ "clang -fdeclspec -o conftest -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/x86_64-darwin20 -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0 -I../../../../trenni -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -pipe -O3 -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.0.0/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -lruby.3.0-static -framework Security -framework Foundation -lpthread -lgmp -ldl -lobjc "
4
+ checked program was:
5
+ /* begin */
6
+ 1: #include "ruby.h"
7
+ 2:
8
+ 3: int main(int argc, char **argv)
9
+ 4: {
10
+ 5: return !!argv[argc];
11
+ 6: }
12
+ /* end */
13
+
14
+ "clang -fdeclspec -o conftest -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/x86_64-darwin20 -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0 -I../../../../trenni -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -pipe -O3 -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.0.0/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -lruby.3.0-static -framework Security -framework Foundation -lpthread -lgmp -ldl -lobjc "
15
+ checked program was:
16
+ /* begin */
17
+ 1: #include "ruby.h"
18
+ 2:
19
+ 3: /*top*/
20
+ 4: extern int t(void);
21
+ 5: int main(int argc, char **argv)
22
+ 6: {
23
+ 7: if (argc > 1000000) {
24
+ 8: int (* volatile tp)(void)=(int (*)(void))&t;
25
+ 9: printf("%d", (*tp)());
26
+ 10: }
27
+ 11:
28
+ 12: return !!argv[argc];
29
+ 13: }
30
+ 14: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_sym2str; return !p; }
31
+ /* end */
32
+
33
+ --------------------
34
+
35
+ have_func: checking for rb_str_cat_cstr()... -------------------- yes
36
+
37
+ "clang -fdeclspec -o conftest -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/x86_64-darwin20 -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0 -I../../../../trenni -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -pipe -O3 -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.0.0/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -lruby.3.0-static -framework Security -framework Foundation -lpthread -lgmp -ldl -lobjc "
38
+ checked program was:
39
+ /* begin */
40
+ 1: #include "ruby.h"
41
+ 2:
42
+ 3: /*top*/
43
+ 4: extern int t(void);
44
+ 5: int main(int argc, char **argv)
45
+ 6: {
46
+ 7: if (argc > 1000000) {
47
+ 8: int (* volatile tp)(void)=(int (*)(void))&t;
48
+ 9: printf("%d", (*tp)());
49
+ 10: }
50
+ 11:
51
+ 12: return !!argv[argc];
52
+ 13: }
53
+ 14: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_str_cat_cstr; return !p; }
54
+ /* end */
55
+
56
+ --------------------
57
+
58
+ have_func: checking for rb_str_reserve()... -------------------- no
59
+
60
+ "clang -fdeclspec -o conftest -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/x86_64-darwin20 -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0 -I../../../../trenni -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -pipe -O3 -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.0.0/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -lruby.3.0-static -framework Security -framework Foundation -lpthread -lgmp -ldl -lobjc "
61
+ conftest.c:14:57: error: use of undeclared identifier 'rb_str_reserve'
62
+ int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_str_reserve; return !p; }
63
+ ^
64
+ 1 error generated.
65
+ checked program was:
66
+ /* begin */
67
+ 1: #include "ruby.h"
68
+ 2:
69
+ 3: /*top*/
70
+ 4: extern int t(void);
71
+ 5: int main(int argc, char **argv)
72
+ 6: {
73
+ 7: if (argc > 1000000) {
74
+ 8: int (* volatile tp)(void)=(int (*)(void))&t;
75
+ 9: printf("%d", (*tp)());
76
+ 10: }
77
+ 11:
78
+ 12: return !!argv[argc];
79
+ 13: }
80
+ 14: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_str_reserve; return !p; }
81
+ /* end */
82
+
83
+ "clang -fdeclspec -o conftest -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/x86_64-darwin20 -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.0.0/include/ruby-3.0.0 -I../../../../trenni -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -pipe -O3 -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.0.0/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -lruby.3.0-static -framework Security -framework Foundation -lpthread -lgmp -ldl -lobjc "
84
+ Undefined symbols for architecture x86_64:
85
+ "_rb_str_reserve", referenced from:
86
+ _t in conftest-cf43c1.o
87
+ ld: symbol(s) not found for architecture x86_64
88
+ clang: error: linker command failed with exit code 1 (use -v to see invocation)
89
+ checked program was:
90
+ /* begin */
91
+ 1: #include "ruby.h"
92
+ 2:
93
+ 3: /*top*/
94
+ 4: extern int t(void);
95
+ 5: int main(int argc, char **argv)
96
+ 6: {
97
+ 7: if (argc > 1000000) {
98
+ 8: int (* volatile tp)(void)=(int (*)(void))&t;
99
+ 9: printf("%d", (*tp)());
100
+ 10: }
101
+ 11:
102
+ 12: return !!argv[argc];
103
+ 13: }
104
+ 14: extern void rb_str_reserve();
105
+ 15: int t(void) { rb_str_reserve(); return 0; }
106
+ /* end */
107
+
108
+ --------------------
109
+
data/ext/trenni/escape.c CHANGED
@@ -137,6 +137,8 @@ VALUE Trenni_Markup_escape_string(VALUE self, VALUE string) {
137
137
 
138
138
  void Init_trenni_escape() {
139
139
  rb_Trenni_MarkupString = rb_define_class_under(rb_Trenni, "MarkupString", rb_cString);
140
+ rb_gc_register_mark_object(rb_Trenni_MarkupString);
141
+
140
142
  rb_include_module(rb_Trenni_MarkupString, rb_Trenni_Markup);
141
143
 
142
144
  rb_undef_method(rb_class_of(rb_Trenni_Markup), "escape_string");
File without changes
data/ext/trenni/trenni.c CHANGED
@@ -48,18 +48,25 @@ void Init_trenni() {
48
48
  id_is_a = rb_intern("is_a?");
49
49
 
50
50
  rb_Trenni = rb_define_module("Trenni");
51
+ rb_gc_register_mark_object(rb_Trenni);
52
+
51
53
  rb_Trenni_Markup = rb_define_module_under(rb_Trenni, "Markup");
54
+ rb_gc_register_mark_object(rb_Trenni_Markup);
55
+
52
56
  rb_Trenni_Native = rb_define_module_under(rb_Trenni, "Native");
57
+ rb_gc_register_mark_object(rb_Trenni_Native);
53
58
 
54
59
  Init_trenni_escape();
55
60
 
56
61
  rb_Trenni_ParseError = rb_const_get_at(rb_Trenni, rb_intern("ParseError"));
62
+ rb_gc_register_mark_object(rb_Trenni_ParseError);
57
63
 
58
64
  rb_define_module_function(rb_Trenni_Native, "parse_markup", Trenni_Native_parse_markup, 3);
59
65
  rb_define_module_function(rb_Trenni_Native, "parse_template", Trenni_Native_parse_template, 2);
60
66
  rb_define_module_function(rb_Trenni_Native, "parse_query", Trenni_Native_parse_query, 2);
61
67
 
62
68
  rb_Trenni_Tag = rb_const_get_at(rb_Trenni, rb_intern("Tag"));
69
+ rb_gc_register_mark_object(rb_Trenni_Tag);
63
70
 
64
71
  Init_trenni_tag();
65
72
  }
@@ -28,25 +28,57 @@ module Trenni
28
28
  class Builder
29
29
  include Markup
30
30
 
31
- INDENT = "\t".freeze
31
+ INDENT = "\t"
32
+
33
+ class Fragment
34
+ def initialize(block)
35
+ @block = block
36
+ @builder = nil
37
+ end
38
+
39
+ def call(builder)
40
+ @block.call(builder)
41
+ end
42
+
43
+ def to_s
44
+ unless @builder
45
+ @builder = Builder.new
46
+
47
+ self.call(@builder)
48
+ end
49
+
50
+ return @builder.to_s
51
+ end
52
+
53
+ def == other
54
+ # This is a bit of a hack... but is required for existing specs to pass:
55
+ self.to_s == other.to_s
56
+ end
57
+ end
32
58
 
33
59
  # A helper to generate fragments of markup.
34
- def self.fragment(builder = nil, &block)
35
- if builder.is_a?(self)
36
- yield builder
60
+ def self.fragment(output = nil, &block)
61
+ if output.is_a?(Binding)
62
+ output = Template.buffer(output)
63
+ end
64
+
65
+ if output.nil?
66
+ return Fragment.new(block)
67
+ end
68
+
69
+ if output.is_a?(Builder)
70
+ block.call(output)
37
71
  else
38
- builder = self.new(builder)
39
-
40
- yield builder
72
+ block.call(Builder.new(output))
41
73
  end
42
74
 
43
- return builder
75
+ return nil
44
76
  end
45
77
 
46
78
  def self.tag(name, content, **attributes)
47
79
  self.fragment do |builder|
48
80
  builder.inline(name, attributes) do
49
- builder.text content
81
+ builder.text(content)
50
82
  end
51
83
  end
52
84
  end
@@ -97,14 +129,26 @@ module Trenni
97
129
  end
98
130
 
99
131
  # Begin an inline tag.
100
- def inline(name, attributes = {}, &block)
101
- indent = @indent
132
+ def inline_tag(name, attributes = {}, &block)
133
+ original_indent = @indent
102
134
 
103
135
  full_tag(name, attributes, @indent, false) do
104
136
  @indent = false
105
137
  yield if block_given?
106
- @indent = indent
107
138
  end
139
+ ensure
140
+ @indent = original_indent
141
+ end
142
+
143
+ alias inline inline_tag
144
+
145
+ def inline!
146
+ original_indent = @indent
147
+ @indent = false
148
+
149
+ yield
150
+ ensure
151
+ @indent = original_indent
108
152
  end
109
153
 
110
154
  def text(content)
@@ -129,7 +173,13 @@ module Trenni
129
173
  def <<(content)
130
174
  return unless content
131
175
 
132
- Markup.append(@output, content)
176
+ if content.is_a?(Fragment)
177
+ inline! do
178
+ content.call(self)
179
+ end
180
+ else
181
+ Markup.append(@output, content)
182
+ end
133
183
  end
134
184
 
135
185
  # Append pre-existing markup:
data/lib/trenni/native.rb CHANGED
@@ -27,7 +27,7 @@ require_relative 'tag'
27
27
 
28
28
  begin
29
29
  # Load native code:
30
- require_relative 'trenni'
30
+ require 'trenni/trenni'
31
31
  rescue LoadError
32
32
  warn "Could not load native implementation: #{$!}" if $VERBOSE
33
33
  end unless ENV['TRENNI_PREFER_FALLBACK']
@@ -29,36 +29,27 @@ module Trenni
29
29
  BINDING = binding
30
30
 
31
31
  class Builder
32
- def >> block
33
- if block
34
- Template.buffer(block.binding) << self
35
- return nil
36
- else
37
- return self
38
- end
39
- end
40
-
41
- def capture(*args, &block)
42
- self.append Template.capture(*args, &block)
32
+ def capture(*arguments, &block)
33
+ Template.capture(*arguments, output: self, &block)
43
34
  end
44
35
  end
45
36
 
46
37
  class Template
47
38
  # Returns the output produced by calling the given block.
48
- def self.capture(*args, &block)
39
+ def self.capture(*arguments, output: nil, &block)
49
40
  scope = block.binding
50
- out = scope.local_variable_get(OUT)
41
+ previous_output = scope.local_variable_get(OUT)
51
42
 
52
- capture = out.class.new(encoding: out.encoding)
53
- scope.local_variable_set(OUT, capture)
43
+ output ||= previous_output.class.new(encoding: previous_output.encoding)
44
+ scope.local_variable_set(OUT, output)
54
45
 
55
46
  begin
56
- block.call(*args)
47
+ block.call(*arguments)
57
48
  ensure
58
- scope.local_variable_set(OUT, out)
49
+ scope.local_variable_set(OUT, previous_output)
59
50
  end
60
51
 
61
- return capture
52
+ return output
62
53
  end
63
54
 
64
55
  # Returns the buffer used for capturing output.
@@ -21,5 +21,5 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  module Trenni
24
- VERSION = "3.11.0"
24
+ VERSION = "3.13.2"
25
25
  end
@@ -21,22 +21,34 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
  # THE SOFTWARE.
23
23
 
24
- require 'trenni'
24
+ require 'trenni/builder'
25
25
 
26
- module Trenni::BuilderSpec
27
- describe 'Trenni::Builder#tag' do
28
- subject {Trenni::Builder.new}
29
-
30
- it "should format nested attributes" do
31
- subject.tag('div', data: {id: 10})
32
-
33
- expect(subject.output).to be == '<div data-id="10"/>'
26
+ RSpec.describe Trenni::Builder do
27
+ it "should produce valid html" do
28
+ subject.doctype
29
+ subject.tag('html') do
30
+ subject.tag('head') do
31
+ subject.inline('title') do
32
+ subject.text('Hello World')
33
+ end
34
+ end
35
+ subject.tag('body') do
36
+ end
34
37
  end
38
+
39
+ expect(subject.output).to be == <<~HTML.chomp
40
+ <!DOCTYPE html>
41
+ <html>
42
+ <head>
43
+ <title>Hello World</title>
44
+ </head>
45
+ <body>
46
+ </body>
47
+ </html>
48
+ HTML
35
49
  end
36
50
 
37
- describe 'Trenni::Builder#fragment' do
38
- let(:builder) {Trenni::Builder.new}
39
-
51
+ describe '.fragment' do
40
52
  it "should use an existing builder" do
41
53
  result = Trenni::Builder.fragment do |builder|
42
54
  end
@@ -47,61 +59,59 @@ module Trenni::BuilderSpec
47
59
  it "should use an existing builder" do
48
60
  expect(Trenni::Builder).to receive(:new).and_call_original
49
61
 
50
- result = Trenni::Builder.fragment(builder) do |builder|
62
+ result = Trenni::Builder.fragment(subject) do |builder|
51
63
  end
52
64
 
53
- expect(result).to_not be_nil
65
+ expect(result).to be_nil
54
66
  end
55
67
  end
56
68
 
57
- describe Trenni::Builder do
58
- describe '#<<' do
59
- it 'can append text' do
60
- subject << 'text'
61
- expect(subject.output).to be == "text"
62
- end
69
+ describe '#tag' do
70
+ it "should format nested attributes" do
71
+ subject.tag('div', data: {id: 10})
63
72
 
64
- it "doesn't append nil" do
65
- subject << nil
66
- expect(subject.output).to be == ""
67
- end
73
+ expect(subject.output).to be == '<div data-id="10"/>'
68
74
  end
69
75
 
70
- it 'should be able to append nil' do
71
- expect{subject.append(nil)}.to_not raise_error
76
+ it "should indent self-closing tag correctly" do
77
+ builder = Trenni::Builder.new
78
+
79
+ builder.tag('foo') {builder.tag('bar')}
80
+
81
+ expect(builder.output).to be == <<~HTML.chomp
82
+ <foo>
83
+ <bar/>
84
+ </foo>
85
+ HTML
72
86
  end
73
87
 
74
- it 'should append existing markup' do
75
- subject.tag("outer") do
76
- subject.append("<inner>\n\t<nested/>\n</inner>")
77
- end
78
-
79
- expect(subject.output).to be == "<outer>\n\t<inner>\n\t\t<nested/>\n\t</inner>\n</outer>"
88
+ it "should support compact attributes" do
89
+ subject.tag :option, :required => true
90
+ expect(subject.output).to be == %Q{<option required/>}
80
91
  end
81
92
 
82
- it "should produce valid html" do
83
- subject.doctype
84
- subject.tag('html') do
85
- subject.tag('head') do
86
- subject.inline('title') do
87
- subject.text('Hello World')
88
- end
89
- end
90
- subject.tag('body') do
91
- end
92
- end
93
-
94
- expect(subject.output).to be == "<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<title>Hello World</title>\n\t</head>\n\t<body>\n\t</body>\n</html>"
93
+ it "should output without changing escaped characters" do
94
+ subject.tag "section", :'data-text' => 'foo\nbar'
95
+ expect(subject.output).to be == '<section data-text="foo\nbar"/>'
95
96
  end
96
97
 
97
- it "should indent self-closing tag correctly" do
98
- builder = Trenni::Builder.new
99
-
100
- builder.tag('foo') { builder.tag('bar') }
101
-
102
- expect(builder.output).to be == "<foo>\n\t<bar/>\n</foo>"
98
+ it "should order array attributes as specified" do
99
+ subject.tag :t, [[:a, 10], [:b, 20]]
100
+ expect(subject.output).to be == %Q{<t a="10" b="20"/>}
101
+ end
102
+
103
+ it "should order hash attributes as specified" do
104
+ subject.tag :t, :b => 20, :a => 10
105
+ expect(subject.output).to be == %Q{<t b="20" a="10"/>}
103
106
  end
104
107
 
108
+ it "shouldn't output attributes with nil value" do
109
+ subject.tag :t, [[:a, 10], [:b, nil]]
110
+ expect(subject.output).to be == %Q{<t a="10"/>}
111
+ end
112
+ end
113
+
114
+ describe '#inline' do
105
115
  it "should produce inline html" do
106
116
  subject.inline("div") do
107
117
  subject.tag("strong") do
@@ -114,6 +124,20 @@ module Trenni::BuilderSpec
114
124
  expect(subject.output).to be == "<div><strong>Hello</strong>World!</div>"
115
125
  end
116
126
 
127
+ it "can inline fragments" do
128
+ subject.inline! do
129
+ subject.inline('a') do
130
+ subject << "Hello"
131
+ end
132
+
133
+ subject.inline('a') do
134
+ subject << "World"
135
+ end
136
+ end
137
+
138
+ expect(subject.output).to be == "<a>Hello</a><a>World</a>"
139
+ end
140
+
117
141
  it "escapes attributes and text correctly" do
118
142
  subject.inline :foo, :bar => %Q{"Hello World"} do
119
143
  subject.text %Q{if x < 10}
@@ -121,30 +145,37 @@ module Trenni::BuilderSpec
121
145
 
122
146
  expect(subject.output).to be == %Q{<foo bar="&quot;Hello World&quot;">if x &lt; 10</foo>}
123
147
  end
124
-
125
- it "should support compact attributes" do
126
- subject.tag :option, :required => true
127
- expect(subject.output).to be == %Q{<option required/>}
128
- end
129
-
130
- it "should output without changing escaped characters" do
131
- subject.tag "section", :'data-text' => 'foo\nbar'
132
- expect(subject.output).to be == '<section data-text="foo\nbar"/>'
148
+ end
149
+
150
+ describe '#<<' do
151
+ it 'can append text' do
152
+ subject << 'text'
153
+ expect(subject.output).to be == "text"
133
154
  end
134
155
 
135
- it "should order array attributes as specified" do
136
- subject.tag :t, [[:a, 10], [:b, 20]]
137
- expect(subject.output).to be == %Q{<t a="10" b="20"/>}
156
+ it "doesn't append nil" do
157
+ subject << nil
158
+ expect(subject.output).to be == ""
138
159
  end
139
-
140
- it "should order hash attributes as specified" do
141
- subject.tag :t, :b => 20, :a => 10
142
- expect(subject.output).to be == %Q{<t b="20" a="10"/>}
160
+ end
161
+
162
+ describe '#append' do
163
+ it 'should be able to append nil' do
164
+ expect{subject.append(nil)}.to_not raise_error
143
165
  end
144
166
 
145
- it "shouldn't output attributes with nil value" do
146
- subject.tag :t, [[:a, 10], [:b, nil]]
147
- expect(subject.output).to be == %Q{<t a="10"/>}
167
+ it 'should append existing markup' do
168
+ subject.tag("outer") do
169
+ subject.append("<inner>\n\t<nested/>\n</inner>")
170
+ end
171
+
172
+ expect(subject.output).to be == <<~HTML.chomp
173
+ <outer>
174
+ <inner>
175
+ <nested/>
176
+ </inner>
177
+ </outer>
178
+ HTML
148
179
  end
149
180
  end
150
181
  end
@@ -1,8 +1,8 @@
1
1
  <?r
2
2
  def append_to_buffer(&block)
3
- Trenni::Builder.fragment do |builder|
3
+ Trenni::Builder.fragment(block.binding) do |builder|
4
4
  builder.capture(&block)
5
- end >> block
5
+ end
6
6
  end
7
7
 
8
8
  append_to_buffer do ?>Hello World!<?r end ?>
metadata CHANGED
@@ -1,57 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trenni
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.0
4
+ version: 3.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-31 00:00:00.000000000 Z
11
+ date: 2021-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rake-compiler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bake-bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: bake-modernize
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
13
  - !ruby/object:Gem::Dependency
56
14
  name: bundler
57
15
  requirement: !ruby/object:Gem::Requirement
@@ -94,17 +52,16 @@ dependencies:
94
52
  - - "~>"
95
53
  - !ruby/object:Gem::Version
96
54
  version: '3.4'
97
- description:
98
- email:
55
+ description:
56
+ email:
99
57
  executables: []
100
58
  extensions:
101
- - ext/Rakefile
59
+ - ext/trenni/extconf.rb
102
60
  extra_rdoc_files: []
103
61
  files:
104
62
  - bake/trenni/entities.rb
105
63
  - bake/trenni/parsers.rb
106
64
  - ext/.DS_Store
107
- - ext/Rakefile
108
65
  - ext/tmp/.DS_Store
109
66
  - ext/tmp/x86_64-darwin16/lib/trenni/trenni.bundle
110
67
  - ext/tmp/x86_64-darwin16/trenni/2.4.0/Makefile
@@ -142,6 +99,16 @@ files:
142
99
  - ext/tmp/x86_64-darwin19/trenni/2.7.1/template.o
143
100
  - ext/tmp/x86_64-darwin19/trenni/2.7.1/trenni.bundle
144
101
  - ext/tmp/x86_64-darwin19/trenni/2.7.1/trenni.o
102
+ - ext/tmp/x86_64-darwin20/lib/trenni/trenni.bundle
103
+ - ext/tmp/x86_64-darwin20/trenni/3.0.0/Makefile
104
+ - ext/tmp/x86_64-darwin20/trenni/3.0.0/escape.o
105
+ - ext/tmp/x86_64-darwin20/trenni/3.0.0/markup.o
106
+ - ext/tmp/x86_64-darwin20/trenni/3.0.0/mkmf.log
107
+ - ext/tmp/x86_64-darwin20/trenni/3.0.0/query.o
108
+ - ext/tmp/x86_64-darwin20/trenni/3.0.0/tag.o
109
+ - ext/tmp/x86_64-darwin20/trenni/3.0.0/template.o
110
+ - ext/tmp/x86_64-darwin20/trenni/3.0.0/trenni.bundle
111
+ - ext/tmp/x86_64-darwin20/trenni/3.0.0/trenni.o
145
112
  - ext/trenni/.DS_Store
146
113
  - ext/trenni/escape.c
147
114
  - ext/trenni/escape.h
@@ -223,23 +190,23 @@ licenses:
223
190
  - MIT
224
191
  metadata:
225
192
  funding_uri: https://github.com/sponsors/ioquatix
226
- post_install_message:
193
+ post_install_message:
227
194
  rdoc_options: []
228
195
  require_paths:
229
196
  - lib
230
197
  required_ruby_version: !ruby/object:Gem::Requirement
231
198
  requirements:
232
- - - "~>"
199
+ - - ">="
233
200
  - !ruby/object:Gem::Version
234
- version: '2.4'
201
+ version: '2.5'
235
202
  required_rubygems_version: !ruby/object:Gem::Requirement
236
203
  requirements:
237
204
  - - ">="
238
205
  - !ruby/object:Gem::Version
239
206
  version: '0'
240
207
  requirements: []
241
- rubygems_version: 3.1.2
242
- signing_key:
208
+ rubygems_version: 3.2.22
209
+ signing_key:
243
210
  specification_version: 4
244
211
  summary: A fast native templating system that compiles directly to Ruby code.
245
212
  test_files: []
data/ext/Rakefile DELETED
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- spec_path = File.expand_path('../trenni.gemspec', Dir.pwd)
4
- spec = Gem::Specification.load(spec_path)
5
-
6
- require "rake/extensiontask"
7
-
8
- unless RUBY_PLATFORM =~ /java/
9
- Rake::ExtensionTask.new("trenni") do |ext|
10
- ext.ext_dir = 'trenni'
11
- ext.lib_dir = '../lib/trenni'
12
- end
13
- else
14
- task :compile do
15
- puts "Nothing to compile for this platform."
16
- end
17
- end
18
-
19
- task :default => :compile