Mailinglist Archive: yast-devel (73 mails)

< Previous Next >
Re: [yast-devel] yast from svn - libyui-bindings: how to compile standalone
  • From: Martin Vidner <mvidner@xxxxxxx>
  • Date: Fri, 1 Aug 2008 17:33:35 +0200
  • Message-id: <20080801153335.GA8319@xxxxxxxxxxxxxxxx>
On Fri, Aug 01, 2008 at 02:18:22PM +0200, Jan-Simon Möller wrote:
How can i compile yast, especially all dependencies of libyui-bindings into
an own prefix ?
I don't want to break my installed yast but need a up-to-date version of
python-yui for an 10.3-based host.

For yast2-ycp-ui-bindings you need to work around a bug that I have
not figured out yet: comment out the check for libyui, because it is
only looking in /usr:

configure.in.in:
-AC_CHECK_HEADERS([YaST2/yui/YWidgetFactory.h],
- [],
- [AC_MSG_ERROR([libyui headers not found - install package
yast2-libyui-devel!])])
+dnl AC_CHECK_HEADERS([YaST2/yui/YWidgetFactory.h],
+dnl [],
+dnl [AC_MSG_ERROR([libyui headers not found - install package
yast2-libyui-devel!])])

Oh, you actually mean libyui-bindings. I haven't tried that until
now. I get
yui_python.cxx:2724:30: error: YaST2/yui/YUILog.h: No such file or directory

libyui and the bindings are not prefix clean :-(
It seems that LIBYUI_INCLUDE_DIR is wrong. It points to
$myprefix/include/YaST2/yui but the above code expects
$myprefix/include.

The attached patch seems to make it work but it is a very quick
hack.

--
Martin Vidner, YaST developer
http://en.opensuse.org/User:Mvidner

Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
Index: libyui/cmake/FindLibyui.cmake
===================================================================
--- libyui/cmake/FindLibyui.cmake (revision 49588)
+++ libyui/cmake/FindLibyui.cmake (working copy)
@@ -26,10 +26,10 @@

SET(UI_PLUGIN_DIR ${LIB_INSTALL_DIR}/YaST2/plugin)

-FIND_PATH(LIBYUI_INCLUDE_DIR YWidget.h
- ${CMAKE_INSTALL_PREFIX}/include/YaST2/yui
- /usr/include/YaST2/yui
- /usr/local/include/YaST2/yui
+FIND_PATH(LIBYUI_INCLUDE_DIR YaST2/yui/YWidget.h
+ ${CMAKE_INSTALL_PREFIX}/include
+ /usr/include
+ /usr/local/include
)

FIND_LIBRARY(LIBYUI_LIBRARY NAMES yui
Index: libyui-bindings/swig/ruby/CMakeLists.txt
===================================================================
--- libyui-bindings/swig/ruby/CMakeLists.txt (revision 49587)
+++ libyui-bindings/swig/ruby/CMakeLists.txt (working copy)
@@ -12,14 +12,14 @@
ADD_CUSTOM_COMMAND (
OUTPUT ${SWIG_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E echo_append "Creating wrapper code for ruby..."
- COMMAND ${SWIG_EXECUTABLE} -c++ -ruby -autorename -o ${SWIG_OUTPUT}
-I${LIBYUI_INCLUDE_DIR} ${SWIG_INPUT}
+ COMMAND ${SWIG_EXECUTABLE} -c++ -ruby -autorename -o ${SWIG_OUTPUT}
-I${LIBYUI_INCLUDE_DIR}/YaST2/yui ${SWIG_INPUT}
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../*.i
)

ADD_LIBRARY( yui_ruby SHARED ${SWIG_OUTPUT} )
-INCLUDE_DIRECTORIES( ${RUBY_INCLUDE_PATH} ${LIBYUI_INCLUDE_DIR} )
+INCLUDE_DIRECTORIES( ${RUBY_INCLUDE_PATH} ${LIBYUI_INCLUDE_DIR}
${LIBYUI_INCLUDE_DIR}/YaST2/yui )

SET_TARGET_PROPERTIES( yui_ruby PROPERTIES PREFIX "" OUTPUT_NAME "yui")

Index: libyui-bindings/swig/python/CMakeLists.txt
===================================================================
--- libyui-bindings/swig/python/CMakeLists.txt (revision 49587)
+++ libyui-bindings/swig/python/CMakeLists.txt (working copy)
@@ -21,7 +21,7 @@
ADD_CUSTOM_COMMAND (
OUTPUT ${SWIG_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E echo_append "Creating wrapper code for Python
..."
- COMMAND ${SWIG_EXECUTABLE} -c++ -python -shadow -features autodoc -o
${SWIG_OUTPUT} -I${LIBYUI_INCLUDE_DIR} ${SWIG_INPUT}
+ COMMAND ${SWIG_EXECUTABLE} -c++ -python -shadow -features autodoc -o
${SWIG_OUTPUT} -I${LIBYUI_INCLUDE_DIR}/YaST2/yui ${SWIG_INPUT}
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../*.i
@@ -34,7 +34,7 @@
# and don't prefix with 'lib'
SET_TARGET_PROPERTIES( yui_python PROPERTIES PREFIX "" OUTPUT_NAME "_yui")

-INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} ${LIBYUI_INCLUDE_DIR} )
+INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} ${LIBYUI_INCLUDE_DIR}
${LIBYUI_INCLUDE_DIR}/YaST2/yui)

TARGET_LINK_LIBRARIES( yui_python ${LIBYUI_LIBRARY} )
TARGET_LINK_LIBRARIES( yui_python ${PYTHON_LIBRARIES} )
Index: libyui-bindings/swig/perl/CMakeLists.txt
===================================================================
--- libyui-bindings/swig/perl/CMakeLists.txt (revision 49587)
+++ libyui-bindings/swig/perl/CMakeLists.txt (working copy)
@@ -31,7 +31,7 @@
ADD_CUSTOM_COMMAND (
OUTPUT ${SWIG_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E echo_append "Creating wrapper code for Perl ..."
- COMMAND ${SWIG_EXECUTABLE} -c++ -perl -shadow -features autodoc -o
${SWIG_OUTPUT} -I${LIBYUI_INCLUDE_DIR} ${SWIG_INPUT}
+ COMMAND ${SWIG_EXECUTABLE} -c++ -perl -shadow -features autodoc -o
${SWIG_OUTPUT} -I${LIBYUI_INCLUDE_DIR}/YaST2/yui ${SWIG_INPUT}
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../*.i
@@ -44,7 +44,7 @@
# and don't prefix with 'lib'
SET_TARGET_PROPERTIES( yui_perl PROPERTIES PREFIX "" OUTPUT_NAME "yui")

-INCLUDE_DIRECTORIES( ${PERL_CORE_DIR} ${LIBYUI_INCLUDE_DIR})
+INCLUDE_DIRECTORIES( ${PERL_CORE_DIR} ${LIBYUI_INCLUDE_DIR}
${LIBYUI_INCLUDE_DIR}/YaST2/yui)

TARGET_LINK_LIBRARIES( yui_perl ${LIBYUI_LIBRARY} )
TARGET_LINK_LIBRARIES( yui_perl ${PERL_LIBRARY} )
< Previous Next >
References