git: 07b1de9d91e5 - main - games/lwjgl: port to powerpc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 29 Jan 2025 16:58:15 UTC
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=07b1de9d91e550c0694a3fc98989a84f715f2169 commit 07b1de9d91e550c0694a3fc98989a84f715f2169 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2025-01-28 01:24:23 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2025-01-29 16:56:57 +0000 games/lwjgl: port to powerpc Use BFD due to: [apply] ld: error: relocation R_PPC_ADDR16_LO cannot be used against symbol '__stack_chk_guard'; recompile with -fPIC --- games/lwjgl/Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/games/lwjgl/Makefile b/games/lwjgl/Makefile index 66c1b2a7d4d7..cec0a99cb976 100644 --- a/games/lwjgl/Makefile +++ b/games/lwjgl/Makefile @@ -9,7 +9,7 @@ WWW= https://legacy.lwjgl.org LICENSE= BSD3CLAUSE -ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 powerpc64le +ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc powerpc64 powerpc64le BUILD_DEPENDS= ${JAVAJARDIR}/jutils/jutils.jar:games/jutils \ ${JAVAJARDIR}/jinput/jinput.jar:games/jinput @@ -36,7 +36,7 @@ PLIST_FILES= ${JAVAJARDIR}/${PORTNAME}/${PORTNAME}.jar \ .include <bsd.port.pre.mk> -.if ${ARCH} == i386 +.if ${ARCH} == i386 || ${ARCH} == powerpc PLIST_FILES+= lib/${PORTNAME}/lib${PORTNAME}.so .endif @@ -48,6 +48,11 @@ PLIST_FILES+= lib/${PORTNAME}/lib${PORTNAME}64.so MAKE_ARGS+= -Dbuild.64bit.only=1 .endif +.if ${ARCH} == powerpc +LLD_UNSAFE= yes +MAKE_ARGS+= -Dbuild.32bit.only=1 +.endif + post-patch: @${REINPLACE_CMD} -e 's|PREFIX|${PREFIX}|g' \ -e '/executable/s/cc/${CC}/g' \ @@ -61,6 +66,10 @@ post-patch: .elif ${ARCH} == aarch64 @${REINPLACE_CMD} -e 's|amd64|aarch64|g' \ ${WRKSRC}/platform_build/bsd_ant/build.xml +.elif ${ARCH} == powerpc + @${REINPLACE_CMD} -e 's|i386|ppc|g' \ + -e '/linker_flags32/s/-shared/-shared -fuse-ld=bfd/g' \ + ${WRKSRC}/platform_build/bsd_ant/build.xml .endif do-install: @@ -70,7 +79,7 @@ do-install: ${STAGEDIR}${JAVAJARDIR}/${PORTNAME} .endfor @${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME} -.if ${ARCH} == i386 +.if ${ARCH} == i386 || ${ARCH} == powerpc ${INSTALL_DATA} ${WRKSRC}/libs/freebsd/lib${PORTNAME}.so \ ${STAGEDIR}${PREFIX}/lib/${PORTNAME} .endif