Skip to content
This repository
Browse code

Fix for Issue #290 Fails to build on BSD

  • Loading branch information...
commit 0fad6b47b5aa5ab987542e01a0ee28f9185befc3 1 parent 10d5f31
Alexander Sokolov SokoloffA authored
2  CMakeLists.txt
@@ -26,6 +26,8 @@ message(STATUS "")
26 26 message(STATUS "Razor-qt version: ${RAZOR_VERSION}")
27 27 message(STATUS "")
28 28
  29 +link_directories(/usr/local/lib/)
  30 +
29 31 add_definitions ( -Wall )
30 32 set( QT_USE_QTDBUS 1 )
31 33 find_package ( Qt4 4.6.0 REQUIRED )
4 cmake/RazorTranslate.cmake
@@ -207,7 +207,7 @@ function(razor_translate_desktop2 _RESULT)
207 207 if (_translations)
208 208 add_custom_command(OUTPUT ${_outFile}
209 209 COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
210   - COMMAND grep --no-filename -P ${_pattern} ${_translations} >> ${_outFile}
  210 + COMMAND grep --no-filename ${_pattern} ${_translations} >> ${_outFile}
211 211 COMMENT "Generating ${_fileName}${_fileExt}"
212 212 )
213 213 else()
@@ -305,7 +305,7 @@ macro(razor_translate_desktop _RESULT)
305 305 if (TR_FILES)
306 306 add_custom_command(OUTPUT ${_OUT_FILE}
307 307 COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_IN_FILE} > ${_OUT_FILE}
308   - COMMAND grep --no-filename -P ${PATTERN} ${TR_FILES} >> ${_OUT_FILE}
  308 + COMMAND grep --no-filename ${PATTERN} ${TR_FILES} >> ${_OUT_FILE}
309 309 COMMENT "Generating ${_FILE_NAME}${_FILE_EXT}"
310 310 )
311 311 else()
3  libraries/qtxdg/xdgdesktopfile.cpp
@@ -1078,9 +1078,8 @@ bool XdgDesktopFile::isApplicable(bool excludeHidden, const QString& environment
1078 1078 ************************************************/
1079 1079 QString expandDynamicUrl(QString url)
1080 1080 {
1081   - for (int i=0; environ[i]; i++)
  1081 + foreach(QString line, QProcess::systemEnvironment())
1082 1082 {
1083   - QString line(environ[i]);
1084 1083 QString name = line.section("=", 0, 0);
1085 1084 QString val = line.section("=", 1);
1086 1085 url.replace(QString("$%1").arg(name), val);
1  libraries/razorqxt/CMakeLists.txt
... ... @@ -1,6 +1,7 @@
1 1 include(RazorLibSuffix)
2 2
3 3 find_package(X11 REQUIRED)
  4 +include_directories(${X11_INCLUDE_DIR})
4 5
5 6 # our Qxt library
6 7 set ( razorqxt_PUBLIC_HDRS
2  razorqt-appswitcher/CMakeLists.txt
@@ -8,6 +8,8 @@ endif (NOT CMAKE_BUILD_TYPE)
8 8 add_definitions ( -Wall )
9 9 find_package ( Qt4 REQUIRED )
10 10 include ( ${QT_USE_FILE} )
  11 +find_package(X11 REQUIRED)
  12 +
11 13 include_directories (
12 14 ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
13 15 ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTXML_INCLUDE_DIR} ${QT_QTDBUS_INCLUDE_DIR}
2  razorqt-config/razor-config-mouse/CMakeLists.txt
... ... @@ -1,3 +1,5 @@
  1 +find_package(X11 REQUIRED)
  2 +include_directories(${X11_INCLUDE_DIR})
1 3
2 4 include_directories (
3 5 ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
2  razorqt-notificationd/src/CMakeLists.txt
@@ -32,6 +32,8 @@ qt4_add_dbus_adaptor(NOTIFICATIONS_SRC
32 32 notifyd.h Notifyd
33 33 )
34 34
  35 +find_package(X11 REQUIRED)
  36 +include_directories(${X11_INCLUDE_DIR})
35 37
36 38 add_executable(razor-notificationd
37 39 ${NOTIFICATIONS_SRC}
3  razorqt-panel/plugin-tray/CMakeLists.txt
@@ -18,11 +18,10 @@ set(MOCS
18 18 include( FindPkgConfig )
19 19 include( CheckLibraryExists )
20 20
21   -pkg_check_modules( X11 REQUIRED x11 )
  21 +find_package(X11 REQUIRED)
22 22 pkg_check_modules( XCOMPOSITE REQUIRED xcomposite)
23 23 pkg_check_modules( XDAMAGE REQUIRED xdamage )
24 24 pkg_check_modules( XRENDER REQUIRED xrender )
25   -
26 25 set(LIBRARIES
27 26 ${X11_LIBRARIES}
28 27 ${XCOMPOSITE_LIBRARIES}
3  razorqt-runner/CMakeLists.txt
@@ -88,7 +88,8 @@ endif (NOT CMAKE_BUILD_TYPE)
88 88 add_definitions(-Wall)
89 89 find_package(Qt4 REQUIRED)
90 90 include(${QT_USE_FILE})
91   -
  91 +find_package(X11 REQUIRED)
  92 +include_directories(${X11_INCLUDE_DIR})
92 93
93 94 set(RAZOR_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/razor)
94 95 set(APP_SHARE_DIR ${RAZOR_SHARE_DIR}/${PROJECT_NAME})

2 comments on commit 0fad6b4

PICCORO Lenz McKAY

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

Alexander Sokolov

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?

PICCORO Lenz McKAY
Alexander Sokolov
Owner

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?

PICCORO Lenz McKAY

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.
Something went wrong with that request. Please try again.