New version with some bugfixes available. I just renamed the ebuild to libpri-1.5.0.ebuild. Patches still apply. Compiles fine but I haven't done any tests with it.
Oliver, thank you for the report and testing the patches.
Thank you Oliver, that is in the tree now. I used EAPI=6 so that I could take the base eclass usage away and quiet down the last repoman warning.