[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / games / doomlegacy

Annotation of pkgsrc/games/doomlegacy/Makefile, Revision 1.9

1.9     ! micha       1: # $NetBSD: Makefile,v 1.8 2020/06/18 10:14:54 micha Exp $
1.1       micha       2:
1.4       micha       3: VERS=                  1.48.4
1.1       micha       4: PKGNAME=               doomlegacy-${VERS}
1.8       micha       5: PKGREVISION=           3
1.1       micha       6: CATEGORIES=            games
                      7: MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=doomlegacy/}
1.5       micha       8: DISTNAME=              ${PKGNAME_NOREV:S/-/_/}_source
1.1       micha       9: DISTFILES=             ${DEFAULT_DISTFILES} doomlegacy_${VERS}_common.zip
                     10: EXTRACT_SUFX=          .tar.bz2
                     11:
                     12: MAINTAINER=            micha@NetBSD.org
1.3       nia        13: HOMEPAGE=              http://doomlegacy.sourceforge.net/
1.1       micha      14: COMMENT=               The legacy of Doom
                     15: LICENSE=               gnu-gpl-v2
                     16:
                     17: # Tested on Linux/ppc (32bit Big Endian) and NetBSD/amd64 (64bit Little Endian)
                     18: # Untested: In general the source code has support for the other listed OS too
                     19: ONLY_FOR_PLATFORM=     Darwin-*-* DragonFly-*-* FreeBSD-*-* Linux-*-* \
                     20:                        NetBSD-*-* OpenBSD-*-* SunOS-*-*
                     21:
                     22: USE_LANGUAGES+=                c99
                     23: USE_TOOLS+=            gmake
1.4       micha      24: # Dependency generation fails with parallel build
1.1       micha      25: MAKE_JOBS_SAFE=                no
                     26:
                     27: .include "../../mk/bsd.prefs.mk"
                     28: .include "../../mk/endian.mk"
                     29:
                     30: .if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
                     31: MAKE_FLAGS+=           OS=FREEBSD
                     32: .elif ${OPSYS} == "NetBSD"
                     33: MAKE_FLAGS+=           OS=NETBSD
                     34: .elif ${OPSYS} == "Darwin"
                     35: MAKE_FLAGS+=           OS=MAC
                     36: .else
                     37: # Other Unix (should work for GNU/Linux, OpenBSD and SunOS)
                     38: MAKE_FLAGS+=           OS=LINUX
1.4       micha      39: CFLAGS.SunOS+=         -DSOLARIS
1.9     ! micha      40: LDFLAGS.SunOS+=                -lresolv -lsocket -lnsl
1.1       micha      41: .endif
                     42:
                     43: .if ${MACHINE_ENDIAN} == "big"
                     44: # Some compilers define this themselves (but maybe not all)
                     45: CFLAGS+=               -D__BIG_ENDIAN__
                     46: .endif
                     47:
1.4       micha      48: # Required by extended node patch for ZDoom compressed node format
                     49: CFLAGS+=               -DHAVE_ZLIB
                     50: LDFLAGS+=              -lz
                     51:
1.1       micha      52: # DOOMWADDIR is intentionally shared with other Doom packages
                     53: DOOMWADDIR=            share/doom
1.4       micha      54: INSTALLATION_DIRS=     bin ${PKGMANDIR}/man6 share/doc/doomlegacy ${DOOMWADDIR}
1.1       micha      55:
1.4       micha      56: # Honor environment
                     57: SUBST_CLASSES+=                makeopt
                     58: SUBST_STAGE.makeopt=   do-configure
                     59: SUBST_MESSAGE.makeopt= Preparing make_options file ...
                     60: SUBST_FILES.makeopt=   make_options
                     61: SUBST_SED.makeopt=     -e 's,\#COMP_ENVIRONMENT,COMP_ENVIRONMENT,'
1.1       micha      62:
                     63: # Configure defaults for LEGACYWADDIR and DOOMWADDIR
                     64: SUBST_CLASSES+=                doomdef
                     65: SUBST_STAGE.doomdef=   do-configure
                     66: SUBST_MESSAGE.doomdef= Preparing doomdef.h file ...
                     67: SUBST_FILES.doomdef=   src/doomdef.h
                     68: SUBST_SED.doomdef=     -e 's,LEGACYWADDIR  "/usr/local/share/games/doomlegacy",LEGACYWADDIR  "${PREFIX}/${DOOMWADDIR}",g'
                     69: SUBST_SED.doomdef+=    -e 's,DEFWADS01  "~/games/doomlegacy/wads",DEFWADS01  "${PREFIX}/${DOOMWADDIR}",'
                     70:
