File: 00_example_cleaning.patch

package info (click to toggle)
luabind 0.9.1%2Bgit20150823%2Bdfsg-3.2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,708 kB
  • sloc: cpp: 14,884; makefile: 204; sh: 41; python: 38; ansic: 11
file content (119 lines) | stat: -rw-r--r-- 3,081 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Create Makefiles necessary for building examples with make.
Also, patch examples so that . is not assumed to be in $PATH.
--- /dev/null
+++ luabind/examples/hello_world/Makefile
@@ -0,0 +1,13 @@
+all: helloworld_test
+
+# if using fink on darwin
+# you need these additional flags
+CPPFLAGS = -I/sw/include -L/sw/lib
+
+helloworld_test: hello_world.cpp
+	$(CXX) -shared hello_world.cpp -o hello_world.so $(CPPFLAGS) \
+	-I/usr/include/lua5.1 -I/usr/include/boost \
+	-llua5.1 -lluabind
+
+clean:
+	rm -f helloworld *.o *~
--- luabind.orig/examples/hello_world/README
+++ luabind/examples/hello_world/README
@@ -2,7 +2,7 @@
 loadlib() from within the lua interpreter to load the library, it will
 then export a function named greet() which you can call.
 
-> loadlib('hello_world.dll', 'init')()
+> loadlib('./hello_world.dll', 'init')()
 > greet()
 Hello world!
 >
--- /dev/null
+++ luabind/examples/glut/Makefile
@@ -0,0 +1,13 @@
+all: glutbind_test
+
+# if using fink on darwin
+# you need these additional flags
+CPPFLAGS = -I/sw/include -L/sw/lib
+
+glutbind_test: glut_bind.cpp
+	$(CXX) glut_bind.cpp -o glut_bind $(CPPFLAGS) \
+	-I/usr/include/lua5.1 -I/usr/include/boost \
+	-llua5.1 -lluabind -lGL -lGLU -lglut
+
+clean:
+	rm -f glut_bind *.o *~
--- luabind.orig/examples/glut/glut_bind.cpp
+++ luabind/examples/glut/glut_bind.cpp
@@ -174,7 +174,7 @@
 
     glutInit (&argc, argv);
 
-    lua_dofile(L, "glut_bindings.lua");
+    lua_dofile(L, "./glut_bindings.lua");
 
     lua_close(L);
     return 0;
--- /dev/null
+++ luabind/examples/glut/README
@@ -0,0 +1,4 @@
+this examples shows how to bind c/c++ functions to use them in lua.
+It builds the executable glut_bind, which should display an opengl
+window.
+Needed: libluabind-dev, freeglut3-dev
--- /dev/null
+++ luabind/examples/regexp/Makefile
@@ -0,0 +1,13 @@
+all: regexp_test
+
+# if using fink on darwin
+# you need these additional flags
+CPPFLAGS = -I/sw/include -L/sw/lib
+
+regexp_test: regex_wrap.cpp
+	$(CXX) regex_wrap.cpp -o regex_wrap $(CPPFLAGS) \
+	-I/usr/include/lua5.1 -I/usr/include/boost \
+	-llua5.1 -lluabind -lboost_regex
+
+clean:
+	rm -f regex_wrap *.o *~
--- luabind.orig/examples/regexp/regex_wrap.cpp
+++ luabind/examples/regexp/regex_wrap.cpp
@@ -51,7 +51,7 @@
 
     wrap_regex(L);
 
-    lua_dofile(L, "regex.lua");
+    lua_dofile(L, "./regex.lua");
 
     lua_close(L);
 }
--- /dev/null
+++ luabind/examples/regexp/README
@@ -0,0 +1,3 @@
+this example shows regex possibilities of luabind using boost_regex.
+It builds executable regex_wrap.
+Needed: libluabind-dev, libboost-regex-dev
--- /dev/null
+++ luabind/examples/regexp/cln/Makefile
@@ -0,0 +1,9 @@
+all: cln_test
+
+cln_test: cln_test.cpp
+	$(CXX) cln_test.cpp -o cln_test \
+	-I/usr/include/lua5.1 -I/usr/include/boost \ 
+	-lluabind -llua -llualib -lcln
+
+clean:
+	rm -f cln_test *.o *~
--- luabind.orig/examples/cln/cln_test.cpp
+++ luabind/examples/cln/cln_test.cpp
@@ -114,7 +114,7 @@
 
     bind_cln(L);
 
-    lua_dofile(L, "cln_test.lua");
+    lua_dofile(L, "./cln_test.lua");
 
     lua_close(L);
     return 0;