summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart van Strien2024-04-07 13:11:49 +0200
committerBart van Strien2024-04-07 13:11:49 +0200
commit179eb10cfb60c373f55c4f8711f4ec75fb9fbc6a (patch)
tree1d24040b55f38659cda3e806fee5e29f23e2399c
parent8524e05243d434ef6d3b0307e3903380a38a0e6f (diff)
downloadaur-179eb10cfb60c373f55c4f8711f4ec75fb9fbc6a.tar.gz
Update package for cmake build
-rw-r--r--PKGBUILD39
1 files changed, 15 insertions, 24 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8ca3eac63399..984dfedeb40f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Linus Sjögren <thelinx@unreliablepollution.net>
# Contributor: Andrzej Giniewicz < gginiu@gmail.com >
pkgname=love-git
-pkgver=20231203.6eb8d546
+pkgver=20240406.92a03719
pkgrel=1
pkgdesc="An open-source 2D game engine which uses the versatile Lua scripting language to create dynamic gaming experiences."
arch=(i686 x86_64 armv6h armv7h)
@@ -14,45 +14,36 @@ depends=(
)
replaces=('love-hg')
source=('git+https://github.com/love2d/love')
-makedepends=('git')
+makedepends=('git' 'cmake')
options=(!strip)
sha256sums=('SKIP')
pkgver() {
- cd $srcdir/love
+ cd "$srcdir/love"
git log -1 --format='%cd.%h' --date=short | tr -d -
}
build() {
- cd $srcdir/love
-
- # Update version information in configure script
- msg "Updating version information"
- head -c 15 platform/unix/configure.ac > configure.ac.tmp
- echo " [$pkgver])" >> configure.ac.tmp
- tail -n +2 platform/unix/configure.ac >> configure.ac.tmp
- mv configure.ac.tmp platform/unix/configure.ac
-
- # Skip installing desktop files, icons, etc
- head -n 4 platform/unix/Makefile.am > Makefile.am.tmp
- mv Makefile.am.tmp platform/unix/Makefile.am
-
- # Generate a configure script for love-git (note the suffix), then configure
msg "Generating makefiles"
- sh platform/unix/automagic -git
- ./configure --enable-silent-rules --prefix=/usr LDFLAGS=""
+ cmake -B build -S "$srcdir/love" \
+ -DLOVE_EXE_NAME='love-git' \
+ -DCMAKE_BUILD_TYPE='None' \
+ -DCMAKE_INSTALL_PREFIX='/usr' \
+ -DCMAKE_SKIP_INSTALL_RPATH=YES \
+ -Wno-dev
- # Finally build
msg "Building"
- make
+ cmake --build build
}
package() {
- cd "$srcdir/love"
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" cmake --install build
+
+ # Skip installing desktop files, icons, etc
+ rm -r "${pkgdir}/usr/share"
# Install the license file
- install -D -m644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -D -m644 "${srcdir}/love/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim:set ts=4 sw=4 noet: