summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Alff2022-05-31 11:52:07 -0400
committerTed Alff2022-05-31 11:52:07 -0400
commitde93d586bbba2646baeddcc981c099021bb6dd40 (patch)
treeabd9550ffd38c0fa93d760e5672210796750abe6
parentfd1b66e46a675daaefbf8264fd086af5fa329b03 (diff)
downloadaur-de93d586bbba2646baeddcc981c099021bb6dd40.tar.gz
Fix compilation.
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD10
-rw-r--r--include_stddef_for_offsetof.patch12
3 files changed, 22 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 200fc445503..e338a88a298 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python2-pygame
pkgdesc = Python game library
pkgver = 1.9.6
- pkgrel = 1
+ pkgrel = 2
url = http://www.pygame.org/
arch = x86_64
arch = i686
@@ -15,7 +15,8 @@ pkgbase = python2-pygame
depends = python2
depends = portmidi
source = https://pypi.io/packages/source/p/pygame/pygame-1.9.6.tar.gz
+ source = include_stddef_for_offsetof.patch
sha256sums = 301c6428c0880ecd4a9e3951b80e539c33863b6ff356a443db1758de4f297957
+ sha256sums = 73874fbf335183ed309242fa648a73fb8f64e78ed89d9becad24a4f1b5d330c8
pkgname = python2-pygame
-
diff --git a/PKGBUILD b/PKGBUILD
index f263d3eefbe..f185a090563 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,21 +2,25 @@
pkgname=python2-pygame
pkgver=1.9.6
-pkgrel=1
+pkgrel=2
pkgdesc="Python game library"
arch=('x86_64' 'i686' 'armv7h' 'aarch64')
url="http://www.pygame.org/"
license=('LGPL')
depends=('sdl_mixer' 'sdl_ttf' 'sdl_image' 'python2' 'portmidi')
makedepends=('python2-setuptools')
-source=(https://pypi.io/packages/source/p/pygame/pygame-$pkgver.tar.gz)
-sha256sums=('301c6428c0880ecd4a9e3951b80e539c33863b6ff356a443db1758de4f297957')
+source=("https://pypi.io/packages/source/p/pygame/pygame-$pkgver.tar.gz"
+ 'include_stddef_for_offsetof.patch')
+sha256sums=('301c6428c0880ecd4a9e3951b80e539c33863b6ff356a443db1758de4f297957'
+ '73874fbf335183ed309242fa648a73fb8f64e78ed89d9becad24a4f1b5d330c8')
prepare() {
cd pygame-${pkgver}
# don't ship python2 *and* python3 compiled bytecode from upstream
find . -name "*.pyc" -delete
find . -type f -exec sed -i 's#/usr/bin/env python#/usr/bin/env python2#' {} +
+
+ patch -uNp2 -r- -i ../include_stddef_for_offsetof.patch
}
build() {
diff --git a/include_stddef_for_offsetof.patch b/include_stddef_for_offsetof.patch
new file mode 100644
index 00000000000..dd9bf26b71b
--- /dev/null
+++ b/include_stddef_for_offsetof.patch
@@ -0,0 +1,12 @@
+diff -Naur ./pygame-1.9.6.orig/src_c/_pygame.h ./pygame-1.9.6/src_c/_pygame.h
+--- ./pygame-1.9.6.orig/src_c/_pygame.h 2022-05-31 11:42:28.700875496 -0400
++++ ./pygame-1.9.6/src_c/_pygame.h 2022-05-31 11:46:25.328375067 -0400
+@@ -73,6 +73,8 @@
+ #endif
+ #endif
+
++#include <stddef.h>
++
+ #define PG_STRINGIZE_HELPER(x) #x
+ #define PG_STRINGIZE(x) PG_STRINGIZE_HELPER(x)
+ #define PG_WARN(desc) message(__FILE__ "(" PG_STRINGIZE(__LINE__) "): WARNING: " #desc)