On Sun Mar 09, 2025 at 07:08:28PM +0000, Johannes Thyssen Tishman wrote:
> Currently, if a port wants to find netgen-mesher using the CMake
> configuration file NetgenConfig.cmake (none at the moment), it will fail
> with the following error:
> 
> > CMake Error at /usr/local/lib/cmake/netgen/netgen-targets.cmake:126 
> > (message):
> >   The imported target "netgen" references the file
> >
> >      "/usr/local/bin/netgen"
> >
> >   but this file does not exist.
> 
> This is because the binary was renamed to netgen-mesher to avoid
> conflicting with cad/netgen, a change I failed to account for in the
> generated CMake configuration file mentioned above. The revision below
> fixes this.

OK rsadowski

> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/cad/netgen-mesher/Makefile,v
> diff -u -p -r1.3 Makefile
> --- Makefile  24 Feb 2025 19:39:18 -0000      1.3
> +++ Makefile  9 Mar 2025 19:06:13 -0000
> @@ -2,7 +2,7 @@ COMMENT =             automatic 3d tetrahedral mesh
>  
>  V =                  6.2.2404
>  PKGNAME =            netgen-mesher-${V}
> -REVISION =           1
> +REVISION =           2
>  
>  DIST_TUPLE +=                github NGSolve netgen v${V} .
>  
> @@ -64,7 +64,6 @@ CONFIGURE_ARGS +=   -DCMAKE_INSTALL_PREFIX
>                       
> -DTK_STUB_LIBRARY=${LOCALBASE}/lib/libtkstub${MODTK_VERSION:S/.//}.a
>  
>  post-install:
> -     mv ${PREFIX}/bin/netgen ${PREFIX}/bin/netgen-mesher
>       ${MODPY_COMPILEALL} \
>               ${WRKINST}${MODPY_SITEPKG}/netgen \
>               ${WRKINST}${MODPY_SITEPKG}/pyngcore
> Index: patches/patch-ng_CMakeLists_txt
> ===================================================================
> RCS file: /cvs/ports/cad/netgen-mesher/patches/patch-ng_CMakeLists_txt,v
> diff -u -p -r1.1.1.1 patch-ng_CMakeLists_txt
> --- patches/patch-ng_CMakeLists_txt   23 Jan 2025 21:19:24 -0000      1.1.1.1
> +++ patches/patch-ng_CMakeLists_txt   9 Mar 2025 19:06:13 -0000
> @@ -1,7 +1,15 @@
>  Index: ng/CMakeLists.txt
>  --- ng/CMakeLists.txt.orig
>  +++ ng/CMakeLists.txt
> -@@ -37,7 +37,7 @@ endif(USE_GUI)
> +@@ -28,6 +28,7 @@ if(USE_GUI)
> +     if(APPLE)
> +         set_target_properties(netgen PROPERTIES OUTPUT_NAME netgen)
> +     endif(APPLE)
> ++    set_target_properties(netgen PROPERTIES OUTPUT_NAME netgen-mesher)
> +     target_link_libraries( netgen ${Python3_LIBRARIES} ${TCL_LIBRARY} 
> ${TK_LIBRARY})
> +     endif(NOT BUILD_FOR_CONDA)
> + 
> +@@ -37,7 +38,7 @@ endif(USE_GUI)
>   if(USE_PYTHON)
>       add_library(ngpy SHARED netgenpy.cpp)
>       target_link_libraries( ngpy PUBLIC nglib PRIVATE 
> "$<BUILD_INTERFACE:netgen_python>" )
> 

Reply via email to