public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Adding an extra patch to an ebuild
@ 2012-11-21  8:38 Adam Carter
  2012-11-21  9:41 ` Markos Chandras
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Adam Carter @ 2012-11-21  8:38 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

It looks like i have hit this gcc 4.7 build bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53113

Theres a patch attached to the bug i'd like to apply. Unfortunately the gcc
4.7.2 ebuild doesnt have "epatch_user", so i need to take the other
approach listed in the handbook. It suggests i use a custom environment but
i dont understand how i would apply a patch by setting an environment
variable. Can anyone explain?

[-- Attachment #2: Type: text/html, Size: 546 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Adding an extra patch to an ebuild
  2012-11-21  8:38 [gentoo-user] Adding an extra patch to an ebuild Adam Carter
@ 2012-11-21  9:41 ` Markos Chandras
  2012-11-21  9:46   ` Adam Carter
  2012-11-21  9:46 ` Helmut Jarausch
  2012-11-21 10:41 ` Neil Bothwick
  2 siblings, 1 reply; 7+ messages in thread
From: Markos Chandras @ 2012-11-21  9:41 UTC (permalink / raw
  To: gentoo-user

On Wed, Nov 21, 2012 at 8:38 AM, Adam Carter <adamcarter3@gmail.com> wrote:
> It looks like i have hit this gcc 4.7 build bug:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53113
>
> Theres a patch attached to the bug i'd like to apply. Unfortunately the gcc
> 4.7.2 ebuild doesnt have "epatch_user", so i need to take the other approach
> listed in the handbook. It suggests i use a custom environment but i dont
> understand how i would apply a patch by setting an environment variable. Can
> anyone explain?

Can you show us the link from the handbook?

-- 
Regards,
Markos Chandras / Gentoo Linux Developer / Key ID: B4AFF2C2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Adding an extra patch to an ebuild
  2012-11-21  9:41 ` Markos Chandras
@ 2012-11-21  9:46   ` Adam Carter
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Carter @ 2012-11-21  9:46 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 121 bytes --]

> Can you show us the link from the handbook?
>
> http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=6

[-- Attachment #2: Type: text/html, Size: 457 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Adding an extra patch to an ebuild
  2012-11-21  8:38 [gentoo-user] Adding an extra patch to an ebuild Adam Carter
  2012-11-21  9:41 ` Markos Chandras
@ 2012-11-21  9:46 ` Helmut Jarausch
  2012-11-21 10:17   ` Markos Chandras
  2012-11-21 10:41 ` Neil Bothwick
  2 siblings, 1 reply; 7+ messages in thread
From: Helmut Jarausch @ 2012-11-21  9:46 UTC (permalink / raw
  To: gentoo-user

On 11/21/2012 09:38:26 AM, Adam Carter wrote:
> It looks like i have hit this gcc 4.7 build bug:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53113
> 
> Theres a patch attached to the bug i'd like to apply. Unfortunately  
> the gcc
> 4.7.2 ebuild doesnt have "epatch_user", so i need to take the other
> approach listed in the handbook. It suggests i use a custom  
> environment but
> i dont understand how i would apply a patch by setting an environment
> variable. Can anyone explain?
> 

Please have a look at

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=6

/etc/portage/patches

Helmut.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Adding an extra patch to an ebuild
  2012-11-21  9:46 ` Helmut Jarausch
@ 2012-11-21 10:17   ` Markos Chandras
  0 siblings, 0 replies; 7+ messages in thread
From: Markos Chandras @ 2012-11-21 10:17 UTC (permalink / raw
  To: gentoo-user

On Wed, Nov 21, 2012 at 9:46 AM, Helmut Jarausch
<jarausch@igpm.rwth-aachen.de> wrote:
> On 11/21/2012 09:38:26 AM, Adam Carter wrote:
>>
>> It looks like i have hit this gcc 4.7 build bug:
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53113
>>
>> Theres a patch attached to the bug i'd like to apply. Unfortunately the
>> gcc
>> 4.7.2 ebuild doesnt have "epatch_user", so i need to take the other
>> approach listed in the handbook. It suggests i use a custom environment
>> but
>> i dont understand how i would apply a patch by setting an environment
>> variable. Can anyone explain?
>>
>
> Please have a look at
>
> http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=6
>
> /etc/portage/patches
>
> Helmut.
>

This requires the ebuild to use epatch_user.

Adam, I don't it is possible to use the 'evn' file to patch an ebuild.
Either edit the ebuild directly and add your patch or open a bug
asking the toolchain maintainers to add epatch_user to gcc. But I have
to say, it is easier if you just edit the ebuild, add the epatch_user
line there, run ebuild digest and then place your patch in
/etc/portage/patches. You should then be able to build gcc just fine.

-- 
Regards,
Markos Chandras / Gentoo Linux Developer / Key ID: B4AFF2C2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Adding an extra patch to an ebuild
  2012-11-21  8:38 [gentoo-user] Adding an extra patch to an ebuild Adam Carter
  2012-11-21  9:41 ` Markos Chandras
  2012-11-21  9:46 ` Helmut Jarausch
@ 2012-11-21 10:41 ` Neil Bothwick
  2012-11-21 22:06   ` Adam Carter
  2 siblings, 1 reply; 7+ messages in thread
From: Neil Bothwick @ 2012-11-21 10:41 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

On Wed, 21 Nov 2012 19:38:26 +1100, Adam Carter wrote:

> Theres a patch attached to the bug i'd like to apply. Unfortunately the
> gcc 4.7.2 ebuild doesnt have "epatch_user", so i need to take the other
> approach listed in the handbook. It suggests i use a custom environment
> but i dont understand how i would apply a patch by setting an
> environment variable. Can anyone explain?

Create /etc/portage/env/sys-devel/gcc-4.7.2 containing

post_src_unpack() {
        cd "${S}"
        epatch_user
}

to run epatch_user after the source has been unpacked. If you need to run
epatch_user after the other patches have been applied, change the function
name to post_src_prepare.

Alternatively, if this is a one-off, you could run

ebuild /path/to/ebuild prepare

then apply the patch manually in $PORTAGE_TMPDIR and complete the emerge
with

ebuild /path/to/ebuild merge


-- 
Neil Bothwick

Those who live by the sword get shot by those who don't.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Adding an extra patch to an ebuild
  2012-11-21 10:41 ` Neil Bothwick
@ 2012-11-21 22:06   ` Adam Carter
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Carter @ 2012-11-21 22:06 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

>
> Create /etc/portage/env/sys-devel/gcc-4.7.2 containing
>
> post_src_unpack() {
>         cd "${S}"
>         epatch_user
> }
>
> to run epatch_user after the source has been unpacked. If you need to run
> epatch_user after the other patches have been applied, change the function
> name to post_src_prepare.
>

Thanks Neil, this worked beautifully, as did the gcc patch and i'm running
4.7.2.

[-- Attachment #2: Type: text/html, Size: 652 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-21 22:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-21  8:38 [gentoo-user] Adding an extra patch to an ebuild Adam Carter
2012-11-21  9:41 ` Markos Chandras
2012-11-21  9:46   ` Adam Carter
2012-11-21  9:46 ` Helmut Jarausch
2012-11-21 10:17   ` Markos Chandras
2012-11-21 10:41 ` Neil Bothwick
2012-11-21 22:06   ` Adam Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox