Re: git: 90ba3efd0411 - main - cad/Clipper2: add A Polygon Clipping and Offsetting library (in C++, C# & Delphi)

From: Daniel Engberg <daniel.engberg.lists_at_pyret.net>
Date: Sun, 13 Oct 2024 11:52:12 UTC
On 2024-10-13T13:28:39.000+02:00, Michael Reifenberger
<mr@FreeBSD.org> wrote:

> The branch main has been updated by mr:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=90ba3efd0411122e8898a2ca8adddeba4874f2fd
> 
> commit 90ba3efd0411122e8898a2ca8adddeba4874f2fd
> 
> Author:     Michael Reifenberger <mr@FreeBSD.org>
> 
> AuthorDate: 2024-10-12 09:19:30 +0000
> 
> Commit:     Michael Reifenberger <mr@FreeBSD.org>
> 
> CommitDate: 2024-10-13 11:28:21 +0000
> 
>     cad/Clipper2: add A Polygon Clipping and Offsetting library (in C++, C# & Delphi)
> 
>     
> 
>     It will be used by openscad.
> 
>     
> 
>     Clipper2:
> 
>     The Clipper2 library performs intersection, union, difference and
> 
>     XOR boolean operations on both simple and complex polygons.
> 
>     It also performs polygon offsetting.
> 
>     This is a major update of my original Clipper library
> 
>     that was written over 10 years ago.
> 
>     That library I'm now calling Clipper1,
> 
>     and while it still works very well,
> 
>     Clipper2 is better in just about every way.
> 
> ---
> 
>  cad/Clipper2/Makefile  | 25 +++++++++++++++++++++++++
> 
>  cad/Clipper2/distinfo  |  5 +++++
> 
>  cad/Clipper2/pkg-descr |  5 +++++
> 
>  cad/Clipper2/pkg-plist | 16 ++++++++++++++++
> 
>  cad/Makefile           |  2 ++
> 
>  5 files changed, 53 insertions(+)
> 
> diff --git a/cad/Clipper2/Makefile b/cad/Clipper2/Makefile
> 
> new file mode 100644
> 
> index 000000000000..6877c275f643
> 
> --- /dev/null
> 
> +++ b/cad/Clipper2/Makefile
> 
> @@ -0,0 +1,25 @@
> 
> +PORTNAME=    Clipper2
> 
> +DISTVERSION=    1.4.0
> 
> +#PORTREVISION=    1
> 
> +CATEGORIES=    cad
> 
> +
> 
> +MAINTAINER=    mr@freebsd.org
> 
> +COMMENT=    A Polygon Clipping and Offsetting library (in C++, C# & Delphi)
> 
> +WWW=        https://github.com/AngusJohnson/Clipper2
> 
> +
> 
> +LICENSE=    BSL
> 
> +LICENSE_FILE=    ${WRKSRC}/LICENSE
> 
> +
> 
> +USES=    cmake
> 
> +
> 
> +USE_GITHUB=    yes
> 
> +GH_ACCOUNT=    AngusJohnson google:gtest
> 
> +GH_PROJECT=    googletest:gtest
> 
> +GH_TAGNAME=    2b665ac 71815bb:gtest
> 
> +GH_SUBDIR=    CPP/Tests/googletest:gtest
> 
> +
> 
> +CMAKE_SOURCE_PATH= ${WRKSRC}/CPP
> 
> +#CMAKE_ON=    
> 
> +CMAKE_OFF=    INSTALL_GTEST
> 
> +
> 
> +.include <bsd.port.mk> [http://bsd.port.mk>];
> 
> diff --git a/cad/Clipper2/distinfo b/cad/Clipper2/distinfo
> 
> new file mode 100644
> 
> index 000000000000..4326887a1487
> 
> --- /dev/null
> 
> +++ b/cad/Clipper2/distinfo
> 
> @@ -0,0 +1,5 @@
> 
> +TIMESTAMP = 1728687615
> 
> +SHA256 (AngusJohnson-Clipper2-1.4.0-2b665ac_GH0.tar.gz) = bf1553e085ebcfc501884a56087580b2a5b2ffa14826700b67489bcc3af79c19
> 
> +SIZE (AngusJohnson-Clipper2-1.4.0-2b665ac_GH0.tar.gz) = 619495
> 
> +SHA256 (google-googletest-71815bb_GH0.tar.gz) = 386281d4eddb10c6cf5f93ee02d56793fb075138cb584ca31b1e70ab38c7678c
> 
> +SIZE (google-googletest-71815bb_GH0.tar.gz) = 873787
> 
> diff --git a/cad/Clipper2/pkg-descr b/cad/Clipper2/pkg-descr
> 
> new file mode 100644
> 
> index 000000000000..e3e2252a5fd8
> 
> --- /dev/null
> 
> +++ b/cad/Clipper2/pkg-descr
> 
> @@ -0,0 +1,5 @@
> 
> +The Clipper2 library performs intersection, 
> 
> +union, difference and XOR boolean operations on both simple and complex polygons. 
> 
> +It also performs polygon offsetting. 
> 
> +This is a major update of my original Clipper library that was written over 10 years ago. 
> 
> +That library I'm now calling Clipper1, and while it still works very well, Clipper2 is better in just about every way.
> 
> diff --git a/cad/Clipper2/pkg-plist b/cad/Clipper2/pkg-plist
> 
> new file mode 100644
> 
> index 000000000000..70f0f448017f
> 
> --- /dev/null
> 
> +++ b/cad/Clipper2/pkg-plist
> 
> @@ -0,0 +1,16 @@
> 
> +include/clipper2/clipper.core.h
> 
> +include/clipper2/clipper.engine.h
> 
> +include/clipper2/clipper.export.h
> 
> +include/clipper2/clipper.h
> 
> +include/clipper2/clipper.minkowski.h
> 
> +include/clipper2/clipper.offset.h
> 
> +include/clipper2/clipper.rectclip.h
> 
> +include/clipper2/clipper.version.h
> 
> +lib/cmake/clipper2/Clipper2Config.cmake
> 
> +lib/cmake/clipper2/Clipper2ConfigVersion.cmake
> 
> +lib/cmake/clipper2/Clipper2Targets-%%CMAKE_BUILD_TYPE%%.cmake
> 
> +lib/cmake/clipper2/Clipper2Targets.cmake
> 
> +lib/libClipper2.a
> 
> +lib/libClipper2Z.a
> 
> +libdata/pkgconfig/Clipper2.pc
> 
> +libdata/pkgconfig/Clipper2Z.pc
> 
> diff --git a/cad/Makefile b/cad/Makefile
> 
> index 1e4d7e8b0008..7f604861af7f 100644
> 
> --- a/cad/Makefile
> 
> +++ b/cad/Makefile
> 
> @@ -1,5 +1,6 @@
> 
>      COMMENT = CAD tools
> 
>  
> 
> +    SUBDIR += Clipper2
> 
>      SUBDIR += PrusaSlicer
> 
>      SUBDIR += abc
> 
>      SUBDIR += admesh
> 
> @@ -34,6 +35,7 @@
> 
>      SUBDIR += feappv
> 
>      SUBDIR += fidocadj
> 
>      SUBDIR += freecad
> 
> +    SUBDIR += freecad-devel
> 
>      SUBDIR += freehdl
> 
>      SUBDIR += fritzing
> 
>      SUBDIR += gds3d

Hi,

I think your port is supposed to look something like this and use
shared libs?

https://projects.pyret.net/files/freebsd-patches/clipper2-shared.patch

Best regards,

Daniel