summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipe Verri2017-08-21 10:23:43 -0300
committerFilipe Verri2017-08-21 10:23:43 -0300
commit065703b4e02b4072c7b1674c1671b4f8ce5451aa (patch)
tree2fa616afe873a78d207d32b9832f210993d3382b
parent1f0bb9d0cdfbe8db8506c646f560241cd8ec7036 (diff)
downloadaur-065703b4e02b4072c7b1674c1671b4f8ce5451aa.tar.gz
Removed build2 make-dependency.
* Use bootstrapping if needed. * Bootstrapping process has been improved.
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD60
2 files changed, 19 insertions, 42 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bc9e949051de..8b2dcb542861 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,7 +6,6 @@ pkgbase = bpkg
arch = i686
arch = x86_64
license = MIT
- makedepends = build2=0.6.0
makedepends = gcc>=4.9
depends = libbpkg=0.6.0
depends = sqlite>=3.18
diff --git a/PKGBUILD b/PKGBUILD
index 9a6bfd1e6036..4649eaeb5beb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,71 +8,49 @@ arch=(i686 x86_64)
url="https://build2.org/"
license=('MIT')
depends=('libbpkg=0.6.0' 'sqlite>=3.18')
-makedepends=('build2=0.6.0' 'gcc>=4.9')
+makedepends=('gcc>=4.9')
source=("https://download.build2.org/0.6.0/build2-toolchain-0.6.0.tar.gz")
sha256sums=('7c1749abdd145254fadfe3684567767a785e3f78b094a5850d2c3d152e32a264')
build() {
cd build2-toolchain-0.6.0
- if test -z "$(command -v bpkg && bpkg --version | grep '^bpkg 0.6.0')"
+ if test -z "$(command -v b && b --version | grep '^build2 0.6.0')"
then
cd build2
- b config.cxx=g++ config.bin.lib=static
-
- mkdir "$srcdir/root"
-
+ ./bootstrap.sh g++
cd ..
- b configure \
- config.cxx=g++ \
- config.bin.suffix=-stage \
- config.bin.lib=static \
- config.install.root="$srcdir/root/usr" \
- config.install.data_root=/tmp/build2-stage
-
- b install
-
- export PATH="$srcdir/root/usr/bin:$PATH"
-
- b configure \
- config.cxx=g++ \
- config.cc.coptions=-O3 \
- config.bin.lib=static \
- config.install.root="$srcdir/root/usr"
-
- export BPKGCMD=bpkg-stage
+ export BCMD="$(pwd)/build2/build2/b-boot"
else
- export BPKGCMD=bpkg
+ export BCMD=b
fi
- mkdir -p bpkg-final
- cd bpkg-final
-
- $BPKGCMD create \
- cc \
+ $BCMD configure \
config.cxx=g++ \
config.cc.coptions=-O3 \
config.bin.lib=static \
- config.install.root="$pkgdir/usr"
+ config.install.root="$pkgdir/usr" \
+ config.import.libbutl='' \
+ config.import.libbpkg='' \
+ config.import.libsqlite3=''
- $BPKGCMD add https://pkg.cppget.org/1/alpha
- $BPKGCMD --trust-yes fetch
- $BPKGCMD build --yes sys:libsqlite3 sys:libbutl sys:libbpkg bpkg/0.6.0
+ cd bpkg
+ $BCMD 'update(bpkg/)'
}
package() {
- cd build2-toolchain-0.6.0/bpkg-final
+ cd build2-toolchain-0.6.0
- if test -z "$(command -v bpkg && bpkg --version | grep '^bpkg 0.6.0')"
+ if test -z "$(command -v b && b --version | grep '^build2 0.6.0')"
then
- export PATH="$srcdir/root/usr/bin:$PATH"
- export BPKGCMD=bpkg-stage
+ export BCMD="$(pwd)/build2/build2/b-boot"
else
- export BPKGCMD=bpkg
+ export BCMD=b
fi
- $BPKGCMD install bpkg
+ cd bpkg
+ $BCMD install config.install.root="$pkgdir/usr"
mkdir -p "$pkgdir/usr/share/licenses/$pkgname/"
- install -Dm644 "$pkgname-0.6.0/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}