Changeset 7759

Show
Ignore:
Timestamp:
10/28/05 19:24:02 (3 years ago)
Author:
rafl
Message:

r18815@ata: rafl | 2005-10-28 19:24:35 +0200

  • Make pugs detection a bit more portable.
  • Embed parrot in the debian package as default.
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • Makefile.PL

    r7758 r7759  
    248248    if ($ENV{PUGS_EMBED} and $ENV{PUGS_EMBED} =~ /\bparrot\b/i) { 
    249249        my $base = $ENV{PARROT_PATH}; 
    250                 chomp(my $parrot_config = `which parrot-config.imc 2>/dev/null`); 
     250                my $parrot_config; 
     251                for my $item (split(/:/, $ENV{PATH})) { 
     252                        my $path = File::Spec->catfile($item, 'parrot-config.imc'); 
     253                        $parrot_config = $path, last if -e $path; 
     254                } 
    251255                if (!$base && -e $parrot_config) { 
    252256                        $base = (File::Spec->splitpath($parrot_config))[1]; 
     
    263267        my $libs = parrot_config($base, 'libs'); 
    264268        my $icuflags = parrot_config($base, 'icu_shared'); 
     269                my $include_path = parrot_config($base, 'prefix') . parrot_config($base, 'inc'); 
    265270 
    266271        # strip non-GHC flags 
     
    268273        $libs =~ s/-[^IlL]\S*//g; 
    269274        $icuflags =~ s/-[^IlL]\S*//g; 
    270  
    271         $embed_flags .= " -I$base/include -L$base/blib/lib -DPUGS_HAVE_PARROT -L$base/blib/lib -L/usr/local/lib $ldflags "; 
     275        $include_path =~ s/-[^IlL]\S*//g; 
     276 
     277        $embed_flags .= " -I$include_path -I$base/include -L$base/blib/lib -DPUGS_HAVE_PARROT -L$base/blib/lib -L/usr/local/lib $ldflags "; 
    272278        $ghc_output .= " -lparrot $libs $icuflags "; 
    273279        my $config = "$base/src/parrot_config$Config{_o}"; 
  • debian/rules

    r7641 r7759  
    1616configure-stamp: patch-stamp 
    1717        dh_testdir 
    18         PUGS_EMBED=perl5 perl Makefile.PL INSTALLDIRS=vendor DESTDIR=/usr/lib/haskell-packages/ghc6/ 
     18        PUGS_EMBED=perl5,parrot perl Makefile.PL INSTALLDIRS=vendor DESTDIR=/usr/lib/haskell-packages/ghc6/ 
    1919        touch configure-stamp 
    2020