Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 450446 - =games-arcade/methane-1.5.1 uses C compiler instead of C++ compiler
Summary: =games-arcade/methane-1.5.1 uses C compiler instead of C++ compiler
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-05 19:45 UTC by Vicente Olivert Riera (RETIRED)
Modified: 2013-01-05 22:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vicente Olivert Riera (RETIRED) gentoo-dev 2013-01-05 19:45:33 UTC
# grep -e ^C.*FLAGS /etc/make.conf
CFLAGS="-march=native -O2 -Wno-pointer-sign -pipe"
CXXFLAGS="-march=native -O2 -pipe -g0

# grep gcc methane-1.5.1\:20130105-193737.log | tail -n1
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -g0 -DENABLE_SOUND `pkg-config --cflags clanCore-2.3 clanDisplay-2.3 clanApp-2.3 clanGL-2.3 clanGL1-2.3 clanSWRender-2.3 clanSound-2.3 clanMikMod-2.3` -c sources/misc.cpp -o build/misc.o
Comment 1 Vicente Olivert Riera (RETIRED) gentoo-dev 2013-01-05 19:55:10 UTC
This sed command in the src_prepare() function will fix the problem:

sed -e 's:$(CC) ${CXXFLAGS}:$(CC) ${CFLAGS}:' -i Makefile
Comment 2 Vicente Olivert Riera (RETIRED) gentoo-dev 2013-01-05 20:07:35 UTC
Sorry, this one is the valid solution:

sed -e 's:$(CC):$(CXX):' -i Makefile
Comment 3 Julian Ospald 2013-01-05 20:10:37 UTC
we should rather fix the patch:

--- games-arcade/methane/files/methane-1.5.1-gentoo.patch
+++ games-arcade/methane/files/methane-1.5.1-gentoo.patch
@@ -22,7 +22,7 @@
  	@echo "  Compiling $<..."
  	@if [ ! -d build ]; then mkdir build; fi
 -	gcc ${CXXFLAGS} ${METHANE_FLAGS} -c $< -o $@
-+	$(CC) ${CXXFLAGS} ${METHANE_FLAGS} -c $< -o $@
++	$(CXX) ${CXXFLAGS} ${METHANE_FLAGS} -c $< -o $@
  
  
 --- sources/methane.cpp.old	2012-11-27 13:49:22.993003266 +0100
Comment 4 Vicente Olivert Riera (RETIRED) gentoo-dev 2013-01-05 20:11:28 UTC
(In reply to comment #3)
> we should rather fix the patch:
> 
> --- games-arcade/methane/files/methane-1.5.1-gentoo.patch
> +++ games-arcade/methane/files/methane-1.5.1-gentoo.patch
> @@ -22,7 +22,7 @@
>   	@echo "  Compiling $<..."
>   	@if [ ! -d build ]; then mkdir build; fi
>  -	gcc ${CXXFLAGS} ${METHANE_FLAGS} -c $< -o $@
> -+	$(CC) ${CXXFLAGS} ${METHANE_FLAGS} -c $< -o $@
> ++	$(CXX) ${CXXFLAGS} ${METHANE_FLAGS} -c $< -o $@
>   
>   
>  --- sources/methane.cpp.old	2012-11-27 13:49:22.993003266 +0100

I'm agree :-)
Comment 5 Julian Ospald 2013-01-05 22:02:22 UTC
+  05 Jan 2013; Julian Ospald <hasufell@gentoo.org>
+  files/methane-1.5.1-gentoo.patch:
+  use correct compiler wrt #450446