View | Details | Raw Unified | Return to bug 56001
Collapse All | Expand All

(-)editors/manedit/Makefile (-4 / +3 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	manedit
8
PORTNAME=	manedit
9
PORTVERSION=	0.5.6
9
PORTVERSION=	0.5.10
10
CATEGORIES=	editors
10
CATEGORIES=	editors
11
MASTER_SITES=	ftp://wolfpack.twu.net/users/wolfpack/
11
MASTER_SITES=	ftp://wolfpack.twu.net/users/wolfpack/
12
12
Lines 22-29 Link Here
22
22
23
MAN1=		manedit.1
23
MAN1=		manedit.1
24
24
25
pre-patch:
25
pre-configure:
26
	@find ${WRKSRC} -name "*.[ch]" | \
26
	${CP} ${FILESDIR}/mntent* ${WRKSRC}
27
		xargs ${PERL} -pi -e 's|malloc\.h|stdlib.h|g'
28
27
29
.include <bsd.port.mk>
28
.include <bsd.port.mk>
(-)editors/manedit/distinfo (-1 / +1 lines)
Line 1 Link Here
1
MD5 (manedit-0.5.6.tar.bz2) = 8039d8167c0338f8b8666ae9a516e0a0
1
MD5 (manedit-0.5.10.tar.bz2) = a0d9ff519221fee53e3c7c8b10ddc7af
(-)editors/manedit/files/mntent.h (+35 lines)
Line 0 Link Here
1
#ifdef HAVE_MNTENT_H
2
#include <mntent.h>
3
#else
4
5
#ifndef mntent_h_
6
#define mntent_h_
7
8
#include <stdio.h>
9
#include <stdlib.h>
10
#include <string.h>
11
#include <sys/param.h>
12
#include <sys/ucred.h>
13
#include <sys/mount.h>
14
15
#define MOUNTED "mounted"
16
#define MNTTYPE_NFS "nfs"
17
18
//#define MOPTSLEN (256 - (MNAMELEN * 2 + MFSNAMELEN + 2 * sizeof(int)))
19
20
struct mntent {
21
	char *mnt_fsname;   /* file system name */
22
	char *mnt_dir; /* file system path prefix */
23
	char *mnt_type;	   /* dbg, efs,	nfs */
24
	char *mnt_opts;	   /* ro, hide,	etc. */
25
	int  mnt_freq; /* dump frequency, in days */
26
	int  mnt_passno;	   /* pass number on parallel fsck */
27
};
28
29
FILE * setmntent(char * filep, char * type);
30
struct mntent *getmntent(FILE * filep);
31
//char * hasmntopt(struct mntent * mnt, char * opt);
32
int endmntent(FILE * filep);
33
34
#endif /* mntent_h_ */
35
#endif /* not HAVE_MNTENT_H */
(-)editors/manedit/files/mntent_compat.c (+88 lines)
Line 0 Link Here
1
#include "mntent.h"
2
#include <sys/param.h>
3
//#include <sys/ucred.h>
4
#include <sys/mount.h>
5
#include <fstab.h>
6
7
struct statfs *getmntent_mntbufp;
8
int getmntent_mntcount = 0;
9
int getmntent_mntpos = 0;
10
char mntent_global_opts[256];
11
struct mntent mntent_global_mntent;
12
13
FILE * setmntent(char * filep, char * type)
14
{
15
	getmntent_mntpos = 0;
16
	getmntent_mntcount = getmntinfo(&getmntent_mntbufp, MNT_WAIT);
17
	return (FILE *)1; // dummy
18
}
19
20
void getmntent_addopt(char ** c, const char * s)
21
{
22
	int i = strlen(s);
23
        *(*c)++ = ',';
24
        strcpy(*c, s);
25
        *c += i;
26
}
27
28
struct mntent *getmntent(FILE * filep)
29
{
30
	char *c = mntent_global_opts+2; 
31
	struct fstab *fst;
32
	if (getmntent_mntpos >= getmntent_mntcount)
33
		return 0;
34
	if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_RDONLY) strcpy(mntent_global_opts, "ro");
35
		else strcpy(mntent_global_opts, "rw");
36
37
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_SYNCHRONOUS)    getmntent_addopt(&c, "sync");
38
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOEXEC)         getmntent_addopt(&c, "noexec");
39
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOSUID)         getmntent_addopt(&c, "nosuid");
40
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NODEV)          getmntent_addopt(&c, "nodev");
41
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_UNION)          getmntent_addopt(&c, "union");
42
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_ASYNC)          getmntent_addopt(&c, "async");
43
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOATIME)        getmntent_addopt(&c, "noatime");
44
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOCLUSTERR)     getmntent_addopt(&c, "noclusterr");
45
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOCLUSTERW)     getmntent_addopt(&c, "noclusterw");
46
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_NOSYMFOLLOW)    getmntent_addopt(&c, "nosymfollow");
47
        if (getmntent_mntbufp[getmntent_mntpos].f_flags & MNT_SUIDDIR)        getmntent_addopt(&c, "suiddir");
