No other downstream appends synthetic library version, and doing so causes underlinking due to fragile build system (see below). Not to mention being unable to swap out bundled libs from upstream builds. $ cc -lplds4 -L/usr/local/lib /usr/lib/crt1.o: In function `_start1': crt1_c.c:(.text+0xa6): undefined reference to `main' /usr/local/lib/libplds4.so: undefined reference to `pthread_set_name_np' /usr/local/lib/libplds4.so: undefined reference to `pthread_create' /usr/local/lib/libplds4.so: undefined reference to `pthread_condattr_init' /usr/local/lib/libplds4.so: undefined reference to `pthread_setschedparam' /usr/local/lib/libplds4.so: undefined reference to `pthread_getschedparam' PR: 213144 Exp-run by: antoine
100 lines
3.2 KiB
Makefile
100 lines
3.2 KiB
Makefile
# Created by: Andriy Gapon <avg@icyb.net.ua>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= oolite
|
|
PORTVERSION= 1.84
|
|
PORTREVISION= 1
|
|
CATEGORIES= games gnustep
|
|
MASTER_SITES= http://github.com/OoliteProject/oolite/releases/download/1.84/
|
|
DISTNAME= ${PORTNAME}-source-${PORTVERSION}
|
|
DIST_SUBDIR= oolite
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= Trade and combat space simulator, clone of Elite
|
|
|
|
LICENSE= CC-BY-NC-SA-3.0 GPLv2 ZLIB
|
|
LICENSE_COMB= multi
|
|
LICENSE_FILE_CC-BY-NC-SA-3.0= ${WRKSRC}/Doc/LICENSE.TXT
|
|
|
|
BUILD_DEPENDS= zip:archivers/zip \
|
|
${LOCALBASE}/bin/unzip:archivers/unzip
|
|
LIB_DEPENDS= libespeak.so:audio/espeak \
|
|
libnspr4.so:devel/nspr \
|
|
libvorbisfile.so:audio/libvorbis \
|
|
libpng.so:graphics/png \
|
|
libminizip.so:archivers/minizip
|
|
|
|
USES= gnustep openal:al perl5 python:build tar:bzip2
|
|
USE_GL= gl glu
|
|
USE_SDL= sdl
|
|
USE_XORG= x11
|
|
USE_GNUSTEP= base build
|
|
# Redefine DO_MAKE_BUILD, because current gnustep in USES overrides MAKEFILE
|
|
# without possibility to change it, as it was done in the previous implementation
|
|
DO_MAKE_BUILD= ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} Makefile ${_MAKE_JOBS} ${MAKE_ARGS:C,^${DESTDIRNAME}=.*,,g}
|
|
ALL_TARGET= release-deployment
|
|
USE_PERL5= build
|
|
|
|
GNUSTEP_LOCAL_APPS= ${GNUSTEP_LOCAL_ROOT}/Applications
|
|
|
|
SUB_FILES= oolite
|
|
SUB_LIST= GNUSTEP_SYSTEM_TOOLS="${GNUSTEP_SYSTEM_TOOLS}"
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}
|
|
RELEASEDIR= ${WRKSRC}/oolite.app
|
|
DATADIR= ${GNUSTEP_LOCAL_APPS}/oolite.app
|
|
PORTDATA= Resources
|
|
PORTDOCS= *.pdf CHANGELOG.TXT contributors.txt
|
|
|
|
PLIST_FILES+= bin/oolite %%DATADIR%%/oolite \
|
|
share/applications/oolite.desktop \
|
|
share/pixmaps/oolite-icon.png
|
|
|
|
OPTIONS_DEFINE= DOCS
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if exists(${CC})
|
|
CCVERSION!= ${CC} --version
|
|
COMPILER_VERSION= ${CCVERSION:M[0-9].[0-9]*:C/([0-9]).?/\1/g}
|
|
COMPILER_IS_CLANG= ${CCVERSION:Mclang}
|
|
# Check for LLVM/Clang v3.4.1
|
|
.if ${COMPILER_IS_CLANG} && ${COMPILER_VERSION} == 341
|
|
# Use compiler from ports, because of errors
|
|
# for ${WRKSRC}/src/Core/Scripting/OOJavaScriptEngine.m file
|
|
WITH_PORTS_CLANG= yes
|
|
.endif
|
|
.endif
|
|
|
|
.if defined(WITH_PORTS_CLANG)
|
|
BUILD_DEPENDS+= clang34:lang/clang34
|
|
CC= ${LOCALBASE}/bin/clang34
|
|
CXX= ${LOCALBASE}/bin/clang++34
|
|
CPP= ${LOCALBASE}/bin/clang-cpp34
|
|
.endif
|
|
|
|
post-patch: .SILENT
|
|
${REINPLACE_CMD} -e 's/GNUSTEP_USER_ROOT/GNUSTEP_LOCAL_ROOT/ ; \
|
|
s/sdl-config/$${SDL_CONFIG}/ ; \
|
|
s|-lstdc++|`$${SDL_CONFIG} --libs` &| ; \
|
|
s|:src/Core/MiniZip|| ; \
|
|
s|-Isrc/Core/MiniZip|-I$${LOCALBASE}/include/minizip| ; \
|
|
s|-lz|-lminizip| ; \
|
|
/ioapi.c/d ; /unzip.c/d ; \
|
|
s|/usr/X11R6|$${LOCALBASE}|' \
|
|
${WRKSRC}/GNUmakefile
|
|
# Change value of the SAVEDIR define
|
|
${REINPLACE_CMD} -e 's|oolite-saves|\.oolite-saves|' \
|
|
${WRKSRC}/src/Core/NSFileManagerOOExtensions.h
|
|
|
|
do-install:
|
|
(cd ${RELEASEDIR} && ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR})
|
|
${INSTALL_SCRIPT} ${WRKDIR}/oolite ${STAGEDIR}${PREFIX}/bin
|
|
${INSTALL_PROGRAM} ${RELEASEDIR}/oolite ${STAGEDIR}${DATADIR}
|
|
${INSTALL_DATA} ${WRKSRC}/installers/FreeDesktop/oolite.desktop \
|
|
${STAGEDIR}${PREFIX}/share/applications
|
|
${INSTALL_DATA} ${WRKSRC}/installers/FreeDesktop/oolite-icon.png \
|
|
${STAGEDIR}${PREFIX}/share/pixmaps
|
|
(cd ${WRKSRC}/Doc && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR})
|
|
|
|
.include <bsd.port.post.mk>
|