跳转至内容

Free Pascal 包指南

来自 ArchWiki
Arch 软件包指南

32位CLRCMake交叉编译工具DKMSEclipse 插件Electron字体Free PascalGNOMEGoHaskellJavaKDE内核模块LispMesonMinGWNode.js非免费应用OCamlPerlPHPPythonRRubyRust - 安全ShellVCSWeb 应用Wine

本页介绍如何为使用 Free Pascal Compiler (FPC) 构建的软件编写 PKGBUILD。编译 x86_64 Arch Linux 需要 fpc 包。

Free Pascal

包命名

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

有用的代码片段

确定 FPC 的版本以及单元输出的 CPU 和操作系统

_unitdir=`fpc -iSP`-`fpc -iSO`
_fpcver=`fpc -iV`

打包

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

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

交叉编译

  • 始终将上面提到的相应交叉编译器包 (fpc-cpu-system-rtl) 添加到 depends
  • 对于非 Unix-based 系统,始终将 !strip 添加到 options
  • 始终将所有编译的单元 (*.a, *.compiled, *.o, *.ppu, *.res, *.rsj) 放在 /usr/lib/fpc/$_fpcver/units/$_unitdir 下 (或者如果 multilib,则放在 /usr/lib/fpc/$_fpcver/units/i386-linux 下)
  • 始终使用 any (multilib 时为 x86_64) 作为架构
  • 如果安装了导入库,请将 staticlibs 添加到 options

© . This site is unofficial and not affiliated with Arch Linux.

Content is available under GNU Free Documentation License 1.3 or later unless otherwise noted.