mosra / magnum-integration

Integration libraries for the Magnum C++11 graphics engine
https://magnum.graphics/
Other
99 stars 45 forks source link

ArchLinux PKGBUILD needs fixes #79

Closed pirogronian closed 3 years ago

pirogronian commented 3 years ago

Actual PKGBUILD generates several errors for me. It seems be intended as a part of github repo, while usual practise is to download PKGBUILD only and let the makepkg to download needed sources. Below is version that worked for me:

# Author: mosra <mosra@centrum.cz>
pkgname=magnum-integration
pkgver=dev
pkgrel=1
pkgdesc="Integration libraries for the Magnum C++11/C++14 graphics engine"
arch=('i686' 'x86_64')
url="https://magnum.graphics"
license=('MIT')
depends=('magnum' 'bullet' 'eigen' 'glm' 'imgui-src')
makedepends=('cmake' 'ninja')
options=(!strip)
provides=('magnum-integration-git')
source=("git+https://github.com/mosra/magnum-integration") # tag: v2020.06
sha256sums=('SKIP')

# _rootdir=$startdir/../../
_rootdir=$startdir/src

build() {
    mkdir -p "build"
    cd "build"

    cmake ../$pkgname \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DIMGUI_DIR=/opt/imgui \
        -DWITH_BULLET=ON \
        -DWITH_DART=OFF \
        -DWITH_EIGEN=ON \
        -DWITH_GLM=ON \
        -DWITH_IMGUI=ON \
        -DBUILD_TESTS=OFF \
        -DBUILD_GL_TESTS=OFF \
        -G Ninja
    ninja
}

check() {
    cd "$_rootdir/build"
    CORRADE_TEST_COLOR=ON ctest --output-on-failure
}

package() {
    cd "$_rootdir/build"
    DESTDIR="$pkgdir/" ninja install
}

However, I had to disable tests due to magnum detection fail (although I have it installed).

mosra commented 3 years ago

Hello,

It seems be intended as a part of github repo, while usual practise is to download PKGBUILD only

Yes. This particular PKGBUILD is there for me, mainly, to build directly out of the source tree and run the tests, as stated in the docs :wink: For the usual non-developer PKGBUILDs, please get them from AUR or ArchLinux repos (they're also bundled in package/archlinux/magnum-integration[-dev], but why clone a repository just for those if you can get them from AUR directly).