diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2018-03-01 14:04:09 +0100 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2018-03-01 14:04:09 +0100 |
commit | bf132093b67c42139f2ac2b935f3e9ed0777c222 (patch) | |
tree | d5bfcf69f2be5855b15f37eced139de689e49ebc | |
parent | f65dc07b1bc6e22c31a871bc31e274b5bc92c5b8 (diff) |
happy little progress
-rw-r--r-- | src/stage3/patches/glibc.patch | 7 | ||||
-rw-r--r-- | src/stage3/patches/libcap-ng.patch | 15 | ||||
-rw-r--r-- | src/stage3/patches/popt.patch | 15 | ||||
-rw-r--r-- | src/stage3/patches/tcl.patch | 20 | ||||
-rw-r--r-- | src/stage3/prepare_deptree.sh | 26 | ||||
-rwxr-xr-x | src/stage3/stage3.sh | 7 |
6 files changed, 74 insertions, 16 deletions
diff --git a/src/stage3/patches/glibc.patch b/src/stage3/patches/glibc.patch index f56ca02..1652610 100644 --- a/src/stage3/patches/glibc.patch +++ b/src/stage3/patches/glibc.patch @@ -1,14 +1,15 @@ ---- a/PKGBUILD 2018-03-01 07:07:23.230885844 +0100 -+++ b/PKGBUILD 2018-03-01 07:55:12.196458937 +0100 +--- a/PKGBUILD 2018-03-01 13:34:35.714316214 +0100 ++++ b/PKGBUILD 2018-03-01 13:34:35.713316212 +0100 @@ -6,16 +6,14 @@ # NOTE: valgrind requires rebuilt with each major glibc version pkgbase=glibc -pkgname=(glibc lib32-glibc) -pkgver=2.26 +-pkgrel=11 +pkgname=(glibc) +pkgver=2.27 - pkgrel=11 ++pkgrel=1 arch=(x86_64) url='http://www.gnu.org/software/libc' license=(GPL LGPL) diff --git a/src/stage3/patches/libcap-ng.patch b/src/stage3/patches/libcap-ng.patch new file mode 100644 index 0000000..e194cfe --- /dev/null +++ b/src/stage3/patches/libcap-ng.patch @@ -0,0 +1,15 @@ +--- a/PKGBUILD 2018-03-01 13:46:34.827857959 +0100 ++++ b/PKGBUILD 2018-03-01 13:46:34.826857913 +0100 +@@ -13,6 +13,12 @@ depends=('glibc') + source=(http://people.redhat.com/sgrubb/$pkgname/$pkgname-$pkgver.tar.gz) + md5sums=('0dece96644bd798020e170fbf7663802') + ++prepare() { ++ cd $pkgname-$pkgver ++ @CONFIG_SUB@ > config.sub ++ @CONFIG_GUESS@ > config.guess ++} ++ + build() { + cd $pkgname-$pkgver + diff --git a/src/stage3/patches/popt.patch b/src/stage3/patches/popt.patch new file mode 100644 index 0000000..18ff659 --- /dev/null +++ b/src/stage3/patches/popt.patch @@ -0,0 +1,15 @@ +--- a/PKGBUILD 2018-03-01 13:40:15.003223269 +0100 ++++ b/PKGBUILD 2018-03-01 13:40:15.003223269 +0100 +@@ -13,6 +13,12 @@ options=('staticlibs') + source=(http://rpm5.org/files/${pkgname}/${pkgname}-${pkgver}.tar.gz) + sha1sums=('cfe94a15a2404db85858a81ff8de27c8ff3e235e') + ++prepare() { ++ cd "${srcdir}/${pkgname}-${pkgver}" ++ curl "https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" > config.sub ++ curl "https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" > config.guess ++} ++ + build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr diff --git a/src/stage3/patches/tcl.patch b/src/stage3/patches/tcl.patch new file mode 100644 index 0000000..a5e5da8 --- /dev/null +++ b/src/stage3/patches/tcl.patch @@ -0,0 +1,20 @@ +--- a/PKGBUILD 2018-03-01 14:03:27.177548304 +0100 ++++ b/PKGBUILD 2018-03-01 14:03:27.177548304 +0100 +@@ -11,7 +11,7 @@ license=('custom') + depends=('zlib') + options=('staticlibs') + source=(http://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.gz) +-sha1sums=('0d014d97ca38534d4be1dfc6c563a7a3a6aa737f') ++sha1sums=('24c6e9477a83f2e67e3ac6fcd6fec6fbb393b289') + + prepare() { + cd tcl${pkgver} +@@ -21,7 +21,7 @@ prepare() { + + build() { + cd tcl${pkgver}/unix +- [[ $CARCH == "x86_64" ]] && BIT="--enable-64bit" ++ [[ $CARCH == *"64" ]] && BIT="--enable-64bit" + ./configure --prefix=/usr --mandir=/usr/share/man --enable-threads $BIT + make + } diff --git a/src/stage3/prepare_deptree.sh b/src/stage3/prepare_deptree.sh index ded8f87..453900d 100644 --- a/src/stage3/prepare_deptree.sh +++ b/src/stage3/prepare_deptree.sh @@ -26,6 +26,15 @@ echo -n "checking for complete deptree ... " [ -f "$_deptree".FULL ] && _have_deptree=yes || _have_deptree=no echo $_have_deptree +function add_dep() { + # translate dependency string to actual package + realdep=$(pacman --noconfirm -Sw "$2" | grep '^Packages' | awk '{print $3}') + realdep=${realdep%-*-*} + # add dependency to tree and frontier + _tree[$1]="${_tree[$1]} $realdep" + _frontier+=($realdep) +} + if [ "x$_have_deptree" == "xno" ]; then declare -A _tree _frontier=($(pacman -Sg $_groups | awk '{print $2}')) @@ -44,17 +53,16 @@ if [ "x$_have_deptree" == "xno" ]; then _pkgdeps=$(pacman -Si $_pkgname | grep '^Depends' | cut -d':' -f2 | sed 's/None//') # iterate dependencies for pkg - for dep in $_pkgdeps; do - # translate dependency string to actual package - realdep=$(pacman --noconfirm -Sw "$dep" | grep '^Packages' | awk '{print $3}') - realdep=${realdep%-*-*} - # add dependency to tree and frontier - _tree[$_pkgname]="${_tree[$_pkgname]} $realdep" - _frontier+=($realdep) + for _dep in $_pkgdeps; do + add_dep $_pkgname $_dep done - done - # modify build order a bit + # add some additional hand-picked dependencies + case $_pkgname in + libffi) + add_dep $_pkgname dejagnu ;; + esac + done # write package dependency tree truncate -s0 "$_deptree".FULL diff --git a/src/stage3/stage3.sh b/src/stage3/stage3.sh index bd8457a..075412c 100755 --- a/src/stage3/stage3.sh +++ b/src/stage3/stage3.sh @@ -119,11 +119,10 @@ EOF fi done - # patch for cross-compiling - if [ -f "$_srcdir"/patches/$_pkgname.patch ]; then - cp PKGBUILD{,.old} + # patch if necessary + cp PKGBUILD{,.old} + [ -f "$_srcdir"/patches/$_pkgname.patch ] && \ patch -Np1 -i "$_srcdir"/patches/$_pkgname.patch - fi # substitute common variables _config="https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain" |