# KDE (tm) module for the A-A-P build system. # # Written by Adriaan de Groot. Copyright is assigned to # Bram Moolenaar and Stichting NlNet Labs. Released under # the GPL, version 2. There should be a file named COPYING # in the main A-A-P directory with the complete text of # this license. # The KDE module includes support for the following: # # * Identifying KDEDIR, where KDE is installed. This is # available to recipes as $m_kde.KDEDIR. Recipes should use # $m_kde.KDEDIR/include for KDE includes, etc. # * Support for DCOP skel and stub files. A target may list # a header file containing extra DCOP information in the # sources list, like so: # interface.h { filetype=skel } { var_LTOBJSUF = _skel.lo } # or so: # interface.h { filetype=stub } { var_LTOBJSUF = _stub.lo } # # It is important to list both the filetype and the OBJSUF. # The header file is added to the sources, and the generation # of skeleton or stub C++ code is done in $BDIR. # There is no support as yet for: # * dcoplng # * KDE icons # * XDG files # There is no special support for the following, but you can # use normal AAP constructs to achieve the desired goals: # * Installing servicetypes and application .desktop files. # This can be done through INSTALL_DATA; for instance by # assigning names of all the desktop files to a variable # and adding that to INSTALL_DATA : # _top.INSTALL_DATA += $*service_DATA { installdir = services } # here it is important to set { installdir } properly # _and_ to have PKGNAME set. Since KDE normally installs # directly under $PREFIX, set PKGNAME= KDEDIR=`_no.get("KDEDIR")` qtdir_source="Top-level recipe KDEDIR" @if not KDEDIR: KDEDIR=`os.environ.get("KDEDIR")` @if not KDEDIR: KDEDIR=/usr/local/kde-3.1 qtdir_source="Default KDEDIR" @else: qtdir_source="Environment KDEDIR" @if not os.path.isdir(KDEDIR): :print $qtdir_source ($KDEDIR) is not a directory. @raise UserError,"Bad KDEDIR" # Filetypes in KDE :filetype declare h declare skel declare stub declare kidl # A skel file (which should have extension .h, and be explicitly # identified as such in a source list with { filetype=skel }), # is converted to a kidl file, then from there _skel and _stub # implementations can be made. :action h2kidl kidl skel,stub :sys dcopidl $source > `bdir(sufreplace("",".kidl",target))` :action kidl2skel cpp kidl :sys dcopidl2cpp --c++-suffix cc --no-signals --no-stub `sufreplace("",".kidl",source)` :action kidl2stub cpp kidl :sys dcopidl2cpp --c++-suffix cc --no-signals --no-skel `sufreplace("",".kidl",source)` :route stub kidl cpp ltobject h2kidl `bdir(sufreplace("",".kidl",source))` kidl2stub `bdir(sufreplace("","_stub.cc",source))` compile