root/sources/wxd.diff

Revision 453, 1.4 kB (checked in by Gregor, 1 year ago)

--

  • wxd/dsss.conf

    old new  
     1name = wxd 
     2 
     3[+wxc] 
     4prebuild = make -C wxc 
     5preinstall = make -C wxc install prefix=$PREFIX 
     6preclean = make -C wxc clean 
     7version (GNU) { 
     8    prebuild += COMPILER=GNU 
     9    preinstall += COMPILER=GNU 
     10    preclean += COMPILER=GNU 
     11} else { 
     12    prebuild += COMPILER=DMD 
     13    preinstall += COMPILER=DMD 
     14    preclean += COMPILER=DMD 
     15} 
     16 
     17[wx] 
     18exclude = wx/ogl/ogl.d wx/DbGrid.d wx/libs.d 
     19prebuild = mkwxlibs.d 
     20postinstall = install wx/libs.d $INCLUDE_PREFIX/wx 
  • wxd/mkwxlibs.d

    old new  
     1import std.file; 
     2import std.stdio; 
     3import std.string; 
     4 
     5import hcf.process; 
     6 
     7int main() 
     8{ 
     9    PStream ps = new PStream("wx-config --libs"); 
     10    char[] pss, fout; 
     11    char[][] libs; 
     12    pss = ps.readLine(); 
     13    ps.close(); 
     14     
     15    fout = "version (build) { pragma(link, \"wxc\""; 
     16     
     17    libs = split(pss); 
     18    foreach (lib; libs) { 
     19        if (lib.length < 2 || 
     20            lib[0..2] != "-l") continue; 
     21        fout ~= ", \"" ~ lib[2..$] ~ "\""; 
     22    } 
     23    fout ~= "); }\n"; 
     24     
     25    std.file.write("wx/libs.d", cast(void[]) fout); 
     26     
     27    return 0; 
     28} 
Note: See TracBrowser for help on using the browser.