blob: 7310f30ccaf7eebe4d5cfc8405bd837fb3efa61a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# $FreeBSD$
PORTNAME= openbor
PORTVERSION= 3.0.r4415
CATEGORIES= games devel
MASTER_SITES= LOCAL/jbeich \
https://svn.code.sf.net/p/${PORTNAME}/engine/engine/:svn
MAINTAINER= jbeich@FreeBSD.org
COMMENT= Moddable fighting game engine (aka Beats of Rage)
LICENSE= BSD3CLAUSE
LIB_DEPENDS= libpng.so:graphics/png \
libvpx.so:multimedia/libvpx
USES= gmake pkgconfig tar:xz
USE_SDL= gfx2
MAKE_ENV= BUILD_LINUX=1 SDKPATH="${LOCALBASE}" \
GCC_TARGET="${CONFIGURE_TARGET:S/amd64/x86_64/}"
MAKE_ARGS= CC="${CC}" LIBRARIES="${LOCALBASE}/lib" \
TARGET_ARCH=${ARCH:S/i386/x86/} ARCHFLAGS="" \
TARGET_FINAL='${TARGET}' BUILD_MMX=""
LDFLAGS+= -Wl,--as-needed # ogg, pthread, zlib
PLIST_FILES= bin/${PORTNAME} \
share/pixmaps/${PORTNAME}.png
PORTDOCS= README
DESKTOP_ENTRIES="OpenBOR" \
"" \
"${PORTNAME}" \
"${PORTNAME}" \
"Game;ArcadeGame;" \
""
OPTIONS_DEFINE= TREMOR
OPTIONS_DEFAULT= ${MACHINE_CPU:tu:MSOFTFP:S/SOFTFP/TREMOR/}
OPTIONS_DEFINE_i386= MMX
OPTIONS_DEFAULT_i386= MMX # runtime detection
MMX_BUILD_DEPENDS= yasm:devel/yasm
MMX_MAKE_ARGS= BUILD_MMX=1
TREMOR_LIB_DEPENDS= libvorbisidec.so:audio/libtremor
TREMOR_MAKE_ARGS= BUILD_TREMOR=1 BUILD_VORBIS=""
TREMOR_LIB_DEPENDS_OFF= libvorbisfile.so:audio/libvorbis
#
# To update snapshot: make makesum BOOTSTRAP=
# Specific snapshot: make makesum SVN_FETCH= PORTVERSION=1.0.r1234
#
.if defined(BOOTSTRAP)
# XXX SED and _MASTER_SITES_svn aren't defined yet
SED?= /usr/bin/sed
SVN_REV!= ${SETENV} LC_ALL=C svn info \
${MASTER_SITES:M*\:svn:S/:svn//} | \
${SED} -n 's/^Last Changed Rev: //p'
PORTVERSION:= ${PORTVERSION:R}.r${SVN_REV}
.else
SVN_REV?= ${PORTVERSION:E:S/r//}
.endif
.if defined(BOOTSTRAP) || defined(SVN_FETCH)
FETCH_DEPENDS+= svn:devel/subversion
do-fetch:
${MKDIR} ${WRKDIR}
svn export -r${SVN_REV} ${_MASTER_SITES_svn} ${WRKSRC}
(cd ${WRKDIR} && ${TAR} cJvf \
${_DISTDIR}/${DISTNAME}${EXTRACT_SUFX} \
--uid 0 --gid 0 ${DISTNAME})
${REINPLACE_CMD} -i '' '/^PORTVERSION=/s/r.*/r${SVN_REV}/' \
${MASTERDIR}/Makefile
. if ${USER} == ${MAINTAINER:C/@.*//}
-scp ${_DISTDIR}/${DISTNAME}${EXTRACT_SUFX} \
freefall.freebsd.org:public_distfiles/
. endif
.endif
post-patch:
@${REINPLACE_CMD} -e 's/ -O[0-9]//; s/ -g//; s/ -Werror//' \
-e 's/ -fomit-frame-pointer//' \
-e 's/ -freorder-blocks//' \
-e 's/ -Wno-unused-result//' \
-e 's/ -Wl,-rpath,$$(LIBRARIES)//' \
-e '/echo/!s/ @/ /' \
-e 's/$$(LIBS)/$$(LDFLAGS) &/' \
${WRKSRC}/Makefile
@${GREP} -Flr 'malloc.h' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \
's,malloc\.h,stdlib.h,'
@${REINPLACE_CMD} -e 's/^function \(.*\) {/\1() {/' \
-e 's/^get_revnum/VERSION_BUILD=${SVN_REV}/' \
${WRKSRC}/version.sh
do-configure:
(cd ${WRKSRC} && ${SH} ./version.sh)
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/OpenBOR.elf \
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/resources/OpenBOR_Icon_128x128.png \
${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
(cd ${WRKSRC} && ${COPYTREE_SHARE} \
"${PORTDOCS}" ${STAGEDIR}${DOCSDIR})
.include <bsd.port.mk>
|