Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Best way to handle private patches

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
curmudgeon
Veteran
Veteran
Posts: 1746
Joined: Fri Aug 08, 2003 1:39 pm

Best way to handle private patches

  • Quote

Post by curmudgeon » Tue Feb 17, 2004 12:08 am

A couple of applications, I want to patch with my own patch before compiling
(not just on one occasion, but every time I build the application). Can someone
explain possible ways of doing this, and their advantages and disadvantages?
Any documentation (maybe something a little less comprehensive than the
ebuild howto for the developers :) ) or stories from people who have done this?
Thank you for your help.
Top
curmudgeon
Veteran
Veteran
Posts: 1746
Joined: Fri Aug 08, 2003 1:39 pm

  • Quote

Post by curmudgeon » Sun Feb 22, 2004 6:34 am

No answer yet (and I can't believe no one hasn't done this before).
Top
Hypnos
Advocate
Advocate
User avatar
Posts: 2889
Joined: Thu Jul 18, 2002 5:12 pm
Location: Omnipresent

  • Quote

Post by Hypnos » Sun Feb 22, 2004 7:56 am

It's straightforward: Make an ebuild with a weird version number that does that patch during the src install phase.

If you want examples, just do "grep -r epatch /usr/portage".
Personal overlay | Simple backup scheme
Top
TheEternalVortex
Apprentice
Apprentice
User avatar
Posts: 207
Joined: Tue Oct 15, 2002 6:38 am
Location: San Jose, CA
Contact:
Contact TheEternalVortex
Website

  • Quote

Post by TheEternalVortex » Sun Feb 22, 2004 8:14 am

The easiest way to do this if you only want to compile it once is to do (e.g.):

Code: Select all

# cd /usr/portage/ebuilddir
# ebuild myprog-1.0.ebuild unpack
# cd /var/tmp/portage/myprog-1.0/work/
# cp ~/mypatch.patch .
# patch -p0 < mypatch.patch
# cd -
# ebuild myprog-1.0.ebuild compile
# ebuild myprog-1.0.ebuild qmerge
Or you can make your own ebuild by copying the existing one to your portage overlay and adding a line that says epatch mypatch.patch in the unpack section.
-- Andy
Top
Post Reply

4 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy