Change libdvdcss detection to search the default system directory for libraries.

This resolves issue TDE/tde-packaging#113.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/11/head
Slávek Banko 3 years ago
parent 298fe46356
commit a91c7c1df5
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -33,6 +33,18 @@ set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros ) include( TDEMacros )
##### get the system's default path for libraries
tde_save_and_set( CMAKE_INSTALL_PREFIX "/usr" )
include( GNUInstallDirs OPTIONAL )
if( CMAKE_INSTALL_LIBDIR )
set( SYSTEM_LIBDIR "${CMAKE_INSTALL_LIBDIR}" )
else( )
set( SYSTEM_LIBDIR "lib${LIB_SUFFIX}" )
endif( )
tde_restore( CMAKE_INSTALL_PREFIX )
##### setup install paths ##### setup install paths
include( TDESetupPaths ) include( TDESetupPaths )

@ -7,6 +7,9 @@
significant byte first (like Motorola and SPARC, unlike Intel). */ significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ #cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
/* System's default path for libraries */
#define SYSTEM_LIBDIR "@SYSTEM_LIBDIR@"
/* Defined if you have xinerama */ /* Defined if you have xinerama */
#cmakedefine HAVE_XINERAMA 1 #cmakedefine HAVE_XINERAMA 1

@ -116,25 +116,28 @@ void InstWizard::internalWizard()
info << "<font color=\"DarkRed\">" << i18n("No WIN32 codecs found in /usr/lib/win32. You're not able to play Windows Media 9 files, newer Real Media files and some less common formats. Download the codecs here:") info << "<font color=\"DarkRed\">" << i18n("No WIN32 codecs found in /usr/lib/win32. You're not able to play Windows Media 9 files, newer Real Media files and some less common formats. Download the codecs here:")
<< " <a href=\"http://www1.mplayerhq.hu/design7/dload.html#binary_codecs\">http://www1.mplayerhq.hu/design7/dload.html#binary_codecs</a>.</font>"; << " <a href=\"http://www1.mplayerhq.hu/design7/dload.html#binary_codecs\">http://www1.mplayerhq.hu/design7/dload.html#binary_codecs</a>.</font>";
*/ */
//LIBDVDCSS //LIBDVDCSS
info << "<br><hr><b>" << "libdvdcss" << "...</b><br>"; info << "<br><hr><b>" << "libdvdcss" << "...</b><br>";
bool dvdcss = false; bool dvdcss = false;
TQDir d("/usr/lib"); TQStringList libDirs;
TQStringList entries = d.entryList("libdvdcss.so*"); TQStringList entries;
if (entries.count()) TQDir d;
dvdcss = true; libDirs
else << "/" SYSTEM_LIBDIR
<< "/usr/" SYSTEM_LIBDIR
<< "/usr/local/" SYSTEM_LIBDIR
<< "/lib"
<< "/usr/lib"
<< "/usr/local/lib";
for (TQStringList::ConstIterator it = libDirs.begin(); it != libDirs.end(); ++it)
{ {
d = TQDir("/usr/local/lib"); d = TQDir(*it);
entries = d.entryList("libdvdcss.so*"); entries = d.entryList("libdvdcss.so*");
if (entries.count()) if (entries.count())
dvdcss = true;
else
{ {
d = TQDir("/usr/lib64");
entries = d.entryList("libdvdcss.so*");
if (entries.count())
dvdcss = true; dvdcss = true;
break;
} }
} }
if (!dvdcss) if (!dvdcss)

Loading…
Cancel
Save