Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/core/include/kde4.sminc revision 2 by niro, Fri Oct 10 13:29:42 2008 UTC branches/magellan-next/include/kde4.sminc revision 8496 by niro, Wed Jul 20 15:00:37 2011 UTC
# Line 1  Line 1 
1  # $Header: /magellan-cvs/smage/include/kde4.sminc,v 1.16 2008/04/05 08:24:39 niro Exp $  # $Id$
2    
3  sminclude mtools cmake  sminclude mtools cmake qt4
4    
5  ## some global vars ##  ## some global vars ##
6  export QTDIR=/opt/qt4  export KDEDIR=/usr
 export KDEDIR=/opt/kde4  
7  export KDECONFDIR=/etc/kde4  export KDECONFDIR=/etc/kde4
8  export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins  export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins
9    export DBUS_SYSTEM_DIR=/usr/share/dbus-1
10    
11  # fixes some compile issues ala "kde-config: command not found"  # fixes some compile issues ala "kde-config: command not found"
12  export PATH="${KDEDIR}/bin:${PATH}"  export PATH="${KDEDIR}/bin:${PATH}"
# Line 27  export KDEDIRS=${KDEDIR} Line 27  export KDEDIRS=${KDEDIR}
27  DEPEND="${DEPEND}  DEPEND="${DEPEND}
28   >= x11-libs/libXt-1   >= x11-libs/libXt-1
29   >= x11-libs/libXinerama-1   >= x11-libs/libXinerama-1
30   >= x11-libs/qt4-4.3.0"   >= 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     >= x11-libs/qt4-webkit-4.7"
39    
40    if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]]
41    then
42     DEPEND="${DEPEND}
43     >= virtual/phonon
44     >= virtual/phonon-backend"
45    fi
46    
47  SDEPEND="${SDEPEND}  SDEPEND="${SDEPEND}
48   >= dev-util/cmake-2.4.7   >= dev-util/cmake-2.8.5
49   >= dev-util/pkgconfig-0.20   >= dev-util/pkgconfig-0.25
50   >= x11-proto/xf86vidmodeproto-2   >= x11-proto/xf86vidmodeproto-2
51   >= x11-proto/xineramaproto-1"   >= x11-proto/xineramaproto-1"
52    
# Line 46  SRC_URI=( Line 61  SRC_URI=(
61  )  )
62    
63  # exported functions and variables for mage-file  # exported functions and variables for mage-file
64  SPECIAL_VARS="KDEDIR"  SPECIAL_VARS="${SPECIAL_VARS} KDEDIR"
65  SPECIAL_FUNCTIONS="kde4_buildsycoca kde4_postinstall kde4_postremove"  SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove"
66    
67  kde4_configure()  kde4_configure()
68  {  {
# Line 55  kde4_configure() Line 70  kde4_configure()
70    
71  # disabled, seems to be broken atm  # disabled, seems to be broken atm
72  # # use --enable-final only on i*86  # # use --enable-final only on i*86
73  # [[ ${ARCH} = i*86 ]] && configure_opts="${configure_opts} -DKDE4_ENABLE_FINAL=ON"  # [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON"
74     configure_opts+=" -DCMAKE_BUILD_TYPE=Release"
75    
76     # use full rpath on non /usr installations
77     [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
78    
79     # add akonadi dbus dir
80     if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]]
81     then
82     configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/"
83     configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/"
84     fi
85    
86   # add commandline given arguments   # add commandline given arguments
87   configure_opts="${configure_opts} $@"   configure_opts+=" $@"
88    
89   # remove build dir if exist   # remove build dir if exist
90   [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build   [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build
# Line 68  kde4_configure() Line 94  kde4_configure()
94   cd ${BUILDDIR}/build   cd ${BUILDDIR}/build
95    
96   cmake_configure \   cmake_configure \
97   -DCMAKE_INSTALL_PREFIX=${PREFIX:-${KDEDIR}} \   -DCMAKE_INSTALL_PREFIX=${KDEDIR} \
98   -DLIB_INSTALL_DIR=${PREFIX:-${KDEDIR}/$(mlibdir)} \   -DSYSCONF_INSTALL_DIR=${KDECONFDIR} \
99   -DKDE4_USE_ALWAYS_FULL_RPATH=ON \   -DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \
100     -DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \
101     -DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \
102     -DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \
103     -DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \
104   -DKDE4_ENABLE_FPIE=ON \   -DKDE4_ENABLE_FPIE=ON \
105   -DKDE4_BUILD_TESTS=OFF \   -DKDE4_BUILD_TESTS=OFF \
106   -DKDE4_ENABLE_HTMLHANDBOOK=ON \   -DKDE4_ENABLE_HTMLHANDBOOK=ON \
# Line 88  kde4_src_compile() Line 118  kde4_src_compile()
118   cd ${SRCDIR}   cd ${SRCDIR}
119    
120   kde4_configure || die   kde4_configure || die
121   mmake || die   mmake ${KDE4_MAKE_OPTS} || die
122  }  }
123    
124  kde4_src_install()  kde4_src_install()
125  {  {
126   cd ${BUILDDIR}/build   cd ${BUILDDIR}/build
127   mmake DESTDIR=${BINDIR} ${KDE3_MAKE_OPTS} install || die   mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die
128    
129     # move dbus service dirs to a proper location if KDEDIR != /usr
130     if [[ ${KDEDIR} != /usr ]]
131     then
132     if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]]
133     then
134     echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}"
135     minstalldir /usr/share || die
136     cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die
137     rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die
138     fi
139     fi
140    
141   cd ${SRCDIR}   cd ${SRCDIR}
142   local i   local i
# Line 108  kde4_src_install() Line 150  kde4_src_install()
150   done   done
151  }  }
152    
153  kde4_buildsycoca()  export_inherits kde4 src_prepare src_compile src_install
 {  
  if [[ -x ${KDEDIR}/bin/kbuildsycoca4 ]] &&  
  [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]  
  then  
  # install services dir with right permissions  
  install -m0755 -o root -g root -d ${MROOT}/usr/share/services  
   
  # kbuildsycoco4 needs a dbus session, but should not use the users session.  
  # so we start an own session here  
   
  # export everything the be able to kill the session  
  echo "Starting dbus session for kbuildsycoca4 ..."  
  local i  
  for i in $(dbus-launch)  
  do  
  export "$i"  
  done  
   
  echo "Running kbuildsycoca4 to build global database ..."  
  XDG_DATA_DIRS="${MROOT}/usr/share:${MROOT}${KDEDIR}/share:${MROOT}/usr/local/share"  
  ${MROOT}${KDEDIR}/bin/kbuildsycoca4 --global --noincremental &> /dev/null  
   
  echo "Killing dbus session for kbuildsycoca4 ..."  
  kill ${DBUS_SESSION_BUS_PID}  
  unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID  
  fi  
 }  
   
 kde4_postinstall()  
 {  
  # rebuild system konfiguration cache  
  kde4_buildsycoca  
 }  
   
 kde4_postremove()  
 {  
  # rebuild system konfiguration cache  
  kde4_buildsycoca  
 }  
   
 export_inherits kde4 src_prepare src_compile src_install postinstall postremove  

Legend:
Removed from v.2  
changed lines
  Added in v.8496