Browse files

Fix for Issue #290 Fails to build on BSD

  • Loading branch information...
1 parent 10d5f31 commit 0fad6b47b5aa5ab987542e01a0ee28f9185befc3 @SokoloffA SokoloffA committed Aug 7, 2012
View
2 CMakeLists.txt
@@ -26,6 +26,8 @@ message(STATUS "")
message(STATUS "Razor-qt version: ${RAZOR_VERSION}")
message(STATUS "")
+link_directories(/usr/local/lib/)
@mckaygerhard
mckaygerhard added a line comment Aug 14, 2012

this are a hadr code patch!!!!

we need a conditional here! if PREFIX are set, need to change!

another solution its filter archs and OS ,and if freeBSD detected so then change

@SokoloffA
Razor-qt member
SokoloffA added a line comment Aug 14, 2012

Oh! I planned to add comment, but forgot about it.
I don't like this too. But without this line BSD can't find X11 libraries. Maybe somebody known better solution?

@mckaygerhard
mckaygerhard added a line comment Aug 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
add_definitions ( -Wall )
set( QT_USE_QTDBUS 1 )
find_package ( Qt4 4.6.0 REQUIRED )
View
4 cmake/RazorTranslate.cmake
@@ -207,7 +207,7 @@ function(razor_translate_desktop2 _RESULT)
if (_translations)
add_custom_command(OUTPUT ${_outFile}
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
- COMMAND grep --no-filename -P ${_pattern} ${_translations} >> ${_outFile}
+ COMMAND grep --no-filename ${_pattern} ${_translations} >> ${_outFile}
COMMENT "Generating ${_fileName}${_fileExt}"
)
else()
@@ -305,7 +305,7 @@ macro(razor_translate_desktop _RESULT)
if (TR_FILES)
add_custom_command(OUTPUT ${_OUT_FILE}
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_IN_FILE} > ${_OUT_FILE}
- COMMAND grep --no-filename -P ${PATTERN} ${TR_FILES} >> ${_OUT_FILE}
+ COMMAND grep --no-filename ${PATTERN} ${TR_FILES} >> ${_OUT_FILE}
COMMENT "Generating ${_FILE_NAME}${_FILE_EXT}"
)
else()
View
3 libraries/qtxdg/xdgdesktopfile.cpp
@@ -1078,9 +1078,8 @@ bool XdgDesktopFile::isApplicable(bool excludeHidden, const QString& environment
************************************************/
QString expandDynamicUrl(QString url)
{
- for (int i=0; environ[i]; i++)
+ foreach(QString line, QProcess::systemEnvironment())
{
- QString line(environ[i]);
QString name = line.section("=", 0, 0);
QString val = line.section("=", 1);
url.replace(QString("$%1").arg(name), val);
View
1 libraries/razorqxt/CMakeLists.txt
@@ -1,6 +1,7 @@
include(RazorLibSuffix)
find_package(X11 REQUIRED)
+include_directories(${X11_INCLUDE_DIR})
# our Qxt library
set ( razorqxt_PUBLIC_HDRS
View
2 razorqt-appswitcher/CMakeLists.txt
@@ -8,6 +8,8 @@ endif (NOT CMAKE_BUILD_TYPE)
add_definitions ( -Wall )
find_package ( Qt4 REQUIRED )
include ( ${QT_USE_FILE} )
+find_package(X11 REQUIRED)
+
include_directories (
${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTXML_INCLUDE_DIR} ${QT_QTDBUS_INCLUDE_DIR}
View
2 razorqt-config/razor-config-mouse/CMakeLists.txt
@@ -1,3 +1,5 @@
+find_package(X11 REQUIRED)
+include_directories(${X11_INCLUDE_DIR})
include_directories (
${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
View
2 razorqt-notificationd/src/CMakeLists.txt
@@ -32,6 +32,8 @@ qt4_add_dbus_adaptor(NOTIFICATIONS_SRC
notifyd.h Notifyd
)
+find_package(X11 REQUIRED)
+include_directories(${X11_INCLUDE_DIR})
add_executable(razor-notificationd
${NOTIFICATIONS_SRC}
View
3 razorqt-panel/plugin-tray/CMakeLists.txt
@@ -18,11 +18,10 @@ set(MOCS
include( FindPkgConfig )
include( CheckLibraryExists )
-pkg_check_modules( X11 REQUIRED x11 )
+find_package(X11 REQUIRED)
pkg_check_modules( XCOMPOSITE REQUIRED xcomposite)
pkg_check_modules( XDAMAGE REQUIRED xdamage )
pkg_check_modules( XRENDER REQUIRED xrender )
-
set(LIBRARIES
${X11_LIBRARIES}
${XCOMPOSITE_LIBRARIES}
View
3 razorqt-runner/CMakeLists.txt
@@ -88,7 +88,8 @@ endif (NOT CMAKE_BUILD_TYPE)
add_definitions(-Wall)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
-
+find_package(X11 REQUIRED)
+include_directories(${X11_INCLUDE_DIR})
set(RAZOR_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/razor)
set(APP_SHARE_DIR ${RAZOR_SHARE_DIR}/${PROJECT_NAME})

2 comments on commit 0fad6b4

@SokoloffA
Razor-qt member

I do not know what to do. Can I close the bug or not.
On the one hand the project is built successfully.
On the other hand, most of the programs do not work.

razor-panel starts, but can't load any plug-ins:

razor-panel(0xbfbfe5f4) Warning: "Can't load plugin lib "/usr/local/lib/razor-panel//libclock.so"" 
"Cannot load library /usr/local/lib/razor-panel//libclock.so: (/usr/local/lib/razor-panel//libclock.so: 
Undefined symbol "_ZN16RazorPanelPlugin16staticMetaObjectE")" 

_ZN16RazorPanelPlugin16staticMetaObjectE is a RazorPanelPlugin::staticMetaObject
Please note that this error does occur not at compile time but at startup. Any ideas?

Other programs are segfaults. They crashes in the innocent places like QIcon::themeName.
This is due to libraries/qtxdg/qiconfix. When I commented out all calls of my QIconFixed classes in the xdgicon.cpp, programs start to work well. But standard QIcon have a bugs, for this reason, we are use own fixed version. Suggestions?

@mckaygerhard

the cmake find for X11 dont work .. linking explicy only if freeBSD would solve, but seems that the X11 software in FReeBSD dont have property packaged/installed by default .. the code:

find_package(X11 REQUIRED)
include_directories(${X11_INCLUDE_DIR})

must do the prevous lnes, but dont! when linking missing symbols are the results..

Please sign in to comment.