Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
--- PKGBUILD.orig 2016-06-07 12:22:39.833418761 +0100
+++ PKGBUILD 2016-06-07 13:42:49.653850504 +0100
@@ -3,7 +3,6 @@
# Contributor: Tianjiao Yin <ytj000(at)gmail(dot)(see)(oh)(em)>
# Contributor: Allan McRae <allan@archlinux.org>
-set -u
pkgname='gcc45'
pkgver='4.5.4'
pkgrel='3'
@@ -24,7 +23,6 @@
'2d369cf93c6e15c3559c3560bce581e0ae5f1f34dc86bca013ac67ef1c1a9ff9')
prepare() {
- set -u
cd "gcc-${pkgver}"
# Do not install libiberty
@@ -36,7 +34,7 @@
patch -Np0 -i "${srcdir}/gcc-hash-style-both.patch"
case "${CARCH}" in
- 'x86_64') patch -Np1 -i "${srcdir}/gcc_pure64.patch"; false;;
+ 'x86_64') patch -Np1 -i "${srcdir}/gcc_pure64.patch";;
esac
echo "${pkgver}" > 'gcc/BASE-VER'
@@ -48,6 +46,7 @@
cd 'build'
../configure \
+ --build=${CHOST} \
--prefix='/usr' \
--mandir='/usr/share/man' \
--infodir='/usr/share/info' \
@@ -68,19 +67,15 @@
--with-ppl \
--with-system-zlib \
CXX='g++-4.9' CC='gcc-4.9'
- set +u
}
build() {
- set -u
- cd "gcc-${pkgver}"
+ cd "gcc-${pkgver}/build"
local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc))
make -j "${_nproc}"
- set +u
}
package() {
- set -u
cd "gcc-${pkgver}/build"
make install DESTDIR="${pkgdir}"
@@ -96,6 +91,4 @@
mkdir -p "${pkgdir}/opt/gcc-4.5"
ln -s '/usr/bin/gcc-4.5' "${pkgdir}/opt/gcc-4.5/gcc"
ln -s '/usr/bin/g++-4.5' "${pkgdir}/opt/gcc-4.5/g++"
- set +u
}
-set +u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.