diff options
author | bartus | 2019-08-29 15:54:12 +0200 |
---|---|---|
committer | bartus | 2019-08-29 15:54:12 +0200 |
commit | b282a458f8f5a2672aee5071ed15be01490e4a82 (patch) | |
tree | 49dd5103897b6939e9d2475b6ff7ea8988dbdd07 | |
parent | a496cb310357f7a0d5dc093f411ca0eec398b25c (diff) | |
download | aur-b282a458f8f5a2672aee5071ed15be01490e4a82.tar.gz |
Split package into static/dynamic lib
popsift: headers and static library version
popsift-libs: dynamic library
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 34 insertions, 16 deletions
@@ -11,9 +11,15 @@ pkgbase = popsift makedepends = cmake makedepends = git makedepends = cuda>=7.0 - options = staticlibs source = popsift::git+https://github.com/alicevision/popsift.git sha256sums = SKIP pkgname = popsift + pkgdesc = Realtime GPU implementation of SIFT, 25 fps on HD images on recent graphic cards. (DOI: 10.1145/3204949.3208136) [development headers and static libs] + depends = boost + options = staticlibs + +pkgname = popsift-libs + depends = boost-libs>=1.55 + depends = libcudart.so @@ -4,7 +4,7 @@ DISABLE_CHECK=1 _name=popsift -pkgname=${_name} +pkgname=(${_name} ${_name}-libs) pkgver=1.0.0 pkgrel=1 pkgdesc="Realtime GPU implementation of SIFT, 25 fps on HD images on recent graphic cards. (DOI: 10.1145/3204949.3208136)" @@ -17,35 +17,47 @@ provides=() makedepends=('boost' 'cmake' 'git') makedepends+=('cuda>=7.0') checkdepends=('wget') -options=('staticlibs') source=("${_name}::git+https://github.com/alicevision/popsift.git") sha256sums=('SKIP') -_CMAKE_FLAGS=( - -DCMAKE_INSTALL_PREFIX=/usr - -DCMAKE_BUILD_TYPE=Release - ) -((BUILD_SHARED)) && _CMAKE_FLAGS+=( -DBUILD_SHARED_LIBS=ON ) || _CMAKE_FLAGS+=( -DBUILD_SHARED_LIBS=OFF -DCUDA_USE_STATIC_CUDA_RUNTIME=ON ) +_CMAKE_FLAGS=( -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ) ((DISABLE_CHECK)) && _CMAKE_FLAGS+=( -DPopSift_BUILD_EXAMPLES=OFF ) || _CMAKE_FLAGS+=( -DPopSift_BUILD_EXAMPLES=ON -DPopSift_USE_TEST_CMD=ON ) build() { cd ${srcdir} - msg2 "Build PopSift library" - mkdir -p build && cd build - cmake ${_CMAKE_FLAGS[@]} ../${_name} - make + msg2 "Build static ${_name} library" + mkdir -p build_static && pushd build_static + cmake ${_CMAKE_FLAGS[*]} -DBUILD_SHARED_LIBS=OFF -DCUDA_USE_STATIC_CUDA_RUNTIME=ON ${srcdir}/${_name} + make + popd + + msg2 "Build static ${_name} library" + mkdir -p build_shared && pushd build_shared + cmake ${_CMAKE_FLAGS[*]} -DBUILD_SHARED_LIBS=ON ${srcdir}/${_name} + make + popd } -package() { - cd ${srcdir}/build - ((BUILD_SHARED)) && depends=('boost-libs>=1.55' 'libcudart.so') +package_popsift() { + pkgdesc+=" [development headers and static libs]" + depends=('boost') + optdepend=('cuda: for static cudart library') + options=('staticlibs') + cd ${srcdir}/build_static + make DESTDIR=${pkgdir} install +} + +package_popsift-libs() { + depends=('boost-libs>=1.55' 'libcudart.so') + cd ${srcdir}/build_shared make DESTDIR=${pkgdir} install + rm -rf ${pkgdir}/usr/{include,shared} } check() { - cd ${srcdir}/build + cd ${srcdir}/build_static if ! ((DISABLE_CHECK)); then make prepare-test make run-test-boat |