[Midnightbsd-cvs] mports: mports/ports-mgmt: PIB is the ports index browser.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Oct 16 17:25:49 EDT 2007


Log Message:
-----------
PIB is the ports index browser.  It was developed for FreeBSD's ports collection, but it will work with our current environment.

This allows you to use a nice gui app to view dependancies and do searches on ports meta data.  Very handy.

I've modified the default paths to source our mports INDEX-6  file.

Modified Files:
--------------
    mports/ports-mgmt:
        Makefile (r1.3 -> r1.4)

Added Files:
-----------
    mports/ports-mgmt/pib:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-plist (r1.1)
    mports/ports-mgmt/pib/files:
        patch-Makefile (r1.1)
        patch-pib (r1.1)
        patch-tkPort.h (r1.1)

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/ports-mgmt/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lports-mgmt/Makefile -Lports-mgmt/Makefile -u -r1.3 -r1.4
--- ports-mgmt/Makefile
+++ ports-mgmt/Makefile
@@ -3,6 +3,7 @@
 
    COMMENT = Ports for managing, installing and developing MidnightBSD ports and packages
 
+   SUBDIR += pib
    SUBDIR += portlint
    SUBDIR += portsearch
    SUBDIR += portupgrade
--- /dev/null
+++ ports-mgmt/pib/pkg-descr
@@ -0,0 +1,5 @@
+The Ports Index Browser provides a quick and powerful means for browsing the
+Ports Collection INDEX file and performing related functions.
+
+It provides an intuitive GUI interface, online help and useful distfile
+management functions.
--- /dev/null
+++ ports-mgmt/pib/pkg-plist
@@ -0,0 +1,5 @@
+bin/pib
+lib/pib/pib.tcl
+lib/pib/tkSteal.tcl
+lib/pib/libTkSteal.so.2
+ at dirrm lib/pib
--- /dev/null
+++ ports-mgmt/pib/Makefile
@@ -0,0 +1,28 @@
+# New ports collection makefile for:    pib
+# Date created:         16 Oct 2007
+# Whom:                 Lucas Holt <luke at MidnightBSD.org>
+#
+# $MidnightBSD: mports/ports-mgmt/pib/Makefile,v 1.1 2007/10/16 21:25:47 laffer1 Exp $
+#
+
+PORTNAME=	pib
+PORTVERSION=	1.2
+CATEGORIES=	ports-mgmt
+MASTER_SITES=	${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR=	msmith
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	GUI Ports Collection management tool
+
+USE_TK=		yes
+USE_TK_BUILD=	yes
+
+.include <bsd.port.pre.mk>
+
+do-install:
+	${MKDIR} ${PREFIX}/lib/pib
+	${INSTALL_SCRIPT} ${WRKSRC}/*.tcl ${PREFIX}/lib/pib
+	${INSTALL_DATA} ${WRKSRC}/libTkSteal.so.2* ${PREFIX}/lib/pib
+	${LN} -fs ${PREFIX}/lib/pib/pib.tcl ${PREFIX}/bin/pib
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ ports-mgmt/pib/distinfo
@@ -0,0 +1,3 @@
+MD5 (pib-1.2.tar.gz) = fa095bd1f9854aa296b4d35f8ba029f5
+SHA256 (pib-1.2.tar.gz) = b588bbef9f491bae2d2715bcb1533bebf8eb4d447770253cbf53bbed7b6e665a
+SIZE (pib-1.2.tar.gz) = 33286
--- /dev/null
+++ ports-mgmt/pib/files/patch-tkPort.h
@@ -0,0 +1,12 @@
+--- tkPort.h.orig	Wed Apr 13 17:30:58 2005
++++ tkPort.h	Wed Apr 13 17:30:13 2005
+@@ -133,8 +133,6 @@ extern int errno;
+  * in any other header file.
+  */
+ 
+-extern void		panic();
+-
+ /*
+  * These functions do nothing under Unix, so we just eliminate calls them.
+  */
+
--- /dev/null
+++ ports-mgmt/pib/files/patch-Makefile
@@ -0,0 +1,30 @@
+--- Makefile.orig	Sat Oct 28 04:55:08 2000
++++ Makefile	Tue Oct 16 17:04:15 2007
+@@ -5,16 +5,15 @@
+ #
+ 
+ PREFIX?=	/usr/local
+-X11BASE?=	/usr/X11R6
++X11BASE?=	/usr/local
+ 
+ LIB=		TkSteal
+-INTERNALLIB=	YES		# inhibits unuseful static library
+ SHLIB_MAJOR=	2
+ SHLIB_MINOR=	0
+ NOPROFILE=	yes
+ 
+ .if defined(OBJFORMAT) && ${OBJFORMAT} == elf
+-LDADD=		-L${PREFIX}/lib -ltk82
++LDADD=		-L${PREFIX}/lib -ltk84
+ .endif
+ 
+ SRCS=		tkXAccess.c
+@@ -25,7 +24,7 @@
+ PAXFILES=	${SRCS} ${TCL_SRCS} ${HDRS} ${OTHER}
+ PAXNAME=	pib-1.1
+ 
+-CFLAGS+=	-I${PREFIX}/include/tcl8.2 -I${PREFIX}/include/tk8.2 \
++CFLAGS+=	-I${PREFIX}/include/tcl8.4 -I${PREFIX}/include/tk8.4 \
+ 		-I${X11BASE}/include \
+ 		-DUSE_XACCESS -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 \
+ 		-DSTDC_HEADERS=1 -DTK_FILE_COUNT=_r -DNEED_MATHERR=1 \
--- /dev/null
+++ ports-mgmt/pib/files/patch-pib
@@ -0,0 +1,108 @@
+--- pib.tcl.orig	Sat Oct 28 05:01:12 2000
++++ pib.tcl	Tue Oct 16 17:19:47 2007
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ # Tcl magic \
+-exec wish8.2 -f $0 $*
++exec wish8.4 -f $0 $*
+ ################################################################################
+ #
+ # Copyright (C) 1996, 1997
+@@ -70,7 +70,7 @@
+ ################################################################################
+ #
+ # If an alternate filename is given on the commandline, open it instead of
+-# /usr/ports/INDEX
++# /usr/mports/INDEX-6
+ #
+ proc main {} {
+ 
+@@ -102,7 +102,7 @@
+     h_init;
+ 
+     # find our INDEX
+-    set ipath "[op_elookup PORTSDIR]/INDEX";
++    set ipath "[op_elookup PORTSDIR]/INDEX-6";
+     if {$argc == 1} {
+ 	set ipath [lindex $argv 0];
+     }
+@@ -309,22 +309,11 @@
+ #
+ proc init_options {} {
+ 
+-    # listboxes
+-    option add *Listbox.background white;
+-    option add *Listbox.selectForeground white;
+-    option add *Listbox.selectBackground darkblue;
+-
+     # scrollbars
+     option add *Scrollbar.width 11;
+ 
+     # textboxes
+-    option add *Text.background white;
+-    option add *Text.selectForeground white;
+-    option add *Text.selectBackground darkblue;
+     option add *Text.font fixed;
+-
+-    # entries
+-    option add *Entry.background white;
+     
+ }
+ 
+@@ -772,8 +761,8 @@
+     #
+     #       Tag		Name			Allowed states		Default state	Default value
+     op_edef usa		"USA_RESIDENT"		{yesno}			no;
+-    op_edef dir		"PORTSDIR"		{unset value}		value		"/usr/ports";
+-    op_edef ddir	"DISTDIR"		{unset value}		value		"/usr/ports/distfiles";
++    op_edef dir		"PORTSDIR"		{unset value}		value		"/usr/mports";
++    op_edef ddir	"DISTDIR"		{unset value}		value		"/usr/mports/Distfiles";
+     op_edef msb		"MASTER_SITE_BACKUP"	{unset value} 		unset;
+     op_edef msf		"MASTER_SITE_FREEBSD"	{set unset}		unset;
+     op_edef fcmd	"FETCH_CMD"		{unset value}		unset;
+@@ -1931,36 +1920,19 @@
+ 	update_pwin df_getdinfo [format "%d/%d ports, %dK/sec" $pports $Status(nports) $rate];
+ 
+ 	# Find the md5 file.
+-	if {[catch {set fh [open "$path/files/md5" "r"]}]} {
++	if {[catch {set fh [open "$path/distinfo" "r"]}]} {
+ 
+-	    # Nope.  Perhaps we're dealing with US ITAR braindamage
+-	    if {[op_elookup USA_RESIDENT]} {
+-		set aname "$path/files.usa/md5";
++	    # Can't find an distinfo file; give up
++	    if {[file isdirectory "$path"]} {
++		if {$Options(warn_no_md5)} {
++		    lappend errs "$pname: '$path/distinfo' not found";
++		}
+ 	    } else {
+-		set aname "$path/files.non_usa/md5";
+-	    }
+-
+-	    # try again with a new name
+-	    if {[catch {set fh [open $aname "r"]}]} {
+-
+-		# Can't find an md5 file; give up
+-		if {[file isdirectory "$path/files"]} {
+-		    if {$Options(warn_no_md5)} {
+-			lappend errs "$pname: '$path/files/md5' not found";
+-		    }
+-		} else {
+-		    if {[file isdirectory $path]} {
+-			if {$Options(warn_no_fdir)} {
+-			    lappend errs "$pname: '$path/files' not found";
+-			}
+-		    } else {
+-			if {$Options(warn_no_port)} {
+-			    lappend errs "$pname: directory missing.";
+-			}
+-		    }
++		if {$Options(warn_no_port)} {
++		    lappend errs "$pname: directory missing.";
+ 		}
+-		continue ;			# if no port info, assume it's not wanted
+ 	    }
++	    continue ;				# if no port info, assume it's not wanted
+ 	}
+ 
+ 	# initialise state for this port


More information about the Midnightbsd-cvs mailing list