Difference between revisions of "Free Pascal package guidelines"

From ArchWiki
Jump to: navigation, search
(Cross compiling)
(Cross compiling)
Line 23: Line 23:
 
* always put all compiled units (*.compiled, *.o, *.ppu, *.rst) under {{ic|/usr/lib/fpc/''fpc-version''/units/''cpu''-linux}}
 
* always put all compiled units (*.compiled, *.o, *.ppu, *.rst) under {{ic|/usr/lib/fpc/''fpc-version''/units/''cpu''-linux}}
 
==== Cross compiling ====
 
==== Cross compiling ====
* always add the corresponding cross compiler package mentioned above ({{Ic|fpc-''cpu''-''system''-rtl}}, {{AUR|fpc-multilib}} for multilib) to {{ic|depends}}
+
* always add the corresponding cross compiler package mentioned above ({{Ic|fpc-''cpu''-''system''-rtl}} or {{AUR|fpc-multilib}} for multilib) to {{ic|depends}}
 
* always add {{ic|!strip}} to {{ic|options}} for non-Unix-based systems
 
* always add {{ic|!strip}} to {{ic|options}} for non-Unix-based systems
 
* always put all compiled units (*.compiled, *.o, *.ppu, *.rst) under {{ic|/usr/lib/fpc/''fpc-version''/units/''cpu''-''system''}}
 
* always put all compiled units (*.compiled, *.o, *.ppu, *.rst) under {{ic|/usr/lib/fpc/''fpc-version''/units/''cpu''-''system''}}
 
* always use {{ic|any}} ({{ic|x86_64}} if multilib) as the architecture
 
* always use {{ic|any}} ({{ic|x86_64}} if multilib) as the architecture

Revision as of 19:06, 28 June 2012

Template:Package Guidelines

This page explains on how to write PKGBUILDs for software built with the Free Pascal Compiler (FPC). There currently exists two options for building software of Linux, as well as a handful of options for building software on other targets using FPC cross compilers:

Arch Linux

  • fpc is available in the official Arch community repository and provides a compiler targetting only your host CPU (i686 or x86_64).
  • fpc-multilibAUR is available from the Arch User Repository which provides an x86_64 host compiler targetting both i686 and x86_64 CPU Linuxes. This will also provide the ppcross386AUR FPC compiler driver package.

Cross compilers

Free Pascal

Package naming

The project name alone is usually sufficient. However, in the case of cross-compiling, the package should be named fpc32-pkgname when targetting i686 Linux from multilib and fpc-cpu-system-pkgname when targetting non-Arch Linux systems.

Packagiing

Please adhere to the following when making an FPC-based package:

  • always add fpc to makedepends
  • always put all compiled units (*.compiled, *.o, *.ppu, *.rst) under /usr/lib/fpc/fpc-version/units/cpu-linux

Cross compiling

  • always add the corresponding cross compiler package mentioned above (fpc-cpu-system-rtl or fpc-multilibAUR for multilib) to depends
  • always add !strip to options for non-Unix-based systems
  • always put all compiled units (*.compiled, *.o, *.ppu, *.rst) under /usr/lib/fpc/fpc-version/units/cpu-system
  • always use any (x86_64 if multilib) as the architecture