summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Schulte2019-04-12 15:22:18 -0400
committerEric Schulte2019-04-12 15:45:56 -0400
commitbbbf7ceec36a4884f8814ed780a1bdeabcbe2ade (patch)
tree2cc56a3b6f7e9c13dc2333cec3c0b1fd13364ac8
parentc3a2908bbb12ed9616f2748ed2472459d54fea93 (diff)
downloadaur-bbbf7ceec36a4884f8814ed780a1bdeabcbe2ade.tar.gz
Optionally use system boost (if present)
-rw-r--r--PKGBUILD14
1 files changed, 10 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 83c638aca20..97460cc5048 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,15 @@
# Maintainer: Eric Schulte <eschulte@grammatech.com>
_srcname=ddisasm
pkgname=ddisasm-git
-pkgver=v0.1.0.r0.gc2744b8
+pkgver=v0.1.0.r1.ge70761a
pkgrel=1
pkgdesc="A fast and accurate disassembler"
arch=('x86_64')
url="https://github.com/grammatech/ddisasm"
license=('aGPLv3')
-depends=()
-makedepends=('git' 'cmake' 'souffle-git' 'mcpp' 'gtirb' 'capstone')
+optdepends=('boost: build against system boost')
+depends=('gtirb' 'capstone')
+makedepends=('git' 'cmake' 'souffle-git' 'mcpp')
provides=('ddisasm')
source=('git://github.com/grammatech/ddisasm.git')
sha512sums=('SKIP')
@@ -21,10 +22,15 @@ pkgver() {
build() {
cd "$_srcname/"
+ if [ -f /usr/include/boost/program_options.hpp ];then
+ FLAGS="-DCMAKE_INSTALL_PREFIX=/usr -DDDISASM_USE_SYSTEM_BOOST=ON"
+ else
+ FLAGS="-DCMAKE_INSTALL_PREFIX=/usr"
+ fi
# CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
# CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
# LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
- CFLAGS="" CXXFLAGS="" LDFLAGS="" cmake . -Bbuild -DCMAKE_INSTALL_PREFIX=/usr
+ CFLAGS="" CXXFLAGS="" LDFLAGS="" cmake . -Bbuild $FLAGS
make -C build
}