diff options
author | acxz | 2019-07-25 23:47:19 -0400 |
---|---|---|
committer | acxz | 2019-07-25 23:47:19 -0400 |
commit | 825e2da90e822d1b9d0121606a29d531f895d779 (patch) | |
tree | 510c5ceb7b948137518f81dba9316d46882acaa3 | |
parent | e03d8fcd582da873bdfa5558f66793144cff64e2 (diff) | |
download | aur-825e2da90e822d1b9d0121606a29d531f895d779.tar.gz |
Added sisl dep
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 31 |
2 files changed, 24 insertions, 8 deletions
@@ -9,6 +9,7 @@ pkgbase = libiges-git makedepends = git makedepends = cmake depends = gcc + optdepends = sisl provides = libiges conflicts = libiges source = git+https://github.com/cbernardo/libIGES.git @@ -7,6 +7,7 @@ arch=('i686' 'x86_64') url="http://cbernardo.github.io/libIGES" license=('LGPL-2.1') depends=('gcc') +optdepends=('sisl') makedepends=('git' 'cmake') _name=libIGES provides=('libiges') @@ -18,31 +19,45 @@ pkgver() { cd "$_name" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + } _buildtype="Release" -build() { +_cmake_options=() - cd "${srcdir}/${_name}" +check_optdepends() { + # Check if sisl is installed + if (pacman -Qqs sisl >/dev/null) ; then + msg "Enabling sisl support" + _cmake_options=(${_cmake_options[@]} -DUSE_SISL=ON) + else + msg "Disabling sisl support" + fi +} - msg "Starting CMake (build type: ${_buildtype})" +build() { + + # Check optional dependencies + check_optdepends # Create a build directory - mkdir -p "${srcdir}/${_name}-build" - cd "${srcdir}/${_name}-build" + mkdir -p "${srcdir}/${_name}/build" + cd "${srcdir}/${_name}/build" + + msg "Starting CMake (build type: ${_buildtype})" - cmake \ + cmake .. \ -DCMAKE_BUILD_TYPE="${buildtype}" \ -DCMAKE_INSTALL_PREFIX="/usr" \ - "${srcdir}/${_name}" + ${_cmake_options[@]} msg "Building the project" make } package() { - cd "${srcdir}/${_name}-build" + cd "${srcdir}/${_name}/build" msg "Installing files" make DESTDIR="${pkgdir}/" install |