Installation of libportal
        
        
          ![[Warning]](../images/warning.png) 
          
            Warning
          
          
            If a previous version of libportal is installed, move the headers
            out of the way so that later packages do not encounter conflicts
            (as the root user):
          
          if [ -e /usr/include/libportal ]; then
    rm -rf /usr/include/libportal.old &&
    mv -vf /usr/include/libportal{,.old}
fi
         
        
          First, apply a patch to fix building against Qt 6.9 and later:
        
        patch -Np1 -i ../libportal-0.9.1-qt6.9_fixes-1.patch
        
          Install libportal by running the
          following commands:
        
        mkdir build &&
cd    build &&
meson setup --prefix=/usr       \
            --buildtype=release \
            -D vapi=false       \
            -D docs=false       \
            .. &&
ninja
        
          If you have Gi-DocGen-2025.5 installed and wish to
          build the API documentation for this package, issue:
        
        sed -i "/output/s/-1/-0.9.1/" ../doc/meson.build &&
meson configure -D docs=true                     &&
ninja
        
          To test the results, issue: ninja
          test. Note that additional dbus-daemon processes may need to be killed after
          the tests are run.
        
        
          Now, as the root user:
        
        ninja install
       
      
        
          Command Explanations
        
        
          --buildtype=release:
          Specify a buildtype suitable for stable releases of the package, as
          the default may produce unoptimized binaries.
        
        
          -D vapi=false: This
          parameter disables using Vala-0.56.18. Remove this parameter if you have
          it installed.
        
        
          -D docs=false: Allow
          building this package without Gi-DocGen-2025.5 installed. If you have
          Gi-DocGen-2025.5 installed and you wish to
          rebuild and install the API documentation, a meson configure command will
          reset this option.