Free Pascal package guidelines
Arch package guidelines
32-bit – CLR – CMake – Cross – DKMS – Eclipse – Electron – Font – Free Pascal – GNOME – Go – Haskell – Java – KDE – Kernel – Lisp – Meson – MinGW – Node.js – Nonfree – OCaml – Perl – PHP – Python – R – Ruby – Rust – Shell – VCS – Web – Wine
This page explains on how to write PKGBUILDs for software built with the Free Pascal Compiler (FPC). Compiling for x86_64 Arch Linux requires the fpc package.
Free Pascal
Package naming
The project name alone is usually sufficient. However, in the case of cross-compiling, the package should be prefixed with fpc32-
when targetting i686 Linux from multilib and named in the format of fpc-cpu-system-pkgname
when targetting non-Arch Linux systems.
Helpful snippets
- Determine FPC's version and the CPU and OS of the units to output:
_unitdir=`fpc -iSP`-`fpc -iSO` _fpcver=`fpc -iV`
Packaging
Please adhere to the following when making an FPC-based package:
- always add fpc to either
makedepends
ordepends
- always put all compiled units (*.a, *.compiled, *.o, *.ppu, *.res, *.rst) under
/usr/lib/fpc/$_fpcver/units/$arch-linux
- add
staticlibs
tooptions
if installing an import library
Cross compiling
- always add the corresponding cross compiler package mentioned above (
fpc-cpu-system-rtl
) todepends
- always add
!strip
tooptions
for non-Unix-based systems - always put all compiled units (*.a, *.compiled, *.o, *.ppu, *.res, *.rst) under
/usr/lib/fpc/$_fpcver/units/$_unitdir
(or if multilib,/usr/lib/fpc/$_fpcver/units/i386-linux
) - always use
any
(x86_64
if multilib) as the architecture - add
staticlibs
tooptions
if installing an import library