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