summaryrefslogtreecommitdiff
path: root/community/openthreads/PKGBUILD
blob: ff94915c2634ee719e46112f42cad81209f587e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# $Id: PKGBUILD 66257 2012-02-23 05:29:45Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=openthreads
pkgver=2.3.0
pkgrel=2
pkgdesc="A  minimal & complete Object-Oriented thread interface for C++ programmers"
arch=('i686' 'x86_64')
url="http://openthreads.sourceforge.net"
license=("LGPL")
depends=('gcc-libs')
makedepends=('cmake')
source=(http://www.openscenegraph.org/downloads/developer_releases/OpenThreads-$pkgver.zip)
md5sums=('ab4899c9d11e3917bd5f1401d6d0af11')

build() {
  cd "$srcdir/OpenThreads-$pkgver"

  sed -i 's#-lpthreads#-lpthread#' CMakeModules/FindThreads.cmake
  sed -i 's#SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}")#SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")#' src/OpenThreads/pthreads/CMakeLists.txt

  cmake . -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr

  make
}

package() {
  cd "$srcdir/OpenThreads-$pkgver"

  sed -i 's#lib64#lib#' src/OpenThreads/pthreads/cmake_install.cmake
  make DESTDIR="$pkgdir" install

  install -D packaging/pkg_config/openthreads.pc ${pkgdir}/usr/lib/pkgconfig/openthreads.pc
}