Magellan Linux

Annotation of /trunk/include/kde4.sminc

Parent Directory Parent Directory | Revision Log Revision Log


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