tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sysutils/strigi cannot find textproc/libxml2 in bootstrap pkgsrc



I am compiling pkgsrc-2011Q2 packages into a separately bootstrapped
/usr/pkg-2011Q2 filesystem on a NetBSD 5.1_STABLE system.  Most seem
to work as expected.  However, sysutils/strigi complains about not
finding SAX2.h, a file that is part of textproc/libxml2.  The reason
for this is that various cmake files have the path
/usr/pkg/include/libxml2 instead of the correct
/usr/pkg-2011Q2/include/libxml2 path.  These are the only paths with
/usr/pkg instead of /usr/pkg-2011Q2, so everything else is getting it
right.  Further, changing all of these instances to the correct path
allows strigi to compile fine.

Does anyone have enough understanding of how cmake works to help me
figure out what to change?  I'm guessing that the fix must have an
effect on cmake/FindLibXml2.cmake, which follows:

     # - Try to find LibXml2
     # Once done this will define
     #
     #  LIBXML2_FOUND - system has LibXml2
     #  LIBXML2_INCLUDE_DIR - the LibXml2 include directory
     #  LIBXML2_LIBRARIES - the libraries needed to use LibXml2
     #  LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2

     # Copyright (c) 2006, Alexander Neundorf, <neundorf%kde.org@localhost>
     #
     # Redistribution and use is allowed according to the terms of the BSD 
license.
     # For details see the accompanying COPYING-CMAKE-SCRIPTS file.


     IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
        # in cache already
        SET(LibXml2_FIND_QUIETLY TRUE)
     ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)

     IF (NOT WIN32)
        # use pkg-config to get the directories and then use these values
        # in the FIND_PATH() and FIND_LIBRARY() calls
        INCLUDE(UsePkgConfig)
        PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags 
_LibXml2Cflags)
        SET(LIBXML2_DEFINITIONS ${_LibXml2Cflags})
     ENDIF (NOT WIN32)

     FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
        PATHS
        ${_LibXml2IncDir}
        PATH_SUFFIXES libxml2
        )

     SET(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIR} ${_LibXml2IncDir} )

     FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
        PATHS
        ${_LibXml2LinkDir}
        )

     IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
        SET(LIBXML2_FOUND TRUE)
     ELSE (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
        SET(LIBXML2_FOUND FALSE)
     ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)

     FIND_PROGRAM(XMLLINT_EXECUTABLE xmllint)

     if( NOT XMLLINT_EXECUTABLE )
        MESSAGE(STATUS "xmllint program not found. Install it if you want 
validate generated doc file.")
     endif(NOT XMLLINT_EXECUTABLE )

     IF (LIBXML2_FOUND)
        IF (NOT LibXml2_FIND_QUIETLY)
           MESSAGE(STATUS "Found LibXml2: ${LIBXML2_LIBRARIES}")
        ENDIF (NOT LibXml2_FIND_QUIETLY)
     ELSE (LIBXML2_FOUND)
        IF (LibXml2_FIND_REQUIRED)
           MESSAGE(SEND_ERROR "Could NOT find LibXml2")
        ENDIF (LibXml2_FIND_REQUIRED)
     ENDIF (LIBXML2_FOUND)

     MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES)

For example, could it be picking up the wrong pkg-config somehow?  I
have no idea where to start looking to track this all down, though.
I'm hoping someone here has better knowledge of the internals of cmake
as it relates to pkgsrc.

Thanks alot for any help you can offer.

Cheers,
Brook


Home | Main Index | Thread Index | Old Index