aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/Makefile1
-rw-r--r--editors/picpas/Makefile51
-rw-r--r--editors/picpas/distinfo17
-rw-r--r--editors/picpas/files/patch-Source_Globales.pas113
-rw-r--r--editors/picpas/files/patch-Source_PicPas.lpi20
-rw-r--r--editors/picpas/files/patch-miconfig_MiConfigXML.pas20
-rw-r--r--editors/picpas/pkg-descr4
-rw-r--r--editors/picpas/pkg-plist143
8 files changed, 369 insertions, 0 deletions
diff --git a/editors/Makefile b/editors/Makefile
index 86279024be1b..d6dc49a57015 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -215,6 +215,7 @@
SUBDIR += paredit-mode.el
SUBDIR += pdfedit
SUBDIR += pico-alpine
+ SUBDIR += picpas
SUBDIR += pluma
SUBDIR += plume-creator-devel
SUBDIR += poedit
diff --git a/editors/picpas/Makefile b/editors/picpas/Makefile
new file mode 100644
index 000000000000..8760294e69aa
--- /dev/null
+++ b/editors/picpas/Makefile
@@ -0,0 +1,51 @@
+# $FreeBSD$
+
+PORTNAME= picpas
+PORTVERSION= 0.8.6
+DISTVERSIONPREFIX= v
+CATEGORIES= editors
+PKGNAMESUFFIX= ${LAZARUS_PKGNAMESUFFIX}
+
+MAINTAINER= acm@FreeBSD.org
+COMMENT= Multi-platform Pascal for Microchip PIC16F microcontrollers
+
+LICENSE= GPLv2
+
+USES= dos2unix fpc lazarus:flavors
+USE_FPC= chm fcl-base fcl-image fcl-json fcl-registry fcl-xml pasjpeg regexpr \
+ rtl-objpas x11
+USE_XORG= x11
+DOS2UNIX_REGEX= .*\.([txt]|pas|lpi|txt|lfm)
+USE_GITHUB= yes
+GH_ACCOUNT= t-edson
+GH_PROJECT= PicPas
+GH_TAGNAME= e095d58
+GH_TUPLE= t-edson:MiConfig:a4a988a:miconfig/miconfig \
+ t-edson:MisUtils:742eff3:misutils/misutils \
+ t-edson:PicUtils:b38865a:picutils/picutils \
+ t-edson:SynFacilUtils:2909899:syncfacilutils/syncfacilutils \
+ t-edson:UtilsGrilla:07744b9:utilsgrilla/utilsgrilla \
+ t-edson:ogEditGraf:4552327:ogeditgraf/ogeeditgraf \
+ t-edson:t-Xpres:6665922:txpres/txpres
+
+USE_FPC_gtk2= cairo
+USE_GNOME_gtk2= cairo
+USE_FPC+= ${USE_FPC_${FLAVOR}}
+USE_GNOME+= ${USE_GNOME_${FLAVOR}}
+
+gtk2_CONFLICTS_INSTALL= ${PORTNAME}-qt4 ${PORTNAME}-qt5
+qt4_CONFLICTS_INSTALL= ${PORTNAME}-gtk2 ${PORTNAME}-qt5
+qt5_CONFLICTS_INSTALL= ${PORTNAME}-gtk2 ${PORTNAME}-qt4
+
+LAZARUS_PROJECT_FILES= Source/PicPas.lpi
+LAZBUILD_ARGS= -d
+
+post-patch:
+ ${REINPLACE_CMD} 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/Source/Globales.pas
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/PicPas-freebsd ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ @${MKDIR} ${STAGEDIR}${DATADIR}
+ cd ${WRKSRC} && ${COPYTREE_SHARE} "devices syntax samples temp themes units" ${STAGEDIR}${DATADIR}
+
+.include <bsd.port.mk>
diff --git a/editors/picpas/distinfo b/editors/picpas/distinfo
new file mode 100644
index 000000000000..abe97dfe3560
--- /dev/null
+++ b/editors/picpas/distinfo
@@ -0,0 +1,17 @@
+TIMESTAMP = 1533561484
+SHA256 (t-edson-PicPas-v0.8.6-e095d58_GH0.tar.gz) = 714cbcf408462c6aa71d595c5d7ef95dbf9fff2407d6a6340de4be1384d4a610
+SIZE (t-edson-PicPas-v0.8.6-e095d58_GH0.tar.gz) = 13230955
+SHA256 (t-edson-MiConfig-a4a988a_GH0.tar.gz) = de54af664dc96f510393309454fe033e822ffae9f79ed56c715691713edaa65d
+SIZE (t-edson-MiConfig-a4a988a_GH0.tar.gz) = 34117
+SHA256 (t-edson-MisUtils-742eff3_GH0.tar.gz) = 9b45ca7f6e3870f21abef8f670a54cd111b2cafae3149263399302cdccf973da
+SIZE (t-edson-MisUtils-742eff3_GH0.tar.gz) = 272412
+SHA256 (t-edson-PicUtils-b38865a_GH0.tar.gz) = 39112025dc1d2758a989153b83dacc8587f6abf2f3472d41fd51a207a445c240
+SIZE (t-edson-PicUtils-b38865a_GH0.tar.gz) = 182194
+SHA256 (t-edson-SynFacilUtils-2909899_GH0.tar.gz) = 8bf153428dbfddfd63e023175551f35bee464337cd5d10f5132534bf0c9181dc
+SIZE (t-edson-SynFacilUtils-2909899_GH0.tar.gz) = 259715
+SHA256 (t-edson-UtilsGrilla-07744b9_GH0.tar.gz) = 7f5ec2e53a9a58a296fa5d08eebbfe54e4040bf15952ff4720ae8e92d4fd3933
+SIZE (t-edson-UtilsGrilla-07744b9_GH0.tar.gz) = 49776
+SHA256 (t-edson-ogEditGraf-4552327_GH0.tar.gz) = 5885b0406df64a75f2fc05b9e36b56d874c9a3764ddca5bc12a72b673a0e8d75
+SIZE (t-edson-ogEditGraf-4552327_GH0.tar.gz) = 430647
+SHA256 (t-edson-t-Xpres-6665922_GH0.tar.gz) = 813c2f966b3e0a7b1fb11010877b3a22a9f4de402bf90695f0aa056e6c69b0fe
+SIZE (t-edson-t-Xpres-6665922_GH0.tar.gz) = 833095
diff --git a/editors/picpas/files/patch-Source_Globales.pas b/editors/picpas/files/patch-Source_Globales.pas
new file mode 100644
index 000000000000..b5f18e96dddc
--- /dev/null
+++ b/editors/picpas/files/patch-Source_Globales.pas
@@ -0,0 +1,113 @@
+--- Source/Globales.pas 2018-04-26 21:02:54.473902000 -0500
++++ Source/Globales.pas 2018-04-26 21:05:05.270945000 -0500
+@@ -5,7 +5,7 @@
+ {$mode objfpc}{$H+}
+ interface
+ uses Classes, SysUtils, Forms, SynEdit, SynEditKeyCmds, MisUtils,
+- lclType, FileUtil, LazLogger, Menus ;
++ lclType, FileUtil, LazLogger, Menus, Process, LazFileUtils, LazUTF8;
+
+ const
+ NOM_PROG = 'PicPas'; //nombre de programa
+@@ -26,6 +26,7 @@
+ archivoEnt : string; //archivo de entrada
+ MostrarError: Boolean; //Bandera para mostrar mensajesde error.
+ ActConsSeg : Boolean; //Activa consultas en segundo plano
++ S: string;
+
+ /////////////// Campos para manejo del diccionario //////////
+ var
+@@ -173,7 +174,11 @@
+
+ initialization
+ //inicia directorios de la aplicación
+- patApp := ExtractFilePath(Application.ExeName); //incluye el '\' final
++ {$ifdef windows}
++ patApp := GetEnvironmentVariableUTF8('appdata')+'\PicPas\';
++ {$else}
++ patApp := GetEnvironmentVariableUTF8('HOME')+'/.config/PicPas/';
++ {$endif}
+ patSamples := patApp + 'samples';
+ patUnits := patApp + 'units';
+ patDevices := patApp + 'devices';
+@@ -183,29 +188,74 @@
+ archivoEnt := ''; //archivo de entrada
+ //verifica existencia de carpetas de trabajo
+ try
++ if not DirectoryExists(patApp) then begin
++ CreateDir(patApp);
++ end;
+ if not DirectoryExists(patSamples) then begin
+ msgexc(WA_DIR_NOEXIST, [patSamples]);
+- CreateDir(patSamples);
++ {$ifdef freebsd}
++ RunCommand('cp', ['-R',
++ '%%DATADIR%%/samples',
++ patSamples
++ ], S);
++ {else}
++ CreateDir(patSamples);
++ {$endif}
+ end;
+ if not DirectoryExists(patUnits) then begin
+ msgexc(WA_DIR_NOEXIST, [patUnits]);
+- CreateDir(patUnits);
++ {$ifdef freebsd}
++ RunCommand('cp', ['-R',
++ '%%DATADIR%%/units',
++ patUnits
++ ], S);
++ {else}
++ CreateDir(patUnits);
++ {$endif}
+ end;
+ if not DirectoryExists(patDevices) then begin
+ msgexc(WA_DIR_NOEXIST, [patDevices]);
+- CreateDir(patDevices);
++ {$ifdef freebsd}
++ RunCommand('cp', ['-R',
++ '%%DATADIR%%/devices',
++ patDevices
++ ], S);
++ {else}
++ CreateDir(patDevices);
++ {$endif}
+ end;
+ if not DirectoryExists(patTemp) then begin
+ msgexc(WA_DIR_NOEXIST, [patTemp]);
+- CreateDir(patTemp);
++ {$ifdef freebsd}
++ RunCommand('cp', ['-R',
++ '%%DATADIR%%/temp',
++ patSamples
++ ], S);
++ {else}
++ CreateDir(patTemp);
++ {$endif}
+ end;
+ if not DirectoryExists(patSyntax) then begin
+ msgexc(WA_DIR_NOEXIST, [patSyntax]);
+- CreateDir(patSyntax);
++ {$ifdef freebsd}
++ RunCommand('cp', ['-R',
++ '%%DATADIR%%/syntax',
++ patSyntax
++ ], S);
++ {else}
++ CreateDir(patSyntax);
++ {$endif}
+ end;
+ if not DirectoryExists(patThemes) then begin
+ msgexc(WA_DIR_NOEXIST, [patThemes]);
+- CreateDir(patThemes);
++ {$ifdef freebsd}
++ RunCommand('cp', ['-R',
++ '%%DATADIR%%/themes',
++ patThemes
++ ], S);
++ {else}
++ CreateDir(patThemes);
++ {$endif}
+ end;
+
+ except
diff --git a/editors/picpas/files/patch-Source_PicPas.lpi b/editors/picpas/files/patch-Source_PicPas.lpi
new file mode 100644
index 000000000000..be8be9a59dad
--- /dev/null
+++ b/editors/picpas/files/patch-Source_PicPas.lpi
@@ -0,0 +1,20 @@
+--- Source/PicPas.lpi 2018-04-26 17:49:53.839748000 -0500
++++ Source/PicPas.lpi 2018-04-26 17:52:43.133469000 -0500
+@@ -25,7 +25,7 @@
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+- <OtherUnitFiles Value="..\..\_Librerias\SynFacilUtils-1.21;..\..\_Librerias\MisUtils 0.5;..\..\_Librerias\MiConfig 0.4b;..\..\_Librerias\PicUtils-1.3;..\..\_Librerias\Xpres-1.3.2;..\..\_Librerias\UtilsGrilla 0.8;..\..\_Librerias\ogEditGraf 1.6b"/>
++ <OtherUnitFiles Value="..\syncfacilutils;..\misutils;..\miconfig;..\picutils;..\txpres;..\utilsgrilla;..\ogeeditgraf"/>
+ <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <CodeGeneration>
+@@ -252,7 +252,7 @@
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+- <OtherUnitFiles Value="..\..\_Librerias\SynFacilUtils-1.21;..\..\_Librerias\MisUtils-0.6;..\..\_Librerias\MiConfig 0.4b;..\..\_Librerias\PicUtils-1.4;..\..\_Librerias\Xpres-1.3.2;..\..\_Librerias\UtilsGrilla 0.8;..\..\_Librerias\ogEditGraf-2.2"/>
++ <OtherUnitFiles Value="..\syncfacilutils;..\misutils;..\miconfig;..\picutils;..\txpres;..\utilsgrilla;..\ogeeditgraf"/>
+ <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <Parsing>
diff --git a/editors/picpas/files/patch-miconfig_MiConfigXML.pas b/editors/picpas/files/patch-miconfig_MiConfigXML.pas
new file mode 100644
index 000000000000..a3d261d04ba1
--- /dev/null
+++ b/editors/picpas/files/patch-miconfig_MiConfigXML.pas
@@ -0,0 +1,20 @@
+--- miconfig/MiConfigXML.pas 2018-04-26 21:42:01.343702000 -0500
++++ miconfig/MiConfigXML.pas 2018-04-26 21:43:20.791884000 -0500
+@@ -20,7 +20,7 @@
+ {$mode objfpc}{$H+}
+ interface
+ uses
+- Classes, SysUtils, Graphics, Forms, Laz2_XMLCfg, MisUtils, MiConfigBasic;
++ Classes, SysUtils, Graphics, Forms, Laz2_XMLCfg, MisUtils, MiConfigBasic, LazFileUtils, LazUTF8;
+ type
+ { TMiConfigXML }
+ {Clase base que es usada para manejar los campos de configuración.}
+@@ -75,7 +75,7 @@
+ function TMiConfigXML.DefaultFileName: string;
+ {Devuelve el nombre por defecto del archvio de configuración}
+ begin
+- Result := ChangeFileExt(Application.ExeName,'.xml');
++ Result := ChangeFileExt(GetEnvironmentVariableUTF8('HOME')+'/.config/PicPas/'+Application.ExeName,'.xml');
+ end;
+ procedure TMiConfigXML.VerifyFile;
+ //Verifica si el archivo XML "FileName" existe. Si no, muestra un mensaje y lo crea.
diff --git a/editors/picpas/pkg-descr b/editors/picpas/pkg-descr
new file mode 100644
index 000000000000..27b325c5425e
--- /dev/null
+++ b/editors/picpas/pkg-descr
@@ -0,0 +1,4 @@
+PicPas is a Pascal compiler, written in Lazarus, which generates executable
+code for midrange PIC microcontrollers (the 16F series).
+
+WWW: https://github.com/t-edson/PicPas
diff --git a/editors/picpas/pkg-plist b/editors/picpas/pkg-plist
new file mode 100644
index 000000000000..4ae0d3ffe8f6
--- /dev/null
+++ b/editors/picpas/pkg-plist
@@ -0,0 +1,143 @@
+bin/picpas
+%%DATADIR%%/devices/PIC10F200.pas
+%%DATADIR%%/devices/PIC10F202.pas
+%%DATADIR%%/devices/PIC10F204.pas
+%%DATADIR%%/devices/PIC10F206.pas
+%%DATADIR%%/devices/PIC10F220.pas
+%%DATADIR%%/devices/PIC10F222.pas
+%%DATADIR%%/devices/PIC10F320.pas
+%%DATADIR%%/devices/PIC10F322.pas
+%%DATADIR%%/devices/PIC12F508.pas
+%%DATADIR%%/devices/PIC12F509.pas
+%%DATADIR%%/devices/PIC12F510.pas
+%%DATADIR%%/devices/PIC12F519.pas
+%%DATADIR%%/devices/PIC12F609.pas
+%%DATADIR%%/devices/PIC12F615.pas
+%%DATADIR%%/devices/PIC12F617.pas
+%%DATADIR%%/devices/PIC12F629.pas
+%%DATADIR%%/devices/PIC12F635.pas
+%%DATADIR%%/devices/PIC12F675.pas
+%%DATADIR%%/devices/PIC12F675A.pas
+%%DATADIR%%/devices/PIC12F683.pas
+%%DATADIR%%/devices/PIC12F752.pas
+%%DATADIR%%/devices/PIC16C63.pas
+%%DATADIR%%/devices/PIC16F505.pas
+%%DATADIR%%/devices/PIC16F506.pas
+%%DATADIR%%/devices/PIC16F526.pas
+%%DATADIR%%/devices/PIC16F527.pas
+%%DATADIR%%/devices/PIC16F54.pas
+%%DATADIR%%/devices/PIC16F57.pas
+%%DATADIR%%/devices/PIC16F570.pas
+%%DATADIR%%/devices/PIC16F59.pas
+%%DATADIR%%/devices/PIC16F610.pas
+%%DATADIR%%/devices/PIC16F616.pas
+%%DATADIR%%/devices/PIC16F627.pas
+%%DATADIR%%/devices/PIC16F627A.pas
+%%DATADIR%%/devices/PIC16F628.pas
+%%DATADIR%%/devices/PIC16F628A.pas
+%%DATADIR%%/devices/PIC16F630.pas
+%%DATADIR%%/devices/PIC16F631.pas
+%%DATADIR%%/devices/PIC16F636.pas
+%%DATADIR%%/devices/PIC16F639.pas
+%%DATADIR%%/devices/PIC16F648A.pas
+%%DATADIR%%/devices/PIC16F676.pas
+%%DATADIR%%/devices/PIC16F677.pas
+%%DATADIR%%/devices/PIC16F684.pas
+%%DATADIR%%/devices/PIC16F685.pas
+%%DATADIR%%/devices/PIC16F687.pas
+%%DATADIR%%/devices/PIC16F688.pas
+%%DATADIR%%/devices/PIC16F689.pas
+%%DATADIR%%/devices/PIC16F690.pas
+%%DATADIR%%/devices/PIC16F707.pas
+%%DATADIR%%/devices/PIC16F716.pas
+%%DATADIR%%/devices/PIC16F72.pas
+%%DATADIR%%/devices/PIC16F720.pas
+%%DATADIR%%/devices/PIC16F721.pas
+%%DATADIR%%/devices/PIC16F722.pas
+%%DATADIR%%/devices/PIC16F722A.pas
+%%DATADIR%%/devices/PIC16F723.pas
+%%DATADIR%%/devices/PIC16F723A.pas
+%%DATADIR%%/devices/PIC16F724.pas
+%%DATADIR%%/devices/PIC16F726.pas
+%%DATADIR%%/devices/PIC16F727.pas
+%%DATADIR%%/devices/PIC16F73.pas
+%%DATADIR%%/devices/PIC16F737.pas
+%%DATADIR%%/devices/PIC16F74.pas
+%%DATADIR%%/devices/PIC16F747.pas
+%%DATADIR%%/devices/PIC16F753.pas
+%%DATADIR%%/devices/PIC16F76.pas
+%%DATADIR%%/devices/PIC16F767.pas
+%%DATADIR%%/devices/PIC16F77.pas
+%%DATADIR%%/devices/PIC16F777.pas
+%%DATADIR%%/devices/PIC16F785.pas
+%%DATADIR%%/devices/PIC16F818.pas
+%%DATADIR%%/devices/PIC16F819.pas
+%%DATADIR%%/devices/PIC16F83.pas
+%%DATADIR%%/devices/PIC16F84.pas
+%%DATADIR%%/devices/PIC16F84A.pas
+%%DATADIR%%/devices/PIC16F87.pas
+%%DATADIR%%/devices/PIC16F870.pas
+%%DATADIR%%/devices/PIC16F871.pas
+%%DATADIR%%/devices/PIC16F872.pas
+%%DATADIR%%/devices/PIC16F873.pas
+%%DATADIR%%/devices/PIC16F873A.pas
+%%DATADIR%%/devices/PIC16F874.pas
+%%DATADIR%%/devices/PIC16F874A.pas
+%%DATADIR%%/devices/PIC16F876.pas
+%%DATADIR%%/devices/PIC16F876A.pas
+%%DATADIR%%/devices/PIC16F877.pas
+%%DATADIR%%/devices/PIC16F877A.pas
+%%DATADIR%%/devices/PIC16F88.pas
+%%DATADIR%%/devices/PIC16F882.pas
+%%DATADIR%%/devices/PIC16F883.pas
+%%DATADIR%%/devices/PIC16F884.pas
+%%DATADIR%%/devices/PIC16F886.pas
+%%DATADIR%%/devices/PIC16F887.pas
+%%DATADIR%%/devices/PIC16F913.pas
+%%DATADIR%%/devices/PIC16F914.pas
+%%DATADIR%%/devices/PIC16F916.pas
+%%DATADIR%%/devices/PIC16F917.pas
+%%DATADIR%%/devices/PIC16F946.pas
+%%DATADIR%%/samples/ASM_BlinkLed.pas
+%%DATADIR%%/samples/BlinkLed.pas
+%%DATADIR%%/samples/Com_RS-232_UARTSoft.pas
+%%DATADIR%%/samples/Com_RS-232_UARTSoft_ENGLISH.pas
+%%DATADIR%%/samples/DigitalInput.pas
+%%DATADIR%%/samples/EEPROM.pas
+%%DATADIR%%/samples/LCD_test/16F84A example.DSN
+%%DATADIR%%/samples/LCD_test/16F84A example.PWI
+%%DATADIR%%/samples/LCD_test/LCD_test.hex
+%%DATADIR%%/samples/LCD_test/LCD_test.pas
+%%DATADIR%%/samples/Multiplicacion_ASM.pas
+%%DATADIR%%/samples/PicPasDrill/documentation.txt
+%%DATADIR%%/samples/PicPasDrill/firmware.pas
+%%DATADIR%%/samples/PicPasDrill/output.hex
+%%DATADIR%%/samples/PicPasDrill/photo.jpg
+%%DATADIR%%/samples/PicPasDrill/schematic.png
+%%DATADIR%%/samples/UsingASM.pas
+%%DATADIR%%/samples/output.hex
+%%DATADIR%%/syntax/PicPas_AsmPic.xml
+%%DATADIR%%/syntax/PicPas_C.xml
+%%DATADIR%%/syntax/PicPas_PIC16.xml
+%%DATADIR%%/temp/NewFile1.pas
+%%DATADIR%%/temp/NewFile2.pas
+%%DATADIR%%/temp/NewFile3.pas
+%%DATADIR%%/temp/PicPas0.8.4.Full.rar
+%%DATADIR%%/temp/Test1.DSN
+%%DATADIR%%/temp/delay_us_Lib.pas
+%%DATADIR%%/temp/output.hex
+%%DATADIR%%/themes/Fondo_Azul.theme
+%%DATADIR%%/themes/blue.theme
+%%DATADIR%%/themes/dark.theme
+%%DATADIR%%/themes/delphi.theme
+%%DATADIR%%/themes/green.theme
+%%DATADIR%%/themes/oscuro.theme
+%%DATADIR%%/units/LCDLib.pas
+%%DATADIR%%/units/LCDLib_4bits_PIC16F877A.pas
+%%DATADIR%%/units/LCDLib_Commands.pas
+%%DATADIR%%/units/LCDLib_Const.pas
+%%DATADIR%%/units/LCDconst.pas
+%%DATADIR%%/units/UARTSoft.pas
+%%DATADIR%%/units/UARTSoftLib.pas
+%%DATADIR%%/units/UnitTest.pas
+%%DATADIR%%/units/delay_us.pas