1.4       micha      71: # Process INSTALL.pkgsrc
                     72: SUBST_CLASSES+=                install
                     73: SUBST_STAGE.install=   do-configure
                     74: SUBST_MESSAGE.install= Preparing INSTALL.pkgsrc file ...
                     75: SUBST_FILES.install=   ${WRKDIR}/INSTALL.pkgsrc
                     76: SUBST_SED.install=     -e 's,DOOMWADDIR,${PREFIX}/${DOOMWADDIR},'
                     77:
1.1       micha      78: pre-configure:
1.4       micha      79:        ${CP} ${FILESDIR}/INSTALL.pkgsrc ${WRKDIR}
                     80:        ${CP} ${FILESDIR}/doomlegacy.sh ${WRKDIR}
                     81:        ${CP} ${FILESDIR}/doomlegacy.6.in ${WRKDIR}
                     82:        ${CP} ${FILESDIR}/p_blockmap.c ${WRKSRC}/src
                     83:        ${CP} ${FILESDIR}/p_blockmap.h ${WRKSRC}/src
                     84:        ${CP} ${FILESDIR}/p_extnodes.c ${WRKSRC}/src
                     85:        ${CP} ${FILESDIR}/p_extnodes.h ${WRKSRC}/src
                     86:        cd ${WRKSRC} && ${CP} make_options_nix make_options
1.1       micha      87:
1.4       micha      88: # Process start script and manpage templates
1.1       micha      89: do-configure:
                     90:        cd ${WRKDIR} &&                                                 \
1.4       micha      91:                ${SED} -e 's,$$PREFIX,${PREFIX},'                       \
                     92:                        doomlegacy.sh >doomlegacy
                     93:        cd ${WRKDIR} &&                                                 \
                     94:                 ${SED} -e 's,$$NAME,doomlegacy,g'                      \
1.1       micha      95:                        -e 's,$$VERSION,${VERS},g'                      \
                     96:                        -e 's,$$WADDIR,${PREFIX}/${DOOMWADDIR},g'       \
1.4       micha      97:                        doomlegacy.6.in >doomlegacy.6
1.1       micha      98:
                     99: do-install:
1.4       micha     100:        ${INSTALL_PROGRAM} ${WRKSRC}/bin/doomlegacy                     \
                    101:                ${DESTDIR}${PREFIX}/bin/doomlegacy.bin
                    102:        ${INSTALL_SCRIPT} ${WRKDIR}/doomlegacy                          \
                    103:                ${DESTDIR}${PREFIX}/bin/doomlegacy
                    104:        ${INSTALL_DATA} ${WRKDIR}/doomlegacy_${VERS}/legacy.wad         \
                    105:                ${DESTDIR}${PREFIX}/${DOOMWADDIR}/legacy.wad
1.1       micha     106:        cd ${WRKSRC} &&                                                 \
                    107:                ${INSTALL_DATA} docs/legacy.css docs/whatsnew.html      \
1.4       micha     108:                        ${DESTDIR}${PREFIX}/share/doc/doomlegacy
                    109:        ${INSTALL_DATA} ${WRKDIR}/INSTALL.pkgsrc                        \
                    110:                ${DESTDIR}${PREFIX}/share/doc/doomlegacy/INSTALL.pkgsrc
                    111:        ${INSTALL_MAN} ${WRKDIR}/doomlegacy.6                           \
                    112:                ${DESTDIR}${PREFIX}/${PKGMANDIR}/man6
1.1       micha     113:
                    114: # Ensure that at least the shareware Episode 1 of Doom is available
                    115: DEPENDS+=              doom1-[0-9]*:../../games/doom1
                    116:
1.4       micha     117: BUILDLINK_API_DEPENDS.zlib+=           zlib>=1.2.3
                    118: .include "../../devel/zlib/buildlink3.mk"
1.1       micha     119: BUILDLINK_API_DEPENDS.SDL_mixer+=      SDL_mixer>=1.2.7
                    120: .include "../../audio/SDL_mixer/buildlink3.mk"
                    121: BUILDLINK_API_DEPENDS.SDL+=            SDL>=1.2.10
                    122: .include "../../devel/SDL/buildlink3.mk"
                    123:
                    124: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>