ports/57902: New port: bbsmount - graphical disk mounter for X11

Eric J. Christeson echriste at 702com.net
Sun Oct 12 14:20:19 UTC 2003


>Number:         57902
>Category:       ports
>Synopsis:       New port: bbsmount - graphical disk mounter for X11
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 12 07:20:17 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Eric J. Christeson <echriste at 702com.net>
>Release:        FreeBSD 4.8-RELEASE-p13 i386
>Organization:
>Environment:
System: FreeBSD robin.christeson.net 4.8-RELEASE-p13 FreeBSD 4.8-RELEASE-p13 #3: Sat Oct 11 12:40:37 CDT 2003 root at robin.christeson.net:/usr/src-all/stable/src/sys/compile/ROBIN i386


	
>Description:
	New port: bbsmount
	bbsmount is a disk mounter for Blackbox, designed to be a part of
	the Blackbox Slit, although it will still function as a
	stand-alone tool.

	This is my first attempt at producing a port.  Comments welcome.
	
>How-To-Repeat:
	
>Fix:

	

--- bbsmount.sh begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	sysutils/bbsmount
#	sysutils/bbsmount/Makefile
#	sysutils/bbsmount/pkg-descr
#	sysutils/bbsmount/files
#	sysutils/bbsmount/files/patch-data-Makefile.am
#	sysutils/bbsmount/files/patch-configure
#	sysutils/bbsmount/files/patch-bbsmount.cc
#	sysutils/bbsmount/distinfo
#	sysutils/bbsmount/pkg-plist
#
echo c - sysutils/bbsmount
mkdir -p sysutils/bbsmount > /dev/null 2>&1
echo x - sysutils/bbsmount/Makefile
sed 's/^X//' >sysutils/bbsmount/Makefile << 'END-of-sysutils/bbsmount/Makefile'
X# New ports collection makefile for:	bbsmount
X# Date created:				11 October 2003
X# Whom:				Eric J. Christeson <echriste at 702com.net>
X#
X# $FreeBSD: ports/sysutils/bbapm/Makefile,v 1.13 2003/06/03 21:24:17 adamw Exp $
X#
X
XPORTNAME=	bbsmount
XPORTVERSION=	0.3.0p1
XCATEGORIES=	sysutils
XMASTER_SITES=	http://phoenix.inf.upol.cz/~jezberam/bbsmount/files/
XDISTNAME=	${PORTNAME}-${PORTVERSION:S/p/pre/}
X
XMAINTAINER=	echriste at 702com.net
XCOMMENT=	Graphical disk mounter for the Blackbox slit
X
XUSE_X_PREFIX=	yes
XWRKSRC=		${WRKDIR}/${DISTNAME}
XUSE_GMAKE=	yes
XUSE_XLIB=	yes
XUSE_REINPLACE=	yes
X#USE_GNOME=	gtk12
XGNU_CONFIGURE=	yes
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
X	${WRKSRC}/configure
X
Xpost-install:
X	@${ECHO_MSG} "===> Installing documentation"
X	@${MKDIR} ${PREFIX}/share/doc/bbsmount
X	@${INSTALL} ${WRKSRC}/data/README.bbsmount ${PREFIX}/share/doc/bbsmount
X
X.for a in README BUGS NEWS AUTHORS ChangeLog
X	@${INSTALL} ${WRKSRC}/${a} ${PREFIX}/share/doc/bbsmount
X.endfor
X
X	if [ ! -e ${PREFIX}/share/bbtools/bbsmount.bb ]; then \
X		${CP} -p ${WRKSRC}/data/bbsmount.bb \
X		${PREFIX}/share/bbtools/bbsmount.bb; \
X	fi
X	@${INSTALL} ${WRKSRC}/data/bbsmount.bb ${PREFIX}/share/bbtools/bbsmount.bb-sample
X
X.include <bsd.port.mk>
END-of-sysutils/bbsmount/Makefile
echo x - sysutils/bbsmount/pkg-descr
sed 's/^X//' >sysutils/bbsmount/pkg-descr << 'END-of-sysutils/bbsmount/pkg-descr'
Xbbsmount is a disk mounter for Blackbox, designed to be a part of the
XBlackbox Slit, although it will still function as a stand-alone
Xtool.
X
XWWW: http://phoenix.inf.upol.cz/~jezberam/bbsmount
X
X- Eric J. Christeson <echriste at 702com.net>
END-of-sysutils/bbsmount/pkg-descr
echo c - sysutils/bbsmount/files
mkdir -p sysutils/bbsmount/files > /dev/null 2>&1
echo x - sysutils/bbsmount/files/patch-data-Makefile.am
sed 's/^X//' >sysutils/bbsmount/files/patch-data-Makefile.am << 'END-of-sysutils/bbsmount/files/patch-data-Makefile.am'
X--- data/Makefile.am.orig	Mon May 12 04:06:36 2003
X+++ data/Makefile.am	Sat Oct 11 11:30:00 2003
X@@ -1,10 +1,8 @@
X configdir = $(datadir)/bbtools
X exampledir = $(pkgdatadir)/examples
X 
X-config_DATA =	bbsmount.bb \
X-		bbsmount.style \
X-		bbsmount.nobb \
X-		README.bbsmount
X+config_DATA =	bbsmount.style \
X+		bbsmount.nobb
X 
X example_DATA = bbsmount.bb.ex
X 
END-of-sysutils/bbsmount/files/patch-data-Makefile.am
echo x - sysutils/bbsmount/files/patch-configure
sed 's/^X//' >sysutils/bbsmount/files/patch-configure << 'END-of-sysutils/bbsmount/files/patch-configure'
X--- configure.orig	Mon May 12 04:02:56 2003
X+++ configure	Sat Oct 11 08:01:12 2003
X@@ -5308,7 +5308,7 @@
X #include <$ac_header>
X _ACEOF
X if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
X-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
X+  (eval $ac_cpp $CFLAGS conftest.$ac_ext) 2>conftest.er1
X   ac_status=$?
X   grep -v '^ *+' conftest.er1 >conftest.err
X   rm -f conftest.er1
X@@ -5454,7 +5454,7 @@
X #include <$ac_header>
X _ACEOF
X if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
X-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
X+  (eval $ac_cpp $CFLAGS conftest.$ac_ext) 2>conftest.er1
X   ac_status=$?
X   grep -v '^ *+' conftest.er1 >conftest.err
X   rm -f conftest.er1
END-of-sysutils/bbsmount/files/patch-configure
echo x - sysutils/bbsmount/files/patch-bbsmount.cc
sed 's/^X//' >sysutils/bbsmount/files/patch-bbsmount.cc << 'END-of-sysutils/bbsmount/files/patch-bbsmount.cc'
X--- bbsmount.cc.orig	Thu May  8 16:10:07 2003
X+++ bbsmount.cc	Sat Oct 11 08:02:39 2003
X@@ -41,6 +41,9 @@
X #endif /* !TIME_WITH_SYS_TIME */
X 
X #include <pthread.h>
X+#include <sys/param.h>
X+#include <sys/ucred.h>
X+#include <sys/mount.h>
X 
X #include "bbsmount.hh"
X #include "version.h"
X@@ -128,25 +131,18 @@
X {
X     set<int> result;
X     map<string, int>::const_iterator pointer;
X-    char buffer[max_mtab_line_length], md[max_mount_device_point_size], mp[max_mount_device_point_size];
X-    FILE *mtab;
X-
X-    mtab = fopen(MTAB_FILE, "rt");
X-    if (!mtab) {
X-	fprintf(stderr, "Can't open mtab file!");
X+    struct statfs *mbuf;
X+    int i, size;
X+    if((size = getmntinfo(&mbuf, MNT_NOWAIT)) == 0) {
X+	fprintf(stderr, "getmntinfo() failed");
X 	return result;
X+    } 
X+
X+    for(i = 0; i < size; i++) {
X+	pointer = mount_points.find(string(mbuf[i].f_mntonname));
X+	if (pointer != mount_points.end())
X+	  result.insert(pointer->second);
X     }
X-    
X-    while (!feof(mtab)) {
X-	if (fgets(buffer, max_mtab_line_length, mtab) > 0) {
X-	    sscanf(buffer, "%s %s", md, mp);
X-	    pointer = mount_points.find(string(mp));
X-	    if (pointer != mount_points.end())
X-		result.insert(pointer->second);
X-	}
X-    }
X-    
X-    fclose(mtab);
X     return result;
X }
X 
X@@ -179,26 +175,18 @@
X void *
X check_mounts(void *param)
X {
X-    struct stat info;
X-    int mtab_size = 0, return_value, counter;
X-    time_t mtab_time = time(NULL);
X+    int return_value, counter;
X     map<string, int> mount_points;
X 
X     for (counter = 0; counter < (int)AppWindow->GetMountPointsCount(); counter++)
X 	mount_points[AppWindow->GetMountPoint(counter).GetMountPoint()] = counter;
X     while (!finish_checking) {
X-	stat(MTAB_FILE, &info);
X-	if ((difftime(info.st_mtime, mtab_time) > 0) || (mtab_size != info.st_size)) {
X-	    mtab_size = info.st_size;
X-	    mtab_time = info.st_mtime;
X-	    update_mount_points(mount_points);
X-	    create_notify_event();
X-	}
X+	update_mount_points(mount_points);
X+	create_notify_event();
X 	return_value = sleep(AppWindow->GetResources()->app.refresh_time);
X 	if (return_value != 0)
X 	    finish_checking = true;
X     }
X-
X     pthread_exit(NULL);
X     return NULL;
X }
END-of-sysutils/bbsmount/files/patch-bbsmount.cc
echo x - sysutils/bbsmount/distinfo
sed 's/^X//' >sysutils/bbsmount/distinfo << 'END-of-sysutils/bbsmount/distinfo'
XMD5 (bbsmount-0.3.0pre1.tar.gz) = b5a6590c8be5d820c85e1cb17b942a43
END-of-sysutils/bbsmount/distinfo
echo x - sysutils/bbsmount/pkg-plist
sed 's/^X//' >sysutils/bbsmount/pkg-plist << 'END-of-sysutils/bbsmount/pkg-plist'
Xbin/tkmsg
Xbin/bbsmount
Xshare/bbtools/bbsmount.bb-sample
Xshare/bbtools/bbsmount.nobb
Xshare/bbtools/bbsmount.style
Xshare/bbsmount/examples/bbsmount.bb.ex
Xshare/bbsmount/images/notfound.xpm
Xshare/bbsmount/images/mountedcd.xpm
Xshare/bbsmount/images/mounteddisk.xpm
Xshare/bbsmount/images/mounted.xpm
Xshare/bbsmount/images/mountedzip.xpm
Xshare/bbsmount/images/unmountedcd.xpm
Xshare/bbsmount/images/unmounteddisk.xpm
Xshare/bbsmount/images/unmounted.xpm
Xshare/bbsmount/images/unmountedzip.xpm
X%%PORTDOCS%%share/doc/bbsmount/BUGS
X%%PORTDOCS%%share/doc/bbsmount/NEWS
X%%PORTDOCS%%share/doc/bbsmount/README
X%%PORTDOCS%%share/doc/bbsmount/README.bbsmount
X%%PORTDOCS%%share/doc/bbsmount/AUTHORS
X%%PORTDOCS%%share/doc/bbsmount/ChangeLog
X%%PORTDOCS%%@dirrm share/doc/bbsmount
X at unexec rmdir %D/share/bbtools 2>/dev/null || true
X at unexec rmdir %D/share/bbsmount/examples 2>/dev/null || true
X at unexec rmdir %D/share/bbsmount/images 2>/dev/null || true
X at unexec rmdir %D/share/bbsmount 2>/dev/null || true
END-of-sysutils/bbsmount/pkg-plist
exit
--- bbsmount.sh ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list