fix-IDE-data-file-location.patch 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Description: Align fp IDE template file paths with Debian standards
  2. The fp IDE looks for template files in /usr/bin where itself is installed.
  3. However this is not conform with Debian stadard for file locations.
  4. This patch fixes this by making the IDE looking for templates in the base
  5. installation directory.
  6. Author: Abou Al Montacir <abou.almontacir@sfr.fr>
  7. Index: fpc/fpcsrc/packages/ide/fpmake.pp
  8. ===================================================================
  9. --- fpc.orig/fpcsrc/packages/ide/fpmake.pp
  10. +++ fpc/fpcsrc/packages/ide/fpmake.pp
  11. @@ -282,16 +282,16 @@ begin
  12. T.Directory:='compiler';
  13. T.Install:=false;
  14. - P.InstallFiles.Add('fp.ans','$(bininstalldir)');
  15. - P.InstallFiles.Add('gplprog.pt','$(bininstalldir)');
  16. - P.InstallFiles.Add('gplunit.pt','$(bininstalldir)');
  17. - P.InstallFiles.Add('program.pt','$(bininstalldir)');
  18. - P.InstallFiles.Add('unit.pt','$(bininstalldir)');
  19. - P.InstallFiles.Add('cvsco.tdf','$(bininstalldir)');
  20. - P.InstallFiles.Add('cvsdiff.tdf','$(bininstalldir)');
  21. - P.InstallFiles.Add('cvsup.tdf','$(bininstalldir)');
  22. - P.InstallFiles.Add('grep.tdf','$(bininstalldir)');
  23. - P.InstallFiles.Add('tpgrep.tdf','$(bininstalldir)');
  24. + P.InstallFiles.Add('fp.ans','$(baseinstalldir)/ide');
  25. + P.InstallFiles.Add('gplprog.pt','$(baseinstalldir)/ide');
  26. + P.InstallFiles.Add('gplunit.pt','$(baseinstalldir)/ide');
  27. + P.InstallFiles.Add('program.pt','$(baseinstalldir)/ide');
  28. + P.InstallFiles.Add('unit.pt','$(baseinstalldir)/ide');
  29. + P.InstallFiles.Add('cvsco.tdf','$(baseinstalldir)/ide');
  30. + P.InstallFiles.Add('cvsdiff.tdf','$(baseinstalldir)/ide');
  31. + P.InstallFiles.Add('cvsup.tdf','$(baseinstalldir)/ide');
  32. + P.InstallFiles.Add('grep.tdf','$(baseinstalldir)/ide');
  33. + P.InstallFiles.Add('tpgrep.tdf','$(baseinstalldir)/ide');
  34. P.InstallFiles.Add('fp32.ico', [win32, win64], '$(bininstalldir)');
  35. with P.Sources do
  36. Index: fpc/fpcsrc/packages/ide/fpini.pas
  37. ===================================================================
  38. --- fpc.orig/fpcsrc/packages/ide/fpini.pas
  39. +++ fpc/fpcsrc/packages/ide/fpini.pas
  40. @@ -178,12 +178,12 @@ begin
  41. end;
  42. {$endif WINDOWS}
  43. {$else}
  44. - SystemIDEDir:=FExpand(DirOf(system.paramstr(0))+'../lib/fpc/'+version_string+'/ide/text');
  45. + SystemIDEDir:=FExpand(DirOf(system.paramstr(0))+'../lib/fpc/'+version_string+'/ide');
  46. If Not ExistsDir(SystemIDEdir) Then
  47. begin
  48. - SystemIDEDir:=FExpand(DirOf(system.paramstr(0))+'../lib64/fpc/'+version_string+'/ide/text');
  49. + SystemIDEDir:=FExpand(DirOf(system.paramstr(0))+'../lib64/fpc/'+version_string+'/ide');
  50. If Not ExistsDir(SystemIDEdir) Then
  51. - SystemIDEDir:='/usr/lib/fpc/'+version_string+'/ide/text';
  52. + SystemIDEDir:='/usr/lib/fpc/'+version_string+'/ide';
  53. end;
  54. IDEdir:=CompleteDir(FExpand('~/.fp'));
  55. If Not ExistsDir(IDEdir) Then
  56. Index: fpc/fpcsrc/packages/ide/fptemplt.pas
  57. ===================================================================
  58. --- fpc.orig/fpcsrc/packages/ide/fptemplt.pas
  59. +++ fpc/fpcsrc/packages/ide/fptemplt.pas
  60. @@ -280,6 +280,7 @@ begin
  61. New(Templates, Init(10,10));
  62. ScanDir('.');
  63. ScanDir(IDEDir);
  64. + ScanDir(SystemIDEDir);
  65. end;