diff options
author | jmmv <jmmv@pkgsrc.org> | 2003-02-15 13:30:49 +0000 |
---|---|---|
committer | jmmv <jmmv@pkgsrc.org> | 2003-02-15 13:30:49 +0000 |
commit | 36db79780caac656f99a58ee8ca5380d5e1a7708 (patch) | |
tree | b44ee6cb32430c17297166a8ec8404c43a2f111f /devel/libgnome | |
parent | 970c20a9d3137c2435aa0854b31abe001b1d64d0 (diff) | |
download | pkgsrc-36db79780caac656f99a58ee8ca5380d5e1a7708.tar.gz |
Handle trailing slashes when calling mkdir(2) in a better way.
I hope this solves some obscure problems introduced by the old patches.
Diffstat (limited to 'devel/libgnome')
-rw-r--r-- | devel/libgnome/Makefile | 3 | ||||
-rw-r--r-- | devel/libgnome/distinfo | 5 | ||||
-rw-r--r-- | devel/libgnome/patches/patch-ac | 76 | ||||
-rw-r--r-- | devel/libgnome/patches/patch-ae | 22 |
4 files changed, 90 insertions, 16 deletions
diff --git a/devel/libgnome/Makefile b/devel/libgnome/Makefile index 708aea53732..1d8840c46bb 100644 --- a/devel/libgnome/Makefile +++ b/devel/libgnome/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.7 2003/02/14 20:11:49 jmmv Exp $ +# $NetBSD: Makefile,v 1.8 2003/02/15 13:30:49 jmmv Exp $ # DISTNAME= libgnome-2.2.0.1 +PKGREVISION= 1 CATEGORIES= devel gnome MASTER_SITES= ${MASTER_SITE_GNOME:=sources/libgnome/2.2/} EXTRACT_SUFX= .tar.bz2 diff --git a/devel/libgnome/distinfo b/devel/libgnome/distinfo index 8da9648e842..8b9e3606c75 100644 --- a/devel/libgnome/distinfo +++ b/devel/libgnome/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.3 2003/02/14 20:11:50 jmmv Exp $ +$NetBSD: distinfo,v 1.4 2003/02/15 13:30:50 jmmv Exp $ SHA1 (libgnome-2.2.0.1.tar.bz2) = 50a7dd086638094723f47788d399d1826647710e Size (libgnome-2.2.0.1.tar.bz2) = 716319 bytes SHA1 (patch-aa) = edb9f86dbc9defefab5a31ebc6303a7488dab639 SHA1 (patch-ab) = f1d44227b78406e7daece28e734ac239cda41518 -SHA1 (patch-ac) = 646ec430e239123624916b081f976fe6de669865 +SHA1 (patch-ac) = f5aaa1cd464d85b9ceea42a29edec950658620f8 SHA1 (patch-ad) = debc95d4b6bed9998d18c2b2bad1b5a985300ccc +SHA1 (patch-ae) = 3e9d43e3608cbf9e180c06e690f53c030580fbb2 diff --git a/devel/libgnome/patches/patch-ac b/devel/libgnome/patches/patch-ac index 6972b55521a..1f36fb1438d 100644 --- a/devel/libgnome/patches/patch-ac +++ b/devel/libgnome/patches/patch-ac @@ -1,15 +1,65 @@ -$NetBSD: patch-ac,v 1.2 2003/02/14 20:11:51 jmmv Exp $ +$NetBSD: patch-ac,v 1.3 2003/02/15 13:30:50 jmmv Exp $ ---- libgnome/gnome-init.h.orig Fri Nov 22 14:47:27 2002 -+++ libgnome/gnome-init.h -@@ -36,8 +36,8 @@ G_BEGIN_DECLS - * to override .gnome2 via environment variable and this is - * an important feature for environments that mix GNOME versions) - */ --#define GNOME_DOT_GNOME ".gnome2/" --#define GNOME_DOT_GNOME_PRIVATE ".gnome2_private/" -+#define GNOME_DOT_GNOME ".gnome2" -+#define GNOME_DOT_GNOME_PRIVATE ".gnome2_private" +--- libgnome/gnome-init.c.orig 2002-11-22 14:47:27.000000000 +0100 ++++ libgnome/gnome-init.c +@@ -53,6 +53,8 @@ - #define LIBGNOME_MODULE libgnome_module_info_get() - const GnomeModuleInfo *libgnome_module_info_get (void) G_GNUC_CONST; + #include <libgnomevfs/gnome-vfs-init.h> + ++int libgnome_mkdir(const char *path, mode_t mode); ++ + /***************************************************************************** + * bonobo + *****************************************************************************/ +@@ -299,7 +301,7 @@ libgnome_userdir_setup (gboolean create_ + if (!create_dirs) + return; + +- if (mkdir (gnome_user_dir, 0700) < 0) { /* private permissions, but we ++ if (libgnome_mkdir (gnome_user_dir, 0700) < 0) { /* private permissions, but we + don't check that we got them */ + if (errno != EEXIST) { + fprintf(stderr, _("Could not create per-user gnome configuration directory `%s': %s\n"), +@@ -308,7 +310,7 @@ libgnome_userdir_setup (gboolean create_ + } + } + +- if (mkdir (gnome_user_private_dir, 0700) < 0) { /* This is private ++ if (libgnome_mkdir (gnome_user_private_dir, 0700) < 0) { /* This is private + per-user info mode + 700 will be + enforced! maybe +@@ -330,7 +332,7 @@ libgnome_userdir_setup (gboolean create_ + exit(1); + } + +- if (mkdir (gnome_user_accels_dir, 0700) < 0) { ++ if (libgnome_mkdir (gnome_user_accels_dir, 0700) < 0) { + if (errno != EEXIST) { + fprintf(stderr, _("Could not create gnome accelerators directory `%s': %s\n"), + gnome_user_accels_dir, strerror(errno)); +@@ -462,3 +464,24 @@ libgnome_module_info_get (void) + + return &module_info; + } ++ ++int ++libgnome_mkdir(const char *path, mode_t mode) ++{ ++ char *tmp; ++ size_t length; ++ int ret; ++ ++ length = strlen(path); ++ tmp = (char *) malloc(length + 1); ++ strcpy(tmp, path); ++ length--; ++ while (tmp[length] == '/' && length > 0) { ++ tmp[length] = '\0'; ++ length--; ++ } ++ ret = mkdir(tmp, mode); ++ ++ free(tmp); ++ return ret; ++} diff --git a/devel/libgnome/patches/patch-ae b/devel/libgnome/patches/patch-ae new file mode 100644 index 00000000000..7f13f826264 --- /dev/null +++ b/devel/libgnome/patches/patch-ae @@ -0,0 +1,22 @@ +$NetBSD: patch-ae,v 1.1 2003/02/15 13:30:50 jmmv Exp $ + +--- libgnome/gnome-config.c.orig 2002-07-12 14:44:10.000000000 +0200 ++++ libgnome/gnome-config.c +@@ -105,6 +105,8 @@ static TProfile *Current = 0; + */ + static TProfile *Base = 0; + ++int libgnome_mkdir(const char *path, mode_t mode); ++ + static char * + config_concat_dir_and_key (const char *dir, const char *key) + { +@@ -714,7 +716,7 @@ check_path(char *path, mode_t newmode) + } else { + /*we couldn't stat it .. let's try making the + directory*/ +- if(mkdir(newpath->str,newmode)!=0) { ++ if(libgnome_mkdir(newpath->str,newmode)!=0) { + /*error, return false*/ + g_string_free(newpath,TRUE); + return FALSE; |