Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 622068

Summary: dev-util/astyle-3.0.1: does not respect CXX
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: zlg (RETIRED) <zlg>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: astyle-3.0.1-CXX.patch
astyle-3.0.1-CXX-r1.patch

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-06-18 07:23:00 UTC
make: Entering directory '/tmp/portage/dev-util/astyle-3.0.1/work/astyle/src'
g++ -DNDEBUG -Wall -Wextra -fno-rtti -fno-exceptions -std=c++11 -march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches -c astyle_main.cpp -o obj/astyle_main.o
g++ -DNDEBUG -Wall -Wextra -fno-rtti -fno-exceptions -std=c++11 -march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches -c ASBeautifier.cpp -o obj/ASBeautifier.o
[...]
Comment 1 zlg (RETIRED) gentoo-dev 2017-06-21 10:39:41 UTC
Created attachment 477508 [details, diff]
astyle-3.0.1-CXX.patch

It appears upstream ships a Makefile that sets CXX on its own, and the prior maintainer didn't catch it. Attached is a quick patch extending the sed call in src_prepare. Does it solve the problem correctly?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-06-21 11:43:22 UTC
Can't you just pass CXX to make instead of doing awful seds?
Comment 3 zlg (RETIRED) gentoo-dev 2017-06-22 03:53:39 UTC
Created attachment 477582 [details, diff]
astyle-3.0.1-CXX-r1.patch

New patch passes CXX directly via emake argument. Is this what you meant? If so I can go ahead and push it.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-06-22 06:27:19 UTC
Yes, that looks correct. Note that I haven't tested it though but it should be trivial for you to reproduce.
Comment 5 zlg (RETIRED) gentoo-dev 2017-06-23 19:43:14 UTC
Pushed to gentoo.git:

commit afde8cea96633a7b9a9c95fa444b7277f04ab11b
Author: Daniel Campbell <zlg@gentoo.org>
Date:   Fri Jun 23 12:38:09 2017 -0700

    dev-util/astyle: Respect CXX wrt bug 622068
    
    Thanks to mgorny for finding the issue.
    
    Gentoo-Bug: 622068
    Gentoo-Bug-URL: https://bugs.gentoo.org/622068
    Package-Manager: Portage-2.3.6, Repoman-2.3.2