Projects/Nepomuk/Nepomuk2Port

    From KDE TechBase
    Revision as of 17:35, 13 August 2012 by Vishesh (talk | contribs) (Created page with "With KDE 4.9, Nepomuk moved out out kdelibs into its own repository. KDE libs is required to maintain source compatibility with earlier releases, and therefore we could not ju...")
    (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
    The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

    With KDE 4.9, Nepomuk moved out out kdelibs into its own repository. KDE libs is required to maintain source compatibility with earlier releases, and therefore we could not just remove the nepomuk components from kdelibs.

    A new repository called 'nepomuk-core' was introduced which contains all the main components of nepomuk. This included vasts parts of kdelibs/nepomuk and kde-runtime/nepomuk.

    Porting to Nepomuk2

    Nepomuk2 is predominantly just a namespace change from Nepomuk to Nepomuk2. Additionally, the deprecated components of Nepomuk have been removed. In order to make porting easier, a simple script has been provided -

    #!/bin/sh
    egrep -lRZ "Nepomuk" | xargs -0 -l sed -i -e 's/Nepomuk::/Nepomuk2::/g'  
    egrep -lRZ "Nepomuk" | xargs -0 -l sed -i -e 's/#include <Nepomuk\//#include <Nepomuk2\//'
    egrep -lRZ "nepomuk" | xargs -0 -l sed -i -e 's/#include <nepomuk\//#include <nepomuk2\//'
    egrep -lRZ "Nepomuk" | xargs -0 -l sed -i -e 's/namespace Nepomuk/namespace Nepomuk2/g' 
    egrep -lRZ "resourceType" | xargs -0 -l sed -i -e 's/\.resourceType/\.type/g'
    egrep -lRZ "resourceUri" | xargs -0 -l sed -i -e 's/\.resourceUri/\.uri/g'
    egrep -lRZ "NEPOMUK_INCLUDE_DIR" | xargs -0 -l sed -i -e 's/NEPOMUK_INCLUDE_DIR/NEPOMUK_CORE_INCLUDE_DIR/g'
    egrep -lRZ "NEPOMUK_LIBRARIES" | xargs -0 -l sed -i -e 's/NEPOMUK_LIBRARIES/NEPOMUK_CORE_LIBRARY/g'
    egrep -lRZ "NEPOMUK_QUERY_LIBRARIES" | xargs -0 -l sed -i -e 's/${NEPOMUK_QUERY_LIBRARIES}//g'
    

    CMake Changes

    With NepomukCore, the following CMake variables are declared -

    #
    # NEPOMUK_CORE_LIB_DIR : The nepomuk-core library directory
    # NEPOMUK_CORE_INCLUDE_DIR : The nepomuk-core include directory
    # NEPOMUK_CORE_VERSION : The nepomuk-core version
    # NEPOMUK_CORE_ONTOLOGY_DIR : The nepomuk-core ontologies location
    # NEPOMUK_CORE_DBUS_INTERFACES_DIR : The nepomuk-core DBUS Interfaces dir
    # NEPOMUK_CORE_LIBRARY : The nepomukcore library
    #