summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Ramos Rehermann2022-09-30 18:46:25 -0300
committerGustavo Ramos Rehermann2022-09-30 18:46:25 -0300
commitbc5e151d041e7c12671eeeb8452de8c446883b50 (patch)
tree9b5a34485c503d8f2bbbd831c016692f792b5cd2
parent9afd48bcddb1c36cb931029df317eafecbb9b865 (diff)
downloadaur-bspc-warsow-git.tar.gz
Warsow version
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD53
-rw-r--r--bspc-makefile.patch24
3 files changed, 68 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 461b4d8e9e30..23cd1451d41f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,21 @@
-pkgbase = bspc-padman-git
- pkgdesc = Quake 3 BSP-to-AAS compiler, to create bot navigation meshes. WorldOfPadman version
- pkgver = 1659723467.168.6417739
+pkgbase = bspc-warsow-git
+ pkgdesc = Quake 3 BSP-to-AAS compiler, to create bot navigation meshes. Warsow version
+ pkgver = 1664573766.111.d0673fd
pkgrel = 1
- url = https://github.com/PadWorld-Entertainment/bspc
+ url = https://github.com/Warsow/bspc
arch = x86_64
license = GPL
makedepends = git
- makedepends = cmake
- makedepends = ninja
+ makedepends = make
provides = bspc
- provides = bspc-padman
+ provides = bspc-warsow
conflicts = bspc
- conflicts = bspc-padman
- source = git+https://github.com/PadWorld-Entertainment/bspc.git
+ conflicts = bspc-warsow
+ source = git+https://github.com/Warsow/bspc.git
+ source = bspc-ttimo::git+https://github.com/TTimo/bspc.git
+ source = bspc-makefile.patch
md5sums = SKIP
+ md5sums = SKIP
+ md5sums = e3dfc816409a85aa5a62f4b9dd7da258
-pkgname = bspc-padman-git
+pkgname = bspc-warsow-git
diff --git a/PKGBUILD b/PKGBUILD
index 336f273da3aa..674f4475b938 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,31 @@
# Maintainer: Gustavo Ramos Rehermann <rehermann6046@gmail.com>
-pkgname=bspc-padman-git
+pkgname=bspc-warsow-git
_srcname=bspc
-pkgver=1659723467.168.6417739
+pkgver=1664573766.111.d0673fd
pkgrel=1
-pkgdesc="Quake 3 BSP-to-AAS compiler, to create bot navigation meshes. WorldOfPadman version"
+pkgdesc="Quake 3 BSP-to-AAS compiler, to create bot navigation meshes. Warsow version"
arch=("x86_64")
-url="https://github.com/PadWorld-Entertainment/bspc"
+url="https://github.com/Warsow/bspc"
license=('GPL')
groups=()
depends=()
-makedepends=('git' 'cmake' 'ninja')
+makedepends=('git' 'make')
optdepends=()
-provides=("bspc" "bspc-padman")
-conflicts=("bspc" "bspc-padman")
+provides=("bspc" "bspc-warsow")
+conflicts=("bspc" "bspc-warsow")
replaces=()
backup=()
options=()
install=
-source=('git+https://github.com/PadWorld-Entertainment/bspc.git')
+source=(
+ 'git+https://github.com/Warsow/bspc.git'
+ 'bspc-ttimo::git+https://github.com/TTimo/bspc.git'
+ 'bspc-makefile.patch')
noextract=()
-md5sums=('SKIP')
+md5sums=('SKIP'
+ 'SKIP'
+ 'e3dfc816409a85aa5a62f4b9dd7da258')
pkgver() {
cd "$srcdir/$_srcname"
@@ -30,22 +35,26 @@ pkgver() {
printf "%s.%s.%s" "$(git show -s --format=%ct HEAD)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+prepare() {
+ cd "$srcdir/$_srcname"
+
+ patch --forward --strip=1 --input="${srcdir}/bspc-makefile.patch"
+ git add Makefile
+ git commit -m autopatch-makefile
+
+ git remote add ttimo "${srcdir}/bspc-ttimo" || true
+ git fetch ttimo
+ git merge ttimo/master -m automerge -s ort -X theirs
+}
+
build() {
- cd "$srcdir"
-
- cmake -B build -S "$_srcname" \
- -DCMAKE_BUILD_TYPE=None \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -Wno-dev \
- -G Ninja
+ cd "$srcdir/$_srcname"
- cmake --build build
+ make -j"$(nproc)"
}
package() {
- # The below does not work, presumably because of the None target.
- #DESTDIR="$pkgdir/" cmake --install build
-
- # Also rename bspcwop to bspc.
+ cd "$srcdir/$_srcname"
+
mkdir -p "$pkgdir/usr/bin"
- cp "$srcdir/build/bspcwop" "$pkgdir/usr/bin/bspc"
+ cp bspc "$pkgdir/usr/bin/bspc"
}
diff --git a/bspc-makefile.patch b/bspc-makefile.patch
new file mode 100644
index 000000000000..85c7af8b9c55
--- /dev/null
+++ b/bspc-makefile.patch
@@ -0,0 +1,24 @@
+--- bspc.old/Makefile 2022-09-30 18:24:04.828168547 -0300
++++ bspc.new/Makefile 2022-09-30 18:23:58.614855578 -0300
+@@ -1,14 +1,16 @@
+-CC=gcc
+-CFLAGS=\
++CC?=gcc
++BASECFLAGS=\
+ -Dstricmp=strcasecmp -DCom_Memcpy=memcpy -DCom_Memset=memset \
+ -DMAC_STATIC= -DQDECL= -DLINUX -DBSPC -D_FORTIFY_SOURCE=2 \
+ -I. -Ideps -Wall
+
+-RELEASE_CFLAGS=-O3 -ffast-math
+-DEBUG_CFLAGS=-g -O0 -ffast-math
++CFLAGS?=
++
++#RELEASE_CFLAGS=-O3 -ffast-math
++#DEBUG_CFLAGS=-g -O0 -ffast-math
+ LDFLAGS=-lm -lpthread
+
+-DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
++DO_CC=$(CC) $(BASECFLAGS) $(CFLAGS) -o $@ -c $<
+
+ #############################################################################
+ # SETUP AND BUILD BSPC