Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 21141 - (hide annotations) (download)
Wed Mar 12 16:39:55 2014 UTC (10 years, 2 months ago) by niro
Original Path: trunk/include/kde4.sminc
File size: 4879 byte(s)
-added UP2DATE uri and updated dependencies
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 15565 if [[ -z ${SRCFILE} ]]
23 niro 12339 then
24 niro 15565 if [[ ${PVER//.} -ge 483 ]]
25     then
26     KDE4_TARBALL_EXTENSION="tar.xz"
27     else
28     KDE4_TARBALL_EXTENSION="tar.bz2"
29     fi
30 niro 12339 fi
31     : ${SRCFILE="${PNAME/4/}-${PVER}.${KDE4_TARBALL_EXTENSION}"}
32 niro 2 : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"}
33     : ${DESCRIPTION="${PNAME}"}
34     : ${HOMEPAGE="http://www.kde.org/"}
35    
36 niro 13883 if [[ ${PNAME} != oxygen-icons ]]
37     then
38     DEPEND="${DEPEND}
39     >= x11-libs/libXt-1
40     >= x11-libs/libXinerama-1
41 niro 21141 >= x11-libs/qt4-gui-4.8
42     >= x11-libs/qt4-qt3support-4.8
43     >= x11-libs/qt4-script-4.8
44     >= x11-libs/qt4-sql-4.8
45     >= x11-libs/qt4-svg-4.8
46     >= x11-libs/qt4-test-4.8
47     >= x11-libs/qt4-dbus-4.8
48     >= x11-libs/qt4-opengl-4.8
49     >= x11-libs/qt4-webkit-4.8
50     >= x11-libs/qt4-declarative-4.8"
51 niro 13883 fi
52 niro 2
53 niro 15828 if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]] && [[ ${PNAME} != oxygen-icons ]]
54 niro 5637 then
55     DEPEND="${DEPEND}
56 niro 8496 >= virtual/phonon
57     >= virtual/phonon-backend"
58 niro 5637 fi
59    
60 niro 2 SDEPEND="${SDEPEND}
61 niro 21141 >= dev-util/cmake-2.8.12
62 niro 8496 >= dev-util/pkgconfig-0.25
63 niro 2 >= x11-proto/xf86vidmodeproto-2
64     >= x11-proto/xineramaproto-1"
65    
66 niro 8532 if [[ ${PNAME} != automoc4 ]]
67     then
68     SDEPEND="${SDEPEND}
69     >= kde-base/automoc4-0.9.88"
70     fi
71    
72 niro 2 # small hack to fix kdemirrors
73     [[ ${KDE_MIRROR_UNSTABLE} = 1 ]] && KDE_MIRRORS=$(echo ${KDE_MIRRORS} | sed "s:/stable:/unstable:g")
74    
75     SRC_URI=(
76     ${SRC_URI[*]}
77     kde://${PVER}/src/${SRCFILE}
78     kde://${PVER%.*}/src/${SRCFILE}
79     mirror://${PNAME}/${SRCFILE}
80     )
81    
82 niro 21141 UP2DATE="updatecmd -listonly http://download.kde.org/stable/ | grep 'stable/[0-9]' | sed -n 's:.*/\([0-9].*\)/:\1:;$ p'"
83    
84 niro 2 # exported functions and variables for mage-file
85 niro 4788 SPECIAL_VARS="${SPECIAL_VARS} KDEDIR"
86 niro 6918 SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove"
87 niro 2
88     kde4_configure()
89     {
90     local configure_opts
91    
92     # disabled, seems to be broken atm
93     # # use --enable-final only on i*86
94 niro 4091 # [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON"
95     configure_opts+=" -DCMAKE_BUILD_TYPE=Release"
96 niro 2
97 niro 4083 # use full rpath on non /usr installations
98 niro 4091 [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
99 niro 4083
100 niro 4090 # add akonadi dbus dir
101     if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]]
102     then
103 niro 4091 configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/"
104     configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/"
105 niro 4090 fi
106    
107 niro 2 # add commandline given arguments
108 niro 4091 configure_opts+=" $@"
109 niro 2
110     # remove build dir if exist
111     [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build
112    
113     # build outside of the source dir
114     install -d ${BUILDDIR}/build || die
115     cd ${BUILDDIR}/build
116    
117     cmake_configure \
118 niro 4091 -DCMAKE_INSTALL_PREFIX=${KDEDIR} \
119     -DSYSCONF_INSTALL_DIR=${KDECONFDIR} \
120     -DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \
121     -DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \
122     -DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \
123     -DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \
124     -DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \
125 niro 2 -DKDE4_ENABLE_FPIE=ON \
126     -DKDE4_BUILD_TESTS=OFF \
127     -DKDE4_ENABLE_HTMLHANDBOOK=ON \
128     ${configure_opts} \
129     || die
130     }
131    
132     kde4_src_prepare()
133     {
134     munpack ${SRCFILE} || die
135     }
136    
137     kde4_src_compile()
138     {
139     cd ${SRCDIR}
140    
141     kde4_configure || die
142 niro 1921 mmake ${KDE4_MAKE_OPTS} || die
143 niro 2 }
144    
145     kde4_src_install()
146     {
147     cd ${BUILDDIR}/build
148 niro 1921 mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die
149 niro 2
150 niro 4091 # move dbus service dirs to a proper location if KDEDIR != /usr
151     if [[ ${KDEDIR} != /usr ]]
152     then
153     if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]]
154     then
155     echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}"
156     minstalldir /usr/share || die
157     cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die
158     rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die
159     fi
160     fi
161 niro 15751 # or if KDECONFDIR != /etc
162     if [[ ${KDECONFDIR} != /etc ]]
163     then
164     if [[ -d ${BINDIR}/${KDECONFDIR}/dbus-1 ]]
165     then
166 niro 15752 echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}"
167 niro 15751 minstalldir /etc || die
168     cp -R ${BINDIR}/${KDECONFDIR}/dbus-1 ${BINDIR}/etc/ || die
169     rm -r ${BINDIR}/${KDECONFDIR}/dbus-1 || die
170     fi
171     fi
172 niro 4090
173 niro 2 cd ${SRCDIR}
174     local i
175     for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
176     FAQ LICENSE NEWS README TODO
177     do
178     if [ -f ${SRCDIR}/${i} ]
179     then
180     minstalldocs ${i} || die
181     fi
182     done
183     }
184    
185 niro 7127 export_inherits kde4 src_prepare src_compile src_install