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 4083 by niro, Wed Nov 18 20:09:50 2009 UTC trunk/include/kde4.sminc revision 23309 by niro, Mon Nov 10 10:19:29 2014 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2    
3  sminclude mtools cmake qt4  sminclude mtools cmake qt4 dbus
4    msetfeature "!check" # no check target in Makefile
5    
6  ## some global vars ##  ## some global vars ##
7  export KDEDIR=/opt/kde4  export KDEDIR=/usr
8  export KDECONFDIR=/etc/kde4  export KDECONFDIR=/etc/kde4
9  export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins  export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins
10    
# 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%%.*} = 0 ]]
25     then
26     KDE4_TARBALL_EXTENSION="tar.bz2"
27     elif [[ ${PVER//.} -ge 483 ]]
28     then
29     KDE4_TARBALL_EXTENSION="tar.xz"
30     else
31     KDE4_TARBALL_EXTENSION="tar.bz2"
32     fi
33    fi
34    : ${SRCFILE="${PNAME/4/}-${PVER}.${KDE4_TARBALL_EXTENSION}"}
35  : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"}  : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"}
36  : ${DESCRIPTION="${PNAME}"}  : ${DESCRIPTION="${PNAME}"}
37  : ${HOMEPAGE="http://www.kde.org/"}  : ${HOMEPAGE="http://www.kde.org/"}
38    
39  DEPEND="${DEPEND}  if [[ ${PNAME} != oxygen-icons ]]
40   >= x11-libs/libXt-1  then
41   >= x11-libs/libXinerama-1"   DEPEND="${DEPEND}
42     >= x11-libs/libXt-1
43     >= x11-libs/libXinerama-1
44     >= 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    fi
55    
56    if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]] && [[ ${PNAME} != oxygen-icons ]]
57    then
58     DEPEND="${DEPEND}
59     >= virtual/phonon
60     >= virtual/phonon-backend"
61    fi
62    
63  SDEPEND="${SDEPEND}  SDEPEND="${SDEPEND}
64   >= dev-util/cmake-2.4.7   >= dev-util/cmake-2.8.12
65   >= dev-util/pkgconfig-0.20   >= dev-util/pkgconfig-0.25
66   >= x11-proto/xf86vidmodeproto-2   >= x11-proto/xf86vidmodeproto-2
67   >= x11-proto/xineramaproto-1"   >= x11-proto/xineramaproto-1"
68    
69    if [[ ${PNAME} != automoc4 ]]
70    then
71     SDEPEND="${SDEPEND}
72     >= kde-base/automoc4-0.9.88"
73    fi
74    
75  # small hack to fix kdemirrors  # small hack to fix kdemirrors
76  [[ ${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")
77    
# Line 43  SRC_URI=( Line 82  SRC_URI=(
82   mirror://${PNAME}/${SRCFILE}   mirror://${PNAME}/${SRCFILE}
83  )  )
84    
85    UP2DATE="updatecmd -listonly http://download.kde.org/stable/ | grep 'stable/[0-9]' | sed -n 's:.*/\([0-9].*\)/:\1:;$ p'"
86    
87  # exported functions and variables for mage-file  # exported functions and variables for mage-file
88  SPECIAL_VARS="KDEDIR"  SPECIAL_VARS="${SPECIAL_VARS} KDEDIR"
89  SPECIAL_FUNCTIONS="kde4_buildsycoca kde4_postinstall kde4_postremove"  SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove"
90    
91  kde4_configure()  kde4_configure()
92  {  {
# Line 53  kde4_configure() Line 94  kde4_configure()
94    
95  # disabled, seems to be broken atm  # disabled, seems to be broken atm
96  # # use --enable-final only on i*86  # # use --enable-final only on i*86
97  # [[ ${ARCH} = i*86 ]] && configure_opts="${configure_opts} -DKDE4_ENABLE_FINAL=ON"  # [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON"
98   configure_opts="${configure_opts} -DCMAKE_BUILD_TYPE=Release"   configure_opts+=" -DCMAKE_BUILD_TYPE=Release"
99    
100   # use full rpath on non /usr installations   # use full rpath on non /usr installations
101   [[ ${KDEDIR} != /usr ]] && configure_opts="${configure_opts} -DKDE4_USE_ALWAYS_FULL_RPATH=ON"   [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
102    
103     # add akonadi dbus dir
104     if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]]
105     then
106     configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=$(mget-dbus-interfaces-dir)"
107     configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=$(mget-dbus-session-bus-services-dir)"
108     fi
109    
110   # add commandline given arguments   # add commandline given arguments
111   configure_opts="${configure_opts} $@"   configure_opts+=" $@"
112    
113   # remove build dir if exist   # remove build dir if exist
114   [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build   [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build
# Line 70  kde4_configure() Line 118  kde4_configure()
118   cd ${BUILDDIR}/build   cd ${BUILDDIR}/build
119    
120   cmake_configure \   cmake_configure \
121   -DCMAKE_INSTALL_PREFIX=${PREFIX:-${KDEDIR}} \   -DCMAKE_INSTALL_PREFIX=${KDEDIR} \
122   -DSYSCONF_INSTALL_DIR=${PREFIX:-${KDECONFDIR}} \   -DSYSCONF_INSTALL_DIR=${KDECONFDIR} \
123   -DLIB_INSTALL_DIR=${PREFIX:-${KDEDIR}/$(mlibdir)} \   -DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \
124   -DKDE4_DBUS_INTERFACES_DIR=${PREFIX:-"/usr/share/dbus-1/interfaces/"} \   -DDBUS_INTERFACES_INSTALL_DIR=$(mget-dbus-interfaces-dir) \
125   -DKDE4_DBUS_SERVICES_DIR=${PREFIX:-"/usr/share/dbus-1/services/"} \   -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   -DKDE4_ENABLE_FPIE=ON \   -DKDE4_ENABLE_FPIE=ON \
129   -DKDE4_BUILD_TESTS=OFF \   -DKDE4_BUILD_TESTS=OFF \
130   -DKDE4_ENABLE_HTMLHANDBOOK=ON \   -DKDE4_ENABLE_HTMLHANDBOOK=ON \
# Line 100  kde4_src_install() Line 150  kde4_src_install()
150   cd ${BUILDDIR}/build   cd ${BUILDDIR}/build
151   mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die   mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die
152    
153     # 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     # or if KDECONFDIR != /etc
165     if [[ ${KDECONFDIR} != /etc ]]
166     then
167     if [[ -d ${BINDIR}/${KDECONFDIR}/dbus-1 ]]
168     then
169     echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}"
170     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    
176   cd ${SRCDIR}   cd ${SRCDIR}
177   local i   local i
178   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
# Line 112  kde4_src_install() Line 185  kde4_src_install()
185   done   done
186  }  }
187    
188  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.4083  
changed lines
  Added in v.23309