archrelease: copy trunk to community-any
[ArchLinux/community.git] / libnest2d / repos / community-x86_64 / PKGBUILD
bloba3be5535ebbad17996d99f6b36fd14a205f2c8d4
1 # Maintainer: Jelle van der Waa <jelle@archlinux.org
3 pkgname=libnest2d
4 pkgver=0.4
5 pkgrel=2
6 pkgdesc='2D irregular bin packaging and nesting library written in modern C++'
7 arch=(x86_64)
8 url='https://github.com/tamasmeszaros/libnest2d'
9 license=('LGPL')
10 depends=(nlopt polyclipping)
11 makedepends=(boost cmake git)
12 source=(git+https://github.com/tamasmeszaros/libnest2d#commit=da4782500da4eb8cb6e38e5e3f10164ec5a59778
13         allow-disallowed-area.patch::https://patch-diff.githubusercontent.com/raw/tamasmeszaros/libnest2d/pull/18.patch
14         fix-cpp-version.patch)
15 sha512sums=('SKIP'
16             '3aa147e48671f61e15f1c779bf96852a62c5ec9d2dce7e4d2fa10e72769342f45961598ef961306a206455e86f3d9a2544ab7b03e28937541e88d98a6b34d491'
17             '956919502f9110a79729c74745a9095fa82c9f914f6b527fc91ea4f2864960a5437588efa6cd50cdb4970b51ae05cbdae48913f80357a38342b494cd416ba28e')
19 prepare() {
20   cd ${pkgname}
21   # https://github.com/tamasmeszaros/libnest2d/pull/18
22   patch -Np1 -i ${srcdir}/allow-disallowed-area.patch
24   patch -Np1 -i ${srcdir}/fix-cpp-version.patch
26   mkdir build
29 build() {
30   cd ${pkgname}/build
31   export CXXFLAGS+=" -ffat-lto-objects"
32   cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=/usr
35 package() {
36   cd ${pkgname}/build
37   make DESTDIR="${pkgdir}" install