48
		
49
	mntent_global_mntent.mnt_fsname = getmntent_mntbufp[getmntent_mntpos].f_mntfromname;
50
	mntent_global_mntent.mnt_dir = getmntent_mntbufp[getmntent_mntpos].f_mntonname;
51
	mntent_global_mntent.mnt_type = getmntent_mntbufp[getmntent_mntpos].f_fstypename;
52
        mntent_global_mntent.mnt_opts = mntent_global_opts;
53
	if ((fst = getfsspec(getmntent_mntbufp[getmntent_mntpos].f_mntfromname)))
54
        {
55
        	mntent_global_mntent.mnt_freq = fst->fs_freq;
56
        	mntent_global_mntent.mnt_passno = fst->fs_passno;
57
        }
58
        else if ((fst = getfsfile(getmntent_mntbufp[getmntent_mntpos].f_mntonname)))
59
        {
60
        	mntent_global_mntent.mnt_freq = fst->fs_freq;
61
        	mntent_global_mntent.mnt_passno = fst->fs_passno;
62
        }
63
        else if (strcmp(getmntent_mntbufp[getmntent_mntpos].f_fstypename, "ufs") == 0) 
64
        {
65
                if (strcmp(getmntent_mntbufp[getmntent_mntpos].f_mntonname, "/") == 0)
66
                {
67
	        	mntent_global_mntent.mnt_freq = 1;
68
        		mntent_global_mntent.mnt_passno = 1;
69
                }
70
                else
71
                {
72
	        	mntent_global_mntent.mnt_freq = 2;
73
        		mntent_global_mntent.mnt_passno = 2;
74
                }
75
        } 
76
        else
77
        {
78
        	mntent_global_mntent.mnt_freq = 0;
79
        	mntent_global_mntent.mnt_passno = 0;
80
        }
81
        ++getmntent_mntpos;
82
	return & mntent_global_mntent;
83
}
84
85
int endmntent(FILE * filep)
86
{
87
	return 0;
88
}
(-)editors/manedit/files/patch-Makefile.FreeBSD (-1 / +1 lines)
Lines 8-14 Link Here
8
 GTK_CONFIG ?= gtk-config
8
 GTK_CONFIG ?= gtk-config
9
 GTK_CFLAGS = `$(GTK_CONFIG) --cflags`
9
 GTK_CFLAGS = `$(GTK_CONFIG) --cflags`
10
-CFLAGS += $(GTK_CFLAGS) -O2 -Wall \
10
-CFLAGS += $(GTK_CFLAGS) -O2 -Wall \
11
+CFLAGS += $(GTK_CFLAGS) -Wall \
11
+CFLAGS += -I. $(GTK_CFLAGS) \
12
           -DPREFIX=\"$(PREFIX)\" \
12
           -DPREFIX=\"$(PREFIX)\" \
13
           -DLOCALBASE=\"$(LOCALBASE)\" -DX11BASE=\"$(X11BASE)\"
13
           -DLOCALBASE=\"$(LOCALBASE)\" -DX11BASE=\"$(X11BASE)\"
14
 
14
 
(-)editors/manedit/files/patch-Makefile.install.UNIX (-32 / +44 lines)
Lines 1-10 Link Here
1
1
2
$FreeBSD: ports/editors/manedit/files/patch-Makefile.install.UNIX,v 1.2 2001/03/20 17:04:45 sobomax Exp $
2
$FreeBSD: ports/editors/manedit/files/patch-Makefile.install.UNIX,v 1.2 2001/03/20 17:04:45 sobomax Exp $
3
3
4
--- Makefile.install.UNIX.orig	Sun Feb 25 01:10:47 2001
4
--- Makefile.install.UNIX.orig	Wed Apr 30 08:51:49 2003
5
+++ Makefile.install.UNIX	Tue Mar 20 18:55:36 2001
5
+++ Makefile.install.UNIX	Tue Aug 26 04:31:24 2003
6
@@ -28,29 +28,27 @@
6
@@ -27,11 +27,11 @@
7
 
7
 MKDIR      = mkdir
8
 MKDIRFLAGS = -p -m 0755
9
 
10
-MAN        = $(BIN).1.bz2
11
+MAN        = $(BIN).1
12
 ICON       = $(BIN).xpm
8
 
13
 
9
 BIN_DIR   = $(PREFIX)/bin
14
 BIN_DIR   = $(PREFIX)/bin
10
-ICONS_DIR = $(PREFIX)/share/icons
15
-ICONS_DIR = $(PREFIX)/share/icons
Lines 12-43 Link Here
12
 DATA_DIR  = $(PREFIX)/share/$(BIN)
17
 DATA_DIR  = $(PREFIX)/share/$(BIN)
13
 MAN_DIR   = $(PREFIX)/man/man1
18
 MAN_DIR   = $(PREFIX)/man/man1
14
 
19
 
15
 install:
20
@@ -42,28 +42,28 @@
16
 	$(MKDIR) $(MKDIRFLAGS) $(BIN_DIR)
21
 install_bin:
17
-	$(INSTALL) $(INSTBINFLAGS) $(BIN) $(BIN_DIR)/$(BIN)
22
 	@echo "Installing $(BIN) -> $(BIN_DIR)"
18
-	$(INSTALL) $(INSTBINFLAGS) utils/manview.sh $(BIN_DIR)/manview
23
 	@$(MKDIR) $(MKDIRFLAGS) $(BIN_DIR)
19
-	$(INSTALL) $(INSTBINFLAGS) utils/manwrap.sh $(BIN_DIR)/manwrap
24
-	@$(INSTALL) $(INSTBINFLAGS) $(BIN) $(BIN_DIR)
20
+	$(BSD_INSTALL_PROGRAM) $(BIN) $(BIN_DIR)/$(BIN)
25
+	@$(BSD_INSTALL_PROGRAM) $(BIN) $(BIN_DIR)
21
+	$(BSD_INSTALL_SCRIPT) utils/manview.sh $(BIN_DIR)/manview
26
 	@echo "Installing manview -> $(BIN_DIR)"
22
+	$(BSD_INSTALL_SCRIPT) utils/manwrap.sh $(BIN_DIR)/manwrap
27
-	@$(INSTALL) $(INSTSCRFLAGS) utils/manview.sh $(BIN_DIR)/manview
23
 
28
+	@$(BSD_INSTALL_SCRIPT) utils/manview.sh $(BIN_DIR)/manview
24
-	$(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)
29
 	@echo "Installing manwrap -> $(BIN_DIR)"
25
 	$(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)/help
30
-	@$(INSTALL) $(INSTSCRFLAGS) utils/manwrap.sh $(BIN_DIR)/manwrap
26
-	$(COPY) $(COPYFLAGS) help/* $(DATA_DIR)/help
31
+	@$(BSD_INSTALL_SCRIPT) utils/manwrap.sh $(BIN_DIR)/manwrap
27
+	$(BSD_INSTALL_MAN) help/* $(DATA_DIR)/help
32
 
28
 
33
 install_data:
29
-	$(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)
34
 	@echo "Installing $(MAN) -> $(MAN_DIR)"
30
 	$(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)/templates
35
 	@$(MKDIR) $(MKDIRFLAGS) $(MAN_DIR)
31
-	$(COPY) $(COPYFLAGS) templates/* $(DATA_DIR)/templates
36
 	@-$(RM) $(RMFLAGS) $(MAN_DIR)/$(BIN).1
32
+	$(BSD_INSTALL_DATA) templates/* $(DATA_DIR)/templates
37
 	@-$(RM) $(RMFLAGS) $(MAN_DIR)/$(BIN).1.gz
33
 
38
-	@$(INSTALL) $(INSTMANFLAGS) $(MAN) $(MAN_DIR)
34
 	$(MKDIR) $(MKDIRFLAGS) $(MAN_DIR)
39
+	@$(BSD_INSTALL_MAN) $(MAN).out $(MAN_DIR)/$(MAN)
35
-	$(INSTALL) $(INSTMANFLAGS) $(BIN).1.out $(MAN_DIR)/$(BIN).1
40
 	@echo "Installing $(ICON) -> $(ICONS_DIR)"
36
+	$(BSD_INSTALL_MAN) $(BIN).1.out $(MAN_DIR)/$(BIN).1
41
 	@$(MKDIR) $(MKDIRFLAGS) $(ICONS_DIR)
37
 
42
-	@$(INSTALL) $(INSTDATFLAGS) $(ICON) $(ICONS_DIR)
38
 	$(MKDIR) $(MKDIRFLAGS) $(ICONS_DIR)
43
+	@$(BSD_INSTALL_DATA) $(ICON) $(ICONS_DIR)
39
-	$(INSTALL) $(INSTDATFLAGS) $(BIN).xpm $(ICONS_DIR)
44
 	@echo "Installing help files to $(DATA_DIR)/help"
40
+	$(BSD_INSTALL_DATA) $(BIN).xpm $(ICONS_DIR)
45
 	@$(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)
46
 	@$(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)/help
47
-	@$(COPY) $(COPYFLAGS) help/* $(DATA_DIR)/help
48
+	@$(BSD_INSTALL_DATA) help/* $(DATA_DIR)/help
49
 	@echo "Installing templates to $(DATA_DIR)/templates"
50
 	@$(MKDIR) $(MKDIRFLAGS) $(DATA_DIR)/templates
51
-	@$(COPY) $(COPYFLAGS) templates/* $(DATA_DIR)/templates
52
+	@$(BSD_INSTALL_DATA) templates/* $(DATA_DIR)/templates
41
 
53
 
42
 	@echo "-------------------------------------------------------------------------"
54
 preinstall:
43
 	@echo "Program $(BIN) installed in:"
55
 	@echo "Installing \"$(BIN)\"..."
(-)editors/manedit/files/patch-Makefile.srclist (+17 lines)
Line 0 Link Here
1
--- Makefile.srclist.orig	Wed Apr 30 08:51:49 2003
2
+++ Makefile.srclist	Tue Aug 26 04:12:30 2003
3
@@ -4,12 +4,12 @@
4
         fb.h fprompt.h fsd.h guiutils.h manedit.h maneditcb.h	\
5
         maneditop.h messages.h mpfio.h pdialog.h pref.h		\
6
         prefcb.h preffio.h prefop.h pulist.h viewer.h		\
7
-        viewercb.h viewerdnd.h viewerfio.h
8
+        viewercb.h viewerdnd.h viewerfio.h mntent.h
9
 SRC_C = aboutdialog.c cdialog.c clipboard.c csd.c editor.c	\
10
         editorcb.c editordnd.c editorop.c editorfio.c		\
11
         editorfip.c editorfipcb.c editorfipop.c editorundo.c	\
12
         fb.c fprompt.c fsd.c guiutils.c main.c maneditcb.c	\
13
         maneditop.c mpfio.c pdialog.c pref.c prefcb.c preffio.c	\
14
         prefop.c pulist.c viewer.c viewercb.c viewerdnd.c	\
15
-        viewerfio.c
16
+        viewerfio.c mntent_compat.c
17
 SRC_CPP = disk.cpp fio.cpp prochandle.cpp strexp.cpp string.cpp

Return to bug 56001