1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Fix build with clang

PR:		ports/184822
Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
This commit is contained in:
Pawel Pekala 2013-12-19 17:22:10 +00:00
parent 897dfb93c9
commit d527536e8f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=336938
2 changed files with 22 additions and 6 deletions

View File

@ -6,6 +6,7 @@ PORTVERSION= 5.0.a3
PORTEPOCH= 1 PORTEPOCH= 1
CATEGORIES= games CATEGORIES= games
MASTER_SITES= GOOGLE_CODE MASTER_SITES= GOOGLE_CODE
PROJECTHOST= sm-ssc
PKGNAMESUFFIX= -devel PKGNAMESUFFIX= -devel
DISTNAME= ${PORTNAME}-SM5-alpha3-src DISTNAME= ${PORTNAME}-SM5-alpha3-src
@ -24,11 +25,10 @@ OPTIONS_DEFAULT=VORBIS
WRKSRC= ${WRKDIR}/${PORTNAME}-SM5-alpha3 WRKSRC= ${WRKDIR}/${PORTNAME}-SM5-alpha3
PROJECTHOST= sm-ssc
USE_BZIP2= yes USE_BZIP2= yes
USES= iconv pathfix perl5 pkgconfig shebangfix
USE_XORG= x11 xau xdmcp xext xrandr xrender xtst USE_XORG= x11 xau xdmcp xext xrandr xrender xtst
USE_GL= gl glu USE_GL= gl glu
USES= pathfix iconv shebangfix perl5 pkgconfig
USE_GNOME= gtk20 USE_GNOME= gtk20
USE_PERL5= build USE_PERL5= build
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
@ -38,7 +38,7 @@ SHEBANG_FILES= Utils/*.pl \
extern/zlib/zlib2ansi extern/zlib/zlib2ansi
CPPFLAGS+= -I${LOCALBASE}/include CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -lX11 -lpthread LDFLAGS+= -L${LOCALBASE}/lib -lX11
VORBIS_LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis VORBIS_LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis
VORBIS_CONFIGURE_WITH= vorbis VORBIS_CONFIGURE_WITH= vorbis
@ -53,8 +53,10 @@ CONFIGURE_ENV+= ac_cv_lib_pulse_pa_stream_new=no
post-patch: post-patch:
@${REINPLACE_CMD} -e \ @${REINPLACE_CMD} -e \
'/^LIBS/s|-lpthread|${ICONV_LIB}|' -e 's/-finline-limit=300//g' \ 's|-lpthread |-pthread |' ${WRKSRC}/configure
${WRKSRC}/src/Makefile.in @${REINPLACE_CMD} -e \
'/^LIBS/s|-lpthread|${ICONV_LIB}| ; \
s|-finline-limit=300||g' ${WRKSRC}/src/Makefile.in
pre-build: pre-build:
@${ECHO_CMD} -n > ${WRKDIR}/stepmania.sh @${ECHO_CMD} -n > ${WRKDIR}/stepmania.sh
@ -62,7 +64,7 @@ pre-build:
@${ECHO_CMD} 'cd ${PREFIX}/lib/stepmania; ./stepmania $$@' >> ${WRKDIR}/stepmania.sh @${ECHO_CMD} 'cd ${PREFIX}/lib/stepmania; ./stepmania $$@' >> ${WRKDIR}/stepmania.sh
post-build: post-build:
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} \ @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
${MAKEFILE} ${MAKE_ARGS} SMData) ${MAKEFILE} ${MAKE_ARGS} SMData)
do-install: do-install:
@ -85,4 +87,7 @@ do-install:
@(${TAR} -C ${WRKSRC}/Docs --exclude "Licenses.txt" -cf - . | \ @(${TAR} -C ${WRKSRC}/Docs --exclude "Licenses.txt" -cf - . | \
${TAR} -C ${STAGEDIR}${DOCSDIR} --unlink -xf -) ${TAR} -C ${STAGEDIR}${DOCSDIR} --unlink -xf -)
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/stepmania/GtkModule.so
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -0,0 +1,11 @@
--- src/arch/ArchHooks/ArchHooks.h.orig
+++ src/arch/ArchHooks/ArchHooks.h
@@ -1,6 +1,8 @@
#ifndef ARCH_HOOKS_H
#define ARCH_HOOKS_H
+#include <ctime>
+
struct lua_State;
class ArchHooks
{