aboutsummaryrefslogtreecommitdiff
path: root/editors/manedit
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2003-08-26 20:24:22 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2003-08-26 20:24:22 +0000
commit0398cf082c5e2cc5b8592b91679d82cebed9deb2 (patch)
tree1688c0a2d7b72abece284a39ff76e75b92e44b0c /editors/manedit
parent56d10cf1b54b60c98aef163aa29d41d862b9d9e9 (diff)
downloadports-0398cf082c5e2cc5b8592b91679d82cebed9deb2.tar.gz
ports-0398cf082c5e2cc5b8592b91679d82cebed9deb2.zip
Notes
Diffstat (limited to 'editors/manedit')
-rw-r--r--editors/manedit/Makefile7
-rw-r--r--editors/manedit/distinfo2
-rw-r--r--editors/manedit/files/mntent.h35
-rw-r--r--editors/manedit/files/mntent_compat.c88
-rw-r--r--editors/manedit/files/patch-Makefile.FreeBSD2
-rw-r--r--editors/manedit/files/patch-Makefile.install.UNIX76
-rw-r--r--editors/manedit/files/patch-Makefile.srclist17
7 files changed, 189 insertions, 38 deletions
diff --git a/editors/manedit/Makefile b/editors/manedit/Makefile
index 12eb085ab224..7ad1c4416ec5 100644
--- a/editors/manedit/Makefile
+++ b/editors/manedit/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= manedit
-PORTVERSION= 0.5.6
+PORTVERSION= 0.5.10
CATEGORIES= editors
MASTER_SITES= ftp://wolfpack.twu.net/users/wolfpack/
@@ -22,8 +22,7 @@ MAKEFILE= Makefile.FreeBSD
MAN1= manedit.1
-pre-patch:
- @find ${WRKSRC} -name "*.[ch]" | \
- xargs ${PERL} -pi -e 's|malloc\.h|stdlib.h|g'
+pre-configure:
+ ${CP} ${FILESDIR}/mntent* ${WRKSRC}
.include <bsd.port.mk>
diff --git a/editors/manedit/distinfo b/editors/manedit/distinfo
index a7c37ee9e0e4..ce57b577578d 100644
--- a/editors/manedit/distinfo
+++ b/editors/manedit/distinfo
@@ -1 +1 @@
-MD5 (manedit-0.5.6.tar.bz2) = 8039d8167c0338f8b8666ae9a516e0a0
+MD5 (manedit-0.5.10.tar.bz2) = a0d9ff519221fee53e3c7c8b10ddc7af
diff --git a/editors/manedit/files/mntent.h b/editors/manedit/files/mntent.h
new file mode 100644
index 000000000000..1e37778b2178
--- /dev/null
+++ b/editors/manedit/files/mntent.h
@@ -0,0 +1,35 @@
+#ifdef HAVE_MNTENT_H
+#include <mntent.h>
+#else
+
+#ifndef mntent_h_
+#define mntent_h_
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/param.h>
+#include <sys/ucred.h>
+#include <sys/mount.h>
+
+#define MOUNTED "mounted"
+#define MNTTYPE_NFS "nfs"
+
+//#define MOPTSLEN (256 - (MNAMELEN * 2 + MFSNAMELEN + 2 * sizeof(int)))
+
+struct mntent {
+ char *mnt_fsname; /* file system name */
+ char *mnt_dir; /* file system path prefix */
+ char *mnt_type; /* dbg, efs, nfs */
+ char *mnt_opts; /* ro, hide, etc. */
+ int mnt_freq; /* dump frequency, in days */
+ int mnt_passno; /* pass number on parallel fsck */
+};
+
+FILE * setmntent(char * filep, char * type);
+struct mntent *getmntent(FILE * filep);
+//char * hasmntopt(struct mntent * mnt, char * opt);
+int endmntent(FILE * filep);
+
+#endif /* mntent_h_ */
+#endif /* not HAVE_MNTENT_H */
diff --git a/editors/manedit/files/mntent_compat.c b/editors/manedit/files/mntent_compat.c
new file mode 100644
index 000000000000..9112983e61e6
--- /dev/null
+++ b/editors/manedit/files/mntent_compat.c
@@ -0,0 +1,88 @@
+#include "mntent.h"
+#include <sys/param.h>
+//#include <sys/ucred.h>
+#include <sys/mount.h>
+#include <fstab.h>
+
+struct statfs *getmntent_mntbufp;
+int getmntent_mntcount = 0;
+int getmntent_mntpos = 0;
+char mntent_global_opts[256];
+struct mntent mntent_global_mntent;
+
+FILE * setmntent(char * filep, char * type)
+{
+ getmntent_mntpos = 0;
+ getmntent_mntcount = getmntinfo(&getmntent_mntbufp, MNT_WAIT);
+ return (FILE *)1; // dummy
+}
+
+void getmntent_addopt(char ** c, const char * s)
+{
+ int i = strlen(s);
+ *(*c)++ = ',';
+ strcpy(*c, s);
+ *c += i;
+}
+
+struct mntent *getmntent(FILE * filep)
+{
+ char *c = mntent_global_opts+2;
+ struct fstab *fst;
+ if (getmntent_mntpos >= getmntent_mntcount)
+ return 0;
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_RDONLY) strcpy(mntent_global_opts, "ro");
+ else strcpy(mntent_global_opts, "rw");
+
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_SYNCHRONOUS) getmntent_addopt(&c, "sync");
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOEXEC) getmntent_addopt(&c, "noexec");
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOSUID) getmntent_addopt(&c, "nosuid");
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NODEV) getmntent_addopt(&c, "nodev");
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_UNION) getmntent_addopt(&c, "union");
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_ASYNC) getmntent_addopt(&c, "async");
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOATIME) getmntent_addopt(&c, "noatime");
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOCLUSTERR) getmntent_addopt(&c, "noclusterr");
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOCLUSTERW) getmntent_addopt(&c, "noclusterw");
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOSYMFOLLOW) getmntent_addopt(&c, "nosymfollow");
+ if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_SUIDDIR) getmntent_addopt(&c, "suiddir");
+
+ mntent_global_mntent.mnt_fsname = getmntent_mntbufp[getmntent_mntpos].f_mntfromname;
+ mntent_global_mntent.mnt_dir = getmntent_mntbufp[getmntent_mntpos].f_mntonname;
+ mntent_global_mntent.mnt_type = getmntent_mntbufp[getmntent_mntpos].f_fstypename;
+ mntent_global_mntent.mnt_opts = mntent_global_opts;
+ if ((fst = getfsspec(getmntent_mntbufp[getmntent_mntpos].f_mntfromname)))
+ {
+ mntent_global_mntent.mnt_freq = fst->fs_freq;
+ mntent_global_mntent.mnt_passno = fst->fs_passno;
+ }
+ else if ((fst = getfsfile(getmntent_mntbufp[getmntent_mntpos].f_mntonname)))
+ {
+ mntent_global_mntent.mnt_freq = fst->fs_freq;
+ mntent_global_mntent.mnt_passno = fst->fs_passno;
+ }
+ else if (strcmp(getmntent_mntbufp[getmntent_mntpos].f_fstypename, "ufs") == 0)
+ {
+ if (strcmp(getmntent_mntbufp[getmntent_mntpos].f_mntonname, "/") == 0)
+ {
+ mntent_global_mntent.mnt_freq = 1;
+ mntent_global_mntent.mnt_passno = 1;
+ }
+ else
+ {
+ mntent_global_mntent.mnt_freq = 2;
+ mntent_global_mntent.mnt_passno = 2;
+ }
+ }
+ else
+ {
+ mntent_global_mntent.mnt_freq = 0;
+ mntent_global_mntent.mnt_passno = 0;
+ }
+ ++getmntent_mntpos;
+ return & mntent_global_mntent;
+}
+
+int endmntent(FILE * filep)
+{
+ return 0;
+}
diff --git a/editors/manedit/files/patch-Makefile.FreeBSD b/editors/manedit/files/patch-Makefile.FreeBSD
index 9488f8b0e9b7..cd6882f5b18a 100644
--- a/editors/manedit/files/patch-Makefile.FreeBSD
+++ b/editors/manedit/files/patch-Makefile.FreeBSD
@@ -8,7 +8,7 @@ $FreeBSD$
GTK_CONFIG ?= gtk-config
GTK_CFLAGS = `$(GTK_CONFIG) --cflags`
-CFLAGS += $(GTK_CFLAGS) -O2 -Wall \
-+CFLAGS += $(GTK_CFLAGS) -Wall \
++CFLAGS += -I. $(GTK_CFLAGS) \
-DPREFIX=\"$(PREFIX)\" \
-DLOCALBASE=\"$(LOCALBASE)\" -DX11BASE=\"$(X11BASE)\"
diff --git a/editors/manedit/files/patch-Makefile.install.UNIX b/editors/manedit/files/patch-Makefile.install.UNIX
index f7d04c6a3c4b..937d8c8a0c8e 100644
--- a/editors/manedit/files/patch-Makefile.install.UNIX
+++ b/editors/manedit/files/patch-Makefile.install.UNIX
@@ -1,10 +1,15 @@
$FreeBSD$
---- Makefile.install.UNIX.orig Sun Feb 25 01:10:47 2001
-+++ Makefile.install.UNIX Tue Mar 20 18:55:36 2001
-@@ -28,29 +28,27 @@
+--- Makefile.install.UNIX.orig Wed Apr 30 08:51:49 2003
++++ Makefile.install.UNIX Tue Aug 26 04:31:24 2003
+@@ -27,11 +27,11 @@
+ MKDIR = mkdir
+ MKDIRFLAGS = -p -m 0755
+-MAN = $(BIN).1.bz2
++MAN = $(BIN).1
+ ICON = $(BIN).xpm
BIN_DIR = $(PREFIX)/bin
-ICONS_DIR = $(PREFIX)/share/icons
@@ -12,32 +17,39 @@ $FreeBSD$
DATA_DIR = $(PREFIX)/share/$(BIN)
MAN_DIR = $(PREFIX)/man/man1
- install:
- $(MKDIR) $(MKDIRFLAGS) $(BIN_DIR)
-- $(INSTALL) $(INSTBINFLAGS) $(BIN) $(BIN_DIR)/$(BIN)
-- $(INSTALL) $(INSTBINFLAGS) utils/manview.sh $(BIN_DIR)/manview
-- $(INSTALL) $(INSTBINFLAGS) utils/manwrap.sh $(BIN_DIR)/manwrap
-+ $(BSD_INSTALL_PROGRAM) $(BIN) $(BIN_DIR)/$(BIN)
-+ $(BSD_INSTALL_SCRIPT) utils/manview.sh $(BIN_DIR)/manview
-+ $(BSD_INSTALL_SCRIPT) utils/manwrap.sh $(BIN_DIR)/manwrap
-
-- $(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)
- $(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)/help
-- $(COPY) $(COPYFLAGS) help/* $(DATA_DIR)/help
-+ $(BSD_INSTALL_MAN) help/* $(DATA_DIR)/help
-
-- $(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)
- $(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)/templates
-- $(COPY) $(COPYFLAGS) templates/* $(DATA_DIR)/templates
-+ $(BSD_INSTALL_DATA) templates/* $(DATA_DIR)/templates
-
- $(MKDIR) $(MKDIRFLAGS) $(MAN_DIR)
-- $(INSTALL) $(INSTMANFLAGS) $(BIN).1.out $(MAN_DIR)/$(BIN).1
-+ $(BSD_INSTALL_MAN) $(BIN).1.out $(MAN_DIR)/$(BIN).1
-
- $(MKDIR) $(MKDIRFLAGS) $(ICONS_DIR)
-- $(INSTALL) $(INSTDATFLAGS) $(BIN).xpm $(ICONS_DIR)
-+ $(BSD_INSTALL_DATA) $(BIN).xpm $(ICONS_DIR)
-
- @echo "-------------------------------------------------------------------------"
- @echo "Program $(BIN) installed in:"
+@@ -42,28 +42,28 @@
+ install_bin:
+ @echo "Installing $(BIN) -> $(BIN_DIR)"
+ @$(MKDIR) $(MKDIRFLAGS) $(BIN_DIR)
+- @$(INSTALL) $(INSTBINFLAGS) $(BIN) $(BIN_DIR)
++ @$(BSD_INSTALL_PROGRAM) $(BIN) $(BIN_DIR)
+ @echo "Installing manview -> $(BIN_DIR)"
+- @$(INSTALL) $(INSTSCRFLAGS) utils/manview.sh $(BIN_DIR)/manview
++ @$(BSD_INSTALL_SCRIPT) utils/manview.sh $(BIN_DIR)/manview
+ @echo "Installing manwrap -> $(BIN_DIR)"
+- @$(INSTALL) $(INSTSCRFLAGS) utils/manwrap.sh $(BIN_DIR)/manwrap
++ @$(BSD_INSTALL_SCRIPT) utils/manwrap.sh $(BIN_DIR)/manwrap
+
+ install_data:
+ @echo "Installing $(MAN) -> $(MAN_DIR)"
+ @$(MKDIR) $(MKDIRFLAGS) $(MAN_DIR)
+ @-$(RM) $(RMFLAGS) $(MAN_DIR)/$(BIN).1
+ @-$(RM) $(RMFLAGS) $(MAN_DIR)/$(BIN).1.gz
+- @$(INSTALL) $(INSTMANFLAGS) $(MAN) $(MAN_DIR)
++ @$(BSD_INSTALL_MAN) $(MAN).out $(MAN_DIR)/$(MAN)
+ @echo "Installing $(ICON) -> $(ICONS_DIR)"
+ @$(MKDIR) $(MKDIRFLAGS) $(ICONS_DIR)
+- @$(INSTALL) $(INSTDATFLAGS) $(ICON) $(ICONS_DIR)
++ @$(BSD_INSTALL_DATA) $(ICON) $(ICONS_DIR)
+ @echo "Installing help files to $(DATA_DIR)/help"
+ @$(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)
+ @$(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)/help
+- @$(COPY) $(COPYFLAGS) help/* $(DATA_DIR)/help
++ @$(BSD_INSTALL_DATA) help/* $(DATA_DIR)/help
+ @echo "Installing templates to $(DATA_DIR)/templates"
+ @$(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)/templates
+- @$(COPY) $(COPYFLAGS) templates/* $(DATA_DIR)/templates
++ @$(BSD_INSTALL_DATA) templates/* $(DATA_DIR)/templates
+
+ preinstall:
+ @echo "Installing \"$(BIN)\"..."
diff --git a/editors/manedit/files/patch-Makefile.srclist b/editors/manedit/files/patch-Makefile.srclist
new file mode 100644
index 000000000000..f35d4e097026
--- /dev/null
+++ b/editors/manedit/files/patch-Makefile.srclist
@@ -0,0 +1,17 @@
+--- Makefile.srclist.orig Wed Apr 30 08:51:49 2003
++++ Makefile.srclist Tue Aug 26 04:12:30 2003
+@@ -4,12 +4,12 @@
+ fb.h fprompt.h fsd.h guiutils.h manedit.h maneditcb.h \
+ maneditop.h messages.h mpfio.h pdialog.h pref.h \
+ prefcb.h preffio.h prefop.h pulist.h viewer.h \
+- viewercb.h viewerdnd.h viewerfio.h
++ viewercb.h viewerdnd.h viewerfio.h mntent.h
+ SRC_C = aboutdialog.c cdialog.c clipboard.c csd.c editor.c \
+ editorcb.c editordnd.c editorop.c editorfio.c \
+ editorfip.c editorfipcb.c editorfipop.c editorundo.c \
+ fb.c fprompt.c fsd.c guiutils.c main.c maneditcb.c \
+ maneditop.c mpfio.c pdialog.c pref.c prefcb.c preffio.c \
+ prefop.c pulist.c viewer.c viewercb.c viewerdnd.c \
+- viewerfio.c
++ viewerfio.c mntent_compat.c
+ SRC_CPP = disk.cpp fio.cpp prochandle.cpp strexp.cpp string.cpp