Closed automorphism88 closed 6 years ago
Thanks for your extensive pull request. I hope this can be used as a template for further ebuilds. :)
If you want, you can also open an issue concerning the RESTRICT="strip"
feature.
Thanks for your extensive pull request. I hope this can be used as a template for further ebuilds. :)
Part of the reason I created separate files for the sed scripts used in src_prepare
instead of using the sed -e
option was to make it easier to use them with other ebuilds, possibly with adaptation. I'm not sure how similar the install scripts for other models are in terms of things like the heredoc delimiters that are used, filenames, etc., but if they're similar enough, it seems like this is the sort of thing that could make a good eclass, so that the code can be directly shared between ebuilds, rather than just used as a template.
I would be willing to help create a brother-utils.eclass
or something along those lines for other ebuilds to inherit
, but I would need to research the other ebuilds in the tree to know how much code could be shared with them. I haven't really looked at any of them closely except for net-print/brother-genml1-bin
. But it should at least be possible to share low-level functions to extract the heredocs from the install scripts, and higher-level brother-utils_src_prepare
and brother-utils_src_install
functions are possible too if the process is similar enough across the different models.
If you want, you can also open an issue concerning the
RESTRICT="strip"
feature.
I don't really have anything to say on the subject, as I haven't tested it and don't know why it was added in the first place. It's not such a huge deal for these drivers since the binaries that get installed are very small anyway, so making them a few kilobytes smaller by stripping the symbols would be pretty negligible in the greater scheme of things.
However, as a general rule, RESTRICT="strip"
should only be used if it's actually necessary, i.e., if it breaks something to not use it. And if it is known to break if symbols are stripped, it'd be a good idea to add a comment explaining the issue. If it needs to be set for all of these ebuilds, that's another thing that could be done from an eclass, so the comment wouldn't need to be duplicated.
Thanks for your extensive pull request.
Just like Stallman, I only wanted my printer to work :)
There's already an ebuild for this printer, but it's effectively just a virtual for
net-print/brother-genml1-bin
. Brother offers a different driver that's specific to this model and my new ebuild installs that instead.I'm not 100% sure if
RESTRICT="strip"
is necessary, I just copied it from thenet-print/brother-genml1-bin
ebuild, along with thepkg_setup
andsrc_unpack
functions.The
src_prepare
andsrc_install
functions were written to mimic the behavior of the upstream install script, using thenet-print/brother-genml1-bin
ebuild as a guide to determine where files should be installed.I personally own this printer and can confirm that the ebuild in this PR works for me and the version currently in the overlay does not, even though Brother's documentation says that the genml1 driver should work with this model. (For reference, the printer is connected via network, not USB, and has a static IP. Scanning works fine with the existing
media-gfx/brother-mfc7460dn-bin
ebuild.) I still keyworded my ebuild as testing since it's brand new, but it's already been tested on the actual hardware by me.