summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-03-30 18:58:56 +0200
committerSlávek Banko <slavek.banko@axis.cz>2022-03-31 01:10:50 +0200
commita91c7c1df5f039a3611bf0aa320b15f70305e8b3 (patch)
treec9dc53a99ea050485e4130dbcebe2628cad939a8
parent298fe4635696966d3cfcade2b8bce7fc908e4b84 (diff)
downloadkaffeine-a91c7c1df5f039a3611bf0aa320b15f70305e8b3.tar.gz
kaffeine-a91c7c1df5f039a3611bf0aa320b15f70305e8b3.zip
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>
-rw-r--r--CMakeLists.txt12
-rw-r--r--config.h.cmake3
-rw-r--r--kaffeine/src/instwizard.cpp27
3 files changed, 30 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 36f4c14..dc0744d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,18 @@ set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
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
include( TDESetupPaths )
diff --git a/config.h.cmake b/config.h.cmake
index 9e8ebf2..20fc03c 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -7,6 +7,9 @@
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
+/* System's default path for libraries */
+#define SYSTEM_LIBDIR "@SYSTEM_LIBDIR@"
+
/* Defined if you have xinerama */
#cmakedefine HAVE_XINERAMA 1
diff --git a/kaffeine/src/instwizard.cpp b/kaffeine/src/instwizard.cpp
index cc880d1..7733efb 100644
--- a/kaffeine/src/instwizard.cpp
+++ b/kaffeine/src/instwizard.cpp
@@ -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:")
<< " <a href=\"http://www1.mplayerhq.hu/design7/dload.html#binary_codecs\">http://www1.mplayerhq.hu/design7/dload.html#binary_codecs</a>.</font>";
*/
+
//LIBDVDCSS
info << "<br><hr><b>" << "libdvdcss" << "...</b><br>";
bool dvdcss = false;
- TQDir d("/usr/lib");
- TQStringList entries = d.entryList("libdvdcss.so*");
- if (entries.count())
- dvdcss = true;
- else
+ TQStringList libDirs;
+ TQStringList entries;
+ TQDir d;
+ libDirs
+ << "/" 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*");
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)