Files
ports/emulators/fs-uae/Makefile
T
Remko Catersels b1b07a4b30 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
2024-07-31 17:39:28 +02:00

66 lines
1.8 KiB
Makefile

PORTNAME= fs-uae
PORTVERSION= 3.1.66
CATEGORIES= emulators
MASTER_SITES= https://fs-uae.net/files/FS-UAE/Stable/${PORTVERSION}/
MAINTAINER= sirdice@gmail.com
COMMENT= Amiga emulator
WWW= https://fs-uae.net/
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= zip:archivers/zip
LIB_DEPENDS= libmpeg2.so:multimedia/libmpeg2 \
libopenal.so:audio/openal-soft \
libpng.so:graphics/png
USES= compiler:c11 desktop-file-utils gettext gl gmake gnome \
localbase pkgconfig sdl shared-mime-info tar:xz xorg
USE_SDL= sdl2
USE_GL= gl
USE_GNOME= glib20
USE_XORG= x11
GNU_CONFIGURE= yes
CFLAGS+= -Wno-c++11-narrowing
LDFLAGS_i386= -Wl,-znotext
USE_CXXSTD= gnu++98
OPTIONS_DEFINE= DOCS DEBUG
OPTIONS_DEFINE_i386= JIT
OPTIONS_DEFINE_amd64= JIT
JIT_DESC= Enable JIT compiler (experimental)
JIT_CONFIGURE_ENABLE= jit
.include <bsd.port.pre.mk>
# The following is actually meant for lld 15.0 and later, but the ports
# framework does not support LINKER_TYPE and LINKER_VERSION yet.
.if ${COMPILER_TYPE} == "clang"
# Turn off checking of dynamic relocations, to avoid lld diagnostics about
# possibly incorrect addend values.
LDFLAGS_i386+= -Wl,--no-check-dynamic-relocations
.endif
# JIT is not supported on non-x86 make sure it's off
.if ${ARCH} != amd64 && ${ARCH} != i386
CONFIGURE_ARGS+= --disable-jit
.endif
post-patch:
@${REINPLACE_CMD} -e 's|= bind|= ::bind|' \
${WRKSRC}/src/od-fs/bsdsocket_posix.cpp \
${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 <bsd.port.post.mk>