mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 20:43:09 -04:00
games-fps/assaultcube: fix compile failure with clang
Closes: https://bugs.gentoo.org/921915 Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 1999-2022 Gentoo Authors
|
# Copyright 1999-2024 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
@@ -20,16 +20,18 @@ RDEPEND="
|
|||||||
media-libs/libsdl2[opengl]
|
media-libs/libsdl2[opengl]
|
||||||
media-libs/sdl2-image[jpeg,png]
|
media-libs/sdl2-image[jpeg,png]
|
||||||
x11-libs/libX11
|
x11-libs/libX11
|
||||||
|
media-libs/libglvnd[X]
|
||||||
media-libs/libogg
|
media-libs/libogg
|
||||||
media-libs/libvorbis
|
media-libs/libvorbis
|
||||||
media-libs/openal
|
media-libs/openal
|
||||||
"
|
"
|
||||||
DEPEND="${RDEPEND}"
|
DEPEND="${RDEPEND}"
|
||||||
BDEPEND="sys-devel/clang"
|
|
||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}/${PN}-1.3.0.2-respect-ldflags.patch"
|
"${FILESDIR}/${PN}-1.3.0.2-respect-ldflags.patch"
|
||||||
# a script which checks for required libs and certain parts of the game
|
# a script which checks for required libs and certain parts of the game
|
||||||
"${FILESDIR}/${PN}-1.3.0.2-fix-checkinstall.patch"
|
"${FILESDIR}/${PN}-1.3.0.2-fix-checkinstall.patch"
|
||||||
|
# bug #921915
|
||||||
|
"${FILESDIR}/${PN}-1.3.0.2-unset-variables.patch"
|
||||||
"${FILESDIR}/0001-Fix-unnecessary-rebuild-on-make-install.patch"
|
"${FILESDIR}/0001-Fix-unnecessary-rebuild-on-make-install.patch"
|
||||||
"${FILESDIR}/0002-Don-t-configure-libenet-in-Makefile.patch"
|
"${FILESDIR}/0002-Don-t-configure-libenet-in-Makefile.patch"
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
Respect user preferences during the build and fix the Clang build by
|
||||||
|
disabling PCH.
|
||||||
|
https://bugs.gentoo.org/921915
|
||||||
|
--- a/source/src/Makefile
|
||||||
|
+++ b/source/src/Makefile
|
||||||
|
@@ -6,7 +6,6 @@
|
||||||
|
# found to have been caused by the g++ compiler in the past. This seems to have
|
||||||
|
# been fixed now by relaxing the optimization that g++ does, so although we'll
|
||||||
|
# continue using clang++ (just in case), you can use g++ if you prefer.
|
||||||
|
-CXX=clang++
|
||||||
|
|
||||||
|
# call like 'DEBUGBUILD=1 make' to compile a debug version of AssaultCube.
|
||||||
|
ifdef DEBUGBUILD
|
||||||
|
@@ -34,10 +33,8 @@ ifeq ($(ACDEBUG),yes)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(findstring clang,$(CXX)))
|
||||||
|
- CXXFLAGS= -O3 -fomit-frame-pointer
|
||||||
|
override CXXFLAGS+= -Wall -fsigned-char
|
||||||
|
else
|
||||||
|
- CXXFLAGS= -O3 -fomit-frame-pointer
|
||||||
|
override CXXFLAGS+= -Wall -fsigned-char -ffast-math -rdynamic -Wno-format-zero-length
|
||||||
|
ifeq "$(shell expr 'gcc -dumpversion' \>= 8)" "1"
|
||||||
|
override CXXFLAGS+= -Wno-stringop-truncation
|
||||||
|
@@ -182,7 +179,6 @@ rendermodel.o: rendermodel.cpp
|
||||||
|
$(CXX) $(CXXFLAGS) -c -o $@ $(subst -standalone.o,.cpp,$@)
|
||||||
|
|
||||||
|
$(CLIENT_OBJS): CXXFLAGS += $(CLIENT_INCLUDES)
|
||||||
|
-$(CLIENT_OBJS): $(CLIENT_PCH)
|
||||||
|
$(SERVER_OBJS): CXXFLAGS += $(SERVER_INCLUDES)
|
||||||
|
$(filter-out $(SERVER_OBJS),$(MASTER_OBJS)): CXXFLAGS += $(SERVER_INCLUDES)
|
||||||
|
|
||||||
Reference in New Issue
Block a user