Bug 254415 - games/kodi-addon-game.libretro.picodrive: use games/libretro-picodrive
Summary: games/kodi-addon-game.libretro.picodrive: use games/libretro-picodrive
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernhard Froehlich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-20 01:00 UTC by Ivan Rozhuk
Modified: 2021-03-23 23:02 UTC (History)
3 users (show)

See Also:


Attachments
patch (5.22 KB, patch)
2021-03-20 01:00 UTC, Ivan Rozhuk
rozhuk.im: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2021-03-20 01:00:15 UTC
Created attachment 223433 [details]
patch

use games/libretro-picodrive instead of bundled
Comment 1 Bernhard Froehlich freebsd_committer 2021-03-20 07:09:29 UTC
I'll take it
Comment 2 Bernhard Froehlich freebsd_committer 2021-03-23 13:50:54 UTC
I take this PR to dicsuss the changes but it applies to all 3 because they are very similar.

First I would like to know why you want to use the libretro ports instead of the bundled code. In general this is okay but it comes at a cost and complicates things so there should be at least a good reason. When looking at the patch it seems there is no compile or building involved anymore. Only patching the addon.xml and packing it all up.


1) You're heavily fighting with addon.xml(.in) which is close to obfuscation. Why can't this be a simple static patch?

2) That hack in do-build is definitely not a good idea because a minor change in the libretro port (like adding a single file other file to the PLIST) will blow it all up:
${MAKE} -C ../${LIBRETRO_PORT} -V PLIST_FILES | ${SED} 's| .*||g'

3) LIBRETRO_PORT variable also does not help with readability at all but only complicates things. eg.: ${LIBRETRO_PORT}>=0:games/${LIBRETRO_PORT}

4) Why is the LIB_DEPENDS on libtinyxml not required anymore? This looks wrong on first sight.
Comment 3 Ivan Rozhuk 2021-03-23 23:02:03 UTC
> First I would like to know why you want to use the libretro ports instead of the bundled code.

Because I do not want to do porting job twice: for libretro and for kodi.
It was a mistake that in first version I add building libs, at that time I was not sure that it is same libs that retroarh and other uses.


1. Only 2 replaces in addon.xml.in and renaming to addon.xml.
IMHO better to move this code to some .mk file and reduce code required to make libretro kodi plugin to extra small size.
Making patch - hand job again and again, for every new port.

2. This can be changed to something more blow resistant :)

3. Do not agree.

4. libtinyxml not used by these ports.
If kodi or libretro ports use this - then they must set it in their make files.


Idea of these changes is:
1. Make simple template to use with many libretro ports. It can be moved to some .mk file, like kodi.mk.
2. Avoid build libretro libs, because there is no difference between kodi and retroarch (except OpenGL support for libretro).