* Added a tool `mono-dll-fixer' to absolutise the DLL maps in the
`*.dll.config' files corresponding to CLR assemblies. I.e., the full path to native libraries is included in the maps. In effect this allows us to set the equivalent of an RPATH for assemblies. * gtk-sharp: use the DLL fixer. It's not perfect yet: I still have to set the LD_LIBRARY_PATH for monodoc to include the gtk-sharp lib directory itself, so that it can find the `*sharpglue.so' files. This seems to be gtk-sharp's fault; it doesn't have an entry for those libraries in its DLL maps. svn path=/nixpkgs/trunk/; revision=2330
This commit is contained in:
parent
e348ecff74
commit
9efa069a65
|
@ -1,7 +1,7 @@
|
|||
{stdenv, fetchurl, mono, gtksharp, pkgconfig}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "MonoDoc-1.0.6";
|
||||
name = "monodoc-1.0.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://www.go-mono.com/archive/1.0.6/monodoc-1.0.6.tar.gz;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
. $stdenv/setup
|
||||
. $substituter
|
||||
|
||||
substitute $dllFixer $out --subst-var-by perl $perl/bin/perl
|
||||
chmod +x $out
|
|
@ -0,0 +1,9 @@
|
|||
{stdenv, perl}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "mono-dll-fixer";
|
||||
builder = ./builder.sh;
|
||||
substituter = ../substitute/substitute.sh;
|
||||
dllFixer = ./dll-fixer.pl;
|
||||
inherit perl;
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
#! @perl@ -w
|
||||
|
||||
use strict;
|
||||
|
||||
my @paths = split ' ', $ENV{"ALL_INPUTS"};
|
||||
|
||||
open IN, "<$ARGV[0]" or die;
|
||||
open OUT, ">$ARGV[0].tmp" or die;
|
||||
|
||||
while (<IN>) {
|
||||
# !!! should use a real XML library here.
|
||||
if (!/<dllmap dll="(.*)" target="(.*)"\/>/) {
|
||||
print OUT;
|
||||
next;
|
||||
}
|
||||
my $dll = $1;
|
||||
my $target = $2;
|
||||
|
||||
foreach my $path (@paths) {
|
||||
my $fullPath = "$path/lib/$target";
|
||||
if (-e "$fullPath") {
|
||||
$target = $fullPath;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
print OUT " <dllmap dll=\"$dll\" target=\"$target\"/>\n";
|
||||
}
|
||||
|
||||
close IN;
|
||||
|
||||
rename "$ARGV[0].tmp", "$ARGV[0]" or die "cannot rename $ARGV[0]";
|
|
@ -0,0 +1,11 @@
|
|||
. $stdenv/setup
|
||||
|
||||
genericBuild
|
||||
|
||||
# !!! hack
|
||||
export ALL_INPUTS=$pkgs
|
||||
|
||||
find $out -name "*.dll.config" | while read configFile; do
|
||||
echo "modifying config file $configFile"
|
||||
$monoDLLFixer "$configFile"
|
||||
done
|
|
@ -10,22 +10,23 @@
|
|||
, libgnomeui ? null
|
||||
, libgnomeprint ? null
|
||||
, libgnomeprintui ? null
|
||||
, libxml2 } :
|
||||
, libxml2
|
||||
, monoDLLFixer
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "gtk-sharp-1.0.6";
|
||||
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://www.go-mono.com/archive/1.0.6/gtk-sharp-1.0.6.tar.gz;
|
||||
md5 = "2651d14fe77174ab20b8af53d150ee11";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
pkgconfig mono glib pango gtk gconf libglade libgnomecanvas
|
||||
libgtkhtml libgnomeui libgnomeprint libgnomeprintui gtkhtml libxml2
|
||||
|
||||
];
|
||||
|
||||
inherit monoDLLFixer;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -390,6 +390,10 @@ rec {
|
|||
inherit (gtkLibs) glib;
|
||||
};
|
||||
|
||||
monoDLLFixer = import ../build-support/mono-dll-fixer {
|
||||
inherit stdenv perl;
|
||||
};
|
||||
|
||||
strategoxt = (import ../development/compilers/strategoxt) {
|
||||
inherit fetchurl stdenv aterm;
|
||||
sdf = sdf_23;
|
||||
|
@ -633,7 +637,7 @@ rec {
|
|||
};
|
||||
|
||||
gtksharp = (import ../development/libraries/gtk-sharp) {
|
||||
inherit fetchurl stdenv mono pkgconfig libxml2;
|
||||
inherit fetchurl stdenv mono pkgconfig libxml2 monoDLLFixer;
|
||||
inherit (gnome) gtk glib pango libglade libgtkhtml gtkhtml
|
||||
libgnomecanvas libgnomeui libgnomeprint
|
||||
libgnomeprintui gconf;
|
||||
|
|
Loading…
Reference in New Issue