View Issue Details

IDProjectCategoryView StatusLast Update
0036409PatchesIDEpublic2019-12-15 22:36
ReporterCudaText manAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionreopened 
Product Version2.1 (SVN)Product Build 
Target VersionFixed in Version 
Summary0036409: IDE target OS - DragonFlyBSD
DescriptionAdds possible target OS.
Also replaced many CompareText(s1, s2)=0 to SameText(s1, s2).
TagsNo tags attached.
Fixed in Revisionr62401, r62403
LazTarget-
Widgetset
Attached Files
  • dr.diff (6,666 bytes)
    Index: components/codetools/definetemplates.pas
    ===================================================================
    --- components/codetools/definetemplates.pas	(revision 62360)
    +++ components/codetools/definetemplates.pas	(working copy)
    @@ -109,11 +109,11 @@
       VirtualTempDir='TEMPORARYDIRECTORY';
       
       // FPC operating systems and processor types
    -  FPCOperatingSystemNames: array[1..35] of shortstring =(
    +  FPCOperatingSystemNames: array[1..36] of shortstring =(
          'linux',
          'win32','win64','wince',
          'darwin','macos',
    -     'freebsd','netbsd','openbsd',
    +     'freebsd','netbsd','openbsd','dragonfly',
          'aix',
          'amiga',
          'android',
    @@ -141,7 +141,7 @@
          'wdosx',
          'wii'
         );
    -  FPCOperatingSystemCaptions: array[1..35] of shortstring =(
    +  FPCOperatingSystemCaptions: array[1..36] of shortstring =(
          'AIX',
          'Amiga',
          'Android',
    @@ -149,6 +149,7 @@
          'Atari',
          'BeOS',
          'Darwin',
    +     'DragonFly',
          'Embedded',
          'emx',
          'FreeBSD',
    @@ -213,7 +214,7 @@
         'ECMAScript6'
         );
     
    -  Lazarus_CPU_OS_Widget_Combinations: array[1..91] of shortstring = (
    +  Lazarus_CPU_OS_Widget_Combinations: array[1..111] of shortstring = (
         'i386-linux-gtk',
         'i386-linux-gtk2',
         'i386-linux-qt',
    @@ -235,6 +236,11 @@
         'i386-netbsd-qt',
         'i386-netbsd-qt5',
         'i386-netbsd-nogui',
    +    'i386-dragonfly-gtk',
    +    'i386-dragonfly-gtk2',
    +    'i386-dragonfly-qt',
    +    'i386-dragonfly-qt5',
    +    'i386-dragonfly-nogui',
         'i386-win32-win32',
         'i386-win32-gtk2',
         'i386-win32-qt',
    @@ -294,6 +300,21 @@
         'x86_64-freebsd-qt5',
         'x86_64-freebsd-fpgui',
         'x86_64-freebsd-nogui',
    +    'x86_64-openbsd-gtk2',
    +    'x86_64-openbsd-qt',
    +    'x86_64-openbsd-qt5',
    +    'x86_64-openbsd-fpgui',
    +    'x86_64-openbsd-nogui',
    +    'x86_64-netbsd-gtk2',
    +    'x86_64-netbsd-qt',
    +    'x86_64-netbsd-qt5',
    +    'x86_64-netbsd-fpgui',
    +    'x86_64-netbsd-nogui',
    +    'x86_64-dragonfly-gtk2',
    +    'x86_64-dragonfly-qt',
    +    'x86_64-dragonfly-qt5',
    +    'x86_64-dragonfly-fpgui',
    +    'x86_64-dragonfly-nogui',
         'x86_64-linux-gtk',
         'x86_64-linux-gtk2',
         'x86_64-linux-qt',
    @@ -3611,20 +3632,21 @@
     function GetDefaultSrcOSForTargetOS(const TargetOS: string): string;
     begin
       Result:='';
    -  if (CompareText(TargetOS,'linux')=0)
    -  or (CompareText(TargetOS,'freebsd')=0)
    -  or (CompareText(TargetOS,'netbsd')=0)
    -  or (CompareText(TargetOS,'openbsd')=0)
    -  or (CompareText(TargetOS,'darwin')=0)
    -  or (CompareText(TargetOS,'solaris')=0)
    -  or (CompareText(TargetOS,'haiku')=0)
    -  or (CompareText(TargetOS,'android')=0)
    +  if SameText(TargetOS,'linux')
    +  or SameText(TargetOS,'freebsd')
    +  or SameText(TargetOS,'netbsd')
    +  or SameText(TargetOS,'openbsd')
    +  or SameText(TargetOS,'dragonfly')
    +  or SameText(TargetOS,'darwin')
    +  or SameText(TargetOS,'solaris')
    +  or SameText(TargetOS,'haiku')
    +  or SameText(TargetOS,'android')
       then
         Result:='unix'
       else
    -  if (CompareText(TargetOS,'win32')=0)
    -  or (CompareText(TargetOS,'win64')=0)
    -  or (CompareText(TargetOS,'wince')=0)
    +  if SameText(TargetOS,'win32')
    +  or SameText(TargetOS,'win64')
    +  or SameText(TargetOS,'wince')
       then
         Result:='win';
     end;
    @@ -3632,13 +3654,14 @@
     function GetDefaultSrcOS2ForTargetOS(const TargetOS: string): string;
     begin
       Result:='';
    -  if (CompareText(TargetOS,'freebsd')=0)
    -  or (CompareText(TargetOS,'netbsd')=0)
    -  or (CompareText(TargetOS,'openbsd')=0)
    -  or (CompareText(TargetOS,'darwin')=0)
    +  if SameText(TargetOS,'freebsd')
    +  or SameText(TargetOS,'netbsd')
    +  or SameText(TargetOS,'openbsd')
    +  or SameText(TargetOS,'dragonfly')
    +  or SameText(TargetOS,'darwin')
       then
         Result:='bsd'
    -  else if (CompareText(TargetOS,'android')=0) then
    +  else if SameText(TargetOS,'android') then
         Result:='linux';
     end;
     
    @@ -3645,8 +3668,8 @@
     function GetDefaultSrcCPUForTargetCPU(const TargetCPU: string): string;
     begin
       Result:='';
    -  if (CompareText(TargetCPU,'i386')=0)
    -  or (CompareText(TargetCPU,'x86_64')=0)
    +  if SameText(TargetCPU,'i386')
    +  or SameText(TargetCPU,'x86_64')
       then
         Result:='x86';
     end;
    Index: ide/buildlazdialog.pas
    ===================================================================
    --- ide/buildlazdialog.pas	(revision 62360)
    +++ ide/buildlazdialog.pas	(working copy)
    @@ -1066,6 +1066,7 @@
           Add('Linux');
           Add('NetBSD');
           Add('OpenBSD');
    +      Add('DragonFly');
           Add('Solaris');
           Add('Win32');
           Add('Win64');
    Index: ide/compileroptions.pp
    ===================================================================
    --- ide/compileroptions.pp	(revision 62360)
    +++ ide/compileroptions.pp	(working copy)
    @@ -713,7 +713,7 @@
     begin
       Result:= (TargetCPU='x86_64')
         and ((TargetOS='linux') or (TargetOS='freebsd') or (TargetOS='netbsd')
    -      or (TargetOS='openbsd') or (TargetOS='solaris'));
    +      or (TargetOS='openbsd') or (TargetOS='dragonfly') or (TargetOS='solaris'));
     end;
     
     procedure GatherInheritedOptions(AddOptionsList: TFPList;
    Index: ide/lazconf.pp
    ===================================================================
    --- ide/lazconf.pp	(revision 62360)
    +++ ide/lazconf.pp	(working copy)
    @@ -347,16 +347,17 @@
     begin
       if TargetOS='' then
         TargetOS:=GetCompiledTargetOS;
    -  if CompareText(copy(TargetOS,1,3), 'win') = 0 then
    +  if SameText(copy(TargetOS,1,3), 'win') then
         Result:='.dll'
    -  else if CompareText(TargetOS, 'darwin') = 0 then
    +  else if SameText(TargetOS, 'darwin') then
         Result:='.dylib'
    -  else if (CompareText(TargetOS, 'linux') = 0)
    -  or (CompareText(TargetOS, 'android') = 0)
    -  or (CompareText(TargetOS, 'freebsd') = 0)
    -  or (CompareText(TargetOS, 'openbsd') = 0)
    -  or (CompareText(TargetOS, 'netbsd') = 0)
    -  or (CompareText(TargetOS, 'haiku') = 0) then
    +  else if SameText(TargetOS, 'linux')
    +  or SameText(TargetOS, 'android')
    +  or SameText(TargetOS, 'freebsd')
    +  or SameText(TargetOS, 'openbsd')
    +  or SameText(TargetOS, 'netbsd')
    +  or SameText(TargetOS, 'dragonfly')
    +  or SameText(TargetOS, 'haiku') then
         Result:='.so'
       else
         Result:='';
    @@ -393,10 +394,11 @@
       if StdPrefix<>'' then
         Result:=ExtractFilePath(Result)+StdPrefix+ExtractFileName(Result);
       // lowercase
    -  if (CompareText(TargetOS,'linux')=0)
    -  or (CompareText(TargetOS,'freebsd')=0)
    -  or (CompareText(TargetOS,'netbsd')=0)
    -  or (CompareText(TargetOS,'openbsd')=0)
    +  if SameText(TargetOS,'linux')
    +  or SameText(TargetOS,'freebsd')
    +  or SameText(TargetOS,'netbsd')
    +  or SameText(TargetOS,'openbsd')
    +  or SameText(TargetOS,'dragonfly')
       then
         Result:=ExtractFilePath(Result)+lowercase(ExtractFileName(Result));
     end;
    
    dr.diff (6,666 bytes)
  • dfix.diff (4,365 bytes)
    Index: components/codetools/definetemplates.pas
    ===================================================================
    --- components/codetools/definetemplates.pas	(revision 62378)
    +++ components/codetools/definetemplates.pas	(working copy)
    @@ -109,11 +109,11 @@
       VirtualTempDir='TEMPORARYDIRECTORY';
       
       // FPC operating systems and processor types
    -  FPCOperatingSystemNames: array[1..35] of shortstring =(
    +  FPCOperatingSystemNames: array[1..36] of shortstring =(
          'linux',
          'win32','win64','wince',
          'darwin','macos',
    -     'freebsd','netbsd','openbsd',
    +     'freebsd','netbsd','openbsd','dragonfly',
          'aix',
          'amiga',
          'android',
    @@ -141,7 +141,7 @@
          'wdosx',
          'wii'
         );
    -  FPCOperatingSystemCaptions: array[1..35] of shortstring =(
    +  FPCOperatingSystemCaptions: array[1..36] of shortstring =(
          'AIX',
          'Amiga',
          'Android',
    @@ -149,6 +149,7 @@
          'Atari',
          'BeOS',
          'Darwin',
    +     'DragonFly',
          'Embedded',
          'emx',
          'FreeBSD',
    @@ -213,7 +214,7 @@
         'ECMAScript6'
         );
     
    -  Lazarus_CPU_OS_Widget_Combinations: array[1..91] of shortstring = (
    +  Lazarus_CPU_OS_Widget_Combinations: array[1..111] of shortstring = (
         'i386-linux-gtk',
         'i386-linux-gtk2',
         'i386-linux-qt',
    @@ -235,6 +236,11 @@
         'i386-netbsd-qt',
         'i386-netbsd-qt5',
         'i386-netbsd-nogui',
    +    'i386-dragonfly-gtk',
    +    'i386-dragonfly-gtk2',
    +    'i386-dragonfly-qt',
    +    'i386-dragonfly-qt5',
    +    'i386-dragonfly-nogui',
         'i386-win32-win32',
         'i386-win32-gtk2',
         'i386-win32-qt',
    @@ -294,6 +300,21 @@
         'x86_64-freebsd-qt5',
         'x86_64-freebsd-fpgui',
         'x86_64-freebsd-nogui',
    +    'x86_64-openbsd-gtk2',
    +    'x86_64-openbsd-qt',
    +    'x86_64-openbsd-qt5',
    +    'x86_64-openbsd-fpgui',
    +    'x86_64-openbsd-nogui',
    +    'x86_64-netbsd-gtk2',
    +    'x86_64-netbsd-qt',
    +    'x86_64-netbsd-qt5',
    +    'x86_64-netbsd-fpgui',
    +    'x86_64-netbsd-nogui',
    +    'x86_64-dragonfly-gtk2',
    +    'x86_64-dragonfly-qt',
    +    'x86_64-dragonfly-qt5',
    +    'x86_64-dragonfly-fpgui',
    +    'x86_64-dragonfly-nogui',
         'x86_64-linux-gtk',
         'x86_64-linux-gtk2',
         'x86_64-linux-qt',
    @@ -3615,6 +3636,7 @@
       or (CompareText(TargetOS,'freebsd')=0)
       or (CompareText(TargetOS,'netbsd')=0)
       or (CompareText(TargetOS,'openbsd')=0)
    +  or (CompareText(TargetOS,'dragonfly')=0)
       or (CompareText(TargetOS,'darwin')=0)
       or (CompareText(TargetOS,'solaris')=0)
       or (CompareText(TargetOS,'haiku')=0)
    @@ -3635,6 +3657,7 @@
       if (CompareText(TargetOS,'freebsd')=0)
       or (CompareText(TargetOS,'netbsd')=0)
       or (CompareText(TargetOS,'openbsd')=0)
    +  or (CompareText(TargetOS,'dragonfly')=0)
       or (CompareText(TargetOS,'darwin')=0)
       then
         Result:='bsd'
    Index: ide/buildlazdialog.pas
    ===================================================================
    --- ide/buildlazdialog.pas	(revision 62378)
    +++ ide/buildlazdialog.pas	(working copy)
    @@ -1066,6 +1066,7 @@
           Add('Linux');
           Add('NetBSD');
           Add('OpenBSD');
    +      Add('DragonFly');
           Add('Solaris');
           Add('Win32');
           Add('Win64');
    Index: ide/compileroptions.pp
    ===================================================================
    --- ide/compileroptions.pp	(revision 62378)
    +++ ide/compileroptions.pp	(working copy)
    @@ -713,7 +713,7 @@
     begin
       Result:= (TargetCPU='x86_64')
         and ((TargetOS='linux') or (TargetOS='freebsd') or (TargetOS='netbsd')
    -      or (TargetOS='openbsd') or (TargetOS='solaris'));
    +      or (TargetOS='openbsd') or (TargetOS='dragonfly') or (TargetOS='solaris'));
     end;
     
     procedure GatherInheritedOptions(AddOptionsList: TFPList;
    Index: ide/lazconf.pp
    ===================================================================
    --- ide/lazconf.pp	(revision 62378)
    +++ ide/lazconf.pp	(working copy)
    @@ -356,6 +356,7 @@
       or (CompareText(TargetOS, 'freebsd') = 0)
       or (CompareText(TargetOS, 'openbsd') = 0)
       or (CompareText(TargetOS, 'netbsd') = 0)
    +  or (CompareText(TargetOS, 'dragonfly') = 0)
       or (CompareText(TargetOS, 'haiku') = 0) then
         Result:='.so'
       else
    @@ -397,6 +398,7 @@
       or (CompareText(TargetOS,'freebsd')=0)
       or (CompareText(TargetOS,'netbsd')=0)
       or (CompareText(TargetOS,'openbsd')=0)
    +  or (CompareText(TargetOS,'dragonfly')=0)
       then
         Result:=ExtractFilePath(Result)+lowercase(ExtractFileName(Result));
     end;
    
    dfix.diff (4,365 bytes)
  • dfix-2.diff (4,063 bytes)
    Index: components/codetools/definetemplates.pas
    ===================================================================
    --- components/codetools/definetemplates.pas	(revision 62378)
    +++ components/codetools/definetemplates.pas	(working copy)
    @@ -109,11 +109,11 @@
       VirtualTempDir='TEMPORARYDIRECTORY';
       
       // FPC operating systems and processor types
    -  FPCOperatingSystemNames: array[1..35] of shortstring =(
    +  FPCOperatingSystemNames: array[1..36] of shortstring =(
          'linux',
          'win32','win64','wince',
          'darwin','macos',
    -     'freebsd','netbsd','openbsd',
    +     'freebsd','netbsd','openbsd','dragonfly',
          'aix',
          'amiga',
          'android',
    @@ -141,7 +141,7 @@
          'wdosx',
          'wii'
         );
    -  FPCOperatingSystemCaptions: array[1..35] of shortstring =(
    +  FPCOperatingSystemCaptions: array[1..36] of shortstring =(
          'AIX',
          'Amiga',
          'Android',
    @@ -149,6 +149,7 @@
          'Atari',
          'BeOS',
          'Darwin',
    +     'DragonFly',
          'Embedded',
          'emx',
          'FreeBSD',
    @@ -213,7 +214,7 @@
         'ECMAScript6'
         );
     
    -  Lazarus_CPU_OS_Widget_Combinations: array[1..91] of shortstring = (
    +  Lazarus_CPU_OS_Widget_Combinations: array[1..111] of shortstring = (
         'i386-linux-gtk',
         'i386-linux-gtk2',
         'i386-linux-qt',
    @@ -294,6 +300,21 @@
         'x86_64-freebsd-qt5',
         'x86_64-freebsd-fpgui',
         'x86_64-freebsd-nogui',
    +    'x86_64-openbsd-gtk2',
    +    'x86_64-openbsd-qt',
    +    'x86_64-openbsd-qt5',
    +    'x86_64-openbsd-fpgui',
    +    'x86_64-openbsd-nogui',
    +    'x86_64-netbsd-gtk2',
    +    'x86_64-netbsd-qt',
    +    'x86_64-netbsd-qt5',
    +    'x86_64-netbsd-fpgui',
    +    'x86_64-netbsd-nogui',
    +    'x86_64-dragonfly-gtk2',
    +    'x86_64-dragonfly-qt',
    +    'x86_64-dragonfly-qt5',
    +    'x86_64-dragonfly-fpgui',
    +    'x86_64-dragonfly-nogui',
         'x86_64-linux-gtk',
         'x86_64-linux-gtk2',
         'x86_64-linux-qt',
    @@ -3615,6 +3636,7 @@
       or (CompareText(TargetOS,'freebsd')=0)
       or (CompareText(TargetOS,'netbsd')=0)
       or (CompareText(TargetOS,'openbsd')=0)
    +  or (CompareText(TargetOS,'dragonfly')=0)
       or (CompareText(TargetOS,'darwin')=0)
       or (CompareText(TargetOS,'solaris')=0)
       or (CompareText(TargetOS,'haiku')=0)
    @@ -3635,6 +3657,7 @@
       if (CompareText(TargetOS,'freebsd')=0)
       or (CompareText(TargetOS,'netbsd')=0)
       or (CompareText(TargetOS,'openbsd')=0)
    +  or (CompareText(TargetOS,'dragonfly')=0)
       or (CompareText(TargetOS,'darwin')=0)
       then
         Result:='bsd'
    Index: ide/buildlazdialog.pas
    ===================================================================
    --- ide/buildlazdialog.pas	(revision 62378)
    +++ ide/buildlazdialog.pas	(working copy)
    @@ -1066,6 +1066,7 @@
           Add('Linux');
           Add('NetBSD');
           Add('OpenBSD');
    +      Add('DragonFly');
           Add('Solaris');
           Add('Win32');
           Add('Win64');
    Index: ide/compileroptions.pp
    ===================================================================
    --- ide/compileroptions.pp	(revision 62378)
    +++ ide/compileroptions.pp	(working copy)
    @@ -713,7 +713,7 @@
     begin
       Result:= (TargetCPU='x86_64')
         and ((TargetOS='linux') or (TargetOS='freebsd') or (TargetOS='netbsd')
    -      or (TargetOS='openbsd') or (TargetOS='solaris'));
    +      or (TargetOS='openbsd') or (TargetOS='dragonfly') or (TargetOS='solaris'));
     end;
     
     procedure GatherInheritedOptions(AddOptionsList: TFPList;
    Index: ide/lazconf.pp
    ===================================================================
    --- ide/lazconf.pp	(revision 62378)
    +++ ide/lazconf.pp	(working copy)
    @@ -356,6 +356,7 @@
       or (CompareText(TargetOS, 'freebsd') = 0)
       or (CompareText(TargetOS, 'openbsd') = 0)
       or (CompareText(TargetOS, 'netbsd') = 0)
    +  or (CompareText(TargetOS, 'dragonfly') = 0)
       or (CompareText(TargetOS, 'haiku') = 0) then
         Result:='.so'
       else
    @@ -397,6 +398,7 @@
       or (CompareText(TargetOS,'freebsd')=0)
       or (CompareText(TargetOS,'netbsd')=0)
       or (CompareText(TargetOS,'openbsd')=0)
    +  or (CompareText(TargetOS,'dragonfly')=0)
       then
         Result:=ExtractFilePath(Result)+lowercase(ExtractFileName(Result));
     end;
    
    dfix-2.diff (4,063 bytes)
  • fix.diff (500 bytes)
    Index: components/codetools/definetemplates.pas
    ===================================================================
    --- components/codetools/definetemplates.pas	(revision 62401)
    +++ components/codetools/definetemplates.pas	(working copy)
    @@ -214,7 +214,7 @@
         'ECMAScript6'
         );
     
    -  Lazarus_CPU_OS_Widget_Combinations: array[1..111] of shortstring = (
    +  Lazarus_CPU_OS_Widget_Combinations: array[1..106] of shortstring = (
         'i386-linux-gtk',
         'i386-linux-gtk2',
         'i386-linux-qt',
    
    fix.diff (500 bytes)

Activities

CudaText man

2019-12-09 08:58

reporter  

dr.diff (6,666 bytes)
Index: components/codetools/definetemplates.pas
===================================================================
--- components/codetools/definetemplates.pas	(revision 62360)
+++ components/codetools/definetemplates.pas	(working copy)
@@ -109,11 +109,11 @@
   VirtualTempDir='TEMPORARYDIRECTORY';
   
   // FPC operating systems and processor types
-  FPCOperatingSystemNames: array[1..35] of shortstring =(
+  FPCOperatingSystemNames: array[1..36] of shortstring =(
      'linux',
      'win32','win64','wince',
      'darwin','macos',
-     'freebsd','netbsd','openbsd',
+     'freebsd','netbsd','openbsd','dragonfly',
      'aix',
      'amiga',
      'android',
@@ -141,7 +141,7 @@
      'wdosx',
      'wii'
     );
-  FPCOperatingSystemCaptions: array[1..35] of shortstring =(
+  FPCOperatingSystemCaptions: array[1..36] of shortstring =(
      'AIX',
      'Amiga',
      'Android',
@@ -149,6 +149,7 @@
      'Atari',
      'BeOS',
      'Darwin',
+     'DragonFly',
      'Embedded',
      'emx',
      'FreeBSD',
@@ -213,7 +214,7 @@
     'ECMAScript6'
     );
 
-  Lazarus_CPU_OS_Widget_Combinations: array[1..91] of shortstring = (
+  Lazarus_CPU_OS_Widget_Combinations: array[1..111] of shortstring = (
     'i386-linux-gtk',
     'i386-linux-gtk2',
     'i386-linux-qt',
@@ -235,6 +236,11 @@
     'i386-netbsd-qt',
     'i386-netbsd-qt5',
     'i386-netbsd-nogui',
+    'i386-dragonfly-gtk',
+    'i386-dragonfly-gtk2',
+    'i386-dragonfly-qt',
+    'i386-dragonfly-qt5',
+    'i386-dragonfly-nogui',
     'i386-win32-win32',
     'i386-win32-gtk2',
     'i386-win32-qt',
@@ -294,6 +300,21 @@
     'x86_64-freebsd-qt5',
     'x86_64-freebsd-fpgui',
     'x86_64-freebsd-nogui',
+    'x86_64-openbsd-gtk2',
+    'x86_64-openbsd-qt',
+    'x86_64-openbsd-qt5',
+    'x86_64-openbsd-fpgui',
+    'x86_64-openbsd-nogui',
+    'x86_64-netbsd-gtk2',
+    'x86_64-netbsd-qt',
+    'x86_64-netbsd-qt5',
+    'x86_64-netbsd-fpgui',
+    'x86_64-netbsd-nogui',
+    'x86_64-dragonfly-gtk2',
+    'x86_64-dragonfly-qt',
+    'x86_64-dragonfly-qt5',
+    'x86_64-dragonfly-fpgui',
+    'x86_64-dragonfly-nogui',
     'x86_64-linux-gtk',
     'x86_64-linux-gtk2',
     'x86_64-linux-qt',
@@ -3611,20 +3632,21 @@
 function GetDefaultSrcOSForTargetOS(const TargetOS: string): string;
 begin
   Result:='';
-  if (CompareText(TargetOS,'linux')=0)
-  or (CompareText(TargetOS,'freebsd')=0)
-  or (CompareText(TargetOS,'netbsd')=0)
-  or (CompareText(TargetOS,'openbsd')=0)
-  or (CompareText(TargetOS,'darwin')=0)
-  or (CompareText(TargetOS,'solaris')=0)
-  or (CompareText(TargetOS,'haiku')=0)
-  or (CompareText(TargetOS,'android')=0)
+  if SameText(TargetOS,'linux')
+  or SameText(TargetOS,'freebsd')
+  or SameText(TargetOS,'netbsd')
+  or SameText(TargetOS,'openbsd')
+  or SameText(TargetOS,'dragonfly')
+  or SameText(TargetOS,'darwin')
+  or SameText(TargetOS,'solaris')
+  or SameText(TargetOS,'haiku')
+  or SameText(TargetOS,'android')
   then
     Result:='unix'
   else
-  if (CompareText(TargetOS,'win32')=0)
-  or (CompareText(TargetOS,'win64')=0)
-  or (CompareText(TargetOS,'wince')=0)
+  if SameText(TargetOS,'win32')
+  or SameText(TargetOS,'win64')
+  or SameText(TargetOS,'wince')
   then
     Result:='win';
 end;
@@ -3632,13 +3654,14 @@
 function GetDefaultSrcOS2ForTargetOS(const TargetOS: string): string;
 begin
   Result:='';
-  if (CompareText(TargetOS,'freebsd')=0)
-  or (CompareText(TargetOS,'netbsd')=0)
-  or (CompareText(TargetOS,'openbsd')=0)
-  or (CompareText(TargetOS,'darwin')=0)
+  if SameText(TargetOS,'freebsd')
+  or SameText(TargetOS,'netbsd')
+  or SameText(TargetOS,'openbsd')
+  or SameText(TargetOS,'dragonfly')
+  or SameText(TargetOS,'darwin')
   then
     Result:='bsd'
-  else if (CompareText(TargetOS,'android')=0) then
+  else if SameText(TargetOS,'android') then
     Result:='linux';
 end;
 
@@ -3645,8 +3668,8 @@
 function GetDefaultSrcCPUForTargetCPU(const TargetCPU: string): string;
 begin
   Result:='';
-  if (CompareText(TargetCPU,'i386')=0)
-  or (CompareText(TargetCPU,'x86_64')=0)
+  if SameText(TargetCPU,'i386')
+  or SameText(TargetCPU,'x86_64')
   then
     Result:='x86';
 end;
Index: ide/buildlazdialog.pas
===================================================================
--- ide/buildlazdialog.pas	(revision 62360)
+++ ide/buildlazdialog.pas	(working copy)
@@ -1066,6 +1066,7 @@
       Add('Linux');
       Add('NetBSD');
       Add('OpenBSD');
+      Add('DragonFly');
       Add('Solaris');
       Add('Win32');
       Add('Win64');
Index: ide/compileroptions.pp
===================================================================
--- ide/compileroptions.pp	(revision 62360)
+++ ide/compileroptions.pp	(working copy)
@@ -713,7 +713,7 @@
 begin
   Result:= (TargetCPU='x86_64')
     and ((TargetOS='linux') or (TargetOS='freebsd') or (TargetOS='netbsd')
-      or (TargetOS='openbsd') or (TargetOS='solaris'));
+      or (TargetOS='openbsd') or (TargetOS='dragonfly') or (TargetOS='solaris'));
 end;
 
 procedure GatherInheritedOptions(AddOptionsList: TFPList;
Index: ide/lazconf.pp
===================================================================
--- ide/lazconf.pp	(revision 62360)
+++ ide/lazconf.pp	(working copy)
@@ -347,16 +347,17 @@
 begin
   if TargetOS='' then
     TargetOS:=GetCompiledTargetOS;
-  if CompareText(copy(TargetOS,1,3), 'win') = 0 then
+  if SameText(copy(TargetOS,1,3), 'win') then
     Result:='.dll'
-  else if CompareText(TargetOS, 'darwin') = 0 then
+  else if SameText(TargetOS, 'darwin') then
     Result:='.dylib'
-  else if (CompareText(TargetOS, 'linux') = 0)
-  or (CompareText(TargetOS, 'android') = 0)
-  or (CompareText(TargetOS, 'freebsd') = 0)
-  or (CompareText(TargetOS, 'openbsd') = 0)
-  or (CompareText(TargetOS, 'netbsd') = 0)
-  or (CompareText(TargetOS, 'haiku') = 0) then
+  else if SameText(TargetOS, 'linux')
+  or SameText(TargetOS, 'android')
+  or SameText(TargetOS, 'freebsd')
+  or SameText(TargetOS, 'openbsd')
+  or SameText(TargetOS, 'netbsd')
+  or SameText(TargetOS, 'dragonfly')
+  or SameText(TargetOS, 'haiku') then
     Result:='.so'
   else
     Result:='';
@@ -393,10 +394,11 @@
   if StdPrefix<>'' then
     Result:=ExtractFilePath(Result)+StdPrefix+ExtractFileName(Result);
   // lowercase
-  if (CompareText(TargetOS,'linux')=0)
-  or (CompareText(TargetOS,'freebsd')=0)
-  or (CompareText(TargetOS,'netbsd')=0)
-  or (CompareText(TargetOS,'openbsd')=0)
+  if SameText(TargetOS,'linux')
+  or SameText(TargetOS,'freebsd')
+  or SameText(TargetOS,'netbsd')
+  or SameText(TargetOS,'openbsd')
+  or SameText(TargetOS,'dragonfly')
   then
     Result:=ExtractFilePath(Result)+lowercase(ExtractFileName(Result));
 end;
dr.diff (6,666 bytes)

Juha Manninen

2019-12-11 18:59

developer   ~0119759

The CompareText(s1, s2)=0 --> SameText(s1, s2) change is rather useless tweaking, especially because SameText internally calls CompareText.
In any case such a tweak does not belong to a patch that adds a new OS, DragonFlyBSD, to the system.

CudaText man

2019-12-11 21:03

reporter   ~0119769

fixed diff added.

dfix.diff (4,365 bytes)
Index: components/codetools/definetemplates.pas
===================================================================
--- components/codetools/definetemplates.pas	(revision 62378)
+++ components/codetools/definetemplates.pas	(working copy)
@@ -109,11 +109,11 @@
   VirtualTempDir='TEMPORARYDIRECTORY';
   
   // FPC operating systems and processor types
-  FPCOperatingSystemNames: array[1..35] of shortstring =(
+  FPCOperatingSystemNames: array[1..36] of shortstring =(
      'linux',
      'win32','win64','wince',
      'darwin','macos',
-     'freebsd','netbsd','openbsd',
+     'freebsd','netbsd','openbsd','dragonfly',
      'aix',
      'amiga',
      'android',
@@ -141,7 +141,7 @@
      'wdosx',
      'wii'
     );
-  FPCOperatingSystemCaptions: array[1..35] of shortstring =(
+  FPCOperatingSystemCaptions: array[1..36] of shortstring =(
      'AIX',
      'Amiga',
      'Android',
@@ -149,6 +149,7 @@
      'Atari',
      'BeOS',
      'Darwin',
+     'DragonFly',
      'Embedded',
      'emx',
      'FreeBSD',
@@ -213,7 +214,7 @@
     'ECMAScript6'
     );
 
-  Lazarus_CPU_OS_Widget_Combinations: array[1..91] of shortstring = (
+  Lazarus_CPU_OS_Widget_Combinations: array[1..111] of shortstring = (
     'i386-linux-gtk',
     'i386-linux-gtk2',
     'i386-linux-qt',
@@ -235,6 +236,11 @@
     'i386-netbsd-qt',
     'i386-netbsd-qt5',
     'i386-netbsd-nogui',
+    'i386-dragonfly-gtk',
+    'i386-dragonfly-gtk2',
+    'i386-dragonfly-qt',
+    'i386-dragonfly-qt5',
+    'i386-dragonfly-nogui',
     'i386-win32-win32',
     'i386-win32-gtk2',
     'i386-win32-qt',
@@ -294,6 +300,21 @@
     'x86_64-freebsd-qt5',
     'x86_64-freebsd-fpgui',
     'x86_64-freebsd-nogui',
+    'x86_64-openbsd-gtk2',
+    'x86_64-openbsd-qt',
+    'x86_64-openbsd-qt5',
+    'x86_64-openbsd-fpgui',
+    'x86_64-openbsd-nogui',
+    'x86_64-netbsd-gtk2',
+    'x86_64-netbsd-qt',
+    'x86_64-netbsd-qt5',
+    'x86_64-netbsd-fpgui',
+    'x86_64-netbsd-nogui',
+    'x86_64-dragonfly-gtk2',
+    'x86_64-dragonfly-qt',
+    'x86_64-dragonfly-qt5',
+    'x86_64-dragonfly-fpgui',
+    'x86_64-dragonfly-nogui',
     'x86_64-linux-gtk',
     'x86_64-linux-gtk2',
     'x86_64-linux-qt',
@@ -3615,6 +3636,7 @@
   or (CompareText(TargetOS,'freebsd')=0)
   or (CompareText(TargetOS,'netbsd')=0)
   or (CompareText(TargetOS,'openbsd')=0)
+  or (CompareText(TargetOS,'dragonfly')=0)
   or (CompareText(TargetOS,'darwin')=0)
   or (CompareText(TargetOS,'solaris')=0)
   or (CompareText(TargetOS,'haiku')=0)
@@ -3635,6 +3657,7 @@
   if (CompareText(TargetOS,'freebsd')=0)
   or (CompareText(TargetOS,'netbsd')=0)
   or (CompareText(TargetOS,'openbsd')=0)
+  or (CompareText(TargetOS,'dragonfly')=0)
   or (CompareText(TargetOS,'darwin')=0)
   then
     Result:='bsd'
Index: ide/buildlazdialog.pas
===================================================================
--- ide/buildlazdialog.pas	(revision 62378)
+++ ide/buildlazdialog.pas	(working copy)
@@ -1066,6 +1066,7 @@
       Add('Linux');
       Add('NetBSD');
       Add('OpenBSD');
+      Add('DragonFly');
       Add('Solaris');
       Add('Win32');
       Add('Win64');
Index: ide/compileroptions.pp
===================================================================
--- ide/compileroptions.pp	(revision 62378)
+++ ide/compileroptions.pp	(working copy)
@@ -713,7 +713,7 @@
 begin
   Result:= (TargetCPU='x86_64')
     and ((TargetOS='linux') or (TargetOS='freebsd') or (TargetOS='netbsd')
-      or (TargetOS='openbsd') or (TargetOS='solaris'));
+      or (TargetOS='openbsd') or (TargetOS='dragonfly') or (TargetOS='solaris'));
 end;
 
 procedure GatherInheritedOptions(AddOptionsList: TFPList;
Index: ide/lazconf.pp
===================================================================
--- ide/lazconf.pp	(revision 62378)
+++ ide/lazconf.pp	(working copy)
@@ -356,6 +356,7 @@
   or (CompareText(TargetOS, 'freebsd') = 0)
   or (CompareText(TargetOS, 'openbsd') = 0)
   or (CompareText(TargetOS, 'netbsd') = 0)
+  or (CompareText(TargetOS, 'dragonfly') = 0)
   or (CompareText(TargetOS, 'haiku') = 0) then
     Result:='.so'
   else
@@ -397,6 +398,7 @@
   or (CompareText(TargetOS,'freebsd')=0)
   or (CompareText(TargetOS,'netbsd')=0)
   or (CompareText(TargetOS,'openbsd')=0)
+  or (CompareText(TargetOS,'dragonfly')=0)
   then
     Result:=ExtractFilePath(Result)+lowercase(ExtractFileName(Result));
 end;
dfix.diff (4,365 bytes)

Alfred

2019-12-11 22:31

reporter   ~0119774

AFAIK, DragonFly has no i386 support !

CudaText man

2019-12-11 22:45

reporter   ~0119775

Ok, removed x32 support.

dfix-2.diff (4,063 bytes)
Index: components/codetools/definetemplates.pas
===================================================================
--- components/codetools/definetemplates.pas	(revision 62378)
+++ components/codetools/definetemplates.pas	(working copy)
@@ -109,11 +109,11 @@
   VirtualTempDir='TEMPORARYDIRECTORY';
   
   // FPC operating systems and processor types
-  FPCOperatingSystemNames: array[1..35] of shortstring =(
+  FPCOperatingSystemNames: array[1..36] of shortstring =(
      'linux',
      'win32','win64','wince',
      'darwin','macos',
-     'freebsd','netbsd','openbsd',
+     'freebsd','netbsd','openbsd','dragonfly',
      'aix',
      'amiga',
      'android',
@@ -141,7 +141,7 @@
      'wdosx',
      'wii'
     );
-  FPCOperatingSystemCaptions: array[1..35] of shortstring =(
+  FPCOperatingSystemCaptions: array[1..36] of shortstring =(
      'AIX',
      'Amiga',
      'Android',
@@ -149,6 +149,7 @@
      'Atari',
      'BeOS',
      'Darwin',
+     'DragonFly',
      'Embedded',
      'emx',
      'FreeBSD',
@@ -213,7 +214,7 @@
     'ECMAScript6'
     );
 
-  Lazarus_CPU_OS_Widget_Combinations: array[1..91] of shortstring = (
+  Lazarus_CPU_OS_Widget_Combinations: array[1..111] of shortstring = (
     'i386-linux-gtk',
     'i386-linux-gtk2',
     'i386-linux-qt',
@@ -294,6 +300,21 @@
     'x86_64-freebsd-qt5',
     'x86_64-freebsd-fpgui',
     'x86_64-freebsd-nogui',
+    'x86_64-openbsd-gtk2',
+    'x86_64-openbsd-qt',
+    'x86_64-openbsd-qt5',
+    'x86_64-openbsd-fpgui',
+    'x86_64-openbsd-nogui',
+    'x86_64-netbsd-gtk2',
+    'x86_64-netbsd-qt',
+    'x86_64-netbsd-qt5',
+    'x86_64-netbsd-fpgui',
+    'x86_64-netbsd-nogui',
+    'x86_64-dragonfly-gtk2',
+    'x86_64-dragonfly-qt',
+    'x86_64-dragonfly-qt5',
+    'x86_64-dragonfly-fpgui',
+    'x86_64-dragonfly-nogui',
     'x86_64-linux-gtk',
     'x86_64-linux-gtk2',
     'x86_64-linux-qt',
@@ -3615,6 +3636,7 @@
   or (CompareText(TargetOS,'freebsd')=0)
   or (CompareText(TargetOS,'netbsd')=0)
   or (CompareText(TargetOS,'openbsd')=0)
+  or (CompareText(TargetOS,'dragonfly')=0)
   or (CompareText(TargetOS,'darwin')=0)
   or (CompareText(TargetOS,'solaris')=0)
   or (CompareText(TargetOS,'haiku')=0)
@@ -3635,6 +3657,7 @@
   if (CompareText(TargetOS,'freebsd')=0)
   or (CompareText(TargetOS,'netbsd')=0)
   or (CompareText(TargetOS,'openbsd')=0)
+  or (CompareText(TargetOS,'dragonfly')=0)
   or (CompareText(TargetOS,'darwin')=0)
   then
     Result:='bsd'
Index: ide/buildlazdialog.pas
===================================================================
--- ide/buildlazdialog.pas	(revision 62378)
+++ ide/buildlazdialog.pas	(working copy)
@@ -1066,6 +1066,7 @@
       Add('Linux');
       Add('NetBSD');
       Add('OpenBSD');
+      Add('DragonFly');
       Add('Solaris');
       Add('Win32');
       Add('Win64');
Index: ide/compileroptions.pp
===================================================================
--- ide/compileroptions.pp	(revision 62378)
+++ ide/compileroptions.pp	(working copy)
@@ -713,7 +713,7 @@
 begin
   Result:= (TargetCPU='x86_64')
     and ((TargetOS='linux') or (TargetOS='freebsd') or (TargetOS='netbsd')
-      or (TargetOS='openbsd') or (TargetOS='solaris'));
+      or (TargetOS='openbsd') or (TargetOS='dragonfly') or (TargetOS='solaris'));
 end;
 
 procedure GatherInheritedOptions(AddOptionsList: TFPList;
Index: ide/lazconf.pp
===================================================================
--- ide/lazconf.pp	(revision 62378)
+++ ide/lazconf.pp	(working copy)
@@ -356,6 +356,7 @@
   or (CompareText(TargetOS, 'freebsd') = 0)
   or (CompareText(TargetOS, 'openbsd') = 0)
   or (CompareText(TargetOS, 'netbsd') = 0)
+  or (CompareText(TargetOS, 'dragonfly') = 0)
   or (CompareText(TargetOS, 'haiku') = 0) then
     Result:='.so'
   else
@@ -397,6 +398,7 @@
   or (CompareText(TargetOS,'freebsd')=0)
   or (CompareText(TargetOS,'netbsd')=0)
   or (CompareText(TargetOS,'openbsd')=0)
+  or (CompareText(TargetOS,'dragonfly')=0)
   then
     Result:=ExtractFilePath(Result)+lowercase(ExtractFileName(Result));
 end;
dfix-2.diff (4,063 bytes)

Juha Manninen

2019-12-15 22:14

developer   ~0119863

I applied the latest patch. Thanks.
There are no functional changes. It means that if Lazarus failed to work in DragonFlyBSD, it still fails.

CudaText man

2019-12-15 22:24

reporter   ~0119864

somehow I posted patch broken a little. sorry, fix added.

fix.diff (500 bytes)
Index: components/codetools/definetemplates.pas
===================================================================
--- components/codetools/definetemplates.pas	(revision 62401)
+++ components/codetools/definetemplates.pas	(working copy)
@@ -214,7 +214,7 @@
     'ECMAScript6'
     );
 
-  Lazarus_CPU_OS_Widget_Combinations: array[1..111] of shortstring = (
+  Lazarus_CPU_OS_Widget_Combinations: array[1..106] of shortstring = (
     'i386-linux-gtk',
     'i386-linux-gtk2',
     'i386-linux-qt',
fix.diff (500 bytes)

Juha Manninen

2019-12-15 22:36

developer   ~0119866

Oops, I also tested poorly. Fixed in r62403. Now it compiles fine.

Issue History

Date Modified Username Field Change
2019-12-09 08:58 CudaText man New Issue
2019-12-09 08:58 CudaText man File Added: dr.diff
2019-12-11 18:59 Juha Manninen Note Added: 0119759
2019-12-11 21:03 CudaText man File Added: dfix.diff
2019-12-11 21:03 CudaText man Note Added: 0119769
2019-12-11 22:31 Alfred Note Added: 0119774
2019-12-11 22:45 CudaText man File Added: dfix-2.diff
2019-12-11 22:45 CudaText man Note Added: 0119775
2019-12-15 22:06 Juha Manninen Assigned To => Juha Manninen
2019-12-15 22:06 Juha Manninen Status new => assigned
2019-12-15 22:14 Juha Manninen Status assigned => resolved
2019-12-15 22:14 Juha Manninen Resolution open => fixed
2019-12-15 22:14 Juha Manninen Fixed in Revision => r62401
2019-12-15 22:14 Juha Manninen LazTarget => -
2019-12-15 22:14 Juha Manninen Note Added: 0119863
2019-12-15 22:24 CudaText man File Added: fix.diff
2019-12-15 22:24 CudaText man Note Added: 0119864
2019-12-15 22:24 CudaText man Status resolved => assigned
2019-12-15 22:24 CudaText man Resolution fixed => reopened
2019-12-15 22:36 Juha Manninen Status assigned => resolved
2019-12-15 22:36 Juha Manninen Fixed in Revision r62401 => r62401, r62403
2019-12-15 22:36 Juha Manninen Note Added: 0119866