diff options
author | Daniel Bermond | 2018-12-31 13:38:29 +0000 |
---|---|---|
committer | Daniel Bermond | 2018-12-31 13:43:41 +0000 |
commit | 699e133f2020a346a173bdedd98e625ae91e96e4 (patch) | |
tree | 8fb52f1c02594cea53ad2be7268d9474bf58bea3 | |
parent | 2b31c6d994404f2467f567bc8a74e311190978e1 (diff) | |
download | aur-699e133f2020a346a173bdedd98e625ae91e96e4.tar.gz |
Remove exec stack from core library. Enable PIE in ui-console.
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | mupen64plus-git-core-exe-stack.patch | 11 | ||||
-rw-r--r-- | mupen64plus-git-install-fix.patch | 10 | ||||
-rw-r--r-- | mupen64plus-git-ui-console-pie.patch | 19 |
5 files changed, 74 insertions, 20 deletions
@@ -1,8 +1,8 @@ pkgbase = mupen64plus-git pkgdesc = Nintendo64 Emulator (git version) - pkgver = 2.5.r1018.ge9ac55bf.20181015.044935 + pkgver = 2.5.r1032.gef15526e.20181121.044505 pkgrel = 1 - url = http://www.mupen64plus.org/ + url = https://www.mupen64plus.org/ arch = i686 arch = x86_64 license = GPL @@ -12,13 +12,14 @@ pkgbase = mupen64plus-git makedepends = boost depends = speexdsp depends = minizip - depends = hicolor-icon-theme depends = sdl2 depends = glu depends = libsamplerate depends = libpng depends = freetype2 depends = boost-libs + depends = hicolor-icon-theme + depends = desktop-file-utils provides = mupen64plus conflicts = mupen64plus source = git+https://github.com/mupen64plus/mupen64plus-core.git @@ -28,6 +29,9 @@ pkgbase = mupen64plus-git source = git+https://github.com/mupen64plus/mupen64plus-audio-sdl.git source = git+https://github.com/mupen64plus/mupen64plus-input-sdl.git source = git+https://github.com/mupen64plus/mupen64plus-ui-console.git + source = mupen64plus-git-install-fix.patch + source = mupen64plus-git-core-exe-stack.patch + source = mupen64plus-git-ui-console-pie.patch sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP @@ -35,6 +39,9 @@ pkgbase = mupen64plus-git sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP + sha256sums = d45208a1d9e5a08e6711739c9f52bd88ff016fa5c382a85f305cd4b69dbf62d1 + sha256sums = 859d0a51319e95c4357d539521a0872fedd5de366b759b89d66d663a6da3b6d0 + sha256sums = e0e6b47aa5ea7b72f2bd5d5ad5e42fee870d947177f2b7e0137b6a93540b894d pkgname = mupen64plus-git @@ -1,4 +1,4 @@ -# Maintainer: Daniel Bermond < yahoo-com: danielbermond > +# Maintainer: Daniel Bermond < gmail-com: danielbermond > # NOTE: # The additional field in $pkgver is in the format 'YYYMMDD.HHMMSS', which @@ -7,14 +7,14 @@ # mupen64plus component receives a new commit. pkgname=mupen64plus-git -pkgver=2.5.r1018.ge9ac55bf.20181015.044935 +pkgver=2.5.r1032.gef15526e.20181121.044505 pkgrel=1 pkgdesc='Nintendo64 Emulator (git version)' arch=('i686' 'x86_64') -url='http://www.mupen64plus.org/' +url='https://www.mupen64plus.org/' license=('GPL') -depends=('speexdsp' 'minizip' 'hicolor-icon-theme' 'sdl2' - 'glu' 'libsamplerate' 'libpng' 'freetype2' 'boost-libs') +depends=('speexdsp' 'minizip' 'sdl2' 'glu' 'libsamplerate' 'libpng' + 'freetype2' 'boost-libs' 'hicolor-icon-theme' 'desktop-file-utils') makedepends=('git' 'nasm' 'mesa' 'boost') provides=('mupen64plus') conflicts=('mupen64plus') @@ -24,20 +24,35 @@ source=('git+https://github.com/mupen64plus/mupen64plus-core.git' 'git+https://github.com/mupen64plus/mupen64plus-video-glide64mk2.git' 'git+https://github.com/mupen64plus/mupen64plus-audio-sdl.git' 'git+https://github.com/mupen64plus/mupen64plus-input-sdl.git' - 'git+https://github.com/mupen64plus/mupen64plus-ui-console.git') + 'git+https://github.com/mupen64plus/mupen64plus-ui-console.git' + 'mupen64plus-git-install-fix.patch' + 'mupen64plus-git-core-exe-stack.patch' + 'mupen64plus-git-ui-console-pie.patch') sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' - 'SKIP') + 'SKIP' + 'd45208a1d9e5a08e6711739c9f52bd88ff016fa5c382a85f305cd4b69dbf62d1' + '859d0a51319e95c4357d539521a0872fedd5de366b759b89d66d663a6da3b6d0' + 'e0e6b47aa5ea7b72f2bd5d5ad5e42fee870d947177f2b7e0137b6a93540b894d') + _m64p_components='core rsp-hle video-rice video-glide64mk2 audio-sdl input-sdl ui-console' prepare() { - # extract install script and remove unecessary 'source' directory references from it + # extract install script bsdtar -xf "${srcdir}/mupen64plus-core/tools/m64p_helper_scripts.tar.gz" m64p_install.sh - sed -i 's/source\///g' m64p_install.sh + + # remove uneedeed 'source' directory references from install script + patch -Np1 -i mupen64plus-git-install-fix.patch + + # remove executable stack from core library + patch -Np1 -i mupen64plus-git-core-exe-stack.patch + + # enable PIE for ui-console interface + patch -Np1 -i mupen64plus-git-ui-console-pie.patch } pkgver() { @@ -59,17 +74,9 @@ pkgver() { build() { local _component - local _target_line for _component in $_m64p_components do - # fix for 'ui-console' component (it needs to be compiled with -fPIC) - if [ "$_component" = 'ui-console' ] - then - _target_line="$(sed -n '/^ifeq ($(OS), LINUX)/=' "mupen64plus-${_component}/projects/unix/Makefile")" - sed -i "$((_target_line + 1))i\ \CFLAGS += -fPIC" "mupen64plus-${_component}/projects/unix/Makefile" - fi - printf '%s\n' " -> Building component '${_component}'..." make -C "mupen64plus-${_component}/projects/unix" clean $@ make -C "mupen64plus-${_component}/projects/unix" all $@ diff --git a/mupen64plus-git-core-exe-stack.patch b/mupen64plus-git-core-exe-stack.patch new file mode 100644 index 000000000000..8d83d90b71d3 --- /dev/null +++ b/mupen64plus-git-core-exe-stack.patch @@ -0,0 +1,11 @@ +diff -Naurp a/mupen64plus-core/projects/unix/Makefile b/mupen64plus-core/projects/unix/Makefile +--- a/mupen64plus-core/projects/unix/Makefile 2018-12-31 12:55:18.000000000 +0000 ++++ b/mupen64plus-core/projects/unix/Makefile 2018-12-31 13:08:02.609166199 +0000 +@@ -140,6 +140,7 @@ OPTFLAGS ?= -O3 -flto + WARNFLAGS ?= -Wall + CFLAGS += -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src -I../../src/asm_defines -DM64P_PARALLEL + CXXFLAGS += -fvisibility-inlines-hidden ++LDFLAGS += -Wl,-z,noexecstack + LDLIBS += -lm + + # Since we are building a shared library, we must compile with -fPIC on some architectures diff --git a/mupen64plus-git-install-fix.patch b/mupen64plus-git-install-fix.patch new file mode 100644 index 000000000000..2cdf2f3fa96e --- /dev/null +++ b/mupen64plus-git-install-fix.patch @@ -0,0 +1,10 @@ +diff -Naurp a/m64p_install.sh b/m64p_install.sh +--- a/m64p_install.sh 2013-02-26 20:22:09.000000000 +0000 ++++ b/m64p_install.sh 2018-12-31 12:20:39.000000000 +0000 +@@ -43,5 +43,5 @@ for component in ${M64P_COMPONENTS}; do + fi + + echo "************************************ Installing ${component} ${component_type}" +- "$MAKE" -C source/mupen64plus-${component}/projects/unix install $@ ++ "$MAKE" -C mupen64plus-${component}/projects/unix install $@ + done diff --git a/mupen64plus-git-ui-console-pie.patch b/mupen64plus-git-ui-console-pie.patch new file mode 100644 index 000000000000..cf9c7cc0a80c --- /dev/null +++ b/mupen64plus-git-ui-console-pie.patch @@ -0,0 +1,19 @@ +diff -Naurp a/mupen64plus-ui-console/projects/unix/Makefile b/mupen64plus-ui-console/projects/unix/Makefile +--- a/mupen64plus-ui-console/projects/unix/Makefile 2018-12-31 12:43:25.555935332 +0000 ++++ b/mupen64plus-ui-console/projects/unix/Makefile 2018-12-31 12:54:54.172782742 +0000 +@@ -175,15 +175,6 @@ LINK.o = $(Q_LD)$(CC) $(CFLAGS) $(LDFLAG + ifeq ($(PIE), 1) + CFLAGS += -fPIE + LDFLAGS += -pie +-else +- CFLAGS += -fno-PIE +- ifeq ($(CC),$(CROSS_COMPILE)gcc) +- # check if PIE is the default for the compiler +- PIE_DEFAULT = $(shell $(CC) -v 2>&1 | grep enable-default-pie) +- ifneq ($(PIE_DEFAULT),) +- LDFLAGS += -no-pie +- endif +- endif + endif + + # set installation options |