On 2023.03.21 16:27, Morgan Wesström wrote:
On 2023-03-21 21:04, Jack wrote:
1) Where's the appropriate place for these files in Gentoo and why?
2) If the appropriate place is either of those folders with a
version number, how do I install the files there without hard
coding the version number in the ebuild (which would naturally
break the next time Perl gets updated)?
Regards
Morgan Wesström
I'd suggest looking at ebuilds created by g-cpan, which produces
ebuilds for any module in CPAN. I suspect the eclass(es) involved
deal with the perl version issue. I don't think you can savely
ignore that, since there are likely to be things in the module which
do depend on the version of perl used to create that module.
Thank you, Jack. Digging through some ebuilds in the dev-perl
category was the first thing I did. It led me to the perl-module
eclass but I can only find reference documentation which doesn't tell
me how to use it or how its functions hook into the build system.
I don't know if it's actually useful, but note I suggested perl-gcpan
not dev-perl. I don't know how different those generated ebuilds are
from ones in dev-perl, but they are created "on the fly" from the CPAN
entry for the module. You could try it on some CPAN module you think
has some similarities to one of the znapzend perl modules. I don't
know how to know if a perl module truly depends on the perl version,
but I don't think it hurts to make that assumption. The only cost I
see is a possibly unnecessary rebuild on a perl upgrade.
I lack fundamental knowledge of how Perl is organized and I'm an old
guy which mean I have to be selective with new knowledge not t be
overwhelmed. ;) How DO I know if either module is dependent on a
specific Perl version for example?
I might challenge you on age, and the mere fact that you are using
Gentoo, and messing with ebuilds puts you far ahead of the general
crowd. I'm currently trying to make an application work with Qt6, so
don't underestimate what you can figure out how to do.
In the old ebuild I found online, the developer just creates a
/usr/share/znapzend/perl5 folder and puts all those files there.
https://git.gerczei.eu/tgerczei/gentoo-overlay/src/branch/master/app-backup/znapzend/znapzend-0.20.0.ebuild
I could easily do that and be done with it but this is also an
opportunity to absorb some new knowledge and to know that I made the
correct choice and why this choice is the correct one in this
situation.
The znapaend readme says something about any necessary perl modules
being installed within the znapzend area and not within the system
perl, so that might actually be a reasonable place to also put their
own perl modules. You could also dig into the package for one of the
other distributions and see where they put the various pieces.
Regards
Morgan
Jack