aboutsummaryrefslogtreecommitdiff
path: root/sysutils/bbsmount
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2003-11-06 09:49:26 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2003-11-06 09:49:26 +0000
commit91da2896ed38928e18e8c58d237923647b01bb94 (patch)
tree2c49063915e582859674e78d709ac65e5f451182 /sysutils/bbsmount
parentfb378bc3f96ac4a172bb3afcd11990fc14829710 (diff)
downloadports-91da2896ed38928e18e8c58d237923647b01bb94.tar.gz
ports-91da2896ed38928e18e8c58d237923647b01bb94.zip
Add bbsmount 0.3.0p1, graphical disk mounter for the Blackbox slit.
PR: 57902 Submitted by: Eric J. Christeson <echriste@702com.net>
Notes
Notes: svn path=/head/; revision=93227
Diffstat (limited to 'sysutils/bbsmount')
-rw-r--r--sysutils/bbsmount/Makefile43
-rw-r--r--sysutils/bbsmount/distinfo1
-rw-r--r--sysutils/bbsmount/files/patch-bbsmount.cc78
-rw-r--r--sysutils/bbsmount/files/patch-configure20
-rw-r--r--sysutils/bbsmount/files/patch-data-Makefile.am15
-rw-r--r--sysutils/bbsmount/pkg-descr7
-rw-r--r--sysutils/bbsmount/pkg-plist26
7 files changed, 190 insertions, 0 deletions
diff --git a/sysutils/bbsmount/Makefile b/sysutils/bbsmount/Makefile
new file mode 100644
index 000000000000..c6f3bc4495ea
--- /dev/null
+++ b/sysutils/bbsmount/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: bbsmount
+# Date created: 11 October 2003
+# Whom: Eric J. Christeson <echriste@702com.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= bbsmount
+PORTVERSION= 0.3.0p1
+CATEGORIES= sysutils
+MASTER_SITES= http://phoenix.inf.upol.cz/~jezberam/bbsmount/files/
+DISTNAME= ${PORTNAME}-${PORTVERSION:S/p/pre/}
+
+MAINTAINER= echriste@702com.net
+COMMENT= Graphical disk mounter for the Blackbox slit
+
+USE_X_PREFIX= yes
+WRKSRC= ${WRKDIR}/${DISTNAME}
+USE_GMAKE= yes
+USE_XLIB= yes
+USE_REINPLACE= yes
+GNU_CONFIGURE= yes
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
+ ${WRKSRC}/configure
+
+post-install:
+ @${ECHO_MSG} "===> Installing documentation"
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL} ${WRKSRC}/data/README.bbsmount ${DOCSDIR}
+
+.for a in README BUGS NEWS AUTHORS ChangeLog
+ @${INSTALL} ${WRKSRC}/${a} ${DOCSDIR}
+.endfor
+
+ if [ ! -e ${PREFIX}/share/bbtools/bbsmount.bb ]; then \
+ ${CP} -p ${WRKSRC}/data/bbsmount.bb \
+ ${PREFIX}/share/bbtools/bbsmount.bb; \
+ fi
+ @${INSTALL} ${WRKSRC}/data/bbsmount.bb ${PREFIX}/share/bbtools/bbsmount.bb-sample
+
+.include <bsd.port.mk>
diff --git a/sysutils/bbsmount/distinfo b/sysutils/bbsmount/distinfo
new file mode 100644
index 000000000000..c0f2d5df0b3a
--- /dev/null
+++ b/sysutils/bbsmount/distinfo
@@ -0,0 +1 @@
+MD5 (bbsmount-0.3.0pre1.tar.gz) = b5a6590c8be5d820c85e1cb17b942a43
diff --git a/sysutils/bbsmount/files/patch-bbsmount.cc b/sysutils/bbsmount/files/patch-bbsmount.cc
new file mode 100644
index 000000000000..fe4f4bd20dd5
--- /dev/null
+++ b/sysutils/bbsmount/files/patch-bbsmount.cc
@@ -0,0 +1,78 @@
+--- bbsmount.cc.orig Thu May 8 16:10:07 2003
++++ bbsmount.cc Sat Oct 11 08:02:39 2003
+@@ -41,6 +41,9 @@
+ #endif /* !TIME_WITH_SYS_TIME */
+
+ #include <pthread.h>
++#include <sys/param.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
+
+ #include "bbsmount.hh"
+ #include "version.h"
+@@ -128,25 +131,18 @@
+ {
+ set<int> result;
+ map<string, int>::const_iterator pointer;
+- char buffer[max_mtab_line_length], md[max_mount_device_point_size], mp[max_mount_device_point_size];
+- FILE *mtab;
+-
+- mtab = fopen(MTAB_FILE, "rt");
+- if (!mtab) {
+- fprintf(stderr, "Can't open mtab file!");
++ struct statfs *mbuf;
++ int i, size;
++ if((size = getmntinfo(&mbuf, MNT_NOWAIT)) == 0) {
++ fprintf(stderr, "getmntinfo() failed");
+ return result;
++ }
++
++ for(i = 0; i < size; i++) {
++ pointer = mount_points.find(string(mbuf[i].f_mntonname));
++ if (pointer != mount_points.end())
++ result.insert(pointer->second);
+ }
+-
+- while (!feof(mtab)) {
+- if (fgets(buffer, max_mtab_line_length, mtab) > 0) {
+- sscanf(buffer, "%s %s", md, mp);
+- pointer = mount_points.find(string(mp));
+- if (pointer != mount_points.end())
+- result.insert(pointer->second);
+- }
+- }
+-
+- fclose(mtab);
+ return result;
+ }
+
+@@ -179,26 +175,18 @@
+ void *
+ check_mounts(void *param)
+ {
+- struct stat info;
+- int mtab_size = 0, return_value, counter;
+- time_t mtab_time = time(NULL);
++ int return_value, counter;
+ map<string, int> mount_points;
+
+ for (counter = 0; counter < (int)AppWindow->GetMountPointsCount(); counter++)
+ mount_points[AppWindow->GetMountPoint(counter).GetMountPoint()] = counter;
+ while (!finish_checking) {
+- stat(MTAB_FILE, &info);
+- if ((difftime(info.st_mtime, mtab_time) > 0) || (mtab_size != info.st_size)) {
+- mtab_size = info.st_size;
+- mtab_time = info.st_mtime;
+- update_mount_points(mount_points);
+- create_notify_event();
+- }
++ update_mount_points(mount_points);
++ create_notify_event();
+ return_value = sleep(AppWindow->GetResources()->app.refresh_time);
+ if (return_value != 0)
+ finish_checking = true;
+ }
+-
+ pthread_exit(NULL);
+ return NULL;
+ }
diff --git a/sysutils/bbsmount/files/patch-configure b/sysutils/bbsmount/files/patch-configure
new file mode 100644
index 000000000000..3708d21e21f2
--- /dev/null
+++ b/sysutils/bbsmount/files/patch-configure
@@ -0,0 +1,20 @@
+--- configure.orig Mon May 12 04:02:56 2003
++++ configure Sat Oct 11 08:01:12 2003
+@@ -5308,7 +5308,7 @@
+ #include <$ac_header>
+ _ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ (eval $ac_cpp $CFLAGS conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+@@ -5454,7 +5454,7 @@
+ #include <$ac_header>
+ _ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ (eval $ac_cpp $CFLAGS conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
diff --git a/sysutils/bbsmount/files/patch-data-Makefile.am b/sysutils/bbsmount/files/patch-data-Makefile.am
new file mode 100644
index 000000000000..32c73843b38b
--- /dev/null
+++ b/sysutils/bbsmount/files/patch-data-Makefile.am
@@ -0,0 +1,15 @@
+--- data/Makefile.am.orig Mon May 12 04:06:36 2003
++++ data/Makefile.am Sat Oct 11 11:30:00 2003
+@@ -1,10 +1,8 @@
+ configdir = $(datadir)/bbtools
+ exampledir = $(pkgdatadir)/examples
+
+-config_DATA = bbsmount.bb \
+- bbsmount.style \
+- bbsmount.nobb \
+- README.bbsmount
++config_DATA = bbsmount.style \
++ bbsmount.nobb
+
+ example_DATA = bbsmount.bb.ex
+
diff --git a/sysutils/bbsmount/pkg-descr b/sysutils/bbsmount/pkg-descr
new file mode 100644
index 000000000000..7da4042fd29d
--- /dev/null
+++ b/sysutils/bbsmount/pkg-descr
@@ -0,0 +1,7 @@
+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.
+
+WWW: http://phoenix.inf.upol.cz/~jezberam/bbsmount
+
+- Eric J. Christeson <echriste@702com.net>
diff --git a/sysutils/bbsmount/pkg-plist b/sysutils/bbsmount/pkg-plist
new file mode 100644
index 000000000000..5adaefa5ac57
--- /dev/null
+++ b/sysutils/bbsmount/pkg-plist
@@ -0,0 +1,26 @@
+bin/tkmsg
+bin/bbsmount
+share/bbtools/bbsmount.bb-sample
+share/bbtools/bbsmount.nobb
+share/bbtools/bbsmount.style
+share/bbsmount/examples/bbsmount.bb.ex
+share/bbsmount/images/notfound.xpm
+share/bbsmount/images/mountedcd.xpm
+share/bbsmount/images/mounteddisk.xpm
+share/bbsmount/images/mounted.xpm
+share/bbsmount/images/mountedzip.xpm
+share/bbsmount/images/unmountedcd.xpm
+share/bbsmount/images/unmounteddisk.xpm
+share/bbsmount/images/unmounted.xpm
+share/bbsmount/images/unmountedzip.xpm
+%%PORTDOCS%%%%DOCSDIR%%/BUGS
+%%PORTDOCS%%%%DOCSDIR%%/NEWS
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.bbsmount
+%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@unexec rmdir %D/share/bbtools 2>/dev/null || true
+@unexec rmdir %D/share/bbsmount/examples 2>/dev/null || true
+@unexec rmdir %D/share/bbsmount/images 2>/dev/null || true
+@unexec rmdir %D/share/bbsmount 2>/dev/null || true