From ed38af5c52dd288996478aacffc6344abd1719c0 Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Thu, 30 Oct 2008 16:28:38 +0000 Subject: [PATCH] Import xdg-user-dirs-0.10 xdg-user-dirs is a tool to help manage "well known" user directories like the desktop folder and the music folder. It also handles localization (i.e. translation) of the filenames. adapted from FreeBSD port --- devel/xdg-user-dirs/Makefile | 26 +++++++ devel/xdg-user-dirs/distinfo | 5 ++ devel/xdg-user-dirs/patches/patch-configure | 23 +++++++ .../xdg-user-dirs/patches/patch-xdg-user-dir | 13 ++++ .../patches/patch-xdg-user-dirs-update_c | 23 +++++++ devel/xdg-user-dirs/pkg/DESCR | 3 + devel/xdg-user-dirs/pkg/PLIST | 68 +++++++++++++++++++ 7 files changed, 161 insertions(+) create mode 100644 devel/xdg-user-dirs/Makefile create mode 100644 devel/xdg-user-dirs/distinfo create mode 100644 devel/xdg-user-dirs/patches/patch-configure create mode 100644 devel/xdg-user-dirs/patches/patch-xdg-user-dir create mode 100644 devel/xdg-user-dirs/patches/patch-xdg-user-dirs-update_c create mode 100644 devel/xdg-user-dirs/pkg/DESCR create mode 100644 devel/xdg-user-dirs/pkg/PLIST diff --git a/devel/xdg-user-dirs/Makefile b/devel/xdg-user-dirs/Makefile new file mode 100644 index 00000000000..8371b8f73fa --- /dev/null +++ b/devel/xdg-user-dirs/Makefile @@ -0,0 +1,26 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2008/10/30 16:28:38 ajacoutot Exp $ + +COMMENT= utilities to manage well know user directories + +DISTNAME= xdg-user-dirs-0.10 +CATEGORIES= devel + +HOMEPAGE= http://freedesktop.org/wiki/Software/xdg-user-dirs/ + +# GPLv2 +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= http://user-dirs.freedesktop.org/releases/ + +WANTLIB= c + +MODULES= devel/gettext + +CONFIGURE_STYLE= gnu + +FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/xdg-user-dirs + +.include diff --git a/devel/xdg-user-dirs/distinfo b/devel/xdg-user-dirs/distinfo new file mode 100644 index 00000000000..7d74cd4d25a --- /dev/null +++ b/devel/xdg-user-dirs/distinfo @@ -0,0 +1,5 @@ +MD5 (xdg-user-dirs-0.10.tar.gz) = aHP0nqf1aHQ2Ie0eBeUtqw== +RMD160 (xdg-user-dirs-0.10.tar.gz) = YGnP9JkY3AOTvIa94alSaOjG3lE= +SHA1 (xdg-user-dirs-0.10.tar.gz) = gkqyzNvqMNTNwpu+w7gCUCl+Njs= +SHA256 (xdg-user-dirs-0.10.tar.gz) = Fpl4xnfbXEmPSF6Yls0Kurrms6nQv2QP+nGdWvKrykY= +SIZE (xdg-user-dirs-0.10.tar.gz) = 242835 diff --git a/devel/xdg-user-dirs/patches/patch-configure b/devel/xdg-user-dirs/patches/patch-configure new file mode 100644 index 00000000000..62c2f75292a --- /dev/null +++ b/devel/xdg-user-dirs/patches/patch-configure @@ -0,0 +1,23 @@ +$OpenBSD: patch-configure,v 1.1.1.1 2008/10/30 16:28:38 ajacoutot Exp $ +--- configure.orig Thu Oct 30 17:12:17 2008 ++++ configure Thu Oct 30 17:13:08 2008 +@@ -7801,7 +7801,7 @@ host!$host$ac_delim + host_cpu!$host_cpu$ac_delim + host_vendor!$host_vendor$ac_delim + host_os!$host_os$ac_delim +-LIBICONV!$LIBICONV$ac_delim ++LIBICONV!$LTLIBICONV$ac_delim + LTLIBICONV!$LTLIBICONV$ac_delim + GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim + USE_NLS!$USE_NLS$ac_delim +@@ -7854,8 +7854,8 @@ for ac_last_try in false false false false false :; do + XGETTEXT_015!$XGETTEXT_015$ac_delim + MSGMERGE!$MSGMERGE$ac_delim + INTL_MACOSX_LIBS!$INTL_MACOSX_LIBS$ac_delim +-INTLLIBS!$INTLLIBS$ac_delim +-LIBINTL!$LIBINTL$ac_delim ++INTLLIBS!$LTLIBINTL$ac_delim ++LIBINTL!$LTLIBINTL$ac_delim + LTLIBINTL!$LTLIBINTL$ac_delim + POSUB!$POSUB$ac_delim + LIBOBJS!$LIBOBJS$ac_delim diff --git a/devel/xdg-user-dirs/patches/patch-xdg-user-dir b/devel/xdg-user-dirs/patches/patch-xdg-user-dir new file mode 100644 index 00000000000..03bbe02916a --- /dev/null +++ b/devel/xdg-user-dirs/patches/patch-xdg-user-dir @@ -0,0 +1,13 @@ +$OpenBSD: patch-xdg-user-dir,v 1.1.1.1 2008/10/30 16:28:38 ajacoutot Exp $ +--- xdg-user-dir.orig Mon Feb 26 16:51:16 2007 ++++ xdg-user-dir Thu Oct 30 17:14:03 2008 +@@ -1,7 +1,7 @@ + #!/bin/sh + +-test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs +-if [ "x$1" == "xDESKTOP" ]; then ++test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && . ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs ++if [ "x$1" = "xDESKTOP" ]; then + eval echo \${XDG_${1}_DIR:-$HOME/Desktop} + else + eval echo \${XDG_${1}_DIR:-$HOME} diff --git a/devel/xdg-user-dirs/patches/patch-xdg-user-dirs-update_c b/devel/xdg-user-dirs/patches/patch-xdg-user-dirs-update_c new file mode 100644 index 00000000000..909958557a0 --- /dev/null +++ b/devel/xdg-user-dirs/patches/patch-xdg-user-dirs-update_c @@ -0,0 +1,23 @@ +$OpenBSD: patch-xdg-user-dirs-update_c,v 1.1.1.1 2008/10/30 16:28:38 ajacoutot Exp $ +--- xdg-user-dirs-update.c.orig Mon Aug 20 10:12:20 2007 ++++ xdg-user-dirs-update.c Thu Oct 30 17:09:24 2008 +@@ -16,6 +16,19 @@ + #include + #include + ++#if defined(__FreeBSD__) || defined(__OpenBSD__) ++static char *strndup(const char *str, size_t len) { ++ char *ret; ++ ++ if ((str == NULL || len < 0)) return(NULL); ++ ret = (char *)malloc(len + 1); ++ if (ret == NULL) return(NULL); ++ memcpy(ret, str, len); ++ ret[len] = '\0'; ++ return(ret); ++} ++#endif ++ + typedef struct { + char *name; + char *path; diff --git a/devel/xdg-user-dirs/pkg/DESCR b/devel/xdg-user-dirs/pkg/DESCR new file mode 100644 index 00000000000..5ee6918d751 --- /dev/null +++ b/devel/xdg-user-dirs/pkg/DESCR @@ -0,0 +1,3 @@ +xdg-user-dirs is a tool to help manage "well known" user directories +like the desktop folder and the music folder. It also handles +localization (i.e. translation) of the filenames. diff --git a/devel/xdg-user-dirs/pkg/PLIST b/devel/xdg-user-dirs/pkg/PLIST new file mode 100644 index 00000000000..cf18be5ce6f --- /dev/null +++ b/devel/xdg-user-dirs/pkg/PLIST @@ -0,0 +1,68 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2008/10/30 16:28:38 ajacoutot Exp $ +bin/xdg-user-dir +@bin bin/xdg-user-dirs-update +share/examples/xdg-user-dirs/ +share/examples/xdg-user-dirs/xdg/ +@sample ${SYSCONFDIR}/xdg/ +share/examples/xdg-user-dirs/xdg/user-dirs.conf +@sample ${SYSCONFDIR}/xdg/user-dirs.conf +share/examples/xdg-user-dirs/xdg/user-dirs.defaults +@sample ${SYSCONFDIR}/xdg/user-dirs.defaults +share/locale/af/ +share/locale/af/LC_MESSAGES/ +share/locale/af/LC_MESSAGES/xdg-user-dirs.mo +share/locale/ar/ +share/locale/ar/LC_MESSAGES/ +share/locale/ar/LC_MESSAGES/xdg-user-dirs.mo +share/locale/be@latin/ +share/locale/be@latin/LC_MESSAGES/ +share/locale/be@latin/LC_MESSAGES/xdg-user-dirs.mo +share/locale/bg/LC_MESSAGES/xdg-user-dirs.mo +share/locale/ca/LC_MESSAGES/xdg-user-dirs.mo +share/locale/cs/LC_MESSAGES/xdg-user-dirs.mo +share/locale/da/LC_MESSAGES/xdg-user-dirs.mo +share/locale/de/LC_MESSAGES/xdg-user-dirs.mo +share/locale/el/LC_MESSAGES/xdg-user-dirs.mo +share/locale/es/LC_MESSAGES/xdg-user-dirs.mo +share/locale/et/LC_MESSAGES/xdg-user-dirs.mo +share/locale/eu/LC_MESSAGES/xdg-user-dirs.mo +share/locale/fi/LC_MESSAGES/xdg-user-dirs.mo +share/locale/fr/LC_MESSAGES/xdg-user-dirs.mo +share/locale/ga/LC_MESSAGES/xdg-user-dirs.mo +share/locale/hu/LC_MESSAGES/xdg-user-dirs.mo +share/locale/it/LC_MESSAGES/xdg-user-dirs.mo +share/locale/ja/LC_MESSAGES/xdg-user-dirs.mo +share/locale/ko/LC_MESSAGES/xdg-user-dirs.mo +share/locale/ku/ +share/locale/ku/LC_MESSAGES/ +share/locale/ku/LC_MESSAGES/xdg-user-dirs.mo +share/locale/lt/ +share/locale/lt/LC_MESSAGES/ +share/locale/lt/LC_MESSAGES/xdg-user-dirs.mo +share/locale/mk/ +share/locale/mk/LC_MESSAGES/ +share/locale/mk/LC_MESSAGES/xdg-user-dirs.mo +share/locale/nb/LC_MESSAGES/xdg-user-dirs.mo +share/locale/nl/LC_MESSAGES/xdg-user-dirs.mo +share/locale/nn/LC_MESSAGES/xdg-user-dirs.mo +share/locale/pa/ +share/locale/pa/LC_MESSAGES/ +share/locale/pa/LC_MESSAGES/xdg-user-dirs.mo +share/locale/pl/LC_MESSAGES/xdg-user-dirs.mo +share/locale/pt/LC_MESSAGES/xdg-user-dirs.mo +share/locale/pt_BR/LC_MESSAGES/xdg-user-dirs.mo +share/locale/ru/LC_MESSAGES/xdg-user-dirs.mo +share/locale/sk/LC_MESSAGES/xdg-user-dirs.mo +share/locale/sr/LC_MESSAGES/xdg-user-dirs.mo +share/locale/sr@Latn/ +share/locale/sr@Latn/LC_MESSAGES/ +share/locale/sr@Latn/LC_MESSAGES/xdg-user-dirs.mo +share/locale/sv/LC_MESSAGES/xdg-user-dirs.mo +share/locale/th/ +share/locale/th/LC_MESSAGES/ +share/locale/th/LC_MESSAGES/xdg-user-dirs.mo +share/locale/tr/LC_MESSAGES/xdg-user-dirs.mo +share/locale/uk/LC_MESSAGES/xdg-user-dirs.mo +share/locale/zh_CN/LC_MESSAGES/xdg-user-dirs.mo +share/locale/zh_HK/LC_MESSAGES/xdg-user-dirs.mo +share/locale/zh_TW/LC_MESSAGES/xdg-user-dirs.mo