File: kde.aap

package info (click to toggle)
aap 1.072-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,980 kB
  • ctags: 2,160
  • sloc: python: 15,113; makefile: 61; sh: 31
file content (82 lines) | stat: -rw-r--r-- 2,765 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# 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