Free Pascal package guidelines (简体中文)

本页说明如何为使用 Free Pascal Compiler (FPC) PKGBUILD。当前存在用于构建 Linux 软件的两个选项,以及使用 FPC 交叉编译器在其他目标上构建软件的少数选项:

  • fpc 提供了仅针对您的主机 CPU(仅x86_64)的编译器。
翻译状态:本文是 Free Pascal package guidelines翻译。上次翻译日期:2020-05-03。如果英文版本有所更改,则您可以帮助同步翻译。
Arch 软件包准则

32-bitCLRCMake – Cross – DKMSEclipse – Electron – Font – Free Pascal – GNOME – GoHaskellJava – KDE – Kernel – Lisp – Meson – MinGW – Node.js – Nonfree – OCaml – Perl – PHPPython – R – Ruby – Rust – VCS – Web – Wine

Free Pascal

软件包命名

仅项目名称通常就足够了。但是,在交叉编译的情况下,当从 multilib 以 i686 Linux 为目标时,包的前缀应该是 fpc32- ,当以非 Arch Linux 系统为目标时,包的名称应该是 fpc-cpu-system-pkgname

有用的代码片段

  • 确定 FPC 的版本以及要输出的单元的 CPU 和 OS:
_unitdir=`fpc -iSP`-`fpc -iSO`
_fpcver=`fpc -iV`

打包

制作基于 FPC 的软件包时,请遵守以下规定:

  • 始终将 fpc 添加到 makedependsdepends
  • 始终将所有编译单元(*.a, *.compiled, *.o, *.ppu, *.res, *.rst) )放在 /usr/lib/fpc/$_fpcver/units/$arch-linux 下面。
  • 如果安装导入库,请将 staticlibs 添加到 options 中。

交叉编译

  • 始终将上述相应的交叉编译器包() )添加到 depends
  • 对于非类 Unix 的系统总是添加 到 options
  • 始终将所有已编译的单元(*.a, *.compiled, *.o, *.ppu, *.res, *.rst) 放在 下(或者如果是 multilib,放在 )
  • 始终使用 (如果是 multilib,则为 x86_64)作为体系结构
  • 如果安装导入库,请将 staticlibs 添加到 options 中。
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.