On Wed Apr 16, 2025 at 09:23:50PM -0600, Anthony J. Bentley wrote: > I came across a CMake project that couldn't find sdl2-net. I've seen > the problem before: it's because the cmake config is looking for an > unversioned .so. We already have equivalent patches in sdl2, sdl2-image, > sdl2-mixer, sdl2-ttf.
Yes please, this is our pattern. OK rsadowski > > ok? > > diff 5a3b2804456bd22fe0e22a52774b96faf45326b9 > 5a70c43569e751215d33970e99d5fcc3d379dda8 > commit - 5a3b2804456bd22fe0e22a52774b96faf45326b9 > commit + 5a70c43569e751215d33970e99d5fcc3d379dda8 > blob - 5bc7ea7b28cd67086a590b105fa4400d78964c84 > blob + 749a4e335984d5e7a28e5c91d65f2597a073fb37 > --- devel/sdl2-net/Makefile > +++ devel/sdl2-net/Makefile > @@ -3,6 +3,7 @@ COMMENT = SDL2 cross-platform networking library > DISTNAME = SDL2_net-${V} > PKGNAME = sdl2-net-${V} > CATEGORIES = devel net > +REVISION = 0 > > SHARED_LIBS += SDL2_net 1.0 # 0.0 > > @@ -24,4 +25,7 @@ CONFIGURE_ARGS += --disable-gui > > SEPARATE_BUILD = Yes > > +pre-configure: > + ${SUBST_CMD} ${WRKSRC}/sdl2_net-config.cmake.in > + > .include <bsd.port.mk> > blob - /dev/null > blob + 75bf6278bbd437eff47a82ee43d28ced41145a34 (mode 644) > --- /dev/null > +++ devel/sdl2-net/patches/patch-sdl2_net-config_cmake_in > @@ -0,0 +1,12 @@ > +Index: sdl2_net-config.cmake.in > +--- sdl2_net-config.cmake.in.orig > ++++ sdl2_net-config.cmake.in > +@@ -50,7 +50,7 @@ if(NOT TARGET SDL2_net::SDL2_net) > + else() > + set_target_properties(SDL2_net::SDL2_net > + PROPERTIES > +- IMPORTED_LOCATION > "${_sdl2net_libdir}/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2_net${CMAKE_SHARED_LIBRARY_SUFFIX}" > ++ IMPORTED_LOCATION > "${_sdl2net_libdir}/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2_net${CMAKE_SHARED_LIBRARY_SUFFIX}.${LIBSDL2_net_VERSION}" > + ) > + endif() > + endif()