Build ebuild package manually

Which fails to emerge. Applying own patch.

With reference: https://www.gentoo.org/doc/en/handbook/2004.2/handbook-x86.xml?part=3&chap=6

ebuild(1) always requires .ebuild file as first argument, and action as second argument. Here's an example of how to build app-admin/syslog-ng manually.

  1. Fetch tarball

     ebuild /usr/portage/app-admin/syslog-ng/syslog-ng-3.4.2.ebuild fetch
    
  2. Extract tarball

     ebuild /usr/portage/app-admin/syslog-ng/syslog-ng-3.4.2.ebuild unpack
    

    Extracted directory could found at /var/tmp/portage/app-admin/syslog-ng-3.4.2. Now apply patches you need.

  3. Compile(make)

     ebuild /usr/portage/app-admin/syslog-ng/syslog-ng-3.4.2.ebuild compile
    
  4. Install to temporarily location

     ebuild /usr/portage/app-admin/syslog-ng/syslog-ng-3.4.2.ebuild install
    

    This is not "real" installation actually. You can find files under /var/tmp/portage/app-admin/syslog-ng-3.4.2/image/; which will be installed under $PREFIX(normally /usr) in next step.

  5. Install

     ebuild /usr/portage/app-admin/syslog-ng/syslog-ng-3.4.2.ebuild qmerge
    

    qmerge will execute install operation and merge build into portage tree. Package will marked as "installed" after this step has finished.

  6. Cleaning

     ebuild /usr/portage/app-admin/syslog-ng/syslog-ng-3.4.2.ebuild clean
    

    clean will remove temporarily dirs/files(i.e. /var/tmp/portage/app-admin/syslog-ng-3.4.2). But this step could omitted. These files will be removed automatically in the feature.