Package Details: libnest2d 0.4-2

Git Clone URL: https://aur.archlinux.org/libnest2d.git (read-only, click to copy)
Package Base: libnest2d
Description: 2D irregular bin packaging and nesting library written in modern C++
Upstream URL: https://github.com/tamasmeszaros/libnest2d
Licenses: LGPL
Submitter: jelly
Maintainer: None
Last Packager: jelly
Votes: 1
Popularity: 0.014202
First Submitted: 2023-11-25 16:03 (UTC)
Last Updated: 2023-11-25 16:03 (UTC)

Latest Comments

flaviut commented on 2024-05-26 18:49 (UTC)

Needed to tweak this to better match the wiki template to get it to build with ninja on my machine: https://wiki.archlinux.org/title/CMake_package_guidelines#Template

diff --git a/PKGBUILD b/PKGBUILD
index a3be553..5ed6ab7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,19 +20,19 @@ prepare() {
   cd ${pkgname}
   # https://github.com/tamasmeszaros/libnest2d/pull/18
   patch -Np1 -i ${srcdir}/allow-disallowed-area.patch

   patch -Np1 -i ${srcdir}/fix-cpp-version.patch

-  mkdir build
 }

 build() {
-  cd ${pkgname}/build
   export CXXFLAGS+=" -ffat-lto-objects"
-  cmake .. -DLIBNEST2D_HEADER_ONLY=OFF -DCMAKE_INSTALL_PREFIX=/usr
+  cmake -B build -S "$pkgname" \
+      -DCMAKE_BUILD_TYPE='None' \
+      -DCMAKE_INSTALL_PREFIX='/usr' \
+      -DLIBNEST2D_HEADER_ONLY=OFF \
+      -Wno-dev
+  cmake --build build
 }

 package() {
-  cd ${pkgname}/build
-  make DESTDIR="${pkgdir}" install
+  DESTDIR="$pkgdir" cmake --install build
 }