[svn:parrot] r36719 - in trunk: config/init tools/dev

allison at svn.parrot.org allison at svn.parrot.org
Sat Feb 14 08:10:30 UTC 2009


Author: allison
Date: Sat Feb 14 08:10:29 2009
New Revision: 36719
URL: https://trac.parrot.org/parrot/changeset/36719

Log:
[install] Fix persistent install location problems with 'runtime' files. Use
proper versioned directories.

Modified:
   trunk/config/init/install.pm
   trunk/tools/dev/install_files.pl

Modified: trunk/config/init/install.pm
==============================================================================
--- trunk/config/init/install.pm	Sat Feb 14 08:07:12 2009	(r36718)
+++ trunk/config/init/install.pm	Sat Feb 14 08:10:29 2009	(r36719)
@@ -91,7 +91,7 @@
         mandir         => $mandir,
 
         # parrot internal use only
-        doc_dir => $datadir . "/doc/parrot",
+        doc_dir => $datadir . "/doc",
     );
 
     return 1;

Modified: trunk/tools/dev/install_files.pl
==============================================================================
--- trunk/tools/dev/install_files.pl	Sat Feb 14 08:07:12 2009	(r36718)
+++ trunk/tools/dev/install_files.pl	Sat Feb 14 08:10:29 2009	(r36719)
@@ -124,9 +124,10 @@
     destdir     => '',
     exec_prefix => '/usr',
     bindir      => '/usr/bin',
-    libdir      => '/usr/lib/parrot',
-    includedir  => '/usr/include/parrot',
-    docdir      => '/usr/share/doc/parrot',
+    libdir      => '/usr/lib',       # parrot/ subdir added below
+    includedir  => '/usr/include',   # parrot/ subdir added below
+    docdir      => '/usr/share/doc', # parrot/ subdir added below
+    version     => '',
     'dry-run'   => 0,
 );
 
@@ -140,6 +141,11 @@
     }
 }
 
+my $parrotdir = "parrot";
+if ($options{version}) {
+    $parrotdir = File::Spec->catdir( $parrotdir, $options{version} );
+}
+
 # We'll report multiple occurrences of the same file
 my %seen;
 
@@ -173,7 +179,12 @@
     @meta{ split( /,/, $meta ) } = ();
     $meta{$_} = 1 for ( keys %meta );          # Laziness
 
-    if ( $meta{lib} ) {
+    if ( /^runtime/ ) {
+	 # have to catch this case early.
+        $dest =~ s/^runtime\/parrot\///;
+        $dest = File::Spec->catdir( $options{libdir}, $parrotdir, $dest );
+    }
+    elsif ( $meta{lib} ) {
 
         # don't allow libraries to be installed into subdirs of libdir
         $dest = File::Spec->catdir( $options{libdir}, basename($dest) );
@@ -188,11 +199,13 @@
         }
     }
     elsif ( $meta{include} ) {
-        $dest =~ s/^include//;
-        $dest = File::Spec->catdir( $options{includedir}, $dest );
+        $dest =~ s/^include\/parrot//;
+        $dest = File::Spec->catdir( $options{includedir}, $parrotdir, $dest );
     }
     elsif ( $meta{doc} ) {
-        $dest = File::Spec->catdir( $options{docdir}, $dest );
+        $dest =~ s/^docs\/resources/resources/; # resources go in the top level of docs
+        $dest =~ s/^docs/pod/; # other docs are actually raw Pod
+        $dest = File::Spec->catdir( $options{docdir}, $parrotdir, $dest );
     }
     elsif ( $meta{pkgconfig} ) {
 
@@ -200,13 +213,10 @@
         # as it is typically done with automake installed packages.  If there
         # is a use case to make this configurable we'll add a seperate
         # --pkgconfigdir option.
-        $dest = File::Spec->catdir( $options{libdir}, 'pkgconfig', $dest );
-    }
-    elsif ( /\[library]/ ) {
-        $dest =~ s/^runtime/$options{libdir}/;
+        $dest = File::Spec->catdir( $options{libdir}, 'pkgconfig', $parrotdir, $dest );
     }
     else {
-        $dest = File::Spec->catdir( $options{prefix}, $dest );
+        die "Unknown install location in MANIFEST: $_";
     }
 
     $dest = File::Spec->catdir( $options{buildprefix}, $dest )


More information about the parrot-commits mailing list