summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2020-11-22 18:13:58 -0800
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2020-11-22 18:13:58 -0800
commitd9e7d6452310793d5da861fb03a98b3fcd296dc4 (patch)
tree92bd85ed3d4727ae2969187d48d44419df927325
parentpkgrel (diff)
downloadmupen64plus-d9e7d6452310793d5da861fb03a98b3fcd296dc4.tar.xz
Fix build
-rw-r--r--010-mupen64plus-ui-console-pie.patch11
-rw-r--r--020-mupen64plus-core-gcc10-fix.patch10
-rw-r--r--PKGBUILD23
-rw-r--r--ui-console-pic.patch12
4 files changed, 35 insertions, 21 deletions
diff --git a/010-mupen64plus-ui-console-pie.patch b/010-mupen64plus-ui-console-pie.patch
new file mode 100644
index 0000000..39f89de
--- /dev/null
+++ b/010-mupen64plus-ui-console-pie.patch
@@ -0,0 +1,11 @@
+--- a/source/mupen64plus-ui-console/projects/unix/Makefile
++++ b/source/mupen64plus-ui-console/projects/unix/Makefile
+@@ -84,8 +84,6 @@ endif
+ ifeq ($(PIE), 1)
+ CFLAGS += -fPIE
+ LDFLAGS += -pie
+-else
+- CFLAGS += -fno-PIE
+ endif
+
+ # set special flags per-system
diff --git a/020-mupen64plus-core-gcc10-fix.patch b/020-mupen64plus-core-gcc10-fix.patch
new file mode 100644
index 0000000..c429e1e
--- /dev/null
+++ b/020-mupen64plus-core-gcc10-fix.patch
@@ -0,0 +1,10 @@
+--- a/source/mupen64plus-core/src/main/workqueue.h
++++ b/source/mupen64plus-core/src/main/workqueue.h
+@@ -27,7 +27,6 @@
+
+ struct work_struct;
+
+-struct work_struct *work;
+ typedef void (*work_func_t)(struct work_struct *work);
+ struct work_struct {
+ work_func_t func;
diff --git a/PKGBUILD b/PKGBUILD
index 3618b86..9516c6e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,6 @@
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
-# Maintainer (Arch): Sven-Hendrik Haase <sh@lutzhaase.com>
+# Maintainer (Arch): Daniel Bermond <dbermond@archlinux.org>
+# Contributor (Arch): Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor (Arch): Thomas Dziedzic < gostrc at gmail >
# Contributor (Arch): Laurent Carlier <lordheavym@gmail.com>
# Contributor (Arch): Allan McRae <allan@archlinux.org>
@@ -10,30 +11,34 @@
pkgname=mupen64plus
pkgver=2.5
-pkgrel=16
+pkgrel=16.2
pkgdesc='Nintendo64 Emulator'
arch=('x86_64')
url='https://github.com/mupen64plus/mupen64plus-core'
license=('GPL')
-depends=('glu' 'libsamplerate' 'libpng' 'sdl' 'freetype2' 'boost-libs')
+depends=('boost-libs' 'freetype2' 'glu' 'libgl' 'libpng' 'libsamplerate' 'sdl'
+ 'zlib' 'hicolor-icon-theme')
makedepends=('mesa' 'boost')
source=("https://github.com/mupen64plus/mupen64plus-core/releases/download/2.5/mupen64plus-bundle-src-${pkgver}.tar.gz"
- 'ui-console-pic.patch')
+ '010-mupen64plus-ui-console-pie.patch'
+ '020-mupen64plus-core-gcc10-fix.patch')
sha256sums=('9c75b9d826f2d24666175f723a97369b3a6ee159b307f7cc876bbb4facdbba66'
- 'bb4784de177aaa4c0b4f5d07b14ae020f3b47e6aa524df65366ac00eb169ee8f')
+ '0b674779949ca90db9f156b56dd9d7be9847354f5b07ec73aa3a89dde79d6b6d'
+ 'f84f262bcf2b748ccded4443735caba92926241f9238f545a621009f6ae64ef7')
prepare() {
cd mupen64plus-bundle-src-$pkgver
- patch -p1 -i ../ui-console-pic.patch
+ patch -p1 -i ../010-mupen64plus-ui-console-pie.patch
+ patch -p1 -i ../020-mupen64plus-core-gcc10-fix.patch
}
build() {
cd mupen64plus-bundle-src-${pkgver}
# -fPIE breaks libmupen64plus.so.2
-# -fcommon as gcc10 workaround
- export CFLAGS="$CFLAGS -O3 -flto=4 -fPIC -fcommon"
- export CXXFLAGS="$CXXFLAGS -O3 -flto=4 -fPIC -fcommon"
+ export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=4 -fPIE"
+ export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=4 -fPIE"
+ export LDFLAGS="$LDFLAGS,-pie"
if [[ $CARCH = 'i686' ]]; then
export CFLAGS="${CFLAGS/-fno-plt/}"
diff --git a/ui-console-pic.patch b/ui-console-pic.patch
deleted file mode 100644
index 62a1485..0000000
--- a/ui-console-pic.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/source/mupen64plus-ui-console/projects/unix/Makefile b/source/mupen64plus-ui-console/projects/unix/Makefile
-index a4a05e3..199f27f 100755
---- a/source/mupen64plus-ui-console/projects/unix/Makefile
-+++ b/source/mupen64plus-ui-console/projects/unix/Makefile
-@@ -90,6 +90,7 @@ endif
-
- # set special flags per-system
- ifeq ($(OS), LINUX)
-+ CFLAGS += -fPIC
- LDLIBS += -ldl
- endif
- ifeq ($(OS), OSX)