Re: git: 9784fb237cdf - main - cad/libbgcode: new port

From: Daniel Engberg <daniel.engberg.lists_at_pyret.net>
Date: Fri, 29 Mar 2024 09:36:11 UTC
On 2024-03-28T20:37:34.000+01:00, Michael Zhilin <mizhka@FreeBSD.org> wrote:
>  The branch main has been updated by mizhka:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=9784fb237cdf00b5f379c90df5c2d9f2bec97ea3
> 
> commit 9784fb237cdf00b5f379c90df5c2d9f2bec97ea3
> Author:     Michael Zhilin <mizhka@FreeBSD.org>
> AuthorDate: 2024-03-06 19:53:23 +0000
> Commit:     Michael Zhilin <mizhka@FreeBSD.org>
> CommitDate: 2024-03-28 19:31:42 +0000
> 
>     cad/libbgcode: new port
>     
>     It is required by PrusaSlicer 2.7+. This port provides library and
>     binary to work with g-code (read/write/convert)
>     
>     Reported by: Teodor Sigaev <teodorsigaev@gmail.com>
>     Reviewed by: lwhsu (mentor)
>     Sponsored by: Postgres Professional
>     Differential Revision: https://reviews.freebsd.org/D44257
> ---
>  cad/Makefile                                       |  1 +
>  cad/libbgcode/Makefile                             | 27 ++++++++++++++++++++++
>  cad/libbgcode/distinfo                             |  5 ++++
>  cad/libbgcode/files/patch-CMakeLists.txt           | 13 +++++++++++
>  cad/libbgcode/files/patch-deps_CMakeLists.txt      | 23 ++++++++++++++++++
>  .../files/patch-deps_heatshrink_heatshrink.cmake   | 12 ++++++++++
>  cad/libbgcode/pkg-descr                            |  2 ++
>  cad/libbgcode/pkg-plist                            | 21 +++++++++++++++++
>  8 files changed, 104 insertions(+)
> 
> diff --git a/cad/Makefile b/cad/Makefile
> index e85ed462ada0..f43f0c101c4f 100644
> --- a/cad/Makefile
> +++ b/cad/Makefile
> @@ -74,6 +74,7 @@
>      SUBDIR += ldview
>      SUBDIR += leocad
>      SUBDIR += lepton-eda
> +    SUBDIR += libbgcode
>      SUBDIR += libgdsii
>      SUBDIR += libopencad
>      SUBDIR += librecad
> diff --git a/cad/libbgcode/Makefile b/cad/libbgcode/Makefile
> new file mode 100644
> index 000000000000..ffa5500927c5
> --- /dev/null
> +++ b/cad/libbgcode/Makefile
> @@ -0,0 +1,27 @@
> +PORTNAME=	libbgcode
> +DISTVERSION=	0.2.0
> +CATEGORIES=	cad
> +
> +MAINTAINER=	teodorsigaev@gmail.com
> +COMMENT=	Prusa Block & Binary G-code reader/writer/converter
> +WWW=		https://github.com/prusa3d/libbgcode
> +
> +LICENSE=	AGPLv3
> +LICENSE_FILE=	${WRKSRC}/LICENSE
> +
> +LIB_DEPENDS=	libboost_nowide.so:devel/boost-libs
> +
> +USES=	cmake
> +
> +USE_GITHUB=	yes
> +GH_ACCOUNT=	prusa3d
> +GH_TAGNAME=	6f43cb004ef3d3bda37dde49f6235e24d2717629
> +GH_TUPLE=	atomicobject:heatshrink:v0.4.1:heatshrink
> +
> +CMAKE_ARGS+=	-DBUILD_SHARED_LIBS=ON \
> +		-DLibBGCode_BUILD_DEPS=ON \
> +		-DLibBGCode_BUILD_TESTS=OFF
> +
...

Hi,

Please try to follow Poters Handbook,
(GH_TAGNAME  should use short hash)
https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github

CMAKE_ARGS+= should be CMAKE_ARGS= and you can also use CMAKE_OFF and CMAKE_ON instead which probably is a bit cleaner.
https://docs.freebsd.org/en/books/porters-handbook/book/#using-cmake

Best regards,
Daniel (diizzy@)