diff options
author | Keshav Amburay | 2013-06-07 21:49:31 +0530 |
---|---|---|
committer | Keshav Amburay | 2013-06-07 21:49:31 +0530 |
commit | e6355d135665162c60e70379e5923055ffffd091 (patch) | |
tree | 6975b03df69e59ee0677578c7d0b5cc96de7299e | |
parent | b403d088db291cc116ecd549e4cbe627eb133c0e (diff) | |
download | aur-e6355d135665162c60e70379e5923055ffffd091.tar.gz |
Fix ia32 compile
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | gnu-efi-fix-makefile-vars.patch | 23 |
3 files changed, 36 insertions, 1 deletions
@@ -12,8 +12,10 @@ pkgbase = gnu-efi-libs-git options = !strip options = !makeflags source = gnu-efi::git+git://git.code.sf.net/p/gnu-efi/code#branch=master + source = gnu-efi-fix-makefile-vars.patch source = gnu-efi-disable-USE_MS_ABI.patch sha1sums = SKIP + sha1sums = eec2b954aa44407b38342be567e767cea302b7c8 sha1sums = 5e6b30cdf2c1d89ccb3f5314bb3e0ef0d45b0001 pkgname = gnu-efi-libs-git @@ -26,9 +26,11 @@ conflicts=('gnu-efi-libs') provides=('gnu-efi-libs') source=("${_gitname}::git+${_gitroot}#branch=${_gitbranch}" + 'gnu-efi-fix-makefile-vars.patch' 'gnu-efi-disable-USE_MS_ABI.patch') sha1sums=('SKIP' + 'eec2b954aa44407b38342be567e767cea302b7c8' '5e6b30cdf2c1d89ccb3f5314bb3e0ef0d45b0001') pkgver() { @@ -37,7 +39,9 @@ pkgver() { } _build_gnu-efi-libs-x86_64() { + rm -rf "${srcdir}/${_gitname}_build-x86_64" || true cp -r "${srcdir}/${_gitname}_build" "${srcdir}/${_gitname}_build-x86_64" + cd "${srcdir}/${_gitname}_build-x86_64/${_src_rootdir}/" unset CFLAGS @@ -54,7 +58,9 @@ _build_gnu-efi-libs-x86_64() { } _build_gnu-efi-libs-i386() { + rm -rf "${srcdir}/${_gitname}_build-i386" || true cp -r "${srcdir}/${_gitname}_build" "${srcdir}/${_gitname}_build-i386" + cd "${srcdir}/${_gitname}_build-i386/${_src_rootdir}/" unset CFLAGS @@ -76,8 +82,12 @@ build() { cd "${srcdir}/${_gitname}_build/${_src_rootdir}/" + ## Fix Makefiles to enable compile for both UEFI arch + patch -Np1 -i "${srcdir}/gnu-efi-fix-makefile-vars.patch" || true + echo + ## Disable GCC MS_ABI CFLAGS - # patch -Np1 -i "${srcdir}/gnu-efi-disable-USE_MS_ABI.patch" + # patch -Np1 -i "${srcdir}/gnu-efi-disable-USE_MS_ABI.patch" || true # echo if [[ "${CARCH}" == "x86_64" ]]; then diff --git a/gnu-efi-fix-makefile-vars.patch b/gnu-efi-fix-makefile-vars.patch new file mode 100644 index 000000000000..99e85ab3e081 --- /dev/null +++ b/gnu-efi-fix-makefile-vars.patch @@ -0,0 +1,23 @@ +diff --git a/Make.defaults b/Make.defaults +index 0585915..ccada22 100644 +--- a/Make.defaults ++++ b/Make.defaults +@@ -38,14 +38,14 @@ + # Where to install the package. GNU-EFI will create and access + # lib and include under the root + # +-INSTALLROOT := / +-PREFIX := /usr/local +-LIBDIR := ${PREFIX}/lib ++INSTALLROOT ?= / ++PREFIX ?= /usr/local ++LIBDIR ?= ${PREFIX}/lib + + TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) + + HOSTARCH = $(shell uname -m | sed s,i[3456789]86,ia32,) +-ARCH := $(shell uname -m | sed s,i[3456789]86,ia32,) ++ARCH ?= $(shell uname -m | sed s,i[3456789]86,ia32,) + # FreeBSD (and possibly others) reports amd64 instead of x86_64 + ifeq ($(ARCH), amd64) + ARCH = x86_64 |