Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jul 2018 16:15:30 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r474105 - head/multimedia/kodi-devel/files
Message-ID:  <201807071615.w67GFUco015474@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sat Jul  7 16:15:30 2018
New Revision: 474105
URL: https://svnweb.freebsd.org/changeset/ports/474105

Log:
  multimedia/kodi-devel: Unbreak when objdump is missing
  
  Use readelf to find library sonames instead which are used to fill in the
  blanks in xbmc/DllPaths_generated.h.in.

Added:
  head/multimedia/kodi-devel/files/patch-cmake_scripts_freebsd_Macros.cmake   (contents, props changed)

Added: head/multimedia/kodi-devel/files/patch-cmake_scripts_freebsd_Macros.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/kodi-devel/files/patch-cmake_scripts_freebsd_Macros.cmake	Sat Jul  7 16:15:30 2018	(r474105)
@@ -0,0 +1,25 @@
+objdump might not be available everywhere; use readelf instead.
+
+find_soname() is used to fill in the blanks in xbmc/DllPaths_generated.h.in
+
+--- cmake/scripts/freebsd/Macros.cmake.orig	2018-06-30 06:25:00 UTC
++++ cmake/scripts/freebsd/Macros.cmake
+@@ -78,15 +78,11 @@ function(find_soname lib)
+     string(REGEX MATCH ".*lib${liblow}.so" ${lib}_FILENAME ${_TMP_FILENAME})
+   endif()
+   if(${lib}_FILENAME)
+-    execute_process(COMMAND ${CMAKE_OBJDUMP} -p ${${lib}_FILENAME}
+-                    COMMAND grep SONAME.*${liblow}
++    execute_process(COMMAND readelf -d ${${lib}_FILENAME}
++                    COMMAND awk "$2 == \"SONAME\" { printf \"%s\", substr($NF, 2, length($NF) - 2) }"
+                     ERROR_QUIET
+                     OUTPUT_VARIABLE ${lib}_SONAME)
+-    string(REPLACE "SONAME " "" ${lib}_SONAME ${${lib}_SONAME})
+-    string(STRIP ${${lib}_SONAME} ${lib}_SONAME)
+-    if(VERBOSE)
+-      message(STATUS "${lib} soname: ${${lib}_SONAME}")
+-    endif()
++    message(STATUS "${lib} soname: ${${lib}_SONAME}")
+     set(${lib}_SONAME ${${lib}_SONAME} PARENT_SCOPE)
+   endif()
+   if(arg_REQUIRED AND NOT ${lib}_SONAME)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807071615.w67GFUco015474>