From b1b07a4b308bddaafa8476c81f01ff19aac92722 Mon Sep 17 00:00:00 2001 From: Remko Catersels Date: Wed, 31 Jul 2024 17:36:46 +0200 Subject: [PATCH] emulators/fs-uae: Fix build issue on -CURRENT and -STABLE On 15-CURRENT and recent 14-STABLE the ftime() function moved from libcompat to libutil.This caused a linker error at the end of the build. ld: error: undefined symbol: ftime >>> referenced by blkdev_cdimage.cpp >>> blkdev_cdimage.o:(cdda_play_func(void*)) in archive libuae.a >>> referenced by blkdev_cdimage.cpp >>> blkdev_cdimage.o:(cdda_play_func(void*)) in archive libuae.a >>> did you mean: ctime >>> defined in: /lib/libc.so.7 c++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: *** [Makefile:3627: fs-uae] Error 1 gmake[2]: Leaving directory '/wrkdirs/usr/ports/emulators/fs-uae/work/fs-uae-3.1.66' gmake[1]: *** [Makefile:4241: all-recursive] Error 1 gmake[1]: Leaving directory '/wrkdirs/usr/ports/emulators/fs-uae/work/fs-uae-3.1.66' gmake: *** [Makefile:2356: all] Error 2 ===> Compilation failed unexpectedly. Patch fixes the issue for 14-STABLE > 1401500 and 15-CURRENT > 1500019 PR: 280410 --- emulators/fs-uae/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emulators/fs-uae/Makefile b/emulators/fs-uae/Makefile index bcd215a3f984..1735fc3df544 100644 --- a/emulators/fs-uae/Makefile +++ b/emulators/fs-uae/Makefile @@ -56,5 +56,10 @@ post-patch: ${WRKSRC}/src/support/socket.cpp @${REINPLACE_CMD} -e 's|return NULL|return 0|' \ ${WRKSRC}/src/memory.cpp +.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1500019 || ( ${OSVERSION} >= 1401500 && ${OSVERSION} < 1500000 )) + # These versions moved ftime() from libcompat to libutil + @${REINPLACE_CMD} -e 's|-lcompat|-lutil|' \ + ${WRKSRC}/configure +.endif .include