See the generic information page for more details about configuring, building and running KiCad.
This has been tested on Manjaro but should work with Arch, too -- they share the tools and the AUR package is the same.
makepkg with different flags allows also building and installing the package while modifying the source code between compilations, so you can modify the PKGBUILD file and configuration and installation phases can be replaced with makepkg command.
If your purpose is only to follow the latest master branch, you can as well use kicad-git from AUR in the standard way through the package manager. Makepkg is needed only if you want to change the source code or build flags or need a specific commit/tag.
1. Don't download KiCad source code (it's done automatically later).
2. Install basic tools for building from source.
sudo pacman -S base-devel
3. Create a new directory for KiCad package and enter it.
4. Retrieve the PKGBUILD file for a KiCad package which is as up to date as possible.
wget -O PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=kicad-git
5. Create a fake kicad.install file.
(makepkg expects it even though it's not used here.)
6. Prepare the package.
Dependencies are installed, maybe in several phases:
Total Download Size: 101,84 MiB Total Installed Size: 491,99 MiB :: Proceed with installation? [Y/n]
KiCad source code is downloaded:
==> Retrieving sources... -> Cloning kicad-git git repo...
The source code is now in a subdirectory (src/kicad-git/).
7. Create a new build directory somewhere, enter it and run
8. Configure kicad build system with
cmake-gui or plain cmake):
- Choose OCC instead of OCE (mandatory, OCE doesn't exist) (NOTE: OCC may become the default before v6).
- wxWidgets_CONFIG_EXECUTABLE must be set to
- Also other flags can be seen in the PKGBUILD file
make and then
sudo make install.
10. Add a library path to the linker configuration.
echo /usr/local/lib | sudo tee /etc/ld.so.conf.d/local_lib.conf
Otherwise certain binary files can't be found. This needs to be done only once. Replace /usr/local/lib with the path where libkicad_3dsg.so was installed if you used another installation path.