aboutsummaryrefslogtreecommitdiffstats
path: root/editors/libreoffice
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2011-09-05 20:06:30 +0800
committerbapt <bapt@FreeBSD.org>2011-09-05 20:06:30 +0800
commit72ff9a508f26bbb1bae444ac1cdd128189139366 (patch)
tree0e7644a0002a9243d97130a2aab551c336dd999b /editors/libreoffice
parent25ce4e0a8630340ea2c1b61cb7bf4e05261deced (diff)
downloadfreebsd-ports-gnome-72ff9a508f26bbb1bae444ac1cdd128189139366.tar.gz
freebsd-ports-gnome-72ff9a508f26bbb1bae444ac1cdd128189139366.tar.zst
freebsd-ports-gnome-72ff9a508f26bbb1bae444ac1cdd128189139366.zip
Better desktop integration
Submitted by: Georges Liaskos throught the office@ github
Diffstat (limited to 'editors/libreoffice')
-rw-r--r--editors/libreoffice/Makefile13
-rw-r--r--editors/libreoffice/files/patch-bin__distro-install-desktop-integration58
-rw-r--r--editors/libreoffice/files/patch-clone__libs-core__sysui__desktop__share__create_tree.sh45
3 files changed, 104 insertions, 12 deletions
diff --git a/editors/libreoffice/Makefile b/editors/libreoffice/Makefile
index 0d63198123c7..021cfff8be50 100644
--- a/editors/libreoffice/Makefile
+++ b/editors/libreoffice/Makefile
@@ -412,14 +412,6 @@ post-configure:
post-install:
@${RM} -f ${PLISTF} ${PLISTD}
- @${MKDIR} ${LODESTDIR}/${PREFIX}/share/applications
-.for component in writer printeradmin math javafilter base calc startcenter draw impress
- @cd ${LODESTDIR}/${PREFIX}/share/applications; ${CP} ../../lib/${PORTNAME}/share/xdg/${component}.desktop ${component}.desktop;
-.endfor
- @cd ${WRKSRC}/sysui/desktop/; ${PAX} -rw icons/hicolor ${LODESTDIR}/${PREFIX}/share
- # allow make deinstall/reinstall
- @${RM} -f ${LODESTDIR}/${PREFIX}/share/icons/hicolor/*/apps/libreoffice-*.png
- @for img in ${LODESTDIR}/${PREFIX}/share/icons/hicolor/*/apps/*.png; do ${MV} $$img `dirname $$img`/libreoffice-$${img##*/}; done
@for dir in ${EMPTYDIRS}; do ${TOUCH} ${LODESTDIR}/${PREFIX}/lib/$$dir/.keep; done
@cd ${LODESTDIR}/${PREFIX}/lib && ${FIND} -H -s * -type f -o -type l | \
@@ -427,7 +419,7 @@ post-install:
@cd ${LODESTDIR}/${PREFIX}/lib && ${FIND} -d * -type d | \
${SED} -e 's|^|@dirrm lib/|' >> ${PLISTD}
-.for subdir in share/applications share/icons
+.for subdir in share/application-registry share/applications share/icons share/mime share/mime-info share/mimelnk
@cd ${LODESTDIR}/${PREFIX}/${subdir} && ${FIND} -H -s * -type f -o -type l | \
${SED} -e 's|^|${subdir}/|' >> ${PLISTF}
@cd ${LODESTDIR}/${PREFIX}/${subdir} && ${FIND} -d * -type d | \
@@ -435,9 +427,6 @@ post-install:
@${ECHO_CMD} "@unexec ${RMDIR} %D/${subdir} 2>/dev/null || ${TRUE}" >> ${PLISTD}
.endfor
- @cd ${LODESTDIR}/${PREFIX}/share/icons && ${FIND} -H -s * -type f -o -type l | \
- ${SED} -e 's|^|share/icons/|' >> ${PLISTF}
-
@cd ${LODESTDIR}/${PREFIX}/bin && ${FIND} -H -s * -type f -o -type l | \
${SED} -e 's|^|bin/|' >> ${PLISTF}
diff --git a/editors/libreoffice/files/patch-bin__distro-install-desktop-integration b/editors/libreoffice/files/patch-bin__distro-install-desktop-integration
new file mode 100644
index 000000000000..ff07b212addc
--- /dev/null
+++ b/editors/libreoffice/files/patch-bin__distro-install-desktop-integration
@@ -0,0 +1,58 @@
+--- bin/distro-install-desktop-integration.orig 2011-09-04 17:25:30.637120995 +0000
++++ bin/distro-install-desktop-integration 2011-09-04 17:19:02.078137343 +0000
+@@ -74,12 +74,12 @@
+ test -n "$oowrapper_name" && create_man_link "$oowrapper_name" "$used_man_page" "$file_list"
+
+ # add desktop file to the right file list
+- test -n "$desktop_file" -a -f "$DESTDIR/$file_list" && echo "/usr/share/applications/$desktop_file" >>"$DESTDIR/$file_list"
++ test -n "$desktop_file" -a -f "$DESTDIR/$file_list" && echo "$PREFIXDIR/share/applications/$desktop_file" >>"$DESTDIR/$file_list"
+ }
+
+ # install desktop integration from plain packages
+ sysui_temp=`mktemp -d /tmp/distro-pack-desktop-integration-XXXXXX`
+-cp -a sysui/unxlng*/misc/libreoffice/* "$sysui_temp"
++cp -a sysui/unx*/misc/libreoffice/* "$sysui_temp"
+ cp -a sysui/desktop/share/create_tree.sh "$sysui_temp"
+ builddir=`pwd`
+ cd $sysui_temp
+@@ -98,8 +98,8 @@
+ export ICON_PREFIX=$INSTALLDIRNAME
+ export ICON_SOURCE_DIR=$builddir/sysui/desktop/icons
+ export PRODUCTVERSION=
+- export KDEMAINDIR=/usr
+- export GNOMEDIR=/usr
++ export KDEMAINDIR=$PREFIXDIR
++ export GNOMEDIR=$PREFIXDIR
+ export GNOME_MIME_THEME=hicolor
+ /bin/bash ./create_tree.sh
+ )
+@@ -108,8 +108,8 @@
+
+ # we do not want some stuff from the plain packages
+ rm -f $DESTDIR/$PREFIXDIR/bin/$INSTALLDIRNAME*
+-rm -f $DESTDIR/usr/share/applications/libreoffice-javafilter.desktop
+-rm -f $DESTDIR/usr/share/applications/libreoffice-printeradmin.desktop
++rm -f $DESTDIR/$PREFIXDIR/share/applications/libreoffice-javafilter.desktop
++rm -f $DESTDIR/$PREFIXDIR/share/applications/libreoffice-printeradmin.desktop
+ if test -d $DESTDIR/opt ; then
+ rm -f $DESTDIR/opt/$INSTALLDIRNAME
+ rmdir --ignore-fail-on-non-empty $DESTDIR/opt
+@@ -130,12 +130,12 @@
+ # put the stuff installed by create_tree.sh into the right file lists
+ # desktop files will be added by the corresponding add_wrapper command
+ if test -f $DESTDIR/gid_Module_Root_Brand ; then
+- for dir in /usr/share/application-registry \
+- /usr/share/mimelnk/application \
+- /usr/share/mime/packages \
+- /usr/share/mime-info \
+- /usr/share/icons ; do
+- find "$DESTDIR$dir" \( -type f -o -type l \) -printf "$dir/%P\n" >>$DESTDIR/gid_Module_Root_Brand
++ for dir in $PREFIXDIR/share/application-registry \
++ $PREFIXDIR/share/mimelnk/application \
++ $PREFIXDIR/share/mime/packages \
++ $PREFIXDIR/share/mime-info \
++ $PREFIXDIR/share/icons ; do
++ find "$DESTDIR$dir" \( -type f -o -type l \) | sed -e "s|^$DESTDIR||" >>$DESTDIR/gid_Module_Root_Brand
+ done
+ fi
+
diff --git a/editors/libreoffice/files/patch-clone__libs-core__sysui__desktop__share__create_tree.sh b/editors/libreoffice/files/patch-clone__libs-core__sysui__desktop__share__create_tree.sh
new file mode 100644
index 000000000000..6e5111e1dad9
--- /dev/null
+++ b/editors/libreoffice/files/patch-clone__libs-core__sysui__desktop__share__create_tree.sh
@@ -0,0 +1,45 @@
+--- clone/libs-core/sysui/desktop/share/create_tree.sh.orig 2011-09-04 16:44:43.591133517 +0000
++++ clone/libs-core/sysui/desktop/share/create_tree.sh 2011-09-04 17:05:55.429128701 +0000
+@@ -41,31 +41,31 @@
+ chmod 0644 ${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}.*
+ fi
+
+-mkdir -p ${DESTDIR}/usr/bin
++mkdir -p ${DESTDIR}${PREFIXDIR}/bin
+
+ test -n "$OFFICE_PREFIX" && office_prefix="$OFFICE_PREFIX" || office_prefix=/opt
+ office_root=${office_prefix}/${PREFIX}
+
+ #this symlink is needed to have the API boostrap functions running right
+-ln -sf ${office_root}/program/soffice ${DESTDIR}/usr/bin/${PREFIX}
++ln -sf ${office_root}/program/soffice ${DESTDIR}${PREFIXDIR}/bin/${PREFIX}
+
+-cp printeradmin.sh ${DESTDIR}/usr/bin/${PREFIX}-printeradmin
+-chmod 0755 ${DESTDIR}/usr/bin/${PREFIX} ${DESTDIR}/usr/bin/${PREFIX}-printeradmin
++cp printeradmin.sh ${DESTDIR}${PREFIXDIR}/bin/${PREFIX}-printeradmin
++chmod 0755 ${DESTDIR}${PREFIXDIR}/bin/${PREFIX} ${DESTDIR}${PREFIXDIR}/bin/${PREFIX}-printeradmin
+
+ if test "${PREFIX}" != libreoffice${PRODUCTVERSION} ; then
+ # compat symlinks
+ mkdir -p ${DESTDIR}${office_prefix}
+ ln -sf libreoffice${PRODUCTVERSION} ${DESTDIR}${office_root}
+- ln -sf /usr/bin/${PREFIX} ${DESTDIR}/usr/bin/libreoffice${PRODUCTVERSION}
+- ln -sf /usr/bin/${PREFIX}-printeradmin ${DESTDIR}/usr/bin/libreoffice${PRODUCTVERSION}-printeradmin
++ ln -sf ${PREFIXDIR}/bin/${PREFIX} ${DESTDIR}${PREFIXDIR}/bin/libreoffice${PRODUCTVERSION}
++ ln -sf ${PREFIXDIR}/bin/${PREFIX}-printeradmin ${DESTDIR}${PREFIXDIR}/bin/libreoffice${PRODUCTVERSION}-printeradmin
+ fi
+
+-mkdir -p ${DESTDIR}/usr/share/mime/packages
+-cp openoffice.org.xml ${DESTDIR}/usr/share/mime/packages/libreoffice${PRODUCTVERSION}.xml
+-chmod 0644 ${DESTDIR}/usr/share/mime/packages/libreoffice${PRODUCTVERSION}.xml
++mkdir -p ${DESTDIR}${PREFIXDIR}/share/mime/packages
++cp openoffice.org.xml ${DESTDIR}${PREFIXDIR}/share/mime/packages/libreoffice${PRODUCTVERSION}.xml
++chmod 0644 ${DESTDIR}${PREFIXDIR}/share/mime/packages/libreoffice${PRODUCTVERSION}.xml
+
+-mkdir -p ${DESTDIR}/usr/share/applications
++mkdir -p ${DESTDIR}${PREFIXDIR}/share/applications
+ for i in `cat launcherlist`; do
+- ln -sf ${office_root}/share/xdg/$i ${DESTDIR}/usr/share/applications/${PREFIX}-$i
++ ln -sf ${office_root}/share/xdg/$i ${DESTDIR}${PREFIXDIR}/share/applications/${PREFIX}-$i
+ done
+