Import xdg-utils-1.0.2

Xdg-utils is a set of command line tools that assist applications with a
variety of desktop integration tasks.  About half of the tools focus on
tasks commonly required during the installation of a desktop application
and the other half focuses on integration with the desktop environment
while the application is running.

based on an unfinished port from landry@
ok landry@
This commit is contained in:
ajacoutot 2008-10-30 14:28:36 +00:00
parent 18e9a52fc4
commit 4c769a84fe
8 changed files with 188 additions and 0 deletions

29
devel/xdg-utils/Makefile Normal file
View File

@ -0,0 +1,29 @@
# $OpenBSD: Makefile,v 1.1.1.1 2008/10/30 14:28:36 ajacoutot Exp $
COMMENT= utilities to assist desktop integration tasks
DISTNAME= xdg-utils-1.0.2
CATEGORIES= devel
HOMEPAGE= http://portland.freedesktop.org/wiki/
# MIT
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= http://portland.freedesktop.org/download/
EXTRACT_SUFX= .tgz
NO_BUILD= Yes
NO_REGRESS= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ENV= XMLTO=${LOCALBASE}/bin/xmlto
pre-configure:
${SUBST_CMD} \
${WRKSRC}/scripts/{xdg-desktop-menu,xdg-icon-resource,xdg-mime}
.include <bsd.port.mk>

5
devel/xdg-utils/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (xdg-utils-1.0.2.tgz) = NIpbkdxmQmUFAix0pkspQA==
RMD160 (xdg-utils-1.0.2.tgz) = NESCkX6MeAYT7CCxA/jlEyJUDAQ=
SHA1 (xdg-utils-1.0.2.tgz) = 5BoEy/n/jXQzl6K8I8bKgui1nSw=
SHA256 (xdg-utils-1.0.2.tgz) = Ia630WslKbjTl1EY9Z7sCZU+CfmmjXGBWemMkEdLAaw=
SIZE (xdg-utils-1.0.2.tgz) = 282262

View File

@ -0,0 +1,80 @@
$OpenBSD: patch-scripts_xdg-desktop-menu,v 1.1.1.1 2008/10/30 14:28:36 ajacoutot Exp $
--- scripts/xdg-desktop-menu.orig Thu Oct 30 14:45:02 2008
+++ scripts/xdg-desktop-menu Thu Oct 30 14:51:18 2008
@@ -696,7 +696,7 @@ make_lazy_default()
for MIME in $mimetypes ; do
xdg_default_dirs="$XDG_DATA_DIRS"
- [ -n "$xdg_default_dirs" ] || xdg_default_dirs=/usr/local/share/:/usr/share/
+ [ -n "$xdg_default_dirs" ] || xdg_default_dirs=${LOCALBASE}/share/:/usr/share/
if [ x"$mode" = x"user" ] ; then
xdg_user_dir="$XDG_DATA_HOME"
[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
@@ -739,7 +739,7 @@ update_submenu()
xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
xdg_system_dirs="$XDG_CONFIG_DIRS"
- [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/etc/xdg
+ [ -n "$xdg_system_dirs" ] || xdg_system_dirs=${SYSCONFDIR}/xdg
xdg_global_dir=
for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
if [ -w $x/$xdg_dir_name ] ; then
@@ -787,7 +787,7 @@ update_submenu()
return
fi
- if [ $action = "install" -a -f "/etc/xdg/menus/gnome-applications.menu" ] ; then
+ if [ $action = "install" -a -f "${SYSCONFDIR}/xdg/menus/gnome-applications.menu" ] ; then
# Work around for Debian Gnome
gnome_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/gnome-applications-merged^'`
if [ ! -e "$gnome_xdg_dir" ] ; then
@@ -805,7 +805,7 @@ update_submenu()
eval 'ln -s "applications-merged" "$mandrake_xdg_dir"'$xdg_redirect_output
fi
fi
- if [ $action = "install" -a x"$mode" = x"user" -a -d "/etc/xdg/menus/kde-applications-merged" ] ; then
+ if [ $action = "install" -a x"$mode" = x"user" -a -d "${SYSCONFDIR}/xdg/menus/kde-applications-merged" ] ; then
# Work around for Fedora Core 5 + patched KDE
kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
if [ ! -e "$kde_xdg_dir" ] ; then
@@ -814,7 +814,7 @@ update_submenu()
eval 'ln -s "applications-merged" "$kde_xdg_dir"'$xdg_redirect_output
fi
fi
- if [ $action = "install" -a x"$mode" = x"system" -a -d "/etc/xdg/menus/kde-applications-merged" -a ! -d "/etc/xdg/menus/applications-merged" ] ; then
+ if [ $action = "install" -a x"$mode" = x"system" -a -d "${SYSCONFDIR}/xdg/menus/kde-applications-merged" -a ! -d "${SYSCONFDIR}/xdg/menus/applications-merged" ] ; then
# Work around for Kubuntu 6.06
kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
DEBUG 1 "Kubuntu Workaround: Link '$xdg_dir' to 'kde-applications-merged'"
@@ -1102,7 +1102,7 @@ xdg_user_dir="$XDG_DATA_HOME"
xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
+[ -n "$xdg_system_dirs" ] || xdg_system_dirs=${LOCALBASE}/share/:/usr/share/
xdg_global_dir=
for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
if [ -w $x/$xdg_dir_name ] ; then
@@ -1169,7 +1169,7 @@ xdg_user_dir="$XDG_DATA_HOME"
xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
+[ -n "$xdg_system_dirs" ] || xdg_system_dirs=${LOCALBASE}/share/:/usr/share/
xdg_global_dir=
for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
if [ -w $x/$xdg_dir_name ] ; then
@@ -1179,11 +1179,11 @@ for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
done
kde_user_dir="$HOME/.kde/share/applnk"
-kde_global_dir="/usr/share/applnk"
+kde_global_dir="${LOCALBASE}/share/applnk"
[ -w $kde_global_dir ] || kde_global_dir=
gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir="/usr/share/gnome/apps"
+gnome_global_dir="${LOCALBASE}/share/gnome/apps"
[ -w $gnome_global_dir ] || gnome_global_dir=
[ -f /etc/mandriva-release ] && need_mandriva_fix=true

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-scripts_xdg-email,v 1.1.1.1 2008/10/30 14:28:36 ajacoutot Exp $
--- scripts/xdg-email.orig Thu Oct 30 14:47:03 2008
+++ scripts/xdg-email Thu Oct 30 14:47:41 2008
@@ -480,7 +480,7 @@ result=$(echo "$1" | $utf8 | awk '
options=
mailto=
-utf8="iconv -t utf8"
+utf8="iconv -t UTF-8"
while [ $# -gt 0 ] ; do
parm="$1"
shift

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-scripts_xdg-icon-resource,v 1.1.1.1 2008/10/30 14:28:36 ajacoutot Exp $
--- scripts/xdg-icon-resource.orig Thu Oct 30 14:48:27 2008
+++ scripts/xdg-icon-resource Thu Oct 30 14:48:47 2008
@@ -610,7 +610,7 @@ xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
xdg_global_dir=
xdg_global_prefix=
xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs="/usr/local/share/:/usr/share/"
+[ -n "$xdg_system_dirs" ] || xdg_system_dirs="${LOCALBASE}/share/:/usr/share/"
for x in `echo "$xdg_system_dirs" | sed 's/:/ /g'`; do
if [ -w $x/$xdg_dir_name ] ; then
xdg_global_prefix="$x/icons"

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-scripts_xdg-mime,v 1.1.1.1 2008/10/30 14:28:36 ajacoutot Exp $
--- scripts/xdg-mime.orig Thu Oct 30 14:51:30 2008
+++ scripts/xdg-mime Thu Oct 30 14:52:24 2008
@@ -557,7 +557,7 @@ defapp_generic()
[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
xdg_system_dirs="$XDG_DATA_DIRS"
- [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
+ [ -n "$xdg_system_dirs" ] || xdg_system_dirs=${LOCALBASE}/share/:/usr/share/
for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do
DEBUG 2 "Checking $x/applications/defaults.list"
@@ -827,7 +827,7 @@ xdg_user_dir="$XDG_DATA_HOME"
xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
+[ -n "$xdg_system_dirs" ] || xdg_system_dirs=${LOCALBASE}/share/:/usr/share/
for x in `echo $xdg_system_dirs | sed 's/:/ /g'`; do
if [ -w $x/$xdg_dir_name ] ; then
[ x"$mode" = x"system" ] && xdg_base_dir="$x/mime"
@@ -859,7 +859,7 @@ DEBUG 3 "kde_global_dir: $kde_global_dir"
# TODO: Gnome legacy support
# See http://forums.fedoraforum.org/showthread.php?t=26875
gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir=/usr/share/gnome/apps
+gnome_global_dir=${LOCALBASE}/share/gnome/apps
[ -w $gnome_global_dir ] || gnome_global_dir=
DEBUG 3 "gnome_user_dir: $gnome_user_dir"
DEBUG 3 "gnome_global_dir: $gnome_global_dir"

View File

@ -0,0 +1,5 @@
Xdg-utils is a set of command line tools that assist applications with a
variety of desktop integration tasks. About half of the tools focus on
tasks commonly required during the installation of a desktop application
and the other half focuses on integration with the desktop environment
while the application is running.

15
devel/xdg-utils/pkg/PLIST Normal file
View File

@ -0,0 +1,15 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2008/10/30 14:28:36 ajacoutot Exp $
bin/xdg-desktop-icon
bin/xdg-desktop-menu
bin/xdg-email
bin/xdg-icon-resource
bin/xdg-mime
bin/xdg-open
bin/xdg-screensaver
@man man/man1/xdg-desktop-icon.1
@man man/man1/xdg-desktop-menu.1
@man man/man1/xdg-email.1
@man man/man1/xdg-icon-resource.1
@man man/man1/xdg-mime.1
@man man/man1/xdg-open.1
@man man/man1/xdg-screensaver.1