Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
epatch_user question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Mon Oct 22, 2018 12:17 pm    Post subject: epatch_user question Reply with quote

I was looking at adding a user patch for gtk+ and have a question.

The ebuilds don't call it within them, but in looking around I saw that it's part of base.eclass,
so the question is, does that mean that ALL ebuilds implicitly call epatch_user, or does it still have to be explicitly called in the ebuild itself?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Mon Oct 22, 2018 12:18 pm    Post subject: Reply with quote

Every ebuild >=EAPI-6 has eapply_user.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Mon Oct 22, 2018 12:28 pm    Post subject: Reply with quote

Thanks for the clarification, I had assumed that to be the case, but we all know about assume. :lol:

Is there any way to have the ebuild modified without copying to local repository and hand editing?
In other words could I add a use flag or change something in the ebuild programmatically?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Mon Oct 22, 2018 12:32 pm    Post subject: Reply with quote

No, for changes to the ebuild itself you need to do it in your local overlay. Conditional patches are bad anyway, so there is a way around that by writing them unconditional, but as soon as you want to introduce USE flags etc., then to the local overlay it goes.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Mon Oct 22, 2018 12:34 pm    Post subject: Reply with quote

Thanks, I assumed that too, but never hurts to ask.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Mon Oct 22, 2018 12:39 pm    Post subject: Reply with quote

asturm wrote:
Every ebuild >=EAPI-6 has eapply_user.

And you can enable user patch function to EAPI < 6 with this tip
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Mon Oct 22, 2018 1:07 pm    Post subject: Reply with quote

Yes, but the much better option is to fix ebuilds and bump them to EAPI-6++ ;)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Mon Oct 22, 2018 1:32 pm    Post subject: Reply with quote

asturm wrote:
Yes, but the much better option is to fix ebuilds and bump them to EAPI-6++ ;)

Of cours, but it's not always an immediate procedure.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Mon Oct 22, 2018 2:47 pm    Post subject: Reply with quote

I want the patch applied before eautoconf, is that possible, or can I tell it to reconfig somehow?

Some of the changes are to configure.ac and config.h.in
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Mon Oct 22, 2018 2:48 pm    Post subject: Reply with quote

eautoreconf is what you need, from autotools.eclass, if it is not already run after default
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Mon Oct 22, 2018 2:57 pm    Post subject: Reply with quote

asturm wrote:
eautoreconf is what you need, from autotools.eclass, if it is not already run after default


How do I apply that to the patch in /etc/portage/patches/<whatever>

This has to do with gtk+-3 atk-bridge stuff, it runs eautoconf, then applies the patches, then the configure fails.
It needs to reconfigure after the patch is applied. Is that possible?
What I'm trying to do is get past having to make a local ebuild. If it's not possible, then I won't look at the user patch anymore.

And thanks for your answers, they're helpful.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Mon Oct 22, 2018 3:07 pm    Post subject: Reply with quote

In that case, unfortunately the user patch won't suffice. The ebuild calls eautoreconf before gnome2_src_prepare, which relies on xdg_src_prepare to call default (that is when your user patch is applied).
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Mon Oct 22, 2018 3:13 pm    Post subject: Reply with quote

I was afraid of that.

I can have it apply to just configure, but that's less portable from version to version.
It still saves me from having to have a local ebuild, I think.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Mon Oct 22, 2018 3:17 pm    Post subject: Reply with quote

Or you may file a bug to reverse order of eautoreconf and gnome2_src_prepare. ;)
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Mon Oct 22, 2018 3:58 pm    Post subject: Reply with quote

asturm wrote:
Or you may file a bug to reverse order of eautoreconf and gnome2_src_prepare. ;)


What component? current packages?

Edit to add: are you tallking about the gtk+ ebuilds or a general eclass shuffle?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Mon Oct 22, 2018 4:06 pm    Post subject: Reply with quote

Regular bugs are always 'Current packages', yes it's just about the gtk+ ebuild. After talking to maintainers it seems that the ebuild should not even be calling eautoreconf itself (instead define GNOME2_EAUTORECONF="yes" before inherit).
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Mon Oct 22, 2018 4:19 pm    Post subject: Reply with quote

Gotcha :wink: thanks

ETA:
https://bugs.gentoo.org/669320
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Tue Oct 23, 2018 11:11 am    Post subject: Reply with quote

The dev modified the latest, gtk+-3.24.1 and the user patch applies cleanly, with configure.ac and the configure works properly.


With 2 changes, the normal gentoo ebuild (this is with gtk+-3.24.1 only, at the moment) can be used to generate gtk+-3 without at-spi.
1. add "app-accessibility/at-spi2-atk-2.5.3" to /etc/portage/profile/package.provided (satisfy the dependency in ebuild)
2. put patch in /etc/portage/patches, I used this directory "/etc/portage/patches/x11-libs/gtk+:3" so that it would only apply to gtk+-3, you could intead of :3 use the version number.

Patch (call it what you want when you save it)
https://paste.pound-python.org/show/5GvXpgllAGfrjGNX8REC/


NOTE: to use with something like gtk+-3.22.30 then you would need to modify the ebuild like this and then do the 2 steps above.
Code:
--- gtk+-3.22.30.ebuild.orig   2018-10-23 08:37:15.599361809 -0500
+++ gtk+-3.22.30.ebuild   2018-10-23 07:16:17.134775867 -0500
@@ -3,8 +3,9 @@
 
 EAPI=6
 GNOME2_LA_PUNT="yes"
+GNOME2_EAUTORECONF="yes"
 
-inherit autotools flag-o-matic gnome2 multilib virtualx multilib-minimal
+inherit flag-o-matic gnome2 multilib virtualx multilib-minimal
 
 DESCRIPTION="Gimp ToolKit +"
 HOMEPAGE="https://www.gtk.org/"
@@ -123,7 +124,6 @@
    # Fix broken autotools logic
    eapply "${FILESDIR}"/${PN}-3.22.20-libcloudproviders-automagic.patch
 
-   eautoreconf
    gnome2_src_prepare
 }

_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum