Bug#999482: architecture-independent package contains arch-specific lib path

2021-11-11 Thread Vasyl Gello
Control: forwarded -1 https://github.com/xbmc/xbmc/pull/20506

Bug#999482: architecture-independent package contains arch-specific lib path

2021-11-11 Thread Vasyl Gello
Hi Hugh!

I quickly dug Kodi's CMake machinery and it appears that KodiConfig.cmake is 
installed into /usr/share/kodi/cmake by
https://github.com/xbmc/xbmc/blob/master/cmake/scripts/linux/Install.cmake#L176

What's more interesting, there is another KodiConfig.cmake generated in proper 
place, i.e ${APP_LIB}.
This means that I can solve this bug by the following set of changes:

Upstream:

1. Drop the offending directive from cmake/scripts/linux/Install.cmake
2. Adjust xbmc/xbmc-packaging/debian/kodi-addon-dev.install to include 
usr/lib/*/kodi/*.cmake
(to avoid breakage of Kodi's Ububtu PPA packaging)

Debian:

1. Adjust debian/kodi-addons-dev.install to include usr/lib/*/kodi/*.cmake

I think I will upload this fix to unstable somewhere around 19.4 in December.

-- 
Vasyl Gello
==
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.ge...@gmail.com

Skype: vasek.gello
==
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

Bug#999482: architecture-independent package contains arch-specific lib path

2021-11-11 Thread Vasyl Gello
Hi Hugh!

Thanks for spotting this!

> The paths containing /usr/lib/x86_64-linux-gnu here later cause problems when
>building addons on other architectures, as it overrides the addon install
>path - a warning is logged:

It is probably the reason why I had to implement path override in every add-on.
This file is generated from KodiConfig.cmake.in so I will check if I can craft 
an upstream fix for it.
-- 
Vasyl Gello
==
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.ge...@gmail.com

Skype: vasek.gello
==
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

Bug#999482: architecture-independent package contains arch-specific lib path

2021-11-11 Thread Hugh Cole-Baker
Package: kodi-addons-dev-common
Version: 2:19.3+dfsg1-1

In this package with Architecture: all, there is a file,
/usr/share/kodi/cmake/KodiConfig.cmake
containing:

...cut...
if(NOT KODI_LIB_DIR)
  set(KODI_LIB_DIR /usr/lib/x86_64-linux-gnu/kodi)
endif()
if(NOT KODI_DATA_DIR)
  set(KODI_DATA_DIR /usr/share/kodi)
endif()
set(APP_RENDER_SYSTEM gl)
list(APPEND CMAKE_MODULE_PATH /usr/lib/x86_64-linux-gnu/kodi 
/usr/share/kodi/cmake)
...cut...

The paths containing /usr/lib/x86_64-linux-gnu here later cause problems when
building addons on other architectures, as it overrides the addon install
path - a warning is logged:

CMake Warning at /usr/share/kodi/cmake/AddonHelpers.cmake:332 (message):
  CMAKE_INSTALL_LIBDIR lib/arm-linux-gnueabihf differs from Kodi libdir,
  changing to /usr/lib/x86_64-linux-gnu/kodi.  Please pass -DOVERRIDE_PATHS=1
  to skip this check
Call Stack (most recent call first):
  CMakeLists.txt:36 (build_addon)

and the addon libraries end up installed in the wrong location. It seems that
this file should be part of an architecture-specific package, with the correct
paths for the architecture in the file.

BR,
Hugh Cole-Baker