summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Sun2020-10-01 22:45:35 -0400
committerAndrew Sun2020-10-01 22:45:35 -0400
commit322f8f1fcdf7eb9aad0b50d9b5bcea12d6a692b5 (patch)
tree0321dfcd89560039d12215959297ddaf308d9833
parent7d17a7f166afc81ae6989189927b90cbdcad3a5d (diff)
downloadaur-322f8f1fcdf7eb9aad0b50d9b5bcea12d6a692b5.tar.gz
fix build without <sys/sysctl.h>
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD18
-rw-r--r--no-sys-sysctl-header.patch11
3 files changed, 27 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 60b116ce3d7..b9e68e3a12f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = chipmunk
pkgdesc = A high-performance 2D rigid body physics library
pkgver = 7.0.3
- pkgrel = 1
+ pkgrel = 2
url = https://chipmunk-physics.net/
arch = i686
arch = x86_64
@@ -9,7 +9,9 @@ pkgbase = chipmunk
makedepends = cmake
depends = glibc
source = chipmunk-7.0.3.tar.gz::https://github.com/slembcke/Chipmunk2D/archive/Chipmunk-7.0.3.tar.gz
+ source = no-sys-sysctl-header.patch
sha256sums = 1e6f093812d6130e45bdf4cb80280cb3c93d1e1833d8cf989d554d7963b7899a
+ sha256sums = adf74765488c932464c33609775b3d9d8043a79162efc2d0f49b42a38d447e8a
pkgname = chipmunk
diff --git a/PKGBUILD b/PKGBUILD
index ec547b6efdd..0f4bc1a43c2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,26 @@
-# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+# Maintainer: Andrew Sun <adsun701 at gmail dot com>
+# Contributor: Massimiliano Torromeo <massimiliano dot torromeo at gmail dot com>
# Contributor: Astor Castelo <amcastelo[at]gatech[dot]edu>
-# Contributor: Fabio Volpe <volpefabio@gmail.com>
+# Contributor: Fabio Volpe <volpefabio at gmail dot com>
pkgname=chipmunk
pkgver=7.0.3
-pkgrel=1
+pkgrel=2
pkgdesc="A high-performance 2D rigid body physics library"
arch=('i686' 'x86_64')
url="https://chipmunk-physics.net/"
license=('MIT')
depends=('glibc')
makedepends=('cmake')
-source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/slembcke/Chipmunk2D/archive/Chipmunk-${pkgver}.tar.gz")
-sha256sums=('1e6f093812d6130e45bdf4cb80280cb3c93d1e1833d8cf989d554d7963b7899a')
+source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/slembcke/Chipmunk2D/archive/Chipmunk-${pkgver}.tar.gz"
+ "no-sys-sysctl-header.patch")
+sha256sums=('1e6f093812d6130e45bdf4cb80280cb3c93d1e1833d8cf989d554d7963b7899a'
+ 'adf74765488c932464c33609775b3d9d8043a79162efc2d0f49b42a38d447e8a')
+
+prepare() {
+ cd "${srcdir}/Chipmunk2D-Chipmunk-${pkgver}"
+ patch -Np1 -i "${srcdir}/no-sys-sysctl-header.patch"
+}
build() {
mkdir -p "${srcdir}/build" && cd "${srcdir}/build"
diff --git a/no-sys-sysctl-header.patch b/no-sys-sysctl-header.patch
new file mode 100644
index 00000000000..736b804012c
--- /dev/null
+++ b/no-sys-sysctl-header.patch
@@ -0,0 +1,11 @@
+diff -Naur Chipmunk2D-Chipmunk-7.0.3.orig/src/cpHastySpace.c Chipmunk2D-Chipmunk-7.0.3/src/cpHastySpace.c
+--- Chipmunk2D-Chipmunk-7.0.3.orig/src/cpHastySpace.c 2020-10-01 22:42:46.218323897 -0400
++++ Chipmunk2D-Chipmunk-7.0.3/src/cpHastySpace.c 2020-10-01 22:43:20.858552865 -0400
+@@ -8,7 +8,6 @@
+
+ //#include <sys/param.h >
+ #ifndef _WIN32
+-#include <sys/sysctl.h>
+ #include <pthread.h>
+ #else
+ #ifndef WIN32_LEAN_AND_MEAN