000-relocatable.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --- a/aclocal.in
  2. +++ b/aclocal.in
  3. @@ -27,7 +27,8 @@
  4. BEGIN
  5. {
  6. - my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
  7. + my $perllibdir = $ENV{'perllibdir'} ||
  8. + ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@');
  9. unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
  10. }
  11. @@ -58,8 +59,8 @@
  12. # ACLOCAL_PATH environment variable, and reset with the `--system-acdir'
  13. # option.
  14. my @user_includes = ();
  15. -my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
  16. -my @system_includes = ('@datadir@/aclocal');
  17. +my @automake_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . "/../host/share/aclocal-$APIVERSION" : "@datadir@/aclocal-$APIVERSION");
  18. +my @system_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/aclocal' : '@datadir@/aclocal');
  19. # Whether we should copy M4 file in $user_includes[0].
  20. my $install = 0;
  21. --- a/automake.in
  22. +++ b/automake.in
  23. @@ -31,7 +31,8 @@
  24. BEGIN
  25. {
  26. - my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
  27. + my $perllibdir = $ENV{'perllibdir'} ||
  28. + ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@');
  29. unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
  30. # Override SHELL. This is required on DJGPP so that system() uses
  31. --- a/lib/Automake/Config.in
  32. +++ b/lib/Automake/Config.in
  33. @@ -31,7 +31,7 @@
  34. our $PACKAGE = '@PACKAGE@';
  35. our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@';
  36. our $VERSION = '@VERSION@';
  37. -our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
  38. +our $libdir = $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@';
  39. our $perl_threads = @PERL_THREADS@;
  40. 1;