simplify menu entry installation and fix problems with newer findutils
authorAndreas Proschofsky <suka@gentoo.org>
Wed, 30 Mar 2005 10:17:17 +0000 (10:17 +0000)
committerAndreas Proschofsky <suka@gentoo.org>
Wed, 30 Mar 2005 10:17:17 +0000 (10:17 +0000)
Package-Manager: portage-2.0.51.19

app-office/openoffice-bin/ChangeLog
app-office/openoffice-bin/files/1.1.4/ooffice-wrapper-1.3
app-office/openoffice-bin/openoffice-bin-1.1.4.ebuild
app-office/openoffice/ChangeLog
app-office/openoffice/files/1.1.4/ooffice-wrapper-1.3
app-office/openoffice/openoffice-1.1.4.ebuild

index 1e81ae6c661e9869758edc277211fe23a800b201..ca821495c9d014a8117bbdd9e116d991b8377c3f 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for app-office/openoffice-bin
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/ChangeLog,v 1.63 2005/01/24 07:36:42 suka Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/ChangeLog,v 1.64 2005/03/30 10:17:17 suka Exp $
+
+  30 Mar 2005; Andreas Proschofsky <suka@gentoo.org>
+  files/1.1.4/ooffice-wrapper-1.3, openoffice-bin-1.1.4.ebuild:
+  Simplify menu entry installation, see bug #81902, also fix problem with
+  newer findutils, bug#86974
 
   24 Jan 2005; Andreas Proschofsky <suka@gentoo.org>
   files/1.1.4/ooffice-wrapper-1.3:
index ea1be9d0765f2f778225a3af0355ced854354671..c12d92e91bd19941512f1ce5be2a8f73f52afde3 100644 (file)
@@ -86,7 +86,7 @@ fi
 # Default font path.  This is used if SAL_FONTPATH_PRIVATE is not defined.
 
 GENTOO_FONTPATH=""
-for d in `find /usr/share/fonts -type d -maxdepth 1 -mindepth 1` ; do
+for d in `find /usr/share/fonts -maxdepth 1 -mindepth 1 -type d` ; do
     GENTOO_FONTPATH="$GENTOO_FONTPATH;$d"
 done
 
index ae77cf93299a3a38a231789ce2ac26af0cf1f693..9118a8adbb9ffe794800e8f834f7c2151c031fcd 100644 (file)
@@ -1,12 +1,14 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/openoffice-bin-1.1.4.ebuild,v 1.13 2005/01/29 20:15:15 suka Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice-bin/openoffice-bin-1.1.4.ebuild,v 1.14 2005/03/30 10:17:17 suka Exp $
 
 # NOTE:  There are two big issues that should be addressed.
 #
 #        1)  Language support and fonts should be addressed.
 
-IUSE="gnome java kde"
+inherit eutils fdo-mime
+
+IUSE="java kde"
 
 INSTDIR="/opt/OpenOffice.org"
 MY_P="OOo_${PV}_LinuxIntel_install"
@@ -110,49 +112,22 @@ src_install() {
                dosym ooffice /usr/bin/oo${app}
        done
 
-       einfo "Installing Menu shortcuts (need \"gnome\" or \"kde\" in USE)..."
-       if use gnome
-       then
-               insinto /usr/share/gnome/apps/OpenOffice.org
-               # Install the files needed for the category
-               doins ${D}${INSTDIR}/share/gnome/net/.directory
-               doins ${D}${INSTDIR}/share/gnome/net/.order
-
-               # Change this to ooo*.desktop from *.desktop for now, since
-               # otherwise two sets of icons will appear in the GNOME menu.
-               # <brad@gentoo.org> (04 Aug 2003)
-               for x in ${D}${INSTDIR}/share/gnome/net/ooo*.desktop
-               do
-                       # We have to handle soffice and setup differently
-                       perl -pi -e "s:${INSTDIR}/program/setup:/usr/bin/oosetup:g" ${x}
-                       perl -pi -e "s:${INSTDIR}/program/soffice:/usr/bin/ooffice:g" ${x}
-                       # Now fix the rest
-                       perl -pi -e "s:${INSTDIR}/program/s:/usr/bin/oo:g" ${x}
-                       doins ${x}
-               done
-       fi
-
-       if use kde
-       then
-               local kdeloc="${D}${INSTDIR}/share/kde/net/"
-
-               insinto /usr/share/applnk/OpenOffice.org\ 1.1
-               # Install the files needed for the category
-               doins ${kdeloc}/.directory
-               dodir /usr/share
-               # Install the icons and mime info
-               cp -a ${D}${INSTDIR}/share/kde/net/share/mimelnk ${D}${INSTDIR}/share/kde/net/share/icons ${D}/usr/share
-
-               for x in ${kdeloc}/*.desktop
-               do
-                       # We have to handle soffice and setup differently
-                       perl -pi -e "s:${INSTDIR}/program/setup:/usr/bin/oosetup:g" ${x}
-                       perl -pi -e "s:${INSTDIR}/program/soffice:/usr/bin/ooffice:g" ${x}
-                       # Now fix the rest
-                       perl -pi -e "s:${INSTDIR}/program/s:/usr/bin/oo:g" ${x}
-                       doins ${x}
-               done
-       fi
+       einfo "Installing menu shortcuts..."
+       dodir /usr/share
+       cp -a ${D}${INSTDIR}/share/kde/net/share/icons ${D}/usr/share
+
+       use kde && cp -a ${D}${INSTDIR}/share/kde/net/share/mimelnk ${D}/usr/share
+
+       for x in ${D}${INSTDIR}/share/kde/net/*.desktop; do
+               # We have to handle soffice and setup differently
+               sed -i -e "s:${INSTDIR}/program/setup:/usr/bin/oosetup:g" ${x}
+               sed -i -e "s:${INSTDIR}/program/soffice:/usr/bin/ooffice:g" ${x}
+               # Now fix the rest
+               sed -i -e "s:${INSTDIR}/program/s:/usr/bin/oo:g" ${x}
+               echo "Categories=Application;Office;" >> ${x}
+               domenu ${x}
+               rm ${x}
+       done
 
 
        # Remove unneeded stuff
@@ -178,6 +153,9 @@ src_install() {
 
 pkg_postinst() {
 
+       fdo-mime_desktop_database_update
+       fdo-mime_mime_database_update
+
        einfo " To start OpenOffice.org, run:"
        einfo
        einfo "   $ ooffice"
index 4eba38f5f35513bba2c8dfd311bdfb10dc3371b1..2a76518a27e92382680aed0bb252bdc4d831161b 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for app-office/openoffice
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice/ChangeLog,v 1.112 2005/03/28 08:09:41 suka Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice/ChangeLog,v 1.113 2005/03/30 10:15:29 suka Exp $
+
+  30 Mar 2005; Andreas Proschofsky <suka@gentoo.org>
+  files/1.1.4/ooffice-wrapper-1.3, openoffice-1.1.4.ebuild:
+  Simplify menu entry installation, see bug #81902, also fix problem with
+  newer findutils, bug#86974
 
   28 Mar 2005; Andreas Proschofsky <suka@gentoo.org>
   +files/1.1.4/getcompver.awk.patch, openoffice-1.1.4.ebuild:
index ea1be9d0765f2f778225a3af0355ced854354671..c12d92e91bd19941512f1ce5be2a8f73f52afde3 100644 (file)
@@ -86,7 +86,7 @@ fi
 # Default font path.  This is used if SAL_FONTPATH_PRIVATE is not defined.
 
 GENTOO_FONTPATH=""
-for d in `find /usr/share/fonts -type d -maxdepth 1 -mindepth 1` ; do
+for d in `find /usr/share/fonts -maxdepth 1 -mindepth 1 -type d` ; do
     GENTOO_FONTPATH="$GENTOO_FONTPATH;$d"
 done
 
index a245fe9d0b0151573c338d59f580d18fcb0c6740..075174f0ebfc9d083cae7631933705f5a31ab397 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice/openoffice-1.1.4.ebuild,v 1.18 2005/03/28 08:09:41 suka Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice/openoffice-1.1.4.ebuild,v 1.19 2005/03/30 10:15:29 suka Exp $
 
 # Notes:
 #
@@ -26,7 +26,7 @@
 
 inherit eutils flag-o-matic toolchain-funcs
 
-IUSE="curl gnome hardened java kde nptl zlib"
+IUSE="curl hardened java kde nptl zlib"
 
 INSTDIR="/opt/OpenOffice.org"
 S="${WORKDIR}"
@@ -503,49 +503,22 @@ src_install() {
                dosym ooffice /usr/bin/oo${app}
        done
 
-       einfo "Installing Menu shortcuts (need \"gnome\" or \"kde\" in USE)..."
-       if use gnome
-       then
-               insinto /usr/share/gnome/apps/OpenOffice.org
-               # Install the files needed for the category
-               doins ${D}${INSTDIR}/share/gnome/net/.directory
-               doins ${D}${INSTDIR}/share/gnome/net/.order
-
-               # Change this to ooo*.desktop from *.desktop for now, since
-               # otherwise two sets of icons will appear in the GNOME menu.
-               # <brad@gentoo.org> (04 Aug 2003)
-               for x in ${D}${INSTDIR}/share/gnome/net/ooo*.desktop
-               do
-                       # We have to handle soffice and setup differently
-                       perl -pi -e "s:${INSTDIR}/program/setup:/usr/bin/oosetup:g" ${x}
-                       perl -pi -e "s:${INSTDIR}/program/soffice:/usr/bin/ooffice:g" ${x}
-                       # Now fix the rest
-                       perl -pi -e "s:${INSTDIR}/program/s:/usr/bin/oo:g" ${x}
-                       doins ${x}
-               done
-       fi
-
-       if use kde
-       then
-               local kdeloc="${D}${INSTDIR}/share/kde/net/"
-
-               insinto /usr/share/applnk/OpenOffice.org\ 1.1
-               # Install the files needed for the category
-               doins ${kdeloc}/.directory
-               dodir /usr/share
-               # Install the icons and mime info
-               cp -a ${D}${INSTDIR}/share/kde/net/share/mimelnk ${D}${INSTDIR}/share/kde/net/share/icons ${D}/usr/share
-
-               for x in ${kdeloc}/*.desktop
-               do
-                       # We have to handle soffice and setup differently
-                       perl -pi -e "s:${INSTDIR}/program/setup:/usr/bin/oosetup:g" ${x}
-                       perl -pi -e "s:${INSTDIR}/program/soffice:/usr/bin/ooffice:g" ${x}
-                       # Now fix the rest
-                       perl -pi -e "s:${INSTDIR}/program/s:/usr/bin/oo:g" ${x}
-                       doins ${x}
-               done
-       fi
+       einfo "Installing menu shortcuts..."
+       dodir /usr/share
+       cp -a ${D}${INSTDIR}/share/kde/net/share/icons ${D}/usr/share
+
+       use kde && cp -a ${D}${INSTDIR}/share/kde/net/share/mimelnk ${D}/usr/share
+
+       for x in ${D}${INSTDIR}/share/kde/net/*.desktop; do
+               # We have to handle soffice and setup differently
+               sed -i -e "s:${INSTDIR}/program/setup:/usr/bin/oosetup:g" ${x}
+               sed -i -e "s:${INSTDIR}/program/soffice:/usr/bin/ooffice:g" ${x}
+               # Now fix the rest
+               sed -i -e "s:${INSTDIR}/program/s:/usr/bin/oo:g" ${x}
+               echo "Categories=Application;Office;" >> ${x}
+               domenu ${x}
+               rm ${x}
+       done
 
        # Remove unneeded stuff
        rm -rf ${D}${INSTDIR}/share/cde || die
@@ -567,6 +540,9 @@ src_install() {
 
 pkg_postinst() {
 
+       fdo-mime_desktop_database_update
+       fdo-mime_mime_database_update
+
        einfo " To start OpenOffice.org, run:"
        einfo
        einfo "   $ ooffice"