Skip to content

[Bug] Arch AUR PKGBUILD file incompatible with cmake4 #1553

@orangutanrider

Description

@orangutanrider

Bug description:
It works if you get cmake3 from the aur, and edit the pkgbuild file to use it instead.
The settings in PKGBUILD file will default to cmake4 though.

It probably works with cmake4 I would guess, but it denies it.
I don't know enough about cmake to know for sure.
You'd probably just wanna make it work with cmake4 rather than have people install cmake3.

(Working) with cmake3-bin installed. (https://aur.archlinux.org/packages/cmake3-bin)
Modified PKGBUILD file:

# Maintainer: Fabio 'Lolix' Loli <[email protected]> -> https://github.com/FabioLolix
# Maintainer: Maxim Mikityanskiy <[email protected]>

pkgname=mindforger
pkgver=2.0.0
pkgrel=1
pkgdesc="Thinking notebook and Markdown IDE. Search, browse, view and edit your Markdown files. Get as much as possible from knowledge in your remarks"
arch=(x86_64 i686 arm armv6h armv7h aarch64)
url="https://www.mindforger.com/"
license=(GPL2)
depends=(qt5-base qt5-webkit zlib hunspell)
makedepends=(git cmake)
source=("git+https://github.com/dvorka/mindforger.git#tag=${pkgver}"
        "git+https://github.com/dvorka/mindforger-repository.git"
        "mindforger-cmark::git+https://github.com/dvorka/cmark.git")
sha256sums=('SKIP'
            'SKIP'
            'SKIP')

prepare() {
  cd "$pkgname"
  git submodule init
  git config 'submodule.doc.url' "${srcdir}/mindforger-repository"
  git config 'submodule.deps/cmark-gfm.url' "${srcdir}/mindforger-cmark"
  git -c protocol.file.allow=always submodule update
}

build() {
  mkdir -p "$srcdir/$pkgname"/deps/cmark-gfm/build
  cd "$srcdir/$pkgname"/deps/cmark-gfm/build
  cmake3 -DCMARK_TESTS=OFF -DCMARK_SHARED=OFF -Wno-dev ..
  cmake3 --build .

  cd "$srcdir/$pkgname"
  qmake -r CONFIG+=mfnoccache mindforger.pro
  make
}

package() {
  cd "$srcdir/$pkgname"
  make INSTALL_ROOT="$pkgdir/usr" install
}

Environment:

  • MindForger version: 2.0.0
  • Operating system: EndeavourOS, Arch, Linux

Steps to reproduce 🐞:

Follow the AUR installation procedure.
git-clone -> resolve dependencies -> makepkg
https://aur.archlinux.org/packages/mindforger

Error message or log:

==> Making package: mindforger 2.0.0-1 (Mon 05 May 2025 16:37:48 BST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating mindforger git repo...
  -> Updating mindforger-repository git repo...
  -> Updating mindforger-cmark git repo...
==> Validating source files with sha256sums...
    mindforger ... Skipped
    mindforger-repository ... Skipped
    mindforger-cmark ... Skipped
==> Extracting sources...
  -> Creating working copy of mindforger git repo...
Reset branch 'makepkg'
  -> Creating working copy of mindforger-repository git repo...
Reset branch 'makepkg'
  -> Creating working copy of mindforger-cmark git repo...
Reset branch 'makepkg'
==> Starting prepare()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions