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 1927 by niro, Wed Jun 10 16:20:46 2009 UTC trunk/include/kde4.sminc revision 21142 by niro, Wed Mar 12 16:40:33 2014 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2    
3  sminclude mtools cmake qt4  sminclude mtools cmake qt4
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    export DBUS_SYSTEM_DIR=/usr/share/dbus-1
11    
12  # fixes some compile issues ala "kde-config: command not found"  # fixes some compile issues ala "kde-config: command not found"
13  export PATH="${KDEDIR}/bin:${PATH}"  export PATH="${KDEDIR}/bin:${PATH}"
# Line 17  export PKG_CONFIG_PATH=${PKG_CONFIG_PATH Line 19  export PKG_CONFIG_PATH=${PKG_CONFIG_PATH
19  export KDEDIRS=${KDEDIR}  export KDEDIRS=${KDEDIR}
20    
21  # some sane default values  # some sane default values
22  : ${PCATEGORIE="kde-base"}  : ${PCAT="kde-base"}
23  : ${SRCFILE="${PNAME/4/}-${PVER}.tar.bz2"}  if [[ -z ${SRCFILE} ]]
24    then
25     if [[ ${PVER//.} -ge 483 ]]
26     then
27     KDE4_TARBALL_EXTENSION="tar.xz"
28     else
29     KDE4_TARBALL_EXTENSION="tar.bz2"
30     fi
31    fi
32    : ${SRCFILE="${PNAME/4/}-${PVER}.${KDE4_TARBALL_EXTENSION}"}
33  : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"}  : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"}
34  : ${DESCRIPTION="${PNAME}"}  : ${DESCRIPTION="${PNAME}"}
35  : ${HOMEPAGE="http://www.kde.org/"}  : ${HOMEPAGE="http://www.kde.org/"}
36    
37  DEPEND="${DEPEND}  if [[ ${PNAME} != oxygen-icons ]]
38   >= x11-libs/libXt-1  then
39   >= x11-libs/libXinerama-1"   DEPEND="${DEPEND}
40     >= x11-libs/libXt-1
41     >= x11-libs/libXinerama-1
42     >= x11-libs/qt4-gui-4.8
43     >= x11-libs/qt4-qt3support-4.8
44     >= x11-libs/qt4-script-4.8
45     >= x11-libs/qt4-sql-4.8
46     >= x11-libs/qt4-svg-4.8
47     >= x11-libs/qt4-test-4.8
48     >= x11-libs/qt4-dbus-4.8
49     >= x11-libs/qt4-opengl-4.8
50     >= x11-libs/qt4-webkit-4.8
51     >= x11-libs/qt4-declarative-4.8"
52    fi
53    
54    if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]] && [[ ${PNAME} != oxygen-icons ]]
55    then
56     DEPEND="${DEPEND}
57     >= virtual/phonon
58     >= virtual/phonon-backend"
59    fi
60    
61  SDEPEND="${SDEPEND}  SDEPEND="${SDEPEND}
62   >= dev-util/cmake-2.4.7   >= dev-util/cmake-2.8.12
63   >= dev-util/pkgconfig-0.20   >= dev-util/pkgconfig-0.25
64   >= x11-proto/xf86vidmodeproto-2   >= x11-proto/xf86vidmodeproto-2
65   >= x11-proto/xineramaproto-1"   >= x11-proto/xineramaproto-1"
66    
67    if [[ ${PNAME} != automoc4 ]]
68    then
69     SDEPEND="${SDEPEND}
70     >= kde-base/automoc4-0.9.88"
71    fi
72    
73  # small hack to fix kdemirrors  # small hack to fix kdemirrors
74  [[ ${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")
75    
# Line 43  SRC_URI=( Line 80  SRC_URI=(
80   mirror://${PNAME}/${SRCFILE}   mirror://${PNAME}/${SRCFILE}
81  )  )
82    
83    UP2DATE="updatecmd -listonly http://download.kde.org/stable/ | grep 'stable/[0-9]' | sed -n 's:.*/\([0-9].*\)/:\1:;$ p'"
84    
85  # exported functions and variables for mage-file  # exported functions and variables for mage-file
86  SPECIAL_VARS="KDEDIR"  SPECIAL_VARS="${SPECIAL_VARS} KDEDIR"
87  SPECIAL_FUNCTIONS="kde4_buildsycoca kde4_postinstall kde4_postremove"  SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove"
88    
89  kde4_configure()  kde4_configure()
90  {  {
# Line 53  kde4_configure() Line 92  kde4_configure()
92    
93  # disabled, seems to be broken atm  # disabled, seems to be broken atm
94  # # use --enable-final only on i*86  # # use --enable-final only on i*86
95  # [[ ${ARCH} = i*86 ]] && configure_opts="${configure_opts} -DKDE4_ENABLE_FINAL=ON"  # [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON"
96     configure_opts+=" -DCMAKE_BUILD_TYPE=Release"
97    
98     # use full rpath on non /usr installations
99     [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
100    
101     # add akonadi dbus dir
102     if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]]
103     then
104     configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/"
105     configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/"
106     fi
107    
108   # add commandline given arguments   # add commandline given arguments
109   configure_opts="${configure_opts} $@"   configure_opts+=" $@"
110    
111   # remove build dir if exist   # remove build dir if exist
112   [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build   [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build
# Line 66  kde4_configure() Line 116  kde4_configure()
116   cd ${BUILDDIR}/build   cd ${BUILDDIR}/build
117    
118   cmake_configure \   cmake_configure \
119   -DCMAKE_INSTALL_PREFIX=${PREFIX:-${KDEDIR}} \   -DCMAKE_INSTALL_PREFIX=${KDEDIR} \
120   -DLIB_INSTALL_DIR=${PREFIX:-${KDEDIR}/$(mlibdir)} \   -DSYSCONF_INSTALL_DIR=${KDECONFDIR} \
121   -DKDE4_USE_ALWAYS_FULL_RPATH=ON \   -DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \
122     -DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \
123     -DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \
124     -DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \
125     -DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \
126   -DKDE4_ENABLE_FPIE=ON \   -DKDE4_ENABLE_FPIE=ON \
127   -DKDE4_BUILD_TESTS=OFF \   -DKDE4_BUILD_TESTS=OFF \
128   -DKDE4_ENABLE_HTMLHANDBOOK=ON \   -DKDE4_ENABLE_HTMLHANDBOOK=ON \
# Line 94  kde4_src_install() Line 148  kde4_src_install()
148   cd ${BUILDDIR}/build   cd ${BUILDDIR}/build
149   mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die   mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die
150    
151     # move dbus service dirs to a proper location if KDEDIR != /usr
152     if [[ ${KDEDIR} != /usr ]]
153     then
154     if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]]
155     then
156     echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}"
157     minstalldir /usr/share || die
158     cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die
159     rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die
160     fi
161     fi
162     # or if KDECONFDIR != /etc
163     if [[ ${KDECONFDIR} != /etc ]]
164     then
165     if [[ -d ${BINDIR}/${KDECONFDIR}/dbus-1 ]]
166     then
167     echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}"
168     minstalldir /etc || die
169     cp -R ${BINDIR}/${KDECONFDIR}/dbus-1 ${BINDIR}/etc/ || die
170     rm -r ${BINDIR}/${KDECONFDIR}/dbus-1 || die
171     fi
172     fi
173    
174   cd ${SRCDIR}   cd ${SRCDIR}
175   local i   local i
176   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \   for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
# Line 106  kde4_src_install() Line 183  kde4_src_install()
183   done   done
184  }  }
185    
186  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.1927  
changed lines
  Added in v.21142