Package: neko / 2.0.0-3

include-and-link.diff Patch series | download
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
## include-and-link.diff by Jens Peter Secher <jps@debian.org>
##
## Use the right include directories, shared libraries and cflags.
## Use -rpath to force search in /usr/lib/neko.

Index: b/src/tools/install.neko
===================================================================
--- a/src/tools/install.neko
+++ b/src/tools/install.neko
@@ -43,11 +43,6 @@
 // LIBS DATAS
 
 libs = {
-	mod_neko => {
-		src => $array("../../vm/stats","mod_neko","cgi"),
-		inc => "httpd.h",
-		incname => "Apache 1.3.x"
-	},
 	mod_neko2 => {
 		src => $array("../../vm/stats","mod_neko","cgi"),
 		inc => $array("httpd.h","apr.h"),
@@ -59,15 +54,8 @@
 	mysql => {
 		src => $array("mysql"),
 		inc => "mysql.h",
-		incname => "MySQL 4.+"
-		lib => "libmysqlclient_r.a",
-		lparams => "-lz -lssl"
-	},
-	mysql5 => {
-		src => $array("../common/sha1","../common/socket","my_proto/my_proto","my_proto/my_api","mysql"),
-		inc => $array(),
-		realdir => "mysql",
-		cflags => "-Imy_proto -I../common",
+		incname => "MySQL"
+		lparams => "-lmysqlclient"
 	},
 	regexp => {
 		src => $array("regexp"),
@@ -92,13 +80,7 @@
 		inc => switch system { "Mac" => "Carbon.h" default => "gtk/gtk.h" },
 		incname => switch system { "Mac" => "Carbon" default => "GTK+2.0" },
 		cflags => switch system { "Mac" => "" default => "`pkg-config --cflags gtk+-2.0`" },
-		lparams => switch system { "Mac" => "-framework Carbon" default => "`pkg-config --libs gtk+-2.0` -lgthread-2.0" },
-	},
-	mod_tora => {
-		src => $array("../common/socket","protocol","mod_tora"),
-		inc => "httpd.h",
-		incname => "Apache 1.3.x",
-		cflags => "-I../common",
+		lparams => switch system { "Mac" => "-framework Carbon" default => "-lgthread-2.0" },
 	},
 	mod_tora2 => {
 		src => $array("../common/socket","protocol","mod_tora"),
@@ -121,15 +103,14 @@
 
 // PLATFORM
 
-cflags = "-O3 -fPIC";
+cflags = "-O3 -DEAPI -fPIC -pthread $(pkg-config --cflags apr-1)";
 if( system == "Linux" ) cflags += " -pthread";
 cc = getenv("CC");
 if( cc == null ) cc = "gcc";
 linkcmd = switch system { "BSD" => "ld" default => cc };
-linkneko = "-lneko";
 linkoptions = switch system {
 	"Mac" => "-bundle -undefined dynamic_lookup -L../../bin"
-	default => "-shared -L../../bin -pthread"
+	default => "-shared -L../../bin -pthread -lneko" 
 };
 nekovm = switch system { "Windows" => "..\\bin\\neko" default => "../bin/neko" };
 
@@ -142,40 +123,16 @@
 search_includes = function(isap2) {
 	var inc1 = $array(
 		"/usr/include",
-		"/usr/local/include/mysql",
 		"/usr/include/mysql",
-		"/usr/local/include",
 		"/usr/include/gtk-2.0",
-		"/opt/local/include",
-		"/opt/local/include/mysql",
-		"/opt/local/include/mysql5/mysql",
 		"/Developer/Headers/FlatCarbon",
 	);
 	var inc2;
-	if( isap2 )
-		inc2 = $array(
-			"/usr/local/apache2/include",
-			"/usr/include/apache2",
-			"/opt/local/apache2/include",
-			"/usr/include/apr-1",
-			"/usr/include/apr-1.0",
-			"/usr/include/apr-0",
-			"/usr/local/include/apr-1",
-			"/usr/local/include/apr-1.0",
-			"/usr/local/include/apr-0",
-			"/opt/local/include/apr-1",
-			"/opt/local/include/apr-1.0",
-			"/opt/local/include/apr-0"
-		);
-	else
-		inc2 = $array(
-			"/usr/apache/include",
-			"/usr/include/apache-1.3",
-			"/usr/include/httpd",
-			"/opt/local/include/apache",
-			"/opt/local/include/httpd",
-			"/usr/local/apache/include"
-		);
+	inc2 = $array(
+		"/usr/include/apache2",
+		"/usr/include/apr-1",
+		"/usr/include/apr-1.0",
+	);
 	return $aconcat($array(inc1,inc2));
 }
 
@@ -185,11 +142,6 @@
 	cwd,
 	"/usr/lib",
 	"/usr/lib/mysql",
-	"/usr/local/lib",
-	"/usr/local/lib/mysql",
-	"/opt/local/lib",
-	"/opt/local/lib/mysql",
-	"/opt/local/lib/mysql5/mysql",
 );
 
 exec = function(cmd) {
@@ -303,8 +255,6 @@
 		dir[0] + ".o"
 	}));
 	var opt = linkoptions;
-	if( target != "mod_tora" && target != "mod_tora2" )
-		opt += " "+linkneko;
 	var cmd = linkcmd+" "+make("-L",libraries);
 	var out = " -o ../../bin/"+target+".ndll ";
 	exec(cmd+out+files+params1+params2+" "+opt);