From de2cc86f42ebfd440b550c405130a71a7f82e1c5 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Thu, 31 Jul 2025 14:53:24 +0200 Subject: [PATCH] lib2geom, new recipe (#12644) this is usually part of Inkscape, but using the included one in Inkscape causes some conflict --- media-libs/lib2geom/lib2geom-1.4.recipe | 95 +++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 media-libs/lib2geom/lib2geom-1.4.recipe diff --git a/media-libs/lib2geom/lib2geom-1.4.recipe b/media-libs/lib2geom/lib2geom-1.4.recipe new file mode 100644 index 000000000..d2846ec46 --- /dev/null +++ b/media-libs/lib2geom/lib2geom-1.4.recipe @@ -0,0 +1,95 @@ +SUMMARY="Easy to use 2D geometry library in C++" +DESCRIPTION="2Geom is a C++ 2D geometry library geared towards robust processing of computational \ +geometry data associated with vector graphics. The primary design consideration is ease of use \ +and clarity. It is dual-licensed under LGPL 2.1 and MPL 1.1. + +The library is descended from a set of geometric routines present in Inkscape, a vector graphics \ +editor based around the Scalable Vector Graphics format, the most widespread vector graphics \ +interchange format on the Web and a W3C Recommendation. Due to this legacy, not all parts of the \ +API form a coherent whole (yet). + +Rendering is outside the scope of this library, and it is assumed something like libcairo or \ +similar is employed for this. 2geom concentrates on higher level algorithms and geometric \ +computations." +HOMEPAGE="https://gitlab.com/inkscape/lib2geom" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="GNU LGPL v2.1 + MPL v1.1" +REVISION="1" +SOURCE_URI="https://gitlab.com/inkscape/lib2geom/-/archive/$portVersion/lib2geom-$portVersion.tar.bz2" +CHECKSUM_SHA256="717a87ce7f2192271a789c1273ae7b432856c522647b9fe33bb4dd662942b3ea" +SOURCE_DIR="$portVersionedName" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +libVersion="1.4.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + lib2geom$secondaryArchSuffix = $portVersion + lib:lib2geom$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcairo$secondaryArchSuffix + lib:libdouble_conversion$secondaryArchSuffix + lib:libglib_2.0$secondaryArchSuffix + lib:libgsl$secondaryArchSuffix + lib:libgslcblas$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + " + +PROVIDES_devel=" + lib2geom${secondaryArchSuffix}_devel = $portVersion + devel:lib2geom$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + lib2geom$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libboost_filesystem$secondaryArchSuffix >= 1.88.0 + devel:libdouble_conversion$secondaryArchSuffix + devel:libglib_2.0$secondaryArchSuffix + devel:libgsl$secondaryArchSuffix + devel:libgtkmm_3.0$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:ninja + cmd:pkg_config$secondaryArchSuffix + cmd:ragel$secondaryArchSuffix + " + +BUILD() +{ + cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release \ + $cmakeDirArgs \ + -D2GEOM_BUILD_SHARED=ON \ + -D2GEOM_TESTING=OFF \ + -Wno-dev + + ninja -C build $jobArgs +} + +INSTALL() +{ + ninja -C build install + + prepareInstalledDevelLib \ + lib2geom + fixPkgconfig + + packageEntries devel \ + $developDir \ + $libDir/cmake +} + +TEST() +{ + make check +}