Magellan Linux

Annotation of /branches/R11-unstable/include/kde4.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12279 - (hide annotations) (download)
Tue May 15 13:12:16 2012 UTC (11 years, 11 months ago) by niro
Original Path: trunk/include/kde4.sminc
File size: 4143 byte(s)
-added qt4-declarative
1 niro 1927 # $Id$
2 niro 2
3 niro 1927 sminclude mtools cmake qt4
4 niro 2
5     ## some global vars ##
6 niro 6839 export KDEDIR=/usr
7 niro 2 export KDECONFDIR=/etc/kde4
8     export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins
9 niro 4091 export DBUS_SYSTEM_DIR=/usr/share/dbus-1
10 niro 2
11     # fixes some compile issues ala "kde-config: command not found"
12     export PATH="${KDEDIR}/bin:${PATH}"
13     export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${KDEDIR}/$(mlibdir)/pkgconfig
14    
15     # if kde is already installed it may fuck up the build process because it
16     # try to use the wrong docp etc.
17     # so we prevent this:
18     export KDEDIRS=${KDEDIR}
19    
20     # some sane default values
21 niro 9863 : ${PCAT="kde-base"}
22 niro 2 : ${SRCFILE="${PNAME/4/}-${PVER}.tar.bz2"}
23     : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"}
24     : ${DESCRIPTION="${PNAME}"}
25     : ${HOMEPAGE="http://www.kde.org/"}
26    
27     DEPEND="${DEPEND}
28     >= x11-libs/libXt-1
29 niro 5394 >= x11-libs/libXinerama-1
30 niro 8496 >= x11-libs/qt4-gui-4.7
31     >= x11-libs/qt4-qt3support-4.7
32     >= x11-libs/qt4-script-4.7
33     >= x11-libs/qt4-sql-4.7
34     >= x11-libs/qt4-svg-4.7
35     >= x11-libs/qt4-test-4.7
36     >= x11-libs/qt4-dbus-4.7
37     >= x11-libs/qt4-opengl-4.7
38 niro 12279 >= x11-libs/qt4-webkit-4.7
39     >= x11-libs/qt4-declarative-4.7"
40 niro 2
41 niro 8496 if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]]
42 niro 5637 then
43     DEPEND="${DEPEND}
44 niro 8496 >= virtual/phonon
45     >= virtual/phonon-backend"
46 niro 5637 fi
47    
48 niro 2 SDEPEND="${SDEPEND}
49 niro 8496 >= dev-util/cmake-2.8.5
50     >= dev-util/pkgconfig-0.25
51 niro 2 >= x11-proto/xf86vidmodeproto-2
52     >= x11-proto/xineramaproto-1"
53    
54 niro 8532 if [[ ${PNAME} != automoc4 ]]
55     then
56     SDEPEND="${SDEPEND}
57     >= kde-base/automoc4-0.9.88"
58     fi
59    
60 niro 2 # small hack to fix kdemirrors
61     [[ ${KDE_MIRROR_UNSTABLE} = 1 ]] && KDE_MIRRORS=$(echo ${KDE_MIRRORS} | sed "s:/stable:/unstable:g")
62    
63     SRC_URI=(
64     ${SRC_URI[*]}
65     kde://${PVER}/src/${SRCFILE}
66     kde://${PVER%.*}/src/${SRCFILE}
67     mirror://${PNAME}/${SRCFILE}
68     )
69    
70     # exported functions and variables for mage-file
71 niro 4788 SPECIAL_VARS="${SPECIAL_VARS} KDEDIR"
72 niro 6918 SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove"
73 niro 2
74     kde4_configure()
75     {
76     local configure_opts
77    
78     # disabled, seems to be broken atm
79     # # use --enable-final only on i*86
80 niro 4091 # [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON"
81     configure_opts+=" -DCMAKE_BUILD_TYPE=Release"
82 niro 2
83 niro 4083 # use full rpath on non /usr installations
84 niro 4091 [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
85 niro 4083
86 niro 4090 # add akonadi dbus dir
87     if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]]
88     then
89 niro 4091 configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/"
90     configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/"
91 niro 4090 fi
92    
93 niro 2 # add commandline given arguments
94 niro 4091 configure_opts+=" $@"
95 niro 2
96     # remove build dir if exist
97     [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build
98    
99     # build outside of the source dir
100     install -d ${BUILDDIR}/build || die
101     cd ${BUILDDIR}/build
102    
103     cmake_configure \
104 niro 4091 -DCMAKE_INSTALL_PREFIX=${KDEDIR} \
105     -DSYSCONF_INSTALL_DIR=${KDECONFDIR} \
106     -DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \
107     -DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \
108     -DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \
109     -DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \
110     -DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \
111 niro 2 -DKDE4_ENABLE_FPIE=ON \
112     -DKDE4_BUILD_TESTS=OFF \
113     -DKDE4_ENABLE_HTMLHANDBOOK=ON \
114     ${configure_opts} \
115     || die
116     }
117    
118     kde4_src_prepare()
119     {
120     munpack ${SRCFILE} || die
121     }
122    
123     kde4_src_compile()
124     {
125     cd ${SRCDIR}
126    
127     kde4_configure || die
128 niro 1921 mmake ${KDE4_MAKE_OPTS} || die
129 niro 2 }
130    
131     kde4_src_install()
132     {
133     cd ${BUILDDIR}/build
134 niro 1921 mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die
135 niro 2
136 niro 4091 # move dbus service dirs to a proper location if KDEDIR != /usr
137     if [[ ${KDEDIR} != /usr ]]
138     then
139     if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]]
140     then
141     echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}"
142     minstalldir /usr/share || die
143     cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die
144     rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die
145     fi
146     fi
147 niro 4090
148 niro 2 cd ${SRCDIR}
149     local i
150     for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
151     FAQ LICENSE NEWS README TODO
152     do
153     if [ -f ${SRCDIR}/${i} ]
154     then
155     minstalldocs ${i} || die
156     fi
157     done
158     }
159    
160 niro 7127 export_inherits kde4 src_prepare src_compile src_install