pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/gentoo Add DragonFly support. Replace the sta...
details: https://anonhg.NetBSD.org/pkgsrc/rev/dad69cc5fc90
branches: trunk
changeset: 514916:dad69cc5fc90
user: joerg <joerg%pkgsrc.org@localhost>
date: Tue Jun 20 20:41:22 2006 +0000
description:
Add DragonFly support. Replace the static FILE magic with a different
(messy) magic, which doesn't relay on sizeof(FILE), but on two integer
variables having separate addresses and pointer casts not changing
this fact.
diffstat:
sysutils/gentoo/distinfo | 6 ++-
sysutils/gentoo/patches/patch-ac | 79 +++++++++++++++++++++++++++++++++++++--
sysutils/gentoo/patches/patch-af | 31 +++++++++++++++
sysutils/gentoo/patches/patch-ag | 13 ++++++
4 files changed, 122 insertions(+), 7 deletions(-)
diffs (174 lines):
diff -r f68ceea44415 -r dad69cc5fc90 sysutils/gentoo/distinfo
--- a/sysutils/gentoo/distinfo Tue Jun 20 20:36:38 2006 +0000
+++ b/sysutils/gentoo/distinfo Tue Jun 20 20:41:22 2006 +0000
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.17 2005/06/30 15:29:13 adam Exp $
+$NetBSD: distinfo,v 1.18 2006/06/20 20:41:22 joerg Exp $
SHA1 (gentoo-0.11.55.tar.gz) = 5ba1627d0c7caba8ba0064dde5fd8850a38a092e
RMD160 (gentoo-0.11.55.tar.gz) = 30b4edd10a892709a39ac3f83cc5385652a965e2
Size (gentoo-0.11.55.tar.gz) = 1395600 bytes
SHA1 (patch-aa) = bd3736cffbda663fd571b6b7a2171e64b4d52927
SHA1 (patch-ab) = 1aaa154789866b436303b0a8f6f20707301d8b7f
-SHA1 (patch-ac) = ab5d886b29945fcb54baa94e47140516bd4db93e
+SHA1 (patch-ac) = 787e4b6f247710d5170bb9ad6ea9fe502f0c9969
SHA1 (patch-ad) = 0ac9fca5454c98633aa6c0bacfcaa364c34df37f
SHA1 (patch-ae) = daa7cbed8d66af155f2624a0066b2f578e9a93c6
+SHA1 (patch-af) = a86ce48f7430cb6815706f22f71fadad41f0b4f6
+SHA1 (patch-ag) = 3045a4eb72f8c50d147fe09256ec791359053418
diff -r f68ceea44415 -r dad69cc5fc90 sysutils/gentoo/patches/patch-ac
--- a/sysutils/gentoo/patches/patch-ac Tue Jun 20 20:36:38 2006 +0000
+++ b/sysutils/gentoo/patches/patch-ac Tue Jun 20 20:41:22 2006 +0000
@@ -1,22 +1,39 @@
-$NetBSD: patch-ac,v 1.3 2004/05/07 13:50:37 adam Exp $
+$NetBSD: patch-ac,v 1.4 2006/06/20 20:41:22 joerg Exp $
---- src/mntent_wrap.c.orig 2004-05-07 15:22:04.000000000 +0000
+--- src/mntent_wrap.c.orig 2003-10-12 13:45:23.000000000 +0000
+++ src/mntent_wrap.c
+@@ -92,7 +92,7 @@ gint mne_endmntent(FILE *filep)
+ return -1;
+ }
+
+-#elif defined __OpenBSD__ || defined __FreeBSD__ || defined __NetBSD__ || (defined __osf__ && defined __alpha__)
++#elif defined __OpenBSD__ || defined __FreeBSD__ || defined __NetBSD__ || (defined __osf__ && defined __alpha__) || defined(__DragonFly__)
+
+ /* Here is the implementation for BSD and Alpha Tru64 systems. */
+
@@ -100,6 +100,9 @@ gint mne_endmntent(FILE *filep)
#include <sys/mount.h>
#include <sys/param.h>
#include <sys/ucred.h>
-+#ifdef HAVE_STRUCT_STATVFS
++#if defined(HAVE_STRUCT_STATVFS) && !defined(__DragonFly__)
+#include <sys/statvfs.h>
+#endif
/* A pointer to one of these is returned by mne_setmntent(), depending on which file
** name is given as an input. Note that on BSD systems, the system calls themselves
-@@ -115,7 +118,11 @@ static FILE f_fstab, f_mtab;
+@@ -109,13 +112,18 @@ gint mne_endmntent(FILE *filep)
+ ** of what kind of mount entries we're supposed to deal with. Since gentoo will
+ ** pass a FILE pointer to mne_getmntent() anyway, it seems natural to use it.
+ */
+-static FILE f_fstab, f_mtab;
++static int f_stab_val, f_mtab_val;
++static FILE *f_fstab = (FILE *)&f_stab_val, *f_mtab = (FILE *)&f_mtab_val;
+
+ /* These are used when we're accessing the currently mounted filesystems, using
** a call to getmntinfo(). The mtab_pos and mtab_num integers are then used to
** keep track of where in the returned array of statfs structs we are.
*/
-+#ifdef HAVE_STRUCT_STATVFS
++#if defined(HAVE_STRUCT_STATVFS) && !defined(__DragonFly__)
+static struct statvfs *mtab = NULL;
+#else
static struct statfs *mtab = NULL;
@@ -24,3 +41,55 @@
static guint mtab_pos = 0, mtab_num = 0;
/* 1999-05-09 - An attempt at a BSD implementation, after having received input from
+@@ -132,28 +140,28 @@ FILE * mne_setmntent(const gchar *filena
+ if(strcmp(filename, "/etc/fstab") == 0) /* Looking for available filesystems? */
+ {
+ if(setfsent() == 1)
+- return &f_fstab;
++ return f_fstab;
+ }
+ else if(strcmp(filename, "/proc/mtab") == 0) /* Looking for mounted filesystems? */
+ {
+ if((mtab_num = getmntinfo(&mtab, 0)) > 0)
+ {
+ mtab_pos = 0;
+- return &f_mtab;
++ return f_mtab;
+ }
+ }
+ return NULL;
+ }
+
+-/* 1999-05-09 - Get another entry of data, either about mounted (filep == &f_mtab) or available
+-** (filep == &f_fstab) filesystems. Returns NULL when the respective data source
++/* 1999-05-09 - Get another entry of data, either about mounted (filep == f_mtab) or available
++** (filep == f_fstab) filesystems. Returns NULL when the respective data source
+ ** is exhausted.
+ */
+ const MntEnt * mne_getmntent(FILE *filep)
+ {
+ static MntEnt me;
+
+- if(filep == &f_fstab)
++ if(filep == f_fstab)
+ {
+ struct fstab *ment;
+
+@@ -164,7 +172,7 @@ const MntEnt * mne_getmntent(FILE *filep
+ return &me;
+ }
+ }
+- else if(filep == &f_mtab)
++ else if(filep == f_mtab)
+ {
+ if(mtab_pos == mtab_num) /* Array exhausted? */
+ return NULL;
+@@ -182,7 +190,7 @@ const MntEnt * mne_getmntent(FILE *filep
+ /* 1999-05-09 - Stop traversing mount/fs data. */
+ gint mne_endmntent(FILE *filep)
+ {
+- if(filep == &f_fstab)
++ if(filep == f_fstab)
+ endfsent();
+
+ return 0;
diff -r f68ceea44415 -r dad69cc5fc90 sysutils/gentoo/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/gentoo/patches/patch-af Tue Jun 20 20:41:22 2006 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-af,v 1.1 2006/06/20 20:41:22 joerg Exp $
+
+--- src/gentoo.h.orig 2005-01-30 21:49:56.000000000 +0000
++++ src/gentoo.h
+@@ -13,7 +13,7 @@
+
+ #include "config.h"
+
+-#if !(defined __osf__ && defined __alpha__) && !defined __NetBSD__ && !defined __FreeBSD__ && !defined __sgi
++#if !(defined __osf__ && defined __alpha__) && !defined __NetBSD__ && !defined __FreeBSD__ && !defined __sgi && !defined(__DragonFly__)
+ #define __EXTENSIONS__
+ #define _POSIX_C_SOURCE 3 /* This is for Solaris. */
+ #define POSIX_C_SOURCE 3
+@@ -40,7 +40,7 @@
+ #include <time.h>
+ #include <unistd.h>
+
+-#if defined HAVE_STRUCT_STATVFS
++#if defined HAVE_STRUCT_STATVFS && !defined(__DragonFly__)
+ #include <sys/statvfs.h>
+ #elif defined HAVE_STRUCT_STATFS
+ #include <sys/statfs.h>
+@@ -50,7 +50,7 @@
+ ** and save some typing in various tests below. This should probably all
+ ** be replaced by proper Autoconfed stuff at some point.
+ */
+-#if defined __OpenBSD__ || defined __FreeBSD__ || defined __NetBSD__
++#if defined __OpenBSD__ || defined __FreeBSD__ || defined __NetBSD__ || defined(__DragonFly__)
+ #define GENTOO_ON_BSD
+ #endif
+
diff -r f68ceea44415 -r dad69cc5fc90 sysutils/gentoo/patches/patch-ag
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/gentoo/patches/patch-ag Tue Jun 20 20:41:22 2006 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1 2006/06/20 20:41:22 joerg Exp $
+
+--- src/cfg_paths.c.orig 2006-06-19 13:33:18.000000000 +0000
++++ src/cfg_paths.c
+@@ -153,7 +153,7 @@ static GtkWidget * cpt_init(MainInfo *mi
+ page->path[i].path = gtk_entry_new();
+ gtk_signal_connect(GTK_OBJECT(page->path[i].path), "changed", GTK_SIGNAL_FUNC(evt_path_changed), page);
+ gtk_table_attach_defaults(GTK_TABLE(page->ptable), page->path[i].path, 1, 2, i, i+1);
+-#if defined __OpenBSD__ || defined __FreeBSD__ || defined __NetBSD__
++#if defined __OpenBSD__ || defined __FreeBSD__ || defined __NetBSD__ || defined __DragonFly__
+ /* Mountlist and mounted fs files are non-configurable on BSD systems. */
+ if(i == 2 || i == 3)
+ gtk_widget_set_sensitive(page->path[i].path, FALSE);
Home |
Main Index |
Thread Index |
Old Index