diff -ruN dsss.conf dsss.conf --- dsss.conf 1969-12-31 16:00:00.000000000 -0800 +++ dsss.conf 2006-11-28 00:12:43.000000000 -0800 @@ -0,0 +1,22 @@ +name = minwin + +[*] +version (!Windows) { + version (GNU) { + buildflags = -fversion=GTK + } else { + buildflags = -version=GTK + } +} + +[minwin] +prebuild = genlibs.d + +exclude = minwin/libs.d minwin/motif.d minwin/samples/* +version (Windows) { + exclude += minwin/gtk.d minwin/x11.d +} else { + exclude += minwin/win32.d minwin/mswindows.d +} + +postinstall = install minwin/libs.d $INCLUDE_PREFIX/minwin diff -ruN genlibs.d genlibs.d --- genlibs.d 1969-12-31 16:00:00.000000000 -0800 +++ genlibs.d 2006-11-28 00:14:34.000000000 -0800 @@ -0,0 +1,64 @@ +/** + * Generate libs.d for minwin + * + * Authors: + * Gregor Richards + * + * License: + * Copyright (c) 2006 Gregor Richards + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +import std.file; +import std.stdio; +import std.string; + +import hcf.process; + +int main() +{ + char[] libsbuf; + + version (Windows) {} else { + // use pkg-config + PStream ps = new PStream("pkg-config --libs gtk+-2.0"); + char[] pss; + char[][] libs; + pss = ps.readLine(); + ps.close(); + + libsbuf = "version (build) { pragma(link"; + + libs = split(pss); + foreach (lib; libs) { + if (lib.length < 2 || + lib[0..2] != "-l") continue; + libsbuf ~= ", \"" ~ lib[2..$] ~ "\""; + } + libsbuf ~= ");\n"; + + // now make sure it gets set to GTK + libsbuf ~= "pragma(export_version, \"GTK\"); }\n"; + } + + std.file.write("minwin/libs.d", cast(void[]) libsbuf); + + return 0; +} diff -ruN minwin/all.d minwin/all.d --- minwin/all.d 2006-11-28 05:16:08.000000000 -0800 +++ minwin/all.d 2006-11-28 00:08:02.000000000 -0800 @@ -33,4 +33,5 @@ import minwin.listbox; import minwin.canvas; import minwin.scroll; + import minwin.libs; } diff -ruN minwin/button.d minwin/button.d --- minwin/button.d 2006-11-28 05:21:34.000000000 -0800 +++ minwin/button.d 2006-11-28 00:03:14.000000000 -0800 @@ -18,6 +18,7 @@ import minwin.peerimpl; import minwin.logging; import std.string; + import std.c.string; import minwin.peer; } diff -ruN minwin/combo.d minwin/combo.d --- minwin/combo.d 2006-05-20 19:07:38.000000000 -0700 +++ minwin/combo.d 2006-11-28 00:03:19.000000000 -0800 @@ -15,6 +15,7 @@ import minwin.window; import minwin.peerimpl; import std.string; + import std.c.string; import minwin.logging; } diff -ruN minwin/group.d minwin/group.d --- minwin/group.d 2006-05-20 19:06:54.000000000 -0700 +++ minwin/group.d 2006-11-28 00:03:24.000000000 -0800 @@ -19,6 +19,7 @@ import minwin.peerimpl; import minwin.logging; import std.string; + import std.c.string; } // lightweight group of other children - no peer diff -ruN minwin/label.d minwin/label.d --- minwin/label.d 2006-11-28 05:21:34.000000000 -0800 +++ minwin/label.d 2006-11-28 00:03:29.000000000 -0800 @@ -16,6 +16,7 @@ import minwin.window; import minwin.peerimpl; import std.string; + import std.c.string; import minwin.logging; } diff -ruN minwin/listbox.d minwin/listbox.d --- minwin/listbox.d 2006-11-28 05:21:34.000000000 -0800 +++ minwin/listbox.d 2006-11-28 00:03:33.000000000 -0800 @@ -18,6 +18,7 @@ import minwin.window; import minwin.peerimpl; import std.string; + import std.c.string; import minwin.logging; } diff -ruN minwin/text.d minwin/text.d --- minwin/text.d 2006-11-28 05:21:34.000000000 -0800 +++ minwin/text.d 2006-11-28 00:03:37.000000000 -0800 @@ -16,6 +16,7 @@ import minwin.window; import minwin.peerimpl; import std.string; + import std.c.string; import minwin.logging; } diff -ruN minwin/window.d minwin/window.d --- minwin/window.d 2006-05-20 19:05:04.000000000 -0700 +++ minwin/window.d 2006-11-28 00:03:45.000000000 -0800 @@ -12,6 +12,7 @@ private { import std.string; + import std.c.string; import minwin.peerimpl; import minwin.font; import minwin.event;