Qt package guideline

Table of Content

Qt package guidelines



QT Applications have build steps nativly like this:

$ qmake
$ make
$ make install

On the other hand, PantherX has some Build Systems for C/C++ packages:

  1. gnu-build-system : configure & make & make install.
  2. cmake-build-system : cmake & make & make install.
  3. trivial-build-system : Every thing should be defined in the package definition.

With above descriptions, for packaging a Qt Application For PantherX we should select 1. or 2. and customize/replace some steps in guix build system.

PantherX Specifics

We can replace some steps in package building/installation. Here is a piece of package definition. In this sample the gnu-build-system used. And generally two things added to the package definition:

  1. Replacing the configure step.
    At this step we should run qmake - with needed parameters.

  2. Adding some instruction for correcting the installation path, before starting the install step.
    At this step we should modify the installation path in Makefile(s). In this example the (substitute* ....) method used for replacing the out path instead of $INSTALL_ROOT/usr.

(build-system gnu-build-system)
   (modify-phases %standard-phases
     (replace 'configure
       (lambda _
         (invoke "qmake" "CONFIG+=without_djvu without_cups" "qpdfview.pro")))
     ;; Installation process hard-codes "/usr/bin", possibly
     ;; prefixed.
     (add-before 'install 'fix-install-directory
       (lambda* (#:key outputs #:allow-other-keys)
         (let ((out (assoc-ref outputs "out")))
           (substitute* "Makefile.pdf-plugin" (("\\$\\(INSTALL_ROOT\\)/usr") out))
           (substitute* "Makefile.ps-plugin" (("\\$\\(INSTALL_ROOT\\)/usr") out))
           (substitute* "Makefile.image-plugin" (("\\$\\(INSTALL_ROOT\\)/usr") out))
           (substitute* "Makefile.application" (("\\$\\(INSTALL_ROOT\\)/usr") out))


  1. qpdfview - Package Link
  2. qview - Package Link

PantherX & (unofficial) GNU Guix Wiki.

Last update: 2021-10-12 20:09:22 +0000

Inspired by the excellent Arch Linux Wiki