freebsd-ports/games/oolite/Makefile
Loïc Bartoletti 45ab80b9df archivers/minizip*: Add minizip-ng and zlib-ng and create USES=minizip
Import minizip-ng and zlib-ng

Minizip was originally developed in 1998. It was first included in the zlib
distribution as an additional code contribution starting in zlib 1.1.2. Since
that time, it has been continually improved upon and contributed to by many
people.

+ Creating and extracting zip archives.
+ Adding and removing entries from zip archives.
+ Read and write raw zip entry data.
+ Reading and writing zip archives from memory.
+ Zlib, BZIP2, LZMA, and ZSTD compression methods.
+ Password protection through Traditional PKWARE and WinZIP AES encryption.
+ Buffered streaming for improved I/O performance.

some ports bundle it, some ports allow building against a systemwide
one, some ports bundle/rely on an incompatible version - all those will be
fixed in following commits.

Mk/Uses: Introduce USES=minizip[:ng]

To simplify, the LIB_DEPENDS part a new USES tag is added.

USES=minizip will add a LIB_DEPENDS on legacy minizip and
USES=minizip:ng will add a LIB_DEPENDS on minizip-ng.

minizip [1]:

    databases/spatialite
    databases/spatialite-tools
    devel/collada-dom
    games/mrboom
    games/oolite
    graphics/comical
    misc/xiphos
    science/libkml
    textproc/sigil
    www/domoticz
    deskutils/anydesk
    emulators/mupen64plus-core
    multimedia/assimp
    multimedia/vlc
    net-im/psi
    net-im/telegram-desktop

minizip-ng:

    devel/axmldec

[1] Some are known to work with minizip-ng but have to be patched.

Approved by:	tcberner (portmgr)
Differential Revision:	https://reviews.freebsd.org/D33771
2022-01-25 07:35:22 +01:00

84 lines
3 KiB
Makefile

PORTNAME= oolite
PORTVERSION= 1.88
PORTREVISION= 4
CATEGORIES= games gnustep
MASTER_SITES= https://github.com/OoliteProject/oolite/releases/download/1.88/
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
USES= gl gnustep openal:al minizip perl5 python:3.5+,build sdl \
tar:bzip2 xorg
USE_CXXSTD= gnu++98
USE_GL= gl glu
USE_SDL= sdl
USE_XORG= x11
USE_GNUSTEP= base build
MAKE_ENV= ac_cv_path_PYTHON=${PYTHON_CMD}
# 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
BROKEN_aarch64= fails to configure: error: These compiler flags are invalid: -O
BROKEN_armv6= fails to compile: your compiler does not follow the C++ specification for temporary object destruction order
BROKEN_armv7= fails to compile: your compiler does not follow the C++ specification for temporary object destruction order
BROKEN_i386= fails to compile: ../methodjit/MethodJIT.cpp:318:5: error: expected '(' after 'asm'
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.mk>