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 4090 by niro, Wed Nov 18 23:17:22 2009 UTC trunk/include/kde4.sminc revision 15751 by niro, Tue Jan 8 08:03:41 2013 UTC
# Line 3  Line 3 
3  sminclude mtools cmake qt4  sminclude mtools cmake qt4
4    
5  ## some global vars ##  ## some global vars ##
6  export KDEDIR=/opt/kde4  export KDEDIR=/usr
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 17  export PKG_CONFIG_PATH=${PKG_CONFIG_PATH Line 18  export PKG_CONFIG_PATH=${PKG_CONFIG_PATH
18  export KDEDIRS=${KDEDIR}  export KDEDIRS=${KDEDIR}
19    
20  # some sane default values  # some sane default values
21  : ${PCATEGORIE="kde-base"}  : ${PCAT="kde-base"}
22  : ${SRCFILE="${PNAME/4/}-${PVER}.tar.bz2"}  if [[ -z ${SRCFILE} ]]
23    then
24     if [[ ${PVER//.} -ge 483 ]]
25     then
26     KDE4_TARBALL_EXTENSION="tar.xz"
27     else
28     KDE4_TARBALL_EXTENSION="tar.bz2"
29     fi
30    fi
31    : ${SRCFILE="${PNAME/4/}-${PVER}.${KDE4_TARBALL_EXTENSION}"}
32  : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"}  : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"}
33  : ${DESCRIPTION="${PNAME}"}  : ${DESCRIPTION="${PNAME}"}
34  : ${HOMEPAGE="http://www.kde.org/"}  : ${HOMEPAGE="http://www.kde.org/"}
35    
36  DEPEND="${DEPEND}  if [[ ${PNAME} != oxygen-icons ]]
37   >= x11-libs/libXt-1  then
38   >= x11-libs/libXinerama-1"   DEPEND="${DEPEND}
39     >= x11-libs/libXt-1
40     >= x11-libs/libXinerama-1
41     >= x11-libs/qt4-gui-4.7
42     >= x11-libs/qt4-qt3support-4.7
43     >= x11-libs/qt4-script-4.7
44     >= x11-libs/qt4-sql-4.7
45     >= x11-libs/qt4-svg-4.7
46     >= x11-libs/qt4-test-4.7
47     >= x11-libs/qt4-dbus-4.7
48     >= x11-libs/qt4-opengl-4.7
49     >= x11-libs/qt4-webkit-4.7
50     >= x11-libs/qt4-declarative-4.7"
51    fi
52    
53    if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]]
54    then
55     DEPEND="${DEPEND}
56     >= virtual/phonon
57     >= virtual/phonon-backend"
58    fi
59    
60  SDEPEND="${SDEPEND}  SDEPEND="${SDEPEND}
61   >= dev-util/cmake-2.4.7   >= dev-util/cmake-2.8.5
62   >= dev-util/pkgconfig-0.20   >= dev-util/pkgconfig-0.25
63   >= x11-proto/xf86vidmodeproto-2   >= x11-proto/xf86vidmodeproto-2
64   >= x11-proto/xineramaproto-1"   >= x11-proto/xineramaproto-1"
65    
66    if [[ ${PNAME} != automoc4 ]]
67    then
68     SDEPEND="${SDEPEND}
69     >= kde-base/automoc4-0.9.88"
70    fi
71    
72  # small hack to fix kdemirrors  # small hack to fix kdemirrors
73  [[ ${KDE_MIRROR_UNSTABLE} = 1 ]] && KDE_MIRRORS=$(echo ${KDE_MIRRORS} | sed "s:/stable:/unstable:g")  [[ ${KDE_MIRROR_UNSTABLE} = 1 ]] && KDE_MIRRORS=$(echo ${KDE_MIRRORS} | sed "s:/stable:/unstable:g")
74    
# Line 44  SRC_URI=( Line 80  SRC_URI=(
80  )  )
81    
82  # exported functions and variables for mage-file  # exported functions and variables for mage-file
83  SPECIAL_VARS="KDEDIR"  SPECIAL_VARS="${SPECIAL_VARS} KDEDIR"
84  SPECIAL_FUNCTIONS="kde4_buildsycoca kde4_postinstall kde4_postremove"  SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove"
85    
86  kde4_configure()  kde4_configure()
87  {  {
# Line 53  kde4_configure() Line 89  kde4_configure()
89    
90  # disabled, seems to be broken atm  # disabled, seems to be broken atm
91  # # use --enable-final only on i*86  # # use --enable-final only on i*86
92  # [[ ${ARCH} = i*86 ]] && configure_opts="${configure_opts} -DKDE4_ENABLE_FINAL=ON"  # [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON"
93   configure_opts="${configure_opts} -DCMAKE_BUILD_TYPE=Release"   configure_opts+=" -DCMAKE_BUILD_TYPE=Release"
94    
95   # use full rpath on non /usr installations   # use full rpath on non /usr installations
96   [[ ${KDEDIR} != /usr ]] && configure_opts="${configure_opts} -DKDE4_USE_ALWAYS_FULL_RPATH=ON"   [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
97    
98   # add akonadi dbus dir   # add akonadi dbus dir
99   if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]]   if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]]
100   then   then
101   configure_opts="${configure_opts} -DAKONADI_DBUS_INTERFACES_DIR=${PREFIX:-/usr/share/dbus-1/interfaces/}"   configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/"
102   configure_opts="${configure_opts} -DAKONADI_DBUS_SERVICES_DIR=${PREFIX:-/usr/share/dbus-1/services/}"   configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/"
103   fi   fi
104    
105   # add commandline given arguments   # add commandline given arguments
106   configure_opts="${configure_opts} $@"   configure_opts+=" $@"
107    
108   # remove build dir if exist   # remove build dir if exist
109   [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build   [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build
# Line 77  kde4_configure() Line 113  kde4_configure()
113   cd ${BUILDDIR}/build   cd ${BUILDDIR}/build
114    
115   cmake_configure \   cmake_configure \
116   -DCMAKE_INSTALL_PREFIX=${PREFIX:-${KDEDIR}} \   -DCMAKE_INSTALL_PREFIX=${KDEDIR} \
117   -DSYSCONF_INSTALL_DIR=${PREFIX:-${KDECONFDIR}} \   -DSYSCONF_INSTALL_DIR=${KDECONFDIR} \
118   -DLIB_INSTALL_DIR=${PREFIX:-${KDEDIR}/$(mlibdir)} \   -DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \
119   -DKDE4_DBUS_INTERFACES_DIR=${PREFIX:-"/usr/share/dbus-1/interfaces/"} \   -DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \
120   -DKDE4_DBUS_SERVICES_DIR=${PREFIX:-"/usr/share/dbus-1/services/"} \   -DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \
121     -DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \
122     -DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \
123   -DKDE4_ENABLE_FPIE=ON \   -DKDE4_ENABLE_FPIE=ON \
124   -DKDE4_BUILD_TESTS=OFF \   -DKDE4_BUILD_TESTS=OFF \
125   -DKDE4_ENABLE_HTMLHANDBOOK=ON \   -DKDE4_ENABLE_HTMLHANDBOOK=ON \
# Line 107  kde4_src_install() Line 145  kde4_src_install()
145   cd ${BUILDDIR}/build   cd ${BUILDDIR}/build
146   mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die   mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die
147    
148  # # move dbus service dirs to a proper location if KDEDIR != /usr   # move dbus service dirs to a proper location if KDEDIR != /usr
149  # if [[ ${KDEDIR} != /usr ]]   if [[ ${KDEDIR} != /usr ]]
150  # then   then
151  # if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]]   if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]]
152  # then   then
153  # minstalldir /usr/share || die   echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}"
154  # mv ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die   minstalldir /usr/share || die
155  # fi   cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die
156  # fi   rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die
157     fi
158     fi
159     # or if KDECONFDIR != /etc
160     if [[ ${KDECONFDIR} != /etc ]]
161     then
162     if [[ -d ${BINDIR}/${KDECONFDIR}/dbus-1 ]]
163     then
164     minstalldir /etc || die
165     cp -R ${BINDIR}/${KDECONFDIR}/dbus-1 ${BINDIR}/etc/ || die
166     rm -r ${BINDIR}/${KDECONFDIR}/dbus-1 || die
167     fi
168     fi
169    
170   cd ${SRCDIR}   cd ${SRCDIR}
171   local i   local i
# Line 129  kde4_src_install() Line 179  kde4_src_install()
179   done   done
180  }  }
181    
182  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.4090  
changed lines
  Added in v.15751