diff options
Diffstat (limited to 'ports-mgmt')
79 files changed, 0 insertions, 5663 deletions
diff --git a/ports-mgmt/barry/Makefile b/ports-mgmt/barry/Makefile deleted file mode 100644 index a3e471ea8d0c..000000000000 --- a/ports-mgmt/barry/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# New ports collection makefile for: barry -# Date created: 19 September 2002 -# Whom: Brad Davis <so14k@so14k.com> -# -# $FreeBSD$ -# - -PORTNAME= barry -PORTVERSION= 0.6 -CATEGORIES= sysutils kde -MASTER_SITES= http://www.student.uni-oldenburg.de/frerich.raabe/barry/ \ - http://freebsd.so14k.com/barry/ - -MAINTAINER= so14k@so14k.com -COMMENT= A nice KDE frontend to the ports system - -USE_BZIP2= yes -USE_KDELIBS_VER=3 -MAKE_ENV= QTDIR="${X11BASE}" KDEDIR="${LOCALBASE}" PREFIX="${PREFIX}" -USE_REINPLACE= yes - -pre-build: - ${REINPLACE_CMD} "s,-pthread,${PTHREAD_LIBS},g" ${WRKSRC}/Makefile - -do-build: - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} \ - ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} .depend) - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} \ - ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS}) - -pre-install: - ${MKDIR} ${DESTDIR}${PREFIX}/share/applnk/Utilities - -.include <bsd.port.mk> diff --git a/ports-mgmt/barry/distinfo b/ports-mgmt/barry/distinfo deleted file mode 100644 index 06bf37750e42..000000000000 --- a/ports-mgmt/barry/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (barry-0.6.tar.bz2) = 94577582c67a19061387145bb92c03db diff --git a/ports-mgmt/barry/pkg-descr b/ports-mgmt/barry/pkg-descr deleted file mode 100644 index f47fb4748fb8..000000000000 --- a/ports-mgmt/barry/pkg-descr +++ /dev/null @@ -1 +0,0 @@ -A nice KDE frontend to the ports system. diff --git a/ports-mgmt/barry/pkg-plist b/ports-mgmt/barry/pkg-plist deleted file mode 100644 index f96d09238a16..000000000000 --- a/ports-mgmt/barry/pkg-plist +++ /dev/null @@ -1,26 +0,0 @@ -bin/barry -share/applnk/Utilities/barry.desktop -share/apps/barry/background.png -share/apps/barry/barryui.rc -share/apps/barry/bgtable.png -share/apps/barry/eventsrc -share/apps/barry/kdelogo2.png -share/apps/barry/khelpcenter.png -share/apps/barry/konq.css -share/apps/barry/lines.png -share/apps/barry/lines2.png -share/apps/barry/pointers.png -share/apps/barry/shadow1.png -share/apps/barry/splashscreen.html -share/apps/barry/icons/port-installed.png -share/apps/barry/icons/port-not-installed.png -share/icons/hicolor/16x16/apps/barry.png -share/icons/hicolor/32x32/apps/barry.png -share/icons/hicolor/48x48/apps/barry.png -share/locale/de/LC_MESSAGES/barry.mo -share/locale/es/LC_MESSAGES/barry.mo -share/locale/ko/LC_MESSAGES/barry.mo -share/locale/nl/LC_MESSAGES/barry.mo -share/locale/sv/LC_MESSAGES/barry.mo -@dirrm share/apps/barry/icons -@dirrm share/apps/barry diff --git a/ports-mgmt/p5-FreeBSD-Ports/Makefile b/ports-mgmt/p5-FreeBSD-Ports/Makefile deleted file mode 100644 index 7799fc077646..000000000000 --- a/ports-mgmt/p5-FreeBSD-Ports/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# New ports collection makefile for: p5-FreeBSD-Ports -# Date created: 12 September 2001 -# Whom: Tom Hukins <tom@FreeBSD.org> -# -# $FreeBSD$ -# - -PORTNAME= FreeBSD-Ports -PORTVERSION= 0.03 -CATEGORIES= textproc perl5 -MASTER_SITES= http://people.FreeBSD.org/~tom/portpm/ -PKGNAMEPREFIX= p5- - -MAINTAINER= tom@FreeBSD.org -COMMENT= Perl modules for parsing FreeBSD's Ports INDEX file - -USE_BZIP2= yes - -PERL_CONFIGURE= yes -MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} -MAN3= FreeBSD::Ports::Port.3 \ - FreeBSD::Ports.3 -.include <bsd.port.mk> diff --git a/ports-mgmt/p5-FreeBSD-Ports/distinfo b/ports-mgmt/p5-FreeBSD-Ports/distinfo deleted file mode 100644 index 6777dc99a66b..000000000000 --- a/ports-mgmt/p5-FreeBSD-Ports/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (FreeBSD-Ports-0.03.tar.bz2) = ca874e00cff23d7ec946abdadc761720 diff --git a/ports-mgmt/p5-FreeBSD-Ports/pkg-descr b/ports-mgmt/p5-FreeBSD-Ports/pkg-descr deleted file mode 100644 index 679267092e99..000000000000 --- a/ports-mgmt/p5-FreeBSD-Ports/pkg-descr +++ /dev/null @@ -1,17 +0,0 @@ -FreeBSD::Ports and FreeBSD::Ports::Port are modules for parsing -FreeBSD's Ports INDEX file and selecting ports that match certain -criteria. - -For example, you might want to list ports maintained by tom@FreeBSD.org -sorted alphabetically: - my $ports = tie my %port, 'FreeBSD::Ports', '/usr/ports/INDEX'; - $ports->maintainer('tom@FreeBSD.org'); - $ports->sort('alpha'); - foreach my $p (keys %port) { - print $p->as_ascii,"\n"; - } - -WWW: http://people.FreeBSD.org/~tom/portpm/ - -- Tom -tom@FreeBSD.org diff --git a/ports-mgmt/p5-FreeBSD-Ports/pkg-plist b/ports-mgmt/p5-FreeBSD-Ports/pkg-plist deleted file mode 100644 index a6ecd11c12cf..000000000000 --- a/ports-mgmt/p5-FreeBSD-Ports/pkg-plist +++ /dev/null @@ -1,7 +0,0 @@ -%%SITE_PERL%%/FreeBSD/Ports/Port.pm -%%SITE_PERL%%/FreeBSD/Ports.pm -%%SITE_PERL%%/%%PERL_ARCH%%/auto/FreeBSD/Ports/.packlist -@dirrm %%SITE_PERL%%/FreeBSD/Ports -@dirrm %%SITE_PERL%%/FreeBSD -@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/FreeBSD/Ports -@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/FreeBSD diff --git a/ports-mgmt/pib/Makefile b/ports-mgmt/pib/Makefile deleted file mode 100644 index c24febb1a6a4..000000000000 --- a/ports-mgmt/pib/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# New ports collection makefile for: pib -# Date created: 30 December 1996 -# Whom: Mike Smith <msmith@freebsd.org> -# -# $FreeBSD$ -# - -PORTNAME= pib -PORTVERSION= 1.2 -CATEGORIES= sysutils tk82 -MASTER_SITES= ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= msmith - -MAINTAINER= .@babolo.ru -COMMENT= GUI Ports Collection management tool - -BUILD_DEPENDS= wish8.2:${PORTSDIR}/x11-toolkits/tk82 -RUN_DEPENDS= wish8.2:${PORTSDIR}/x11-toolkits/tk82 - -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.mk> diff --git a/ports-mgmt/pib/distinfo b/ports-mgmt/pib/distinfo deleted file mode 100644 index f6454122a1c3..000000000000 --- a/ports-mgmt/pib/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (pib-1.2.tar.gz) = fa095bd1f9854aa296b4d35f8ba029f5 diff --git a/ports-mgmt/pib/files/patch-Makefile b/ports-mgmt/pib/files/patch-Makefile deleted file mode 100644 index 2d9793630bbc..000000000000 --- a/ports-mgmt/pib/files/patch-Makefile +++ /dev/null @@ -1,10 +0,0 @@ ---- Makefile Sat Oct 28 12:55:08 2000 -+++ Makefile Mon Oct 21 04:40:15 2002 -@@ -8,7 +8,6 @@ - X11BASE?= /usr/X11R6 - - LIB= TkSteal --INTERNALLIB= YES # inhibits unuseful static library - SHLIB_MAJOR= 2 - SHLIB_MINOR= 0 - NOPROFILE= yes diff --git a/ports-mgmt/pib/files/patch-pib b/ports-mgmt/pib/files/patch-pib deleted file mode 100644 index d0b9b13f39d8..000000000000 --- a/ports-mgmt/pib/files/patch-pib +++ /dev/null @@ -1,71 +0,0 @@ ---- pib.tcl Sat Oct 28 13:01:12 2000 -+++ pib.tcl Sat Apr 28 04:05:37 2001 -@@ -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; - - } - -@@ -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 diff --git a/ports-mgmt/pib/pkg-descr b/ports-mgmt/pib/pkg-descr deleted file mode 100644 index b71d74e66030..000000000000 --- a/ports-mgmt/pib/pkg-descr +++ /dev/null @@ -1,5 +0,0 @@ -The Ports Index Browser provides a quick and powerful means for browsing the -FreeBSD Ports Collection INDEX file and performing related functions. - -It provides an intuitive GUI interface, online help and useful distfile -management functions. diff --git a/ports-mgmt/pib/pkg-plist b/ports-mgmt/pib/pkg-plist deleted file mode 100644 index 5af3e9ca784f..000000000000 --- a/ports-mgmt/pib/pkg-plist +++ /dev/null @@ -1,5 +0,0 @@ -bin/pib -lib/pib/pib.tcl -lib/pib/tkSteal.tcl -lib/pib/libTkSteal.so.2 -@dirrm lib/pib diff --git a/ports-mgmt/pkg_cutleaves/Makefile b/ports-mgmt/pkg_cutleaves/Makefile deleted file mode 100644 index fa5b982f2faf..000000000000 --- a/ports-mgmt/pkg_cutleaves/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# New ports collection makefile for: pkg_cutleaves -# Date created: 27 July 2003 -# Whom: Stefan Walter <sw@gegenunendlich.de> -# -# $FreeBSD$ -# -# This port is self contained in the src directory. -# - -PORTNAME= pkg_cutleaves -PORTVERSION= 20031115 -CATEGORIES= sysutils -MASTER_SITES= # none -DISTFILES= # none - -MAINTAINER= sw@gegenunendlich.de -COMMENT= Interactive script for deinstalling 'leaf' packages - -RUN_DEPENDS= ${LOCALBASE}/sbin/pkg_deinstall:${PORTSDIR}/sysutils/portupgrade - -NO_BUILD= yes -USE_PERL5= yes -USE_REINPLACE= yes - -SRC= ${.CURDIR}/src - -MAN1= pkg_cutleaves.1 - -do-fetch: - @${DO_NADA} - -pre-patch: - @${CP} ${SRC}/pkg_cutleaves ${WRKDIR}/pkg_cutleaves - @${CP} ${SRC}/pkg_cutleaves.1 ${WRKDIR}/pkg_cutleaves.1 - -post-patch: - @${REINPLACE_CMD} -e \ - 's,/usr/local/etc/pkg_leaves.exclude,${PREFIX}/etc/pkg_leaves.exclude,' \ - ${WRKDIR}/pkg_cutleaves.1 - @${REINPLACE_CMD} -e \ - 's,/usr/local/etc/pkg_leaves.exclude,${PREFIX}/etc/pkg_leaves.exclude,' \ - ${WRKDIR}/pkg_cutleaves - @${REINPLACE_CMD} -e \ - 's,/usr/local/sbin/pkg_deinstall,${LOCALBASE}/sbin/pkg_deinstall,' \ - ${WRKDIR}/pkg_cutleaves - @${REINPLACE_CMD} -e \ - 's,/var/db/pkg,${PKG_DBDIR},' \ - ${WRKDIR}/pkg_cutleaves - @${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},' \ - ${WRKDIR}/pkg_cutleaves - -do-install: - ${INSTALL_SCRIPT} ${WRKDIR}/pkg_cutleaves ${PREFIX}/sbin/pkg_cutleaves - ${INSTALL_MAN} ${WRKDIR}/pkg_cutleaves.1 ${MAN1PREFIX}/man/man1 - -.include <bsd.port.mk> diff --git a/ports-mgmt/pkg_cutleaves/pkg-descr b/ports-mgmt/pkg_cutleaves/pkg-descr deleted file mode 100644 index 02d99d329a1b..000000000000 --- a/ports-mgmt/pkg_cutleaves/pkg-descr +++ /dev/null @@ -1,10 +0,0 @@ -pkg_cutleaves finds installed 'leaf' packages, i.e. packages that are -not referenced by any other installed package, and lets you decide for -each one if you want to keep or deinstall it (via pkg_deinstall(1)). - -Usage: pkg_cutleaves [-l] [-x] [-R] - -l: List leaf packages only, one per line, and don't ask for anything - to be deinstalled. - -x: Exclude packages matching expressions given in the exclude file. - -R: Run 'pkg_deinstall -R' instead of plain 'pkg_deinstall', so packages - the removed leaf packages depend(ed) on will be deinstalled, too. diff --git a/ports-mgmt/pkg_cutleaves/pkg-plist b/ports-mgmt/pkg_cutleaves/pkg-plist deleted file mode 100644 index eb45d358eeda..000000000000 --- a/ports-mgmt/pkg_cutleaves/pkg-plist +++ /dev/null @@ -1 +0,0 @@ -sbin/pkg_cutleaves diff --git a/ports-mgmt/pkg_cutleaves/src/pkg_cutleaves b/ports-mgmt/pkg_cutleaves/src/pkg_cutleaves deleted file mode 100644 index 874f28a4dd08..000000000000 --- a/ports-mgmt/pkg_cutleaves/src/pkg_cutleaves +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/perl -# -# Copyright (c) 2003 Stefan Walter <sw@gegenunendlich.de> -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ - -# Interactive script for deinstalling "leaf" packages; -# requires the portupgrade tools -# -# Syntax: pkg_cutleaves [-c] [-l] [-x] [-R] -# Options: -# -c: Show comments, too; only works with '-l' (ignored otherwise) -# -l: List leaf packages only, don't ask if they should be deinstalled -# -x: Honor exclude list in $excludefile -# -R: Run 'pkg_deinstall -R' instead of plain 'pkg_deinstall' - -use strict; - -my $dbdir = "/var/db/pkg"; -my $excludefile = "/usr/local/etc/pkg_leaves.exclude"; -my $pkgdeinstall = "/usr/local/sbin/pkg_deinstall"; -my ($opt_comments, $opt_listonly, $opt_excludelist, $opt_recursive); -my $exclpattern; - -# Read the exclude list if the file exists -sub get_excl_pattern { - my $excl_file = $_[0]; - my $excl_pattern; - # Does the exclude file exist? - if (($excl_file) && (-f $excl_file) && (-T $excl_file)) { - # Read the patterns to be excluded - my @excludes; - open(EXCLFILE, $excl_file) - or die "Couldn't open $excl_file!"; - while(my $exclude = <EXCLFILE>) { - chomp($exclude); - # Ignore comments and empty lines, add others as regular expressions - unless (($exclude =~ m/(^ *#)|(^ *$)/)) { - $exclude = "^" . $exclude . ".*"; - @excludes = (@excludes, $exclude); - } - } - close(EXCLFILE); - $excl_pattern = join("|", @excludes); - } else { - # Dummy exclusion pattern -> doesn't exclude anything - $excl_pattern = " "; - } - return $excl_pattern; -} - -# Get a hash (name => comment) of all leaves -sub get_leaves { - my $db_dir = $_[0]; - my $excl_pattern = $_[1]; - my %leaves; - opendir(DBDIR, $db_dir) - or die "Can't open package db directory $db_dir!"; - while(defined(my $file = readdir(DBDIR))) { - my $path = $db_dir . '/' . $file; - my $reqlist = $path . '/+REQUIRED_BY'; - my $commentfile = $path . '/+COMMENT'; - # Exclude non-directories, "." and ".." - if (($file ne ".") && ($file ne "..") && (-d $path) && (!-e $reqlist)) { - # Exclude packages matching exclude pattern, if requested - unless ($file =~ m/$excl_pattern/) { - # Read package's short description/comment - my $comment; - if ((-s $commentfile) && (open(COMMENT, $commentfile))) { - $comment = <COMMENT>; - chomp($comment); - close(COMMENT); - } else { - $comment = "No short description"; - } - $leaves{$file} = $comment; - } - } - } - closedir(DBDIR); - return %leaves; -} - -# Examine command line arguments -while(@ARGV) { - my $arg = shift(@ARGV); - if ($arg eq "-x") { - $opt_excludelist = 1; - } - elsif ($arg eq "-l") { - $opt_listonly = 1; - } - elsif ($arg eq "-c") { - $opt_comments = 1; - } - elsif ($arg eq "-R") { - $opt_recursive = 1; - } else { - warn "Unrecognized command line argument $arg ignored.\n"; - } -} - -# Exclusion requested? -if ($opt_excludelist) { - # Get exclusion pattern - $exclpattern = get_excl_pattern($excludefile); -} else { - # Spaces don't appear in package names -> this doesn't exclude anything - $exclpattern = " "; -} - -if ($opt_listonly) { - # Just print out the list of leaves, one per line - my %leaves = get_leaves($dbdir, $exclpattern); - foreach my $leaf (sort keys %leaves) { - if ($opt_comments) { - print "$leaf - $leaves{$leaf}\n"; - } else { - print "$leaf\n"; - } - } -} else { - my %leavestokeep; - my %leavestocut; - my @cutleaves; - # Loop while the user wants to - my $again = "y"; - ROUND: while($again eq "y") { - # Get list of packages and put them into an array - my %leaves = get_leaves($dbdir, $exclpattern); - LEAVESLOOP: foreach my $leaf (sort keys %leaves) { - if (!$leavestokeep{$leaf}) { - print "$leaf - $leaves{$leaf}\n"; - print "$leaf - [keep]/(d)elete/(f)lush marked pkgs/(a)bort? "; - my $answer = substr(lc(<STDIN>), 0, 1); - - if ($answer eq "d") { - print "** Marking $leaf for removal.\n\n"; - $leavestocut{$leaf} = 1; - } - elsif ($answer eq "f") { - print "\n"; - last LEAVESLOOP; - } - elsif ($answer eq "a") { - print "\n"; - last ROUND; - } - else { - print "** Keeping $leaf.\n\n"; - $leavestokeep{$leaf} = 1; - } - } - } # LEAVESLOOP - - # loop through packages marked for removal and pkg_deinstall them - foreach my $leaf (sort keys %leavestocut) { - print "Deleting $leaf.\n"; - my @deinstall_args; - if ($opt_recursive) { - @deinstall_args = ($pkgdeinstall, '-R', $leaf); - } else { - @deinstall_args = ($pkgdeinstall, $leaf); - } - if ((my $status = system(@deinstall_args) >> 8) != 0) { - print "\nError: pkg_deinstall returned $status - exiting, fix this first.\n\n"; - last ROUND; - } - @cutleaves = (@cutleaves, $leaf); - delete $leavestocut{$leaf}; - } - - print "Once more ((y)es/[no])? "; - $again = substr(lc(<STDIN>), 0, 1); - print "\n"; - } # ROUND - - # print list of removed packages, sorted lexically - print "** Deinstalled packages:\n"; - foreach my $cutleaf (sort @cutleaves) { - print "$cutleaf\n"; - } -} - diff --git a/ports-mgmt/pkg_cutleaves/src/pkg_cutleaves.1 b/ports-mgmt/pkg_cutleaves/src/pkg_cutleaves.1 deleted file mode 100644 index 39d22f272bb3..000000000000 --- a/ports-mgmt/pkg_cutleaves/src/pkg_cutleaves.1 +++ /dev/null @@ -1,43 +0,0 @@ -.TH PKG_CUTLEAVES 1 "Jul 2003" FreeBSD -.SH NAME -pkg_cutleaves \- deinstall 'leaf' packages -.SH SYNOPSIS -.B pkg_cutleaves [-c] [-l] [-x] [-R] -.SH DESCRIPTION -.B pkg_cutleaves -finds installed 'leaf' packages, i.e. packages that are not referenced -by any other installed package, and lets you decide for each one if you -want to keep or deinstall it (via pkg_deinstall(1)). -Once the packages marked for removal have been flushed/deinstalled, -you'll be asked if you want to do another run (to see packages that have -become 'leaves' now because you've deinstalled the package(s) that -depended on them). In every run you will be shown only packages that you -haven't marked for keeping, yet. - -Note that your package registry database should be up to date for this -to work properly, so it might be a good idea to run pkgdb(1) before -running pkg_cutleaves. -.SH OPTIONS -.IP -c -When listing leaf packages, also print their comments/short -descriptions. Will be ignored unless the '-l' parameter is given, too. -.IP -l -List leaf packages only, one per line, and don't ask for anything to be -deinstalled. -.IP -x -Exclude packages matching expressions given in the exclude file. -.IP -R -Run 'pkg_deinstall -R' instead of plain 'pkg_deinstall', so packages the -removed leaf packages depend(ed) on will be deinstalled, too. -.SH FILES -.I /usr/local/etc/pkg_leaves.exclude -.RS -An optional list for excluding packages when the '-x' option is given. -If the beginning of a package's name matches any line (except comment or -empty lines) in this file, the package will not be listed/offered for -removal (e.g., a line saying just 'XFree86' (without the 's) will -exclude all packages with names starting with 'XFree86'). -.SH AUTHOR -Stefan Walter <sw@gegenunendlich.de> -.SH SEE ALSO -pkg_deinstall(1), portsclean(1) diff --git a/ports-mgmt/pkg_install/Makefile b/ports-mgmt/pkg_install/Makefile deleted file mode 100644 index 5e8c12cffbe8..000000000000 --- a/ports-mgmt/pkg_install/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# New ports collection makefile for: pkg_install -# Date created: 14 Jul 2003 -# Whom: Oliver Eikemeier -# -# $FreeBSD$ -# - -PORTNAME= pkg_install -PORTVERSION= 20030714 -PORTREVISION= 1 -CATEGORIES= sysutils -MASTER_SITES= ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= marcus - -MAINTAINER= portmgr@freebsd.org -COMMENT= FreeBSD 5.x version of the package tools for older system releases - -MANCOMPRESSED= yes - -MAN1= pkg_add.1 pkg_create.1 pkg_delete.1 \ - pkg_info.1 pkg_version.1 - -MAKE_ARGS= -DNOOBJ -DNOCRYPT -DNO_OPENSSL - -.include <bsd.port.pre.mk> - -.if ${OSVERSION} < 460102 -check-already-installed: -.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) - @if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \ - ${ECHO_CMD} "===> ${PKGNAME} is already installed - perhaps an older version?"; \ - ${ECHO_CMD} " If so, you may wish to \`\`make deinstall'' and install"; \ - ${ECHO_CMD} " this port again by \`\`make reinstall'' to upgrade it properly."; \ - ${ECHO_CMD} " If you really wish to overwrite the old port of ${PKGNAME}"; \ - ${ECHO_CMD} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \ - ${ECHO_CMD} " in your environment or the \"make install\" command line."; \ - exit 1; \ - fi -.else - @${DO_NADA} -.endif -.endif - -pre-configure: - @${SED} -e 's,%%PREFIX%%,${PREFIX},g' \ - -e 's,%%MANPREFIX%%,${MANPREFIX},g' \ - ${FILESDIR}/Makefile.inc > ${WRKDIR}/Makefile.inc - -.if ${OSVERSION} < 440001 || ( ${OSVERSION} >= 500000 && ${OSVERSION} < 500024 ) -post-patch: - @${FIND} ${WRKSRC} -name '*.c' \ - | ${XARGS} ${PERL} -pi.orig -e 's/__FBSDID\(("[^"]*")\)/static const char rcsid[] = $$1/' -.endif - -deinstall: - @if ${PKG_INFO} -e ${PKGNAME}; then \ - ${PKG_DELETE} -f ${PKGNAME}; \ - else \ - ${ECHO_MSG} "===> ${PKGNAME} not installed; skipping"; \ - fi - @${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE} - -.include <bsd.port.post.mk> diff --git a/ports-mgmt/pkg_install/distinfo b/ports-mgmt/pkg_install/distinfo deleted file mode 100644 index a6a2867d34e5..000000000000 --- a/ports-mgmt/pkg_install/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (pkg_install-20030714.tar.gz) = 183bed34c5427aeaf2025d9e2176e9ed diff --git a/ports-mgmt/pkg_install/files/Makefile.inc b/ports-mgmt/pkg_install/files/Makefile.inc deleted file mode 100644 index 3f26acacff36..000000000000 --- a/ports-mgmt/pkg_install/files/Makefile.inc +++ /dev/null @@ -1,4 +0,0 @@ -# $FreeBSD$ - -BINDIR=%%PREFIX%%/sbin -MANDIR=%%MANPREFIX%%/man/man diff --git a/ports-mgmt/pkg_install/files/patch-lib_Makefile b/ports-mgmt/pkg_install/files/patch-lib_Makefile deleted file mode 100644 index ebe850a59b53..000000000000 --- a/ports-mgmt/pkg_install/files/patch-lib_Makefile +++ /dev/null @@ -1,20 +0,0 @@ ---- lib/Makefile.orig Fri Jul 25 12:08:43 2003 -+++ lib/Makefile Fri Jul 25 12:08:45 2003 -@@ -1,12 +1,16 @@ - # $FreeBSD: /tmp/pcvs/ports/ports-mgmt/pkg_install/files/patch-lib_Makefile,v 1.1 2003-08-03 21:44:33 marcus Exp $ - - LIB= install --INTERNALLIB= YES - SRCS= file.c msg.c plist.c str.c exec.c global.c pen.c match.c \ - deps.c version.c pkgwrap.c url.c -+NOPROFILE= yes -+NOPIC= yes - - CFLAGS+= ${DEBUG} - - WARNS?= 2 -+ -+install: -+ @echo -n - - .include <bsd.lib.mk> diff --git a/ports-mgmt/pkg_install/pkg-descr b/ports-mgmt/pkg_install/pkg-descr deleted file mode 100644 index f8a20749e7ee..000000000000 --- a/ports-mgmt/pkg_install/pkg-descr +++ /dev/null @@ -1,9 +0,0 @@ -FreeBSD 5.x version of the pkg_install suite of tools for doing -maintainance of software packages. - -This is mainly useful on FreeBSD systems <= 4.6. - -WWW: http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/pkg_install/ - --- Oliver Eikemeier -eikemeier@fillmore-labs.com diff --git a/ports-mgmt/pkg_install/pkg-plist b/ports-mgmt/pkg_install/pkg-plist deleted file mode 100644 index f4c62b027a74..000000000000 --- a/ports-mgmt/pkg_install/pkg-plist +++ /dev/null @@ -1,5 +0,0 @@ -sbin/pkg_add -sbin/pkg_create -sbin/pkg_delete -sbin/pkg_info -sbin/pkg_version diff --git a/ports-mgmt/pkg_remove/Makefile b/ports-mgmt/pkg_remove/Makefile deleted file mode 100644 index 21f0c19f046b..000000000000 --- a/ports-mgmt/pkg_remove/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# New ports collection makefile for: pkg_remove -# Date created: 8 Jan 2000 -# Whom: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> -# -# $FreeBSD$ -# - -PORTNAME= pkg_remove -PORTVERSION= 1.1 -CATEGORIES= sysutils -MASTER_SITES= # none -DISTFILES= # none - -MAINTAINER= nakaji@jp.freebsd.org -COMMENT= Utility to uninstall packages - -NO_BUILD= yes -NO_WRKSUBDIR= yes - -SRC= ${.CURDIR}/src - -do-fetch: - @${DO_NADA} - -do-install: - ${INSTALL_SCRIPT} ${SRC}/pkg_remove.txt ${PREFIX}/bin/pkg_remove - -.include <bsd.port.mk> diff --git a/ports-mgmt/pkg_remove/pkg-descr b/ports-mgmt/pkg_remove/pkg-descr deleted file mode 100644 index 84f68848781d..000000000000 --- a/ports-mgmt/pkg_remove/pkg-descr +++ /dev/null @@ -1,18 +0,0 @@ -Utility to uninstall packages. -Unlike pkg_delete, pkg_remove removes all packages which depend to -the packages you specify, in proper order, by one command line. - -For example: -# pkg_remove netscape - Remove all netscape related packages. -# pkg_remove xemacs - Same as above about xemacs. -# pkg_remove tiff - Remove tiff library and whole packages which use it. -# pkg_remove '^ja-' - Remove all japanese packages. -# pkg_remove ALL - Remove all packages. - -- SADA Kenji -sada@FreeBSD.org diff --git a/ports-mgmt/pkg_remove/pkg-plist b/ports-mgmt/pkg_remove/pkg-plist deleted file mode 100644 index b8701984f27d..000000000000 --- a/ports-mgmt/pkg_remove/pkg-plist +++ /dev/null @@ -1 +0,0 @@ -bin/pkg_remove diff --git a/ports-mgmt/pkg_remove/src/pkg_remove.txt b/ports-mgmt/pkg_remove/src/pkg_remove.txt deleted file mode 100644 index f45f81c7bfff..000000000000 --- a/ports-mgmt/pkg_remove/src/pkg_remove.txt +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/perl -# $Id: pkg_remove,v 1.3 1999/11/06 15:47:49 sada Exp $ -use Getopt::Std; -getopts('n'); -die("usage: x [-n] ALL | <package-name> [, <package-name> [..]]\n -n : only tell what will take place.\n") if (@ARGV < 1); -$pkg_dbdir = "/var/db/pkg"; -opendir(PKG_DBDIR, $pkg_dbdir); -while ($pkg = readdir(PKG_DBDIR)) { - next if $pkg =~ m/^\./; - $req_by{$pkg} = ''; - if (-f "$pkg_dbdir/$pkg/+REQUIRED_BY") { - open(REQ_B, "$pkg_dbdir/$pkg/+REQUIRED_BY"); - $req_by{$pkg} = join('', <REQ_B>); - } -} -while ($a = shift) { - while (($key, $val) = each(%req_by)) { - if ($a eq 'ALL' || $key =~ m/$a/) { - &remove_package($key); - } - } -} - -sub remove_package -{ - my ($pkg) = @_; - return if ($pkg_removed{$pkg}); - my @r = split(/\n/, $req_by{$pkg}); - my $p; - &remove_package($p) while $p = shift(@r); - print "remove: $pkg\n"; - system "pkg_delete $pkg" unless ($opt_n); - $pkg_removed{$pkg} = 'YES'; -} diff --git a/ports-mgmt/pkg_tree/Makefile b/ports-mgmt/pkg_tree/Makefile deleted file mode 100644 index bd30aec2f775..000000000000 --- a/ports-mgmt/pkg_tree/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# New ports collection makefile for: pkg_tree -# Date created: 24 September 2001 -# Whom: Edwin Groothuis (edwin@mavetju.org) -# -# $FreeBSD$ -# - -PORTNAME= pkg_tree -PORTVERSION= 1.1 -PORTREVISION= 1 -CATEGORIES= sysutils -MASTER_SITES= http://www.mavetju.org/download/ - -MAINTAINER= edwin@mavetju.org -COMMENT= Get a 'graphical' tree-overview of installed packages - -USE_REINPLACE= yes -USE_PERL5= yes - -MAN7= pkg_tree.7 - -post-patch: - @${REINPLACE_CMD} -e 's|__PREFIX__|${PREFIX}|g ; \ - s|__INSTALL_MAN__|${INSTALL_MAN}|g ; \ - s|__INSTALL_SCRIPT__|${INSTALL_SCRIPT}|g' ${WRKSRC}/Makefile - -.include <bsd.port.mk> diff --git a/ports-mgmt/pkg_tree/distinfo b/ports-mgmt/pkg_tree/distinfo deleted file mode 100644 index a81668f3fdfc..000000000000 --- a/ports-mgmt/pkg_tree/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (pkg_tree-1.1.tar.gz) = b41c4a28a7ed727962bb137914f81030 diff --git a/ports-mgmt/pkg_tree/files/patch-Makefile b/ports-mgmt/pkg_tree/files/patch-Makefile deleted file mode 100644 index 5caa17d2e87d..000000000000 --- a/ports-mgmt/pkg_tree/files/patch-Makefile +++ /dev/null @@ -1,13 +0,0 @@ ---- Makefile.orig Wed Dec 12 23:06:13 2001 -+++ Makefile Wed Dec 12 23:07:35 2001 -@@ -11,8 +11,8 @@ - --date="December 15, 2001" pkg_tree.pod > pkg_tree.7 - - install: -- install -o root -g wheel -m 755 -c pkg_tree /usr/local/bin -- install -o root -g wheel -m 644 -c pkg_tree.7 /usr/local/man/man7 -+ __INSTALL_SCRIPT__ pkg_tree __PREFIX__/bin -+ __INSTALL_MAN__ pkg_tree.7 __PREFIX__/man/man7 - - clean: - rm pkg_tree.7 diff --git a/ports-mgmt/pkg_tree/files/patch-pkg_tree b/ports-mgmt/pkg_tree/files/patch-pkg_tree deleted file mode 100644 index b2b81728e81b..000000000000 --- a/ports-mgmt/pkg_tree/files/patch-pkg_tree +++ /dev/null @@ -1,65 +0,0 @@ ---- pkg_tree.orig Wed Dec 12 13:44:40 2001 -+++ pkg_tree Mon Jan 6 23:02:31 2003 -@@ -26,7 +26,7 @@ - # updated by a newer version. In case of tcl-8.3.3_3, this is tcl-8.3.3_4. - # - # PKG-TREE is (c) Edwin Groothuis, edwin@mavetju.org --# For license issues, see the file LICESE. -+# For license issues, see the file LICENSE. - # For more information, see the website: http://www.mavetju.org - # - -@@ -34,10 +34,13 @@ - - use Getopt::Std; - --use vars qw/ $opt_v /; -+use vars qw/ $opt_b $opt_q $opt_t $opt_v /; - - $opt_v=0; --getopts("v"); -+$opt_t=0; -+$opt_b=0; -+$opt_q=0; -+getopts("bqtv"); - - my $PKGDIR="/var/db/pkg"; - -@@ -46,6 +49,7 @@ - closedir DIR; - - @dirs=grep !/^\./,@dirs; -+@dirs=grep !/^pkgdb.db$/,@dirs; - @dirs=sort @dirs; - - my @args=@ARGV; -@@ -150,8 +154,10 @@ - } - next if (!$found); - } -+ next if ($opt_t && $required{$pkg}[0]!=0); -+ next if ($opt_b && $requires{$pkg}[0]!=0); - print "$pkg\n"; -- if ($requires{$pkg}[0]!=0) { -+ if (!$opt_q && $requires{$pkg}[0]!=0) { - print_deps("|"," ",1,$pkg); - } - } ---- patch-aa ends here --- - ---- patch-ab begins here --- ---- pkg_tree.pod.orig Wed Dec 12 13:44:40 2001 -+++ pkg_tree.pod Mon Jan 6 23:20:49 2003 -@@ -53,6 +53,12 @@ - |\__ freetype2-2.0.5 - \__ XFree86-libraries-4.1.0 (unknown) - -+Use the B<-t> parameter to show only top level packages, -+and B<-b> to show only bottom level packages. And B<-t> B<-q> -+together will give the list of top level packages without their -+dependencies, installing only these packages should install all -+currently installed packages. -+ - =head1 RETURN VALUES - - Always 0. diff --git a/ports-mgmt/pkg_tree/pkg-descr b/ports-mgmt/pkg_tree/pkg-descr deleted file mode 100644 index 4c214909ec25..000000000000 --- a/ports-mgmt/pkg_tree/pkg-descr +++ /dev/null @@ -1,13 +0,0 @@ -Get a 'graphical' tree-overview of installed packages - -Generates a ascii-art-graphical tree of packages and their dependancies. -For example for itk-3.2_1: - - [~] edwin@k7>pkg_tree tk-8 - tk-8.3.3 - |\__ tcl-8.3.3_3 (unknown) - |\__ imake-4.1.0 (unknown) - |\__ freetype2-2.0.4 - \__ XFree86-libraries-4.1.0 (unknown) - -WWW: http://www.mavetju.org/ diff --git a/ports-mgmt/pkg_tree/pkg-plist b/ports-mgmt/pkg_tree/pkg-plist deleted file mode 100644 index eae9fa41d2e0..000000000000 --- a/ports-mgmt/pkg_tree/pkg-plist +++ /dev/null @@ -1 +0,0 @@ -bin/pkg_tree diff --git a/ports-mgmt/portcheckout/Makefile b/ports-mgmt/portcheckout/Makefile deleted file mode 100644 index c69b27cfbc53..000000000000 --- a/ports-mgmt/portcheckout/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# New ports collection makefile for: portcheckout -# Date created: 1 November 1998 -# Whom: wosch -# -# $FreeBSD$ -# - -PORTNAME= portcheckout -PORTVERSION= 2.0 -CATEGORIES= devel -MASTER_SITES= http://wolfram.schneider.org/src/ - -MAINTAINER= wosch@FreeBSD.org -COMMENT= Checkout and build ports and all depending ports - -USE_PERL5= yes -MAN1= portcheckout.1 -MANCOMPRESSED= maybe - -post-patch: - perl -pi -e 's^\#\!/usr/local/bin/perl^#!${PERL5}^' ${WRKSRC}/portcheckout.pl - -.include <bsd.port.mk> diff --git a/ports-mgmt/portcheckout/distinfo b/ports-mgmt/portcheckout/distinfo deleted file mode 100644 index f2d1c7df605f..000000000000 --- a/ports-mgmt/portcheckout/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (portcheckout-2.0.tar.gz) = 930a626eb8761f5012b6105e553e75ad diff --git a/ports-mgmt/portcheckout/files/patch-aa b/ports-mgmt/portcheckout/files/patch-aa deleted file mode 100644 index ec1d2a621a95..000000000000 --- a/ports-mgmt/portcheckout/files/patch-aa +++ /dev/null @@ -1,47 +0,0 @@ ---- portcheckout.pl-- Tue Oct 24 13:04:07 2000 -+++ portcheckout.pl Tue Oct 24 13:04:35 2000 -@@ -94,14 +94,14 @@ - PORTSDIR="/tmp/ports"; export PORTSDIR - - # checkout FreeBSD ports system Makefiles -- cvs checkout ports/Mk -+ cvs checkout -P ports/Mk - - ################################################## - # checkout port: de-dict-1.1 -- cvs checkout ports/german/dict -+ cvs checkout -P ports/german/dict - - # de-dict-1.1 depend on port: agrep-2.04 -- cvs checkout ports/textproc/agrep -+ cvs checkout -P ports/textproc/agrep - - ################################################## - # Compile and install de-dict-1.1 -@@ -328,7 +328,7 @@ - #print qq{DISTDIR="/usr/ports/distfiles"; export DISTDIR\n}; - - print "\n# checkout FreeBSD ports system Makefiles\n"; --print "cvs checkout $release ports/Mk\n\n"; -+print "cvs checkout -P $release ports/Mk\n\n"; - - - # list of dependings ports -@@ -338,7 +338,7 @@ - - print "#" x 50, "\n"; - print "# checkout port: $distributionname\n"; -- print "cvs checkout $release ", $obj->{$distributionname}{portpath}, "\n\n"; -+ print "cvs checkout -P $release ", $obj->{$distributionname}{portpath}, "\n\n"; - - $ports_depends{$distributionname} = 1; - foreach my $depends ( -@@ -355,7 +355,7 @@ - $ports_depends{$depends} = 1; - - print "# $distributionname depend on port: $depends\n"; -- print "cvs checkout $release ", $obj->{$depends}{portpath}, "\n\n"; -+ print "cvs checkout -P $release ", $obj->{$depends}{portpath}, "\n\n"; - } - } - diff --git a/ports-mgmt/portcheckout/files/patch-ab b/ports-mgmt/portcheckout/files/patch-ab deleted file mode 100644 index 919579561917..000000000000 --- a/ports-mgmt/portcheckout/files/patch-ab +++ /dev/null @@ -1,12 +0,0 @@ ---- portcheckout.pl.old Thu Jul 31 02:23:39 2003 -+++ portcheckout.pl Thu Jul 31 02:24:54 2003 -@@ -328,7 +328,8 @@ - #print qq{DISTDIR="/usr/ports/distfiles"; export DISTDIR\n}; - - print "\n# checkout FreeBSD ports system Makefiles\n"; --print "cvs checkout -P $release ports/Mk\n\n"; -+print "cvs checkout -P $release ports/Mk\n"; -+print "cvs checkout -P $release ports/Templates\n\n"; - - - # list of dependings ports diff --git a/ports-mgmt/portcheckout/pkg-descr b/ports-mgmt/portcheckout/pkg-descr deleted file mode 100644 index d78a7e082585..000000000000 --- a/ports-mgmt/portcheckout/pkg-descr +++ /dev/null @@ -1,7 +0,0 @@ -The portcheckout(1) reads the /usr/ports/INDEX file and checks-out -a given port and its dependencies. This makes it easy to use the -ports system without having a full and up-to-date /usr/ports tree. - -A typical use would be to connect to the Internet, possibly download -a new INDEX and ports upgrade kit, download a port skeleton with -portcheckout(1), and then build the port. diff --git a/ports-mgmt/portcheckout/pkg-plist b/ports-mgmt/portcheckout/pkg-plist deleted file mode 100644 index 4d9dab92c11b..000000000000 --- a/ports-mgmt/portcheckout/pkg-plist +++ /dev/null @@ -1 +0,0 @@ -bin/portcheckout diff --git a/ports-mgmt/porteasy/Makefile b/ports-mgmt/porteasy/Makefile deleted file mode 100644 index 0c034ce667c6..000000000000 --- a/ports-mgmt/porteasy/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# New ports collection makefile for: porteasy -# Date created: September 19th 2000 -# Whom: des -# -# $FreeBSD$ -# -# This port is self contained in the src directory. -# - -PORTNAME= porteasy -PORTVERSION= 2.7.10 -CATEGORIES= misc -MASTER_SITES= # none -DISTFILES= # none - -MAINTAINER= des@FreeBSD.org -COMMENT= A tool for fetching and building ports - -NO_BUILD= yes -NO_WRKSUBDIR= yes -USE_PERL5= yes - -SRC= ${.CURDIR}/src - -MAN8= porteasy.8 - -do-fetch: - @${DO_NADA} - -do-configure: - @${SED} "s,%%PREFIX%%,${PREFIX}," ${SRC}/porteasy.pl >${WRKDIR}/porteasy -do-install: - @${INSTALL_SCRIPT} ${WRKDIR}/porteasy ${PREFIX}/bin/porteasy - @${INSTALL_MAN} ${SRC}/porteasy.8 ${PREFIX}/man/man8 - @${MKDIR} ${PREFIX}/share/porteasy - @${INSTALL_DATA} ${SRC}/cvspass ${PREFIX}/share/porteasy/cvspass - -.include <bsd.port.mk> diff --git a/ports-mgmt/porteasy/pkg-descr b/ports-mgmt/porteasy/pkg-descr deleted file mode 100644 index 2a2391f38f59..000000000000 --- a/ports-mgmt/porteasy/pkg-descr +++ /dev/null @@ -1,22 +0,0 @@ -Porteasy lets you install ports and build packages without maintaining -a full ports tree. It achieves this by scanning the ports index for -dependency information, and using CVS to update only the ports you -requested and their dependencies. - -Here are some of the things porteasy does for you: - - - automatically update the necessary files (and only the necessary - files) using CVS (including anoncvs support) - - - list all of a port's dependencies, optionally hiding those that - are already installed - - - fetch all the necessary distfiles right away, in a single batch, - so you don't have to wait for one dependency to build before - fetching the next one's distfile. Dialup users will love this. - - - build and install arbitrary ports. - - - build packages. - - -- des@freebsd.org diff --git a/ports-mgmt/porteasy/pkg-plist b/ports-mgmt/porteasy/pkg-plist deleted file mode 100644 index c79cbe496094..000000000000 --- a/ports-mgmt/porteasy/pkg-plist +++ /dev/null @@ -1,3 +0,0 @@ -bin/porteasy -share/porteasy/cvspass -@dirrm share/porteasy diff --git a/ports-mgmt/porteasy/src/cvspass b/ports-mgmt/porteasy/src/cvspass deleted file mode 100644 index c79217923129..000000000000 --- a/ports-mgmt/porteasy/src/cvspass +++ /dev/null @@ -1 +0,0 @@ -:pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs Ay=0=h<Z diff --git a/ports-mgmt/porteasy/src/porteasy.8 b/ports-mgmt/porteasy/src/porteasy.8 deleted file mode 100644 index 9cdcd20a78a8..000000000000 --- a/ports-mgmt/porteasy/src/porteasy.8 +++ /dev/null @@ -1,288 +0,0 @@ -.\"- -.\" Copyright (c) 2000 Dag-Erling Coïdan Smørgrav -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer -.\" in this position and unchanged. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd October 1, 2003 -.Dt PORTEASY 8 -.Os -.Sh NAME -.Nm porteasy -.Nd fetch and build ports -.Sh SYNOPSIS -.Nm -.Op Fl abCceFfhIikLlsuVvw -.Op Fl D Ar date -.Op Fl d Ar dir -.Op Fl p Ar dir -.Op Fl r Ar dir -.Op Fl t Ar tag -.Op Ar port | VAR=VAL ... -.Sh DESCRIPTION -.Nm -maintains an updated ports tree, and fetches and builds ports -automatically, keeping track of dependencies. -.Pp -The following options are available: -.Bl -tag -width Fl -.It Fl a -Use the FreeBSD project's anoncvs server as CVS root directory. -.It Fl b -Build the selected ports. -.It Fl C -Don't clean port directories after building. -.It Fl c -Clean the selected ports. -.It Fl D Ar date -Specify a date to use for -.Xr cvs 1 -operations. -.It Fl d Ar dir -Specify the package database directory (normally -.Pa /var/db/pkg ) . -.It Fl e -Deselect ports that are already installed. -.It Fl F -Force installation and registration, even if the port is already -installed. -.It Fl f -Fetch the selected ports. -.It Fl h -Show a summary of options and parameters. -.It Fl I -Select installed ports. -.It Fl i -Describe the selected ports. -.It Fl k -Build packages for the selected ports. -.It Fl L -List the packing lists for the selected ports. -.It Fl l -List the selected ports. -.It Fl p Ar dir -Specify the ports directory (normally -.Pa /usr/ports ) . -.It Fl r Ar dir -Specify the CVS root directory. -.It Fl s -List installed ports and their status. -.It Fl t Ar tag -Specify a tag to use for -.Xr cvs 1 -operations. -.It Fl u -Update all necessary files using -.Xr cvs 1 . -.It Fl V -Show the -.Nm -version number and exit. -.It Fl v -Verbose mode: show more information about what is being done. -.It Fl w -Show the URL of the port's web site if there is one listed in the port -description. -.El -.Ss Environment settings -Any command line argument of the form -.Ar VAR=VAL -is interpreted as a variable assignment which will be exported into -subprocesses' environments. -Thus compile-time configuration options can be specified on the -.Nm -command line. -.Ss Port names -The port names listed on the command line may be either unqualified or -fully qualified. -A fully qualified port name is the path to the port directory relative -to the root of the ports tree (i.e. the port's category and name -separated by a slash). -An unqualified port name is the name of the package built by the -intended port, or part of that name. -.Pp -Unqualified names need to be looked up in the ports index, which is -usually slightly out of date, so fully qualified names should be used -whenever possible. -.Ss Sequence of operation -This section describes the operations performed by -.Nm -and the order in which they are performed. -.Bl -tag -width indent -.It Update index -If the -.Fl u -option was specified and some unqualified port names were listed on -the command line, the index file is updated using -.Xr cvs 1 . -.It Select ports -The selection list is initialized with the ports listed on the command -line (and, if the -.Fl I -option was specified, all installed ports) marked as explicit -dependencies. -Any unqualified names are looked up in the index, using simple -heuristics to identify incompletely named ports. -If a certain match is not found, -.Nm -prints a list of possible matches and exits. -.Pp -All direct and indirect dependencies of the ports listed on the -command line are also selected and marked as dependencies. -.It Update ports tree and discover dependencies -If the -.Fl u -option was specified, the port directories for all selected ports are -updated using -.Xr cvs 1 . -Each selected port's Makefile is scanned to discover dependencies, -which are in turn selected and marked as implicit dependencies. -This process is repeated until no new dependencies are found. -.It Deselect installed ports -.Pp -If the -.Fl e -option was specified, -.Nm -checks to see if any of the selected ports are already installed; -those that are are deselected. -This process is not very accurate, as it will not detect if an older -or alternate version of a selected port is installed. -.It List selected ports -If the -.Fl l -option was specified, the fully qualified name and package name of all -selected ports are listed. -Explicitly selected ports are indicated with a star. -.It List installed ports -If the -.Fl s -option was specified, all installed ports are listed with their status -('<' for ports that are older than the version in the tree, '>' for -those that are newer, '?' for those that could not be identified). -.It Show packing lists -If the -.Fk L -option was specified, the packing lists for all explicitly selected -ports are shown. -.It Describe selected ports -If the -.Fl i -option was specified, -.Nm -prints a description of each port that was specified on the command -line. -.It Show the URLs of the selected ports' web sites -If the -.Fl w -option was specified, -.Nm -prints the URL of the web site of each port that was specified on the -command line, if a URL is listed in that port's description. -.It Clean the tree -If the -.Fl c -option was specified, -.Nm -runs the -.Sq clean -target on every selected port. -If no ports were selected, -.Nm -runs the -.Sq clean -target on every known port that is present in the tree. -.It Fetch ports -If at least one of the -.Fl b , -.Fl f -or -.Fl k -options was specified, -.Nm -runs the -.Sq fetch -target on every selected port. -.It Build, install, package, clean ports -If one or both of the -.Fl f -or -.Fl k -options were specified, -.Nm -runs the -.Sq install -or -.Sq package -target, followed by the -.Sq clean -target (unless the -.Fl C -option was specified), on every explicitly selected port. -.Nm -lets the ports system handle dependencies on its own, since the -reported dependencies are sometimes too inclusive. -.El -.Sh IMPLEMENTATION NOTES -There may be a significant difference between what ports are selected -(and listed if the -.Fl l -option is specified) and what ports are actually installed and/or have -packages built for them, since implicitly selected ports that are -already installed, or somehow pass the dependency check (e.g. because -an alternate, equivalent port has been installed) will be passed over -by the ports system, as indeed they should. -.Pp -.Nm -tries to minimize the number of times -.Xr cvs 1 -is invoked, since the overhead involved in connecting to a remote -server is usually quite high (and the user might have to type a -password every time), but prefers correctness to performance. -The maximum number of invocations is (2 + NC + NP), where NC and NP -are the number of distinct categories and ports (including master -directories and dependencies). -.Sh ENVIRONMENT -.Bl -tag -width PORTEASY_OPTIONS -.It Ev PORTEASY_OPTIONS -Specifies a set of default options for -.Nm . -These options can be overridden by command line parameters. -.El -.Sh FILES -.Nm -maintains and operates on a ports tree, normally -.Pa /usr/ports . -Some information is gathered from the package database, normally -located in -.Pa /var/db/pkg . -.Sh AUTHORS -.Nm -was written by -.An Dag-Erling Smørgrav Aq des@FreeBSD.org . -Several people contributed their comments and suggestions, most -notably -.An Eivind Eklund Aq eivind@FreeBSD.org . diff --git a/ports-mgmt/porteasy/src/porteasy.pl b/ports-mgmt/porteasy/src/porteasy.pl deleted file mode 100644 index af31490f9653..000000000000 --- a/ports-mgmt/porteasy/src/porteasy.pl +++ /dev/null @@ -1,1245 +0,0 @@ -#!/usr/bin/perl -w -#- -# Copyright (c) 2000-2003 Dag-Erling Coïdan Smørgrav -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer -# in this position and unchanged. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# $FreeBSD$ -# - -use strict; -use Fcntl; -use Getopt::Long; - -my $VERSION = "2.7.10"; -my $COPYRIGHT = "Copyright (c) 2000-2003 Dag-Erling Smørgrav. " . - "All rights reserved."; - -# Constants -sub ANONCVS_ROOT { ":pserver:anoncvs\@anoncvs.FreeBSD.org:/home/ncvs" } -sub REQ_EXPLICIT { 1 } -sub REQ_IMPLICIT { 2 } -sub REQ_MASTER { 4 } - -sub CVS_PASSFILE { "%%PREFIX%%/share/porteasy/cvspass" } - -sub PATH_CVS { "/usr/bin/cvs" } -sub PATH_LDCONFIG { "/sbin/ldconfig" } -sub PATH_MAKE { "/usr/bin/make" } - -# Global parameters -my $dbdir = "/var/db/pkg"; # Package database directory -my $index = undef; # Index file -my $portsdir = "/usr/ports"; # Ports directory -my $tag = undef; # CVS tag to use -my $date = undef; # CVS date to use -my $release = undef; # OS release - -# Global flags -my $anoncvs = 0; # Use anoncvs.FreeBSD.org -my $clean = 0; # Clean ports -my $cvsroot = 0; # CVS root directory -my $exclude = 0; # Do not list installed ports -my $fetch = 0; # Fetch ports -my $force = 0; # Force package registration -my $installed = 0; # Select installed ports -my $info = 0; # Show port info -my $dontclean = 0; # Don't clean after build -my $packages = 0; # Build packages -my $list = 0; # List ports -my $plist = 0; # Print packing list -my $build = 0; # Build ports -my $status = 0; # List installed ports and their status -my $update = 0; # Update ports tree from CVS -my $verbose = 0; # Verbose mode -my $website = 0; # Show website URL - -# Global variables -my $need_deps; # Need dependency information -my $have_index; # Index has been read -my %ports; # Maps ports to their directory. -my %pkgname; # Inverse of the above map -my %masterport; # Maps ports to their master ports -my %reqd; # Ports that need to be installed -my %have_dep; # Dependencies that are already present -my %port_dep; # Map ports to their dependency lists -my %installed; # Installed ports -my $capture; # Capture output - -# -# Set process title -# -sub setproctitle(;$) { - my $title = shift; - - $0 = "porteasy $VERSION"; - $0 .= ": $title" - if defined($title); -} - -# -# Shortcut for 'print STDERR' -# -sub stderr(@) { - print(STDERR @_); -} - -# -# Similar to err(3) -# -sub bsd::err($$@) { - my $code = shift; # Return code - my $fmt = shift; # Format string - my @args = @_; # Arguments - - my $msg; # Error message - - $msg = sprintf($fmt, @args); - stderr("$msg: $!\n"); - exit($code); -} - -# -# Similar to errx(3) -# -sub bsd::errx($$@) { - my $code = shift; # Return code - my $fmt = shift; # Format string - my @args = @_; # Arguments - - my $msg; # Error message - - $msg = sprintf($fmt, @args); - stderr("$msg\n"); - exit($code); -} - -# -# Similar to warn(3) -# -sub bsd::warn($@) { - my $fmt = shift; # Format string - my @args = @_; # Arguments - - my $msg; # Error message - - $msg = sprintf($fmt, @args); - stderr("$msg: $!\n"); -} - -# -# Similar to warnx(3) -# -sub bsd::warnx($@) { - my $fmt = shift; # Format string - my @args = @_; # Arguments - - my $msg; # Error message - - $msg = sprintf($fmt, @args); - stderr("$msg\n"); -} - -# -# Call the specified sub with $capture set -# -sub capture($@) { - my $subr = shift; # Subroutine to call - my @args = @_; # Arguments - - my $oldcapture; # Old capture flag - my $rtn; # Return value - - $oldcapture = $capture; - $capture = 1; - $rtn = &{$subr}(@args); - $capture = $oldcapture; - return $rtn; -} - -# -# Print an info message -# -sub info(@) { - - my $msg; # Message - - if ($verbose) { - $msg = join(' ', @_); - chomp($msg); - stderr("$msg\n"); - } -} - -# -# Print an info message about a subprocess -# -sub cmdinfo(@) { - info(">>>", @_); -} - -# -# Change working directory -# -sub cd($) { - my $dir = shift; # Directory to change to - - cmdinfo("cd $dir"); - chdir($dir) - or bsd::err(1, "unable to chdir to %s", $dir); -} - -# -# Run a command and return its output -# -sub cmd($@) { - my $cmd = shift; # Command to run - my @args = @_; # Arguments - - my $pid; # Child pid - local *PIPE; # Pipe - my $output; # Output - my $rtn; # Return value - - cmdinfo(join(" ", $cmd, @args)); - $pid = ($capture || $verbose) ? open(PIPE, "-|") : fork(); - if (!defined($pid)) { - bsd::err(1, ($capture || $verbose) ? "open()" : "fork()"); - } elsif ($pid == 0) { - exec($cmd, @args); - die("child: exec(): $!\n"); - } - if ($capture || $verbose) { - $output = ""; - while (<PIPE>) { - $output .= $_; - if ($verbose) { - stderr($_); - } - } - } - $rtn = ($capture || $verbose) ? close(PIPE) : (waitpid($pid, 0) == $pid); - if (!$rtn) { - if ($? & 0xff) { - bsd::warnx("%s caught signal %d", $cmd, $? & 0x7f); - } elsif ($? >> 8) { - bsd::warnx("%s returned exit code %d", $cmd, $? >> 8); - } else { - bsd::warn("close()"); - } - return undef; - } - if ($capture) { - $output =~ s/\n*$//s; - return $output; - } - return 1; -} - -# -# Run CVS -# -sub cvs($;@) { - my $cmd = shift; # CVS command - - my @args; # Arguments to CVS - - if (!$update) { - return "\n"; - } - if (!$verbose) { - push(@args, "-q"); - } - push(@args, "-f", "-z3", "-R", "-d$cvsroot", $cmd, "-A"); - if ($cmd eq "checkout") { - push(@args, "-P"); - } elsif ($cmd eq "update") { - push(@args, "-P", "-d"); - } - if ($tag) { - push(@args, "-r$tag"); - } - if ($date) { - push(@args, "-D$date"); - } - push(@args, @_); - return cmd(&PATH_CVS, @args); -} - -# -# Run make -# -sub make($@) { - my $port = shift; # Port category/name - my @args = @_; - - push(@args, "PORTSDIR=$portsdir") - unless ($portsdir eq "/usr/ports"); - cd("$portsdir/$port"); - return cmd(&PATH_MAKE, @args); -} - -# -# The undocumented command. -# -sub ecks() { - - local *FILE; # File handle - - sysopen(FILE, "/var/db/port.mkversion", O_RDWR|O_CREAT|O_TRUNC, 0644) - or bsd::err(1, "open()"); - print(FILE "20380119\n"); - close(FILE); -} - -# -# Update the index file -# -sub update_index() { - - my $parent; # Parent directory - - $parent = $portsdir; - $parent =~ s/\/*ports\/*$//; - if (! -d "ports/CVS") { - cd($parent); - cvs("checkout", "-l", "ports") - or bsd::errx(1, "error checking out the index file"); - cd($portsdir); - } else { - cd($portsdir); - cvs("update", "-l") - or bsd::errx(1, "error updating the index file"); - } - cvs("update", "Mk", "Templates") - or bsd::errx(1, "error updating the ports infrastructure"); - $index = "$portsdir/INDEX-" . substr($release, 0, 1); - if (! -f $index) { - $index = "$portsdir/INDEX"; - } -} - -# -# Read the ports index -# -sub read_index() { - - local *INDEX; # File handle - my $line; # Line from file - - return if ($have_index); - info("Reading $index"); - sysopen(INDEX, $index, O_RDONLY) - or bsd::err(1, "can't open $index"); - while ($line = <INDEX>) { - my @port; # Port info - - @port = split(/\|/, $line, 3); - $port[1] =~ s|^/usr/ports/*||; - $ports{$port[0]} = $port[1]; - $pkgname{$port[1]} = $port[0]; - } - close(INDEX); - info(keys(%ports) . " ports in index"); - $have_index = 1; -} - -# -# Find a port by a portion of it's package name -# -sub find_port($) { - my $port = shift; # Port to find - - my @suggest; # Suggestions - - stderr("Can't find required port '$port'"); - @suggest = grep(/^$port/i, keys(%ports)); - if (@suggest == 1 && $suggest[0] =~ m/^$port[0-9.-]/) { - $port = $ports{$suggest[0]}; - stderr(", assuming you mean $pkgname{$port}.\n"); - return $port; - } elsif (@suggest) { - stderr(", maybe you mean:\n " . (join("\n ", @suggest))); - } - stderr("\n"); - return undef; -} - -# -# Add a port to the list of required ports -# -sub add_port($$) { - my $port = shift; # Port to add - my $req = shift; # Requirement (explicit or implicit) - - my $realport; # Real port name - - if ($port =~ m|^([^/]+/[^/]+)$|) { - $realport = $1; - } else { - if (!$have_index) { - read_index(); - } - if (exists($ports{$port})) { - $realport = $ports{$port}; - } else { - $realport = find_port($port); - } - } - if (!$realport) { - return 1; - } - if (!exists($reqd{$realport})) { - $reqd{$realport} = 0; - } - $reqd{$realport} |= $req; - return 0; -} - -# -# Get the ORIGIN line from a manifest -# -sub get_origin($) { - my $port = shift; # Port to inspect - - local *FILE; # File handle - my $origin; # Origin - - if (!sysopen(FILE, "$dbdir/$port/+CONTENTS", O_RDONLY)) { - bsd::warn("can't read manifest for $port"); - return undef; - } - while (<FILE>) { - if (m/^\@comment\s+ORIGIN:(.*)\s*$/) { - $origin = $1; - last; - } - } - close(FILE); - if ($origin) { - info("$port -> $origin\n"); - } - return $origin; -} - -# -# Select installed ports -# -sub add_installed() { - - local *DIR; # Directory handle - my $port; # Installed port - my $origin; # Port's origin - - opendir(DIR, $dbdir) - or bsd::err(1, "can't read database directory"); - foreach $port (readdir(DIR)) { - next if ($port eq "." || $port eq ".." || ! -d "$dbdir/$port"); - if (!defined($origin = get_origin($port))) { - bsd::warnx("$port has no \@origin line"); - if (!defined($origin = $ports{$port})) { - bsd::warnx("installed port %s is unknown", $port); - } - } - if (defined($installed{$port} = $origin)) { - add_port($origin, &REQ_EXPLICIT); - } - } - closedir(DIR); -} - -# -# Find master directory for a port -# -sub find_master($) { - my $port = shift; # Port - - local *FILE; # File handle - - if ($masterport{$port}) { - return $masterport{$port}; - } - - # Look for MASTERDIR in the Makefile. We can't use 'make -V' - # because the Makefile might try to include the master port's - # Makefile, which might not be checked out yet. - open(FILE, "$portsdir/$port/Makefile") - or bsd::err(1, "unable to read Makefile for $port"); - while (<FILE>) { - my $master; # Master directory - - if (/^(?:MAIN|MASTER)DIR\s*=\s*(\S+)\s*$/) { - $master = $1; - } elsif (/^\.?include \"([^\"]+)\/Makefile(?:[^\/\"]*)\"\s*$/) { - $master = $1; - } - if (defined($master) && $master !~ m/WRKDIRPREFIX/) { - $master =~ s/^\$\{.CURDIR\}//; - $master = "/$port/$master"; - $master =~ s|/+|/|g; - 1 while ($master =~ s|/[^\./]*/\.\./|/|); - $master =~ s|^/||; - $master =~ s|/$||; - if ($master eq $port) { - bsd::warnx("master port heuristics failed for %s", $port); - next; - } - if ($master !~ m|^[^/]+/[^/]+$|) { - bsd::warnx("invalid master for %s: %s", $port, $master); - next; - } - close(FILE); - info("$master is master for $port\n"); - return $masterport{$port} = $master; - } - } - close(FILE); - return undef; -} - -# -# Find a dynamic library -# -sub find_library($) { - my $library = shift; # Library to find - - my $ldconfig; # Output from ldconfig(8) - - $ldconfig = capture(\&cmd, (&PATH_LDCONFIG, "-r")); - defined($ldconfig) - or errx(1, "unable to run ldconfig"); - if ($ldconfig =~ m/^\s*\d+:-l$library(\.\d+)* => (.*)$/m) { - info("The $library library is installed as $2"); - return 1; - } - return 0; -} - -# -# Find a binary -# -sub find_binary($) { - my $binary = shift; # Binary to find - - my $dir; # Directory - - if ($binary =~ m|^/|) { - info("$binary is installed as $binary"); - return (-x $binary); - } - foreach $dir (split(/:/, $ENV{'PATH'})) { - if (-x "$dir/$binary") { - info("$binary is installed as $dir/$binary"); - return 1; - } - } - return 0; -} - -# -# Process a dependency list -# -sub add_dependencies($$@) { - my $port = shift; # Port - my $finder = shift; # Finder function - my @dependlist = @_; # Dependency list - - my $item; # Iterator - - foreach $item (@dependlist) { - $item =~ s|\`([^\`]+)\`|capture(\&cmd, "sh", "-c", $1)|eg; - 1 while ($item =~ s|/[^\./]*/\.\./|/|); - if ($item !~ m|^(?:([^:]+):)?$portsdir/([^/:]+/[^/:]+)/?(:[^:]+)?$|) { - bsd::warnx("invalid dependency: %s", $item); - next; - } - my ($lhs, $rhs, $target) = ($1, $2, $3); - next if ($port_dep{$port}->{$rhs}); - # XXX this isn't quite right; lhs-less dependencies should be - # XXX checked against /var/db/pkg or something. - if ($exclude && defined($lhs)) { - if ($have_dep{$rhs}) { - next; - } - info("Verifying status of $rhs ($lhs)"); - if (($lhs =~ m|^/| && -f $lhs) || &{$finder}($lhs)) { - info("$rhs seems to be installed"); - $have_dep{$rhs} = 1; - next; - } - $have_dep{$rhs} = -1; - } - info("Adding $rhs as a dependency for $port"); - $port_dep{$port}->{$rhs} = $target || 'install'; - } -} - -# -# Find a port's dependencies -# -sub find_dependencies($) { - my $port = shift; # Port - - my $dependvars; # Dependency variables - - return () unless $need_deps; - if (!exists($port_dep{$port})) { - $dependvars = capture(\&make, ($port, "-VLIB_DEPENDS")); - defined($dependvars) - or bsd::errx(1, "failed to obtain dependency list"); - add_dependencies($port, \&find_library, split(' ', $dependvars)); - $dependvars = capture(\&make, ($port, - "-VEXTRACT_DEPENDS", - "-VPATCH_DEPENDS", - "-VFETCH_DEPENDS", - "-VBUILD_DEPENDS", - "-VRUN_DEPENDS", - "-VDEPENDS")); - defined($dependvars) - or bsd::errx(1, "failed to obtain dependency list"); - add_dependencies($port, \&find_binary, split(' ', $dependvars)); - } - return keys(%{$port_dep{$port}}); -} - -# -# Update all necessary files to build the specified ports -# -sub update_ports_tree(@) { - my @ports = @_; # Ports to update - - my $port; # Port name - my $category; # Category name - my %upd_cat; # Hash of updated categories - my %upd_port; # Hash of updated ports - my %processed; # Hash of processed ports - my @additional; # Additional dependencies - my $n; # Pass count - my $makev; # Output from 'make -v' - - foreach $port (@ports) { - push(@additional, $port); - } - for ($n = 0; ; ++$n) { - my @update_now; # Ports that need updating now - my $item; # Iterator - my $master; # Master port - my $dependency; # Dependency - - setproctitle("updating"); - - # Determine which ports need updating - foreach $item (@additional) { - next if $processed{$item}; - ($category, $port) = split(/\//, $item); - if (!exists($upd_port{$category})) { - $upd_port{$category} = {}; - } - if (!exists($upd_port{$category}->{$port})) { - $upd_port{$category}->{$port} = 0; - } - push(@update_now, $item); - } - last unless @update_now; - info("Pass $n:", @update_now); - - # Update the relevant sections of the ports tree - foreach $category (keys(%upd_port)) { - my @ports; # Ports to update - - if (!$upd_cat{$category}) { - cd($portsdir); - cvs("update", "-l", $category) - or bsd::errx(1, "error updating the '$category' category"); - $upd_cat{$category} = 1; - } - foreach $port (keys(%{$upd_port{$category}})) { - next if ($upd_port{$category}->{$port}); - push(@ports, $port); - $upd_port{$category}->{$port} = 1; - } - if (@ports) { - cd("$portsdir/$category"); - cvs("update", @ports) - or bsd::errx(1, "error updating the '$category' category"); - } - } - - # Process all unprocessed ports we know of so far - foreach $port (@update_now) { - setproctitle("updating $port"); - - # See if the port has an unprocessed master port - if (($master = find_master($port)) && !$processed{$master}) { - add_port($master, &REQ_MASTER); - info("Adding $master to head of line\n"); - unshift(@additional, $master); - # Need to process master before we continue - next; - } - - # Find the port's package name - if (!exists($pkgname{$port})) { - $makev = capture(\&make, ($port, "-VPKGNAME")); - if ($makev =~ m/^\s*(\S+)\s*$/s) { - $pkgname{$port} = $1; - } else { - bsd::warnx("failed to obtain package name for $port"); - } - } - - # Find the port's dependencies - foreach $dependency (find_dependencies($port)) { - next if ($processed{$dependency}); - if ($reqd{$port} == &REQ_MASTER) { - add_port($dependency, &REQ_MASTER); - } else { - add_port($dependency, &REQ_IMPLICIT); - } - info("Adding $dependency to back of line\n"); - push(@additional, $dependency); - } - - # Mark port as processed - $processed{$port} = 1; - } - } - setproctitle(); -} - -# -# Find a specific file belonging to a specific port -# -sub find_port_file($$) { - my $port = shift; # Port - my $file = shift; # File to look for - - my $master; # Master port - - $master = $port; - while (!-f "$portsdir/$master/$file") { - if (!($master = $masterport{$master})) { - bsd:errx(1, "$port has no $file"); - } - } - return "$portsdir/$master/$file"; -} - -# -# Show port info -# -sub show_port_info($) { - my $port = shift; # Port to show info for - - local *FILE; # File handle - my $info; # Port info - - sysopen(FILE, find_port_file($port, "pkg-descr"), O_RDONLY) - or bsd::err(1, "can't read description for $port"); - $info = join("| ", <FILE>); - close(FILE); - print("+--- Description for $port ($pkgname{$port}):\n| ${info}+---\n"); -} - -# -# Show port's website URL -# -sub show_port_website($) { - my $port = shift; # Port to show info for - - local *FILE; # File handle - my $website; # Port's website - - sysopen(FILE, find_port_file($port, "pkg-descr"), O_RDONLY) - or bsd::err(1, "can't read description for $port"); - while (<FILE>) { - if (m/^WWW:\s*(\S+)\s*$/) { - $website = $1; - } - } - close(FILE); - if (!defined($website)) { - bsd::warnx("No website for $port"); - } else { - print("$website\n"); - } -} - -# -# Show port plist -# -sub show_port_plist($) { - my $port = shift; # Port to show plist for - - my $master; # Master port - local *FILE; # File handle - my $file; # File name - my %files; # Files to list - my $prefix; # Prefix - - $prefix = capture(\&make, ($port, "-VPREFIX")); - chomp($prefix); - sysopen(FILE, find_port_file($port, "pkg-plist"), O_RDONLY) - or bsd::err(1, "can't read packing list for $port"); - while (<FILE>) { - chomp(); - $file = undef; - if (m/^[^\@]/) { - $file = $_; - } elsif (m/^\@cwd\s+(\S+)\s*$/) { - $prefix = $1; - } elsif (m/^\@dirrm\s+(\S+)\s*$/) { - $file = "$1/"; - } elsif (m/^\@comment\s+/) { - # ignore - } elsif (m/^\@(un)?exec\s+/) { - # ignore - } else { - bsd::warnx("unrecognized plist directive: %s", $_); - } - if (defined($file)) { - if ($file !~ m/^\//) { - $file = "$prefix/$file"; - } - $file =~ s|/+|/|g; - $files{$file} = 1; - } - } - close(FILE); - # XXX list man pages? - print("+--- Packing list for $port ($pkgname{$port}):\n"); - foreach (sort(keys(%files))) { - print("| $_\n"); - } - print("+---\n"); -} - -# -# Compare two package names to determine which is newer -# -sub cmp_version($$) { - my $inst = shift; # Installed package - my $port = shift; # Origin port - - my $tree; # Version in tree - - # Shortcut - if (($tree = $pkgname{$port}) eq $inst) { - return '='; - } - - # Compare port epochs - my ($inst_epoch, $tree_epoch) = (0, 0); - $inst =~ s/,(\d+)$// - and $inst_epoch = $1; - $tree =~ s/,(\d+)$// - and $tree_epoch = $1; - if ($inst_epoch != $tree_epoch) { - return ($inst_epoch > $tree_epoch) ? '>' : '<'; - } - - # Split it into components - my @a = split(/[\._-]/, $inst); - my @b = split(/[\._-]/, $tree); - - # Compare the components one by one - while (@a && @b) { - ($a, $b) = (shift(@a), shift(@b)); - next if $a eq $b; - if ($a =~ m/^\d+$/ && $b =~ m/^\d+$/) { - return ($a > $b) ? '>' : '<'; - } - return ($a gt $b) ? '>' : '<'; - } - - # Anything left? - if (@a) { - return '>'; - } elsif (@b) { - return '<'; - } - return '='; -} - -# -# List installed ports -# -sub list_installed() { - - my $pkg; # Installed package - my $origin; # Origin - my $cmp; # Comparator - - foreach $pkg (sort(keys(%installed))) { - $origin = $installed{$pkg}; - if (!defined($origin) || !defined($pkgname{$origin})) { - print(" ? $pkg\n"); - } else { - $cmp = cmp_version($pkg, $origin); - if ($cmp eq '=') { - print(" $pkg\n"); - } else { - printf(" $cmp $pkg ($pkgname{$origin})\n"); - } - } - } -} - -# -# Clean a port -# -sub clean_port($) { - my $port = shift; # Port to clean - - setproctitle("cleaning $port"); - make($port, "clean") - or bsd::warnx("failed to clean %s", $port); - setproctitle(); -} - -# -# Clean the tree -# -sub clean_tree() { - - my $port; # Port name - - # We could just cd to $portsdir and 'make clean', but it'd - # be extremely noisy due to only having a partial tree - foreach $port (keys(%ports)) { - if (-d "$portsdir/$port") { - make($port, "clean", "NO_DEPENDS=yes") - or bsd::warnx("failed to clean %s", $port); - } - } -} - -# -# Fetch a port -# -sub fetch_port($) { - my $port = shift; # Port to fetch - - setproctitle("fetching $port"); - make($port, "fetch") - or bsd::errx(1, "failed to fetch %s", $port); - setproctitle(); -} - -# -# Build a port -# -sub build_port($) { - my $port = shift; # Port to build - - my @makeargs; # Arguments to make() - - if ($packages) { - push(@makeargs, "package"); - push(@makeargs, "DEPENDS_TARGET=package"); - } else { - push(@makeargs, "install"); - } - if ($force) { - push(@makeargs, "-DFORCE_PKG_REGISTER"); - } - if (!$dontclean) { - push(@makeargs, "clean"); - push(@makeargs, "DEPENDS_CLEAN=YES"); - } - setproctitle("building $port"); - make($port, @makeargs) - or bsd::errx(1, "failed to %s %s", $packages ? "package" : "build", $port); - setproctitle(); -} - -# -# Print usage message and exit -# -sub usage() { - - stderr("Usage: porteasy [-abCceFfhIikLlsuVvw] [-D date] [-d dir]\n" . - " [-p dir] [-r dir] [-t tag] [port ...]\n"); - exit(1); -} - -# -# Print version -# -sub version() { - - stderr("This is porteasy $VERSION. -$COPYRIGHT -"); - exit(1); -} - -# -# Print help text -# -sub help() { - - stderr("This is porteasy $VERSION. -$COPYRIGHT - -Options: - -a, --anoncvs Use the FreeBSD project's anoncvs server - -b, --build Build required ports - -C, --dontclean Don't clean after build - -c, --clean Clean the specified ports - -e, --exclude-installed Exclude installed ports - -F, --force-pkg-register Force package registration - -f, --fetch Fetch distfiles - -h, --help Show this information - -I, --installed Select installed ports - -i, --info Show info about specified ports - -k, --packages Build packages for the specified ports - -L, --plist Show the packing lists for the specified ports - -l, --list List required ports and their dependencies - -s, --status List installed ports and their status - -u, --update Update relevant portions of the ports tree - -V, --version Show version number - -v, --verbose Verbose mode - -w, --website Show the URL to the port's website - -Parameters: - -D, --date=DATE Specify CVS date - -d, --dbdir=DIR Specify package directory (default $dbdir) - -p, --portsdir=DIR Specify ports directory (default $portsdir) - -r, --cvsroot=DIR Specify CVS root - -t, --tag=TAG Specify CVS tag - -Report bugs to <des\@freebsd.org>. -"); - exit(1); -} - -MAIN:{ - my $port; # Port name - my $err = 0; # Error count - my $requested = 0; # Number of ports on command line - - setproctitle(); - - # Show usage if no arguments were specified on the command line - if (!@ARGV) { - usage(); - } - - # Get option defaults - if ($ENV{'PORTEASY_OPTIONS'}) { - foreach (split(' ', $ENV{'PORTEASY_OPTIONS'})) { - unshift(@ARGV, $_); - } - } - - # Scan command line options - Getopt::Long::Configure("auto_abbrev", "bundling"); - GetOptions( - "a|anoncvs" => \$anoncvs, - "b|build" => \$build, - "c|clean" => \$clean, - "C|dontclean" => \$dontclean, - "D|date=s" => \$date, - "d|dbdir=s" => \$dbdir, - "e|exclude-installed" => \$exclude, - "F|force-pkg-register" => \$force, - "f|fetch" => \$fetch, - "h|help" => \&help, - "I|installed" => \$installed, - "i|info" => \$info, - "k|packages" => \$packages, - "L|plist" => \$plist, - "l|list" => \$list, - "p|portsdir=s" => \$portsdir, - "r|cvsroot=s" => \$cvsroot, - "s|status" => \$status, - "t|tag=s" => \$tag, - "u|update" => \$update, - "V|version" => \&version, - "v|verbose" => \$verbose, - "w|website" => \$website, - "x|ecks" => \&ecks, - ) - or usage(); - - if (!@ARGV && - ($build || $fetch || $list || $packages || $plist || $website)) { - usage(); - } - - if ($portsdir !~ m/^\//) { - $portsdir = `pwd` . $portsdir; - $portsdir =~ s/\n/\//s; - } - - if ($portsdir !~ m/\/ports\/?$/) { - bsd::errx(1, "ports directory must be named 'ports'"); - } - - # 'package' implies 'build' - if ($packages) { - $build = 1; - } - - # 'status' implies 'installed' - if ($status) { - $installed = 1; - } - - # Set and check CVS root - if ($anoncvs && !$cvsroot) { - $cvsroot = &ANONCVS_ROOT; - if (-f &CVS_PASSFILE) { - $ENV{'CVS_PASSFILE'} = &CVS_PASSFILE; - } - } - if (!$cvsroot) { - $cvsroot = $ENV{'CVSROOT'}; - } - if (!$cvsroot && -f "$portsdir/CVS/Root") { - local *FILE; - - if (sysopen(FILE, "$portsdir/CVS/Root", O_RDONLY)) { - $cvsroot = <FILE>; - chomp($cvsroot); - close(FILE); - } - } - if ($update && !$cvsroot) { - bsd::errx(1, "No CVS root, please use the -r option or set \$CVSROOT"); - } - - # Step 1: update the ports index - $release = `uname -r`; - update_index(); - - # Step 2: build list of explicitly required ports - foreach my $arg (@ARGV) { - if ($arg =~ m/^([A-Z0-9_]+)=(.*)$/) { - $ENV{$1} = $2; - } else { - $err += add_port($arg, &REQ_EXPLICIT); - ++$requested; - } - } - if ($err) { - bsd::errx(1, "some required ports were not found."); - } - if ($installed) { - add_installed(); - } - - # Step 3: update port directories and discover dependencies - $need_deps = ($update || $fetch || $list); - update_ports_tree(keys(%reqd)); - - # Step 4: deselect ports which are already installed - if ($exclude) { - foreach $port (keys(%reqd)) { - if ((exists($installed{$port}) && $installed{$port} > 0) || - -d "$dbdir/$pkgname{$port}") { - info("$port is already installed"); - delete $reqd{$port}; - } - } - } - - # Step 5: list selected ports - if ($list) { - foreach $port (sort(keys(%reqd))) { - next if ($reqd{$port} == &REQ_MASTER); - print((($reqd{$port} & &REQ_EXPLICIT) ? " * " : " "), - "$port ($pkgname{$port})\n"); - } - } - - # Step 6: list installed ports - if ($status) { - list_installed(); - } - - # Step 7: show info - if ($info) { - foreach $port (keys(%reqd)) { - if ($reqd{$port} & &REQ_EXPLICIT) { - show_port_info($port); - } - } - } - - # Step 8: show packing list - if ($plist) { - foreach $port (keys(%reqd)) { - if ($reqd{$port} & &REQ_EXPLICIT) { - show_port_plist($port); - } - } - } - - # Step 9: show website URL - if ($website) { - foreach $port (keys(%reqd)) { - if ($reqd{$port} & &REQ_EXPLICIT) { - show_port_website($port); - } - } - } - - # Step A: clean the ports directories (or the entire tree) - if ($clean) { - if (!$requested) { - clean_tree(); - } else { - foreach $port (keys(%reqd)) { - if ($reqd{$port} & &REQ_EXPLICIT) { - clean_port($port); - } - } - } - } - - # Step B: fetch distfiles - if ($fetch) { - foreach $port (keys(%reqd)) { - if ($reqd{$port} != &REQ_MASTER) { - fetch_port($port); - } - } - } - - # Step C: build ports - only the explicitly required ones, since - # some dependencies (most commonly XFree86) may be bogus. - if ($build || $packages) { - foreach $port (keys(%reqd)) { - if ($reqd{$port} & &REQ_EXPLICIT) { - build_port($port); - } - } - } - - # Done! - exit(0); -} diff --git a/ports-mgmt/portell/Makefile b/ports-mgmt/portell/Makefile deleted file mode 100644 index c334a6acfcfd..000000000000 --- a/ports-mgmt/portell/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# New ports collection makefile for: portell -# Date created: Wed Jan 08 13:25:35 GMT 2003 -# Whom: mich@freebsdcluster.org -# -# $FreeBSD$ -# - -PORTNAME= portell -PORTVERSION= 0.1 -PORTREVISION= 3 -CATEGORIES= misc -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= ${PORTNAME} -EXTRACT_SUFX= .zip - -MAINTAINER= mich@FreeBSD.org -COMMENT= Quick display of FreeBSD port descriptions - -USE_ZIP= YES -USE_PYTHON= YES -USE_REINPLACE= YES - -do-build: - ${REINPLACE_CMD} -e 's/portell.py/portell/' ${WRKSRC}/README.txt - -do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/portell.py ${PREFIX}/bin/portell -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README.txt ${DOCSDIR} -.endif - -post-install: -.if !defined(BATCH) - @${ECHO_MSG} "" - @${ECHO_MSG} "###############################################################################" - @${ECHO_MSG} "# You must run 'portell -u' to initialize the DB" - @${ECHO_MSG} "# ${DOCSDIR}/README.txt for more information." - @${ECHO_MSG} "###############################################################################" - @${ECHO_MSG} "" -.endif - -.include <bsd.port.mk> diff --git a/ports-mgmt/portell/distinfo b/ports-mgmt/portell/distinfo deleted file mode 100644 index 91ee5e576a05..000000000000 --- a/ports-mgmt/portell/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (portell-0.1.zip) = 13121ee620ab27efb0f39267743e1887 diff --git a/ports-mgmt/portell/files/patch-aa b/ports-mgmt/portell/files/patch-aa deleted file mode 100644 index c090face2380..000000000000 --- a/ports-mgmt/portell/files/patch-aa +++ /dev/null @@ -1,151 +0,0 @@ ---- portell.py.orig Mon Aug 11 15:23:47 2003 -+++ portell.py Mon Aug 11 15:34:56 2003 -@@ -1,70 +1,78 @@ --#! /usr/bin/env python
--# portell.py
--# Description: prints a port's descr-file from whatever directory you're in.
--# Author: Ryan "gt3" Kulla
--# Email: ambiod@sbcglobal.net
--# Version: 0.1
--# Usage: portell.py <portname>
--
--import sys, os, shelve
--from string import join
--
--try:
-- PORTELL_DB = os.environ['PORTELL_PATH']
--except KeyError:
-- PORTELL_DB = "/var/db/portell.db"
--
--PORTS_DIR = "/usr/ports/"
--
--def write_pathname(d, dirname, names):
-- dirname = join(dirname.split('/')[:5], '/') # chop port path subdirs
-- d[os.path.basename(dirname)] = dirname
--
--def update_db():
-- if os.access(PORTELL_DB, os.F_OK):
-- os.unlink(PORTELL_DB)
-- try:
-- d = shelve.open(PORTELL_DB)
-- os.chmod(PORTELL_DB, 0666)
-- except:
-- print "can't read or write %s. are you root?" % PORTELL_DB
-- sys.exit(0)
-- os.path.walk(PORTS_DIR, write_pathname, d)
-- d.close()
--
--def main():
-- if len(sys.argv) != 2:
-- print "usage: %s <portname>" % sys.argv[0]
-- sys.exit(0)
--
-- if sys.argv[1] == '-u':
-- update_db()
-- sys.exit(0)
-- else:
-- portname = sys.argv[1]
--
-- if not os.access(PORTELL_DB, os.F_OK):
-- print >> sys.stderr, "you need to create %s first." % PORTELL_DB
-- print >> sys.stderr, "type: %s -u" % sys.argv[0]
-- sys.exit(0)
--
-- d = shelve.open(PORTELL_DB)
--
-- if d.has_key(portname):
-- descr_path = d[portname] + "/pkg-descr"
-- match = descr_path
-- try:
-- descr_file = open(match, 'r').readlines()
-- print "%s reads:\n" % descr_path
-- for line in descr_file:
-- print line,
-- except IOError, errmsg:
-- print errmsg
-- else:
-- print >> sys.stderr, "can't find %s" % portname
--
-- d.close()
--
--
--if __name__=='__main__':
-- main()
-+#! /usr/bin/env python -+# portell.py -+# Description: prints a port's descr-file from whatever directory you're in. -+# Author: Ryan "gt3" Kulla -+# Email: ambiod@sbcglobal.net -+# Version: 0.1 -+# Usage: portell.py <portname> -+ -+import sys, os, shelve -+from string import join -+ -+try: -+ PORTELL_DB = os.environ['PORTELL_PATH'] -+ if sys.version[:3] == '2.2': -+ PORTELL_DB = PORTELL_DB + ".db" -+ -+ PORTELL_DB_FILE = PORTELL_DB + ".db" -+except KeyError: -+ if sys.version[:3] == '2.2': -+ PORTELL_DB = "/var/db/portell.db" -+ else: -+ PORTELL_DB = "/var/db/portell" -+ PORTELL_DB_FILE = "/var/db/portell.db" -+ -+PORTS_DIR = "/usr/ports/" -+ -+def write_pathname(d, dirname, names): -+ dirname = join(dirname.split('/')[:5], '/') # chop port path subdirs -+ d[os.path.basename(dirname)] = dirname -+ -+def update_db(): -+ if os.access(PORTELL_DB_FILE, os.F_OK): -+ os.unlink(PORTELL_DB_FILE) -+ try: -+ d = shelve.open(PORTELL_DB) -+ os.chmod(PORTELL_DB_FILE, 0666) -+ except: -+ print "can't read or write %s. are you root?" % PORTELL_DB_FILE -+ sys.exit(0) -+ os.path.walk(PORTS_DIR, write_pathname, d) -+ d.close() -+ -+def main(): -+ if len(sys.argv) != 2: -+ print "usage: %s <portname>" % sys.argv[0] -+ sys.exit(0) -+ -+ if sys.argv[1] == '-u': -+ update_db() -+ sys.exit(0) -+ else: -+ portname = sys.argv[1] -+ -+ if not os.access(PORTELL_DB_FILE, os.F_OK): -+ print >> sys.stderr, "you need to create %s first." % PORTELL_DB_FILE -+ print >> sys.stderr, "type: %s -u" % sys.argv[0] -+ sys.exit(0) -+ -+ d = shelve.open(PORTELL_DB) -+ -+ if d.has_key(portname): -+ descr_path = d[portname] + "/pkg-descr" -+ match = descr_path -+ try: -+ descr_file = open(match, 'r').readlines() -+ print "%s reads:\n" % descr_path -+ for line in descr_file: -+ print line, -+ except IOError, errmsg: -+ print errmsg -+ else: -+ print >> sys.stderr, "can't find %s" % portname -+ -+ d.close() -+ -+ -+if __name__=='__main__': -+ main() diff --git a/ports-mgmt/portell/pkg-descr b/ports-mgmt/portell/pkg-descr deleted file mode 100644 index e7892ebb0905..000000000000 --- a/ports-mgmt/portell/pkg-descr +++ /dev/null @@ -1,10 +0,0 @@ -portell is a program that allows FreeBSD users to view the description as -givin in its pkg-descr file for a specific port. If you want to know what -the program "Foo" is, then you can type "portell foo" and portell will -find its pkg-descr file and dump it on your display. - -WWW: http://portell.sourceforge.net -AUTHOR: Ryan Kulla <toxicpulse@sbcglobal.net> - -- Michael L. Hostbaek - mich@FreeBSD.org diff --git a/ports-mgmt/portell/pkg-plist b/ports-mgmt/portell/pkg-plist deleted file mode 100644 index 4f3a00422644..000000000000 --- a/ports-mgmt/portell/pkg-plist +++ /dev/null @@ -1,3 +0,0 @@ -bin/portell -%%PORTDOCS%%%%DOCSDIR%%/README.txt -%%PORTDOCS%%@dirrm %%DOCSDIR%% diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile deleted file mode 100644 index 8d13998b66fa..000000000000 --- a/ports-mgmt/portlint/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# New ports collection makefile for: portlint -# Date created: 13 Jun 1997 -# Whom: Jun-ichiro itojun Hagino <itojun@itojun.org> -# -# $FreeBSD$ -# -# This port is self contained in the src directory. -# - -PORTNAME= portlint -PORTVERSION= 2.5.3 -CATEGORIES= devel -MASTER_SITES= # none -DISTFILES= # none - -MAINTAINER= marcus@FreeBSD.org -COMMENT= A verifier for FreeBSD port directory - -NO_BUILD= yes -WRKSRC= ${WRKDIR}/src -USE_PERL5= yes -USE_REINPLACE= yes - -SRC= ${.CURDIR}/src - -MAN1= portlint.1 - -do-fetch: - @${DO_NADA} - -pre-patch: - @${CP} -R ${SRC} ${WRKDIR} - -post-patch: - @${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL}|' ${WRKSRC}/portlint.pl - @${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL}|' \ - ${WRKSRC}/portlintgrep.pl - -do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/portlint.pl ${PREFIX}/bin/portlint - ${INSTALL_MAN} ${WRKSRC}/portlint.1 ${MAN1PREFIX}/man/man1 - ${MKDIR} ${EXAMPLESDIR} - ${INSTALL_SCRIPT} ${WRKSRC}/portlintgrep.pl ${EXAMPLESDIR}/portlintgrep - -.include <bsd.port.mk> diff --git a/ports-mgmt/portlint/pkg-descr b/ports-mgmt/portlint/pkg-descr deleted file mode 100644 index 82ae417ff2b5..000000000000 --- a/ports-mgmt/portlint/pkg-descr +++ /dev/null @@ -1,12 +0,0 @@ -portlint makes a small set of sanity checks for port directory. - -usage: portlint [-AabctvN] [-B#] [port_directory] - -a additional check for scripts/* and pkg/* - -A turn on all additional checks (equivalent to -abcNt) - -b warn $(VARIABLE) - -c committer mode - -v verbose mode - -t nit pick about use of spaces - -N writing a new port - -V print the version and exit - -B# allow # contiguous blank lines (default: 1 line) diff --git a/ports-mgmt/portlint/pkg-plist b/ports-mgmt/portlint/pkg-plist deleted file mode 100644 index d958b3065723..000000000000 --- a/ports-mgmt/portlint/pkg-plist +++ /dev/null @@ -1,3 +0,0 @@ -bin/portlint -%%EXAMPLESDIR%%/portlintgrep -@dirrm %%EXAMPLESDIR%% diff --git a/ports-mgmt/portlint/src/portlint.1 b/ports-mgmt/portlint/src/portlint.1 deleted file mode 100644 index 7256e3d6f549..000000000000 --- a/ports-mgmt/portlint/src/portlint.1 +++ /dev/null @@ -1,155 +0,0 @@ -.\" $FreeBSD$ -.\" -.\" Copyright (c) 1997 by Jun-ichiro Hagino <itojun@itojun.org>. -.\" All Rights Reserved. Absolutely no warranty. -.\" -.Dd July 11, 1997 -.Dt PORTLINT 1 -.Sh NAME -.Nm portlint -.Nd a verifier for port directory -.Sh SYNOPSIS -.Nm portlint -.Op Fl abchvtNV -.Op Fl M Ar ENV -.Op Fl B Ar n -.Op Ar dir -.Sh DESCRIPTION -.Nm -tries to verify the content of a port directory. -The purpose of -.Nm -can be separated into two parts: -.Pq 1 -to let the submitters easily polish their own port directory, and -.Pq 2 -to decrease the labor of the committers. -.Pp -.Nm -uses very simple regular-expression matching for verifying -files that make up a port directory. -Note that it does NOT implement a complete parser for those files. -Because of this the user may see some extra warnings, -especially when checking complex -.Pa Makefile Ns No s . -.Pp -.Sy Options -.Bl -tag -width Fl -.It Fl A -Turn on all additional checks. -.It Fl a -Perform additional checks for extra files, such as -.Pa scripts/* -and -.Pa pkg-* . -.It Fl b -Warn the use of -.Pa $(VARIABLE) . -Some of the committers prefer -.Pa ${VARIABLE} -instead of -.Pa $(VARIABLE) , -even though they are semantically same. -.It Fl C -Pedantic committer flag. This is equivalent to -.Fl abct . -.It Fl c -Committer flag. -It will add several checks useful only for committers. -If you are a committer and performing check just before committing a port, -use this option. -.It Fl h -Show the summary of command line options, then exit. -.It Fl v -Be verbose. -Show the progress report for items that are being checked. -.It Fl t -Nit pick about use of spaces. -.It Fl N -New port flag. -Adds several checks specific to newly submitted port. -If you are willing to submit the directory to be checked as a new port, -use this option. -.It Fl V -Print the portlint version and exit. -.It Fl M Ar ENV -Set make variables to -.Pa ENV -(ex. PORTSDIR=/usr/ports.work). -.It Fl B Ar n -Set the number of contiguous blank lines allowed in -.Pa Makefile -to -.Ar n . -(by default, -.Ar n -is 1) -.It dir -The port directory to be checked. -If omitted, check will be performed over the current directory. -.El -.Sh DIAGNOSTICS -Messages will be sent to standard output, not standard error output. -.Bl -tag -width WARN: foobaa -.It FATAL: ... -This type of error messages suggest that there is some fatal error -in the port directory. -For example, if some files need a rewrite, or if -some inevitable files are missing, this message will show up. -This kind of errors should be avoided BEFORE submitting -a port via send-pr to the committers. -.\"If a submitter submits it without update, committers will need to rewrite -.\"on behalf of the submitters, which may result in delay of -.\"the development of operating system itself. -.It WARN: ... -This type of error messages suggest that some files may (or may not) -need some fix. -Basically, warnings are produced when -.Nm -is not completely sure about the result. -For example, complex -.Pa Makefile Ns No s -may need some statements that can match the regular expression -.Nm -uses for sanity checks. -In those cases, the user should evaluate the result manually, -and obey/ignore the result. -.It OK: ... -This type of messages are used in verbose mode -.Pq Fl v . -.El -.Sh FILES -.Bl -tag -width bsd.port.mkxx -compact -.It Pa bsd.port.mk -master Makefile for ports -.Po -.Pa bsd.pkg.mk -on -.Nx -/ -.Ox -.Pc -.It Pa /usr/ports/* -ports collection -.Po -.Pa /usr/pkgsrc/* -on -.Nx -/ -.Ox -.Pc ; -can be overriden by setting the -.Va PORTSDIR -environment variable. - -.Sh AUTHORS -.An Joe Marcus Clarke Aq marcus@FreeBSD.org -.An Michael Haro Aq mharo@FreeBSD.org -.An Jun-ichiro Hagino Aq itojun@itojun.org -and -.An Yoshishige Arai Aq ryo2@on.rim.or.jp . -.Pp -Many people has contributed patches and comments/suggestions. -.Sh BUGS -.Nm -is not a magic wand, as described above. diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl deleted file mode 100644 index 5fe3cc1236ab..000000000000 --- a/ports-mgmt/portlint/src/portlint.pl +++ /dev/null @@ -1,2221 +0,0 @@ -#! /usr/bin/perl -# ex:ts=4 -# -# portlint - lint for port directory -# implemented by: -# Jun-ichiro itojun Hagino <itojun@itojun.org> -# Yoshishige Arai <ryo2@on.rim.or.jp> -# -# Copyright(c) 1997 by Jun-ichiro Hagino <itojun@itojun.org>. -# All rights reserved. -# Freely redistributable. Absolutely no warranty. -# -# Please note that this perl code used to be able to handle (Open|Net|Free)BSD -# bsd.port.mk. There are significant differences in those so you'll have -# hard time upgrading this... -# This code now mainly supports FreeBSD, but patches to update support for -# OpenBSD and NetBSD will be accepted. -# -# $FreeBSD$ -# $Id: portlint.pl,v 1.30 2003/11/22 20:37:23 marcus Exp $ -# - -use vars qw/ $opt_a $opt_A $opt_b $opt_c $opt_h $opt_t $opt_v $opt_M $opt_N $opt_B $opt_V /; -use Getopt::Std; -use File::Find; -use IPC::Open2; -#use strict; - -my ($err, $warn); -my ($extrafile, $parenwarn, $committer, $verbose, $usetabs, $newport); -my $contblank; -my $portdir; -my $makeenv = ""; - -$err = $warn = 0; -$extrafile = $parenwarn = $committer = $verbose = $usetabs = $newport = 0; -$contblank = 1; -$portdir = '.'; - -# version variables -my $major = 2; -my $minor = 5; -my $micro = 3; - -sub l { '[{(]'; } -sub r { '[)}]'; } -sub s { '[ \t]'; } - -my $l = &l; -my $r = &r; -my $s = &s; - -# default setting - for FreeBSD -my $portsdir = '/usr/ports'; -my $rcsidstr = 'FreeBSD'; -my $multiplist = 0; -my $ldconfigwithtrue = 0; -my $rcsidinplist = 0; -my $mancompress = 1; -my $manstrict = 0; -my $newxdef = 1; -my $automan = 1; -my $autoinfo = 1; -my $manchapters = '123456789ln'; -my $localbase = '/usr/local'; - -my %lang_pref = qw( - arabic ar - chinese zh - french fr - german de - hebrew iw - hungarian hu - japanese ja - korean ko - polish pl - portuguese pt - russian ru - ukrainian uk - vietnamese vi -); -my @lang_cat = keys %lang_pref; -my @lang_short = values %lang_pref; -my $re_lang_short = '(' . join('|', @lang_short) . ')-'; - -my ($prog) = ($0 =~ /([^\/]+)$/); -sub usage { - print STDERR <<EOF; -usage: $prog [-AabchvtN] [-M ENV] [-B#] [port_directory] - -a additional check for scripts/* and pkg-* - -A turn on all additional checks (equivalent to -abcNt) - -b warn \$(VARIABLE) - -C pedantic committer mode (equivalent to -abct) - -c committer mode - -h show summary of command line options - -v verbose mode - -t nit pick about use of spaces - -N writing a new port - -V print the version and exit - -M ENV set make variables to ENV (ex. PORTSDIR=/usr/ports.work) - -B# allow # contiguous blank lines (default: $contblank line) -EOF - exit 0; -} - -sub version { - print "$prog version $major.$minor.$micro\n"; - exit $major; -} - -getopts('AabCchtvB:M:NV'); - -&usage if $opt_h; -&version if $opt_V; -$extrafile = 1 if $opt_a || $opt_A || $opt_C; -$parenwarn = 1 if $opt_b || $opt_A || $opt_C; -$committer = 1 if $opt_c || $opt_A || $opt_C; -$verbose = 1 if $opt_v; -$newport = 1 if $opt_N || $opt_A; -$usetabs = 1 if $opt_t || $opt_A || $opt_C; -$contblank = $opt_B if $opt_B; -$makeenv = $opt_M if $opt_M; - -$portdir = $ARGV[0] ? $ARGV[0] : '.'; - -# OS dependent configs -# os portsdir rcsid mplist ldcfg plist-rcsid mancompresss strict localbase newxdef automan autoinfo -my @osdep = split(/\n/, <<EOF); -FreeBSD /usr/ports FreeBSD 0 0 0 1 0 /usr/local 1 1 1 -NetBSD /usr/pkgsrc NetBSD 1 1 1 0 1 /usr/pkg 0 0 0 -EOF -my $osname = `uname -s`; -$osname =~ s/\n$//; -foreach my $i (@osdep) { - if ($i =~ /^$osname\t(.*)/) { - print "OK: found OS config for $osname.\n" if ($verbose); - ($portsdir, $rcsidstr, $multiplist, $ldconfigwithtrue, - $rcsidinplist, $mancompress, $manstrict, $localbase, - $newxdef, $automan, $autoinfo) - = split(/\t+/, $1); - last; - } -} - -# The PORTSDIR environment variable overrides our defaults. -$portsdir = $ENV{PORTSDIR} if ( defined $ENV{'PORTSDIR'} ); - -if ($verbose) { - print "OK: config: portsdir: \"$portsdir\" ". - "rcsidstr: \"$rcsidstr\" ". - "multiplist: $multiplist ". - "ldconfigwithtrue: $ldconfigwithtrue ". - "rcsidinplist: $rcsidinplist ". - "mancompress: $mancompress ". - "manstrict: $manstrict ". - "localbase: $localbase ". - "\n"; -} - -# -# just for safety. -# -if (! -d $portdir) { - print STDERR "FATAL: invalid directory $portdir specified.\n"; - exit 1; -} - -chdir "$portdir" || die "$portdir: $!"; - -# get make vars -my @varlist = qw( - PORTNAME PORTVERSION PORTREVISION PORTEPOCH PKGNAME PKGNAMEPREFIX - PKGNAMESUFFIX DISTNAME DISTFILES CATEGORIES MASTERDIR MAINTAINER - MASTER_SITES WRKDIR WRKSRC NO_WRKSUBDIR PATCHDIR SCRIPTDIR FILESDIR - PKGDIR COMMENT DESCR PLIST PKGCATEGORY PKGINSTALL PKGDEINSTALL - PKGREQ PKGMESSAGE MD5_FILE .CURDIR INSTALLS_SHLIB -); - -my $cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", @varlist); - -my %makevar; -my $i = 0; -for (split(/\n/, `$cmd`)) { - print "OK: makevar: $varlist[$i] = $_\n" if ($verbose); - $makevar{$varlist[$i]} = $_; - $i++; -} - -# -# variables for global checks. -# -my $sharedocused = 0; -my %plistmanall = (); -my %plistmangz = (); -my %plistman = (); -my %manlangs = (); - -my %predefined = (); -# historical, no longer in FreeBSD's bsd.sites.mk -foreach my $i (split(/\n/, <<EOF)) { -GNU ftp://prep.ai.mit.edu/pub/gnu/%SUBDIR%/ -GNU ftp://wuarchive.wustl.edu/systems/gnu/%SUBDIR%/ -GNU ftp://ftp.ecrc.net/pub/gnu/%SUBDIR%/ -PERL_CPAN ftp://ftp.cdrom.com/pub/perl/CPAN/modules/by-module/%SUBDIR%/ -SUNSITE ftp://sunsite.unc.edu/pub/Linux/%SUBDIR%/ -SUNSITE ftp://ftp.funet.fi/pub/mirrors/sunsite.unc.edu/pub/Linux/%SUBDIR%/ -SUNSITE ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/%SUBDIR%/ -TEX_CTAN ftp://ftp.cdrom.com/pub/tex/ctan/%SUBDIR%/ -TEX_CTAN ftp://ftp.tex.ac.uk/public/ctan/tex-archive/%SUBDIR%/ -GNOME ftp://ftp.cybertrails.com/pub/gnome/%SUBDIR%/ -AFTERSTEP ftp://ftp.alpha1.net/pub/mirrors/ftp.afterstep.org/%SUBDIR%/ -AFTERSTEP ftp://casper.yz.yamagata-u.ac.jp/pub/X11/apps/afterstep/%SUBDIR%/ -WINDOWMAKER ftp://ftp.io.com/pub/%SUBDIR%/ -EOF - my ($j, $k) = split(/\t+/, $i); - $predefined{$k} = $j; -} - -# Read bsd.sites.mk -$sites_mk = "$portsdir/Mk/bsd.sites.mk"; -open(MK, $sites_mk) || die "$sites_mk: $!"; -my @site_groups = grep($_ = /^MASTER_SITE_(\w+)/ && $1, <MK>); -close(MK); - -$cmd = join(' -V MASTER_SITE_', "make $makeenv -f - all", @site_groups); - -$i = 0; - -open2(IN, OUT, $cmd); - -print OUT <<EOF; -all: - # do nothing - -.include "$sites_mk" -EOF - -close(OUT); - -while (<IN>) { - my $g = $site_groups[$i]; - for my $s (split()) { - $predefined{$s} = $g; - } - $i++; -} - -close(IN); - -# -# check for files. -# -my @checker = ($makevar{DESCR}, 'Makefile', $makevar{MD5_FILE}); -my %checker = ( - $makevar{DESCR} => 'checkdescr', - 'Makefile' => 'checkmakefile', - $makevar{MD5_FILE} => 'TRUE' - ); -if ($extrafile) { - my @files = ( - <$makevar{SCRIPTDIR}/*>, - @makevar{DESCR,PLIST,PKGINSTALL,PKGDEINSTALL,PKGREQ,PKGMESSAGE} - ); - - foreach my $i (@files) { - next if (! -T $i); - next if (defined $checker{$i}); - if ($i =~ /\bpkg-plist$/ - || ($multiplist && $i =~ /\bpkg-plist/)) { - unshift(@checker, $i); - $checker{$i} = 'checkplist'; - } else { - push(@checker, $i); - $checker{$i} = 'checkpathname'; - } - } -} -foreach my $i (<$makevar{PATCHDIR}/patch-*>) { - next if (! -T $i); - next if (defined $checker{$i}); - push(@checker, $i); - $checker{$i} = 'checkpatch'; -} -foreach my $i (@checker) { - print "OK: checking $i.\n" if ($verbose); - if (! -f "$i") { - &perror("FATAL: no $i in \"$portdir\".") unless $i eq $makevar{MD5_FILE} && $makevar{DISTFILES} eq ""; - } else { - my $proc = $checker{$i}; - &$proc($i) || &perror("Cannot open the file $i\n"); - if ($proc ne 'checkpatch') { - &checklastline($i) - || &perror("Cannot open the file $i\n"); - } - } -} - -# Check to make sure there is no pkg-comment file anymore. -if (-f 'pkg-comment') { - &perror("FATAL: Use of pkg-comment is obsolete. Use the COMMENT macro within the port's Makefile instead."); -} - -if ($committer) { - sub find_proc { - return if /^\.\.?$/; - - (my $fullname = $File::Find::name) =~ s#^\./##; - - print "OK: checking the file name of $fullname.\n" if ($verbose); - - if ($fullname eq 'work') { - &perror("FATAL: $fullname: be sure to cleanup the working directory ". - "before committing the port."); - - $File::Find::prune = 1; - } elsif (-l) { - &perror("Warning: $fullname: this is a symlink. ". - "CVS will ignore it."); - } elsif (-z) { - &perror("FATAL: $fullname: empty file and should be removed. ". - "If it still needs to be there, put a dummy comment ". - "to state that the file is intentionally left empty."); - } elsif (-d && scalar(my @x = <$_/{*,.?*}>) <= 1) { - &perror("FATAL: $fullname: empty directory should be removed."); - } elsif (/^\./) { - &perror("Warning: $fullname: dotfiles are not preferred. ". - "If this file is a dotfile to be installed as an example, ". - "consider importing it as \"dot$_\"."); - } elsif (/\.(orig|rej|bak)$/ || /~$/ || /^\#/) { - &perror("FATAL: $fullname: for safety, be sure to cleanup ". - "backup files before committing the port."); - } elsif (/(^|\.)core$/) { - &perror("FATAL: $fullname: for safety, be sure to cleanup ". - "core files before committing the port."); - } elsif ($_ eq 'CVS' && -d) { - if ($newport) { - &perror("FATAL: $fullname: for safety, be sure to cleanup ". - "CVS directories before importing the new port."); - } - - $File::Find::prune = 1; - } - } - - find(\&find_proc, '.'); - - sub checksubdir { - my $dir = shift; - - print "OK: checking CVS status of \"$dir\".\n" if ($verbose); - opendir DIR, $dir; - my @filenames = readdir DIR; - closedir DIR; - - my %entries; - if (-f "$dir/CVS/Entries") { - open ENTRIES, "<$dir/CVS/Entries"; - while (<ENTRIES>) { - chomp; - my @entry = split /\//; - if ($entry[0] eq 'D') { - $entries{ $entry[1] } = $entry[0] - if $entry[1]; - } - elsif ($entry[0] eq '') { - if ($entry[2] =~ /^-/) { - $entries{ $entry[1] } = 'x'; - } - elsif ($entry[2] eq '0') { - $entries{ $entry[1] } = 'n'; - } - else { - $entries{ $entry[1] } = 'f'; - } - } - else { - &perror("WARN: can not parse CVS line $_"); - } - } - close ENTRIES; - } else { - &perror("WARN: no CVS directories. Use -n to check a new port."); - return; - } - - if (-f "$dir/CVS/Entries.Log") { - open ENTRIES, "<$dir/CVS/Entries.Log"; - while (<ENTRIES>) { - chomp; - my $cmd; - my @entry = split /\//; - if (/^(.) (.*)$/) { - $cmd = $1; - @entry = split /\//, $2; - } - else { - $cmd = 'A'; - @entry = split /\//; - } - if ($cmd eq 'A') { - if ($entry[0] eq 'D') { - $entries{ $entry[1] } = $entry[0] - if $entry[1]; - } - elsif ($entry[0] eq '') { - if ($entry[2] =~ /^-/) { - $entries{ $entry[1] } = 'x'; - } - elsif ($entry[2] eq '0') { - $entries{ $entry[1] } = 'n'; - } - else { - $entries{ $entry[1] } = 'f'; - } - } - else { - &perror("WARN: can not parse CVS line $_"); - } - } - elsif ($cmd eq 'R') { - delete $entries{ $entry[1] } - if $entry[1]; - } - # ignore unknown commands - } - close ENTRIES; - } - - foreach (@filenames) { - next - if /^(?:\.\.?|CVS)$/; - my $filename = $dir eq '.' ? $_ : "$dir/$_"; - if (-d $filename) { - if (!$entries{$_} || $entries{$_} ne 'D') { - &perror("FATAL: directory $filename not in CVS."); - } - else { - delete $entries{$_}; - checksubdir($filename); - } - } - else { - if (!$entries{$_}) { - &perror("FATAL: file $filename not in CVS."); - } - elsif ($entries{$_} eq 'D') { - &perror("FATAL: file $filename is a directory in CVS."); - } - elsif ($entries{$_} eq 'x') { - &perror("FATAL: file $filename is deleted in CVS."); - } - elsif ($entries{$_} eq 'n') { - if (!system("egrep", "-q", "\\\$$rcsidstr\[^\$\]+\\\$", $filename)) { - &perror("WARN: RCS tag \"\$$rcsidstr\$\" ". - "should be empty in new file $filename."); - } - delete $entries{$_}; - } - else { - delete $entries{$_}; - } - } - } - - while (my ($file, $type) = each %entries) { - next if $type eq 'x'; - if ($type eq 'D') { - &perror("FATAL: CVS directory $dir/$file missing"); - } - else { - &perror("FATAL: CVS file $dir/$file missing"); - } - } - } - - checksubdir('.') - unless $newport; - - # Check for ports that may break INDEX - my $indexerr = `env LOCALBASE=/nonexistentlocal X11BASE=/nonexistentx make $makeenv describe 2>&1 >/dev/null`; - chomp $indexerr; - $indexerr =~ tr/\n/ /s; - &perror("FATAL: breaks INDEX ($indexerr).") - if ($indexerr); -} -if ($err || $warn) { - print "$err fatal errors and $warn warnings found.\n" -} else { - print "looks fine.\n"; -} -exit $err; - -# -# pkg-descr -# -sub checkdescr { - my($file) = @_; - my(%maxchars) = ($makevar{DESCR}, 80); - my(%maxlines) = ($makevar{DESCR}, 24); - my(%errmsg) = ($makevar{DESCR}, "exceeds $maxlines{$makevar{DESCR}} ". - "lines, make it shorter if possible."); - my($longlines, $linecnt, $tmp) = (0, 0, ""); - - open(IN, "< $file") || return 0; - while (<IN>) { - $tmp .= $_; - chomp || &perror("WARN: $file: should terminate in '\n'."); - $linecnt++; - $longlines++ if ($maxchars{$file} < length); - } - if ($linecnt > $maxlines{$file}) { - &perror("WARN: $file $errmsg{$file}". - "(currently $linecnt lines)"); - } else { - print "OK: $file: has $linecnt lines.\n" if ($verbose); - } - if ($longlines > 0) { - &perror("WARN: $file: includes lines that exceed $maxchars{$file} ". - "characters."); - } - if ($tmp =~ /[\033\200-\377]/) { - &perror("WARN: $file: includes iso-8859-1, or ". - "other local characters. files should be in ". - "plain 7-bit ASCII"); - } - if ($file =~ /\bpkg-descr/ && $tmp =~ m,http://,) { - my $has_url = 0; - my $has_www = 0; - foreach my $line (grep($_ =~ "http://", split(/\n+/, $tmp))) { - $has_url = 1; - if ($line =~ m,WWW:[ \t]+http://,) { - $has_www = 1; - } - } - - if ($has_url && ! $has_www) { - &perror("FATAL: $file: contains a URL but no \"WWW:\""); - } - } - close(IN); -} - -# -# pkg-plist -# -sub checkplist { - my($file) = @_; - my($curdir) = ($localbase); - my(%omfremoveseen) = (); - my(%omfinstallseen) = (); - my(%omfseen) = (); - my($inforemoveseen, $infoinstallseen, $infoseen) = (0, 0, 0); - my(%omfafterinstall) = (); - my(%omfafterremove) = (); - my($infobeforeremove, $infoafterinstall) = (0, 0); - my($infooverwrite) = (0); - my($rcsidseen) = (0); - - my(@exec_omf) = (); - my(@exec_info) = (); - my(@unexec_omf) = (); - my(@unexec_info) = (); - my(@omffile) = (); - my(@infofile) = (); - - open(IN, "< $file") || return 0; - while (<IN>) { - if ($_ =~ /[ \t]+\n?$/) { - &perror("WARN: $file [$.]: whitespace before end ". - "of line."); - } - - # make it easier to handle. - $_ =~ s/\s+$//; - $_ =~ s/\n$//; - - if ($osname eq 'NetBSD' && $_ =~ /<\$ARCH>/) { - &perror("WARN: $file [$.]: use of <\$ARCH> deprecated, ". - "use \${MACHINE_ARCH} instead."); - } - if (m'lib/perl5/site_perl/%%PERL_VER%%') { - &perror("WARN: $file [$.]: use \%\%SITE_PERL\%\% ". - "instead of lib/perl5/site_perl/\%\%PERL_VER\%\%."); - } - if ($_ =~ /^\@/) { - if ($_ =~ /^\@(cwd|cd)[ \t]+(\S+)/) { - $curdir = $2; - } elsif ($_ =~ /^\@unexec[ \t]+rm[ \t]/) { - if ($_ !~ /%[DB]/) { - &perror("WARN: $file [$.]: use \"%D\" or \"%B\" to ". - "specify prefix."); - } - if ($_ !~ /true$/ && $_ !~ /rm -f/) { - &perror("WARN: $file [$.]: add \"2>&1 ". - ">/dev/null || true\" ". - "to \"\@unexec rm\"."); - } - } elsif ($_ =~ /^\@unexec[ \t]+rmdir/) { - if ($_ !~ /%[DB]/) { - &perror("WARN: $file [$.]: use \"%D\" or \"%B\" to ". - "specify prefix."); - } - if ($_ !~ /true$/) { - &perror("WARN: $file [$.]: use \"\@dirrm\" ". - "instead of \"\@unexec rmdir\"."); - } - } elsif ($_ =~ /^\@exec[ \t]+scrollkeeper-install[ \t]+-q\s+(\S+)\s+.+$/) { - push(@exec_omf, $1); - my $ot = $1; - $ot =~ s/^\%D\///; - $omfinstallseen{$ot} = $.; - } elsif (!$autoinfo && $_ =~ /^\@exec[ \t]+install-info\s+(.+)\s+(.+)$/) { - $infoinstallseen = $.; - push(@exec_info, $1); - } elsif ($autoinfo && $_ =~ /^\@exec[ \t]+install-info\s+(.+)\s+(.+)$/) { - &perror("WARN: $file [$.]: \@exec install-info is deprecated in favor of adding info files into the Makefile using the INFO macro."); - } elsif ($_ =~ /^\@unexec[ \t]+scrollkeeper-uninstall[ \t]+-q\s+(\S+)\s+.+$/) { - push(@unexec_omf, $1); - my $ot = $1; - $ot =~ s/^\%D\///; - $omfremoveseen{$ot} = $.; - } elsif (!$autoinfo && $_ =~ /^\@unexec[ \t]+install-info[ \t]+--delete\s+(.+)\s+(.+)$/) { - $inforemoveseen = $.; - push(@unexec_info, $1); - } elsif ($autoinfo && $_ =~ /^\@unexec[ \t]+install-info[ \t]+--delete\s+(.+)\s+(.+)$/) { - &perror("WARN: $file [$.]: \@unexec install-info is deprecated in favor of adding info files into the Makefile using the INFO macro."); - } elsif ($_ =~ /^\@(exec|unexec)/) { - if (/ldconfig/) { - if ($ldconfigwithtrue - && !/\/usr\/bin\/true/) { - &perror("FATAL: $file [$.]: ldconfig ". - "must be used with ". - "\"||/usr/bin/true\"."); - } - &perror("WARN: $file [$.]: possible ". - "direct use of ldconfig ". - "in PLIST found. use ". - "INSTALLS_SHLIB instead."); - } - } elsif ($_ =~ /^\@(comment)/) { - $rcsidseen++ if (/\$$rcsidstr[:\$]/); - } elsif ($_ =~ /^\@(owner|group)\s/) { - &perror("WARN: $file [$.]: \@$1 should not be needed"); - } elsif ($_ =~ /^\@(dirrm|option)/) { - ; # no check made - } else { - &perror("WARN: $file [$.]: ". - "unknown pkg-plist directive \"$_\""); - } - next; - } - - if ($_ =~ /^\//) { - &perror("FATAL: $file [$.]: use of full pathname ". - "disallowed."); - } - - if ($_ =~ /\.la$/) { - &perror("WARN: $file [$.]: installing libtool archives, ". - "please use USE_LIBTOOL in Makefile if possible"); - } - - if ($_ =~ /\.so(\.\d+)?$/ && $makevar{INSTALLS_SHLIB} eq '') { - &perror("WARN: $file [$.]: installing shared libraries, ". - "please define INSTALLS_SHLIB as appropriate"); - } - - if ($autoinfo && $_ =~ /\.info$/) { - &perror("WARN: $file [$.]: enumerating info files in the plist is deprecated in favor of adding info files into the Makefile using the INFO macro."); - } - - if ($autoinfo && $_ =~ /\.info-\d+$/) { - &perror("FATAL: $file [$.]: numbered info files are obsolete and not portable; add info files using the INFO macro in the Makefile."); - } - - if ($_ =~ /.*\.omf$/) { - $omfseen{$_} = $.; - $omfafterinstall{$_}++ if ($omfinstallseen{$_}); - $omfafterremove{$_}++ if ($omfremoveseen{$_}); - push(@omffile, $_); - } - - if (!$autoinfo) { - if ($_ =~ /^info\/.*info(-[0-9]+)?$/) { - $infoseen = $.; - $infoafterinstall++ if ($infoinstallseen); - $infobeforeremove++ if (!$inforemoveseen); - push(@infofile, $_); - } - - if ($_ =~ /^info\/dir$/) { - &perror("FATAL: $file [$.]: \"info/dir\" should not be listed.". - "use install-info to add/remove ". - "an entry."); - $infooverwrite++; - } - } - - if ($_ =~ /^(\%\%PORTDOCS\%\%)?share\/doc\//) { - &perror("WARN: $file [$.]: consider using DOCSDIR macro"); - $sharedocused++; - } elsif ($_ =~ /^(\%\%PORTDOCS\%\%)?\%\%DOCSDIR\%\%/) { - $sharedocused++; - } - - if ($_ =~ /^share\/examples\//) { - &perror("WARN: $file [$.]: consider using EXAMPLESDIR macro"); - } - - if ($_ =~ m#man/([^/]+/)?man([$manchapters])/([^\.]+\.[$manchapters])(\.gz)?$#) { - if ($4 eq '') { - $plistman{$2} .= ' ' . $3; - if ($mancompress) { - &perror("FATAL: $file [$.]: ". - "unpacked man file $3 ". - "listed. must be gzipped."); - } - } else { - $plistmangz{$2} .= ' ' . $3; - if (!$mancompress) { - &perror("FATAL: $file [$.]: ". - "gzipped man file $3$4 ". - "listed. unpacked one should ". - "be installed."); - } - } - $plistmanall{$2} .= ' ' . $3; - if ($1 ne '') { - $manlangs{substr($1, 0, length($1) - 1)}++; - } - } - - if ($curdir !~ m#^$localbase# - && $curdir !~ m#^/usr/X11R6#) { - &perror("WARN: $file [$.]: installing to ". - "directory $curdir discouraged. ". - "could you please avoid it?"); - } - - if ("$curdir/$_" =~ m#^$localbase/share/doc#) { - print "OK: $file [$.]: seen installation to share/doc. ". - "($curdir/$_)\n" if ($verbose); - $sharedocused++; - } - } - - # Check that each OMF file has an install and deinstall line. - my $omf_install = join(" ", @exec_omf); - $omf_install .= ' '; - my $omf_deinstall = join(" ", @unexec_omf); - $omf_deinstall .= ' '; - - foreach my $of (@omffile) { - if ($omf_install !~ /\%D\/\Q$of\E/) { - &perror("FATAL: $file: you need an '\@exec scrollkeeper-install -q \%D/$of 2>/dev/null || /usr/bin/true' line"); - } - if ($omf_deinstall !~ /\%D\/$of/) { - &perror("FATAL: $file: you need an '\@unexec scrollkeeper-uninstall -q \%D/$of 2>/dev/null || /usr/bin/true' line"); - } - } - - if (!$autoinfo) { -# check that every infofile has an exec install-info and unexec install-info - my $exec_install = join(" ", @exec_info); - $exec_install .= ' '; - my $unexec_install = join(" ", @unexec_info); - $unexec_install .= ' '; - - foreach my $if (@infofile) { - next if ($if =~ m/info-/); - if ($exec_install !~ m/\%D\/\Q$if\E/) { - &perror("FATAL: $file: you need an '\@exec install-info \%D/$if \%D/info/dir' line"); - } - if ($unexec_install !~ m/\%D\/$if/) { - &perror("FATAL: $file: you need an '\@unexec install-info --delete \%D/$if \%D/info/dir' line"); - } - } - } - - if ($rcsidinplist && !$rcsidseen) { - &perror("FATAL: $file: RCS tag \"\$$rcsidstr\$\" must be present ". - "as \@comment.") - } - - if (((!$autoinfo && !$infoseen) || $autoinfo) && !scalar(keys %omfseen)) { - close(IN); - return 1; - } - if (scalar(keys %omfseen)) { - if (!scalar(keys %omfinstallseen)) { - &perror("FATAL: $file: scrollkeeper-install must be used to ". - "add/delete entries from the ScrollKeeper OMF database."); - } else { - foreach my $of (keys %omfseen) { - if ($omfafterinstall{$of}) { - &perror("FATAL: $file [$omfinstallseen{$of}]: move ". - "\"\@exec scrollkeeper-install\" ". - "line to make sure that it is placed after ". - "the $of entry."); - } - } - } - if (!scalar(keys %omfremoveseen)) { - &perror("FATAL: $file: \"\@unexec scrollkeeper-uninstall\" must ". - "be placed after the OMF file it uninstalls."); - } else { - foreach my $of (keys %omfseen) { - if ($omfafterremove{$of}) { - &perror("FATAL: $file [$omfremoveseen{$of}]: move ". - "\"\@unexec scrollkeeper-uninstall\" ". - "line to make sure that it is placed after ". - "the $of entry."); - } - } - } - } - - if (!$autoinfo && $infoseen) { - if (!$infoinstallseen) { - if ($infooverwrite) { - &perror("FATAL: $file: install-info must be used to ". - "add/delete entries into \"info/dir\"."); - } - &perror("FATAL: $file: \"\@exec install-info \%D/... \%D/info/dir\" must be placed ". - "after all the info files."); - } elsif ($infoafterinstall) { - &perror("FATAL: $file [$infoinstallseen]: move ". - "\"\@exec install-info\" line to make ". - "sure that it is placed after all the info files."); - } - if (!$inforemoveseen) { - &perror("FATAL: $file: \"\@unexec install-info --delete \%D/... \%D/info/dir\" must ". - "be placed before any of the info files listed."); - } elsif ($infobeforeremove) { - &perror("FATAL: $file [$inforemoveseen]: move ". - "\"\@exec install-info --delete\" ". - "line to make sure ". - "that it is placed before any of the info files. "); - } - } - close(IN); -} - -# -# misc files -# -sub checkpathname { - my($file) = @_; - my($whole); - - open(IN, "< $file") || return 0; - $whole = ''; - while (<IN>) { - $whole .= $_; - } - &abspathname($whole, $file); - close(IN); -} - -sub checklastline { - my($file) = @_; - my($whole); - - open(IN, "< $file") || return 0; - $whole = ''; - while (<IN>) { - $whole .= $_; - } - if ($whole !~ /\n$/) { - &perror("FATAL: $file: the last line has to be ". - "terminated by \\n."); - } - if ($whole =~ /\n([ \t]*\n)+$/) { - &perror("WARN: $file: seems to have unnecessary blank lines ". - "at the last part."); - } - - close(IN); -} - -sub checkpatch { - my($file) = @_; - my($whole); - - if (-z "$file") { - &perror("FATAL: $file: has no content. should be removed ". - "from repository."); - return; - } - - open(IN, "< $file") || return 0; - $whole = ''; - while (<IN>) { - $whole .= $_; - } - if ($committer && $whole =~ /\$([A-Za-z0-9]+)[:\$]/) { - my $lineno = &linenumber($`); - &perror("WARN: $file [$lineno]: includes possible RCS tag \"\$$1\$\". ". - "use binary mode (-ko) on commit/import.") unless - $1 eq $rcsidstr; - } - - close(IN); -} - -# -# Makefile -# -sub checkmakefile { - my($file) = @_; - my($rawwhole, $whole, $idx, @sections); - my($i, $j, $k, $l); - my @cat = (); - my $has_lang_cat = 0; - my $port_lang = ''; - my $tmp; - my $bogusdistfiles = 0; - my @varnames = (); - my($portname, $portversion, $distfiles, $distname, $extractsufx) = ('', '', '', '', ''); - my $masterport = 0; - my $slaveport = 0; - my $use_gnome_hack = 0; - my($realwrksrc, $wrksrc, $nowrksubdir) = ('', '', ''); - my(@mman, @pman); - - open(IN, "< $file") || return 0; - $rawwhole = ''; - $tmp = 0; - while (<IN>) { - if ($_ =~ /[ \t]+\n?$/) { - &perror("WARN: $file [$.]: whitespace before ". - "end of line."); - } - if ($_ =~ /^ /) { # 8 spaces here! - &perror("WARN: $file [$.]: use tab (not space) to make ". - "indentation"); - } - if ($usetabs) { - if (m/^[A-Za-z0-9_-]+.?= /) { - if (m/[?+]=/) { - &perror("WARN: $file [$.]: use a tab (not space) after a ". - "variable name"); - } else { - &perror("FATAL: $file [$.]: use a tab (not space) after a ". - "variable name"); - } - } - } -# -# I'm still not very convinced, for using this kind of magical word. -# 1. This kind of items are not important for Makefile; -# portlint should not require any additional rule to Makefile. -# portlint should simply implement items that are declared in Handbook. -# 2. If we have LINTSKIP, we can't stop people using LINTSKIP too much. -# IMHO it is better to warn the user and let the user think twice, -# than let the user escape from portlint. -# Uncomment this part if you are willing to use these magical words. -# Thu Jun 26 11:37:56 JST 1997 -# -- itojun -# -# if ($_ =~ /^# LINTSKIP\n?$/) { -# print "OK: skipping from line $. in $file.\n" -# if ($verbose); -# $tmp = 1; -# next; -# } -# if ($_ =~ /^# LINTAGAIN\n?$/) { -# print "OK: check start again from line $. in $file.\n" -# if ($verbose); -# $tmp = 0; -# next; -# } -# if ($_ =~ /# LINTIGNORE/) { -# print "OK: ignoring line $. in $file.\n" if ($verbose); -# next; -# } -# next if ($tmp); - $rawwhole .= $_; - } - close(IN); - - # - # whole file: blank lines. - # - $whole = "\n" . $rawwhole; - study $whole; - print "OK: checking contiguous blank lines in $file.\n" - if ($verbose); - $i = "\n" x ($contblank + 2); - if ($whole =~ /$i/) { - my $lineno = &linenumber($`); - &perror("FATAL: $file [$lineno]: contiguous blank lines ". - "(> $contblank lines) found."); - } - - # - # whole file: $(VARIABLE) - # - if ($parenwarn) { - print "OK: checking for \$(VARIABLE).\n" if ($verbose); - if ($whole =~ /\$\([\w\d]+\)/) { - my $lineno = &linenumber($`); - &perror("WARN: $file [$lineno]: use \${VARIABLE}, instead of ". - "\$(VARIABLE)."); - } - } - - # - # whole file: USE_* used too late - # - pos($whole) = 0; - if ($whole =~ /^\.include\s+<bsd\.port\.pre\.mk>$/gm) { - print "OK: checking for USE_* used too late.\n" if ($verbose); - my @use_early = qw( - APACHE - GNUSTEP - IMAKE - JAVA - KDE(?:BASE|LIBS)_VER - LIBRUBY - LINUX_PREFIX - OPENSSL - PYTHON - QT2? - QT_VER - RUBY - X_PREFIX - ); - - my @other_early = qw( - EMACS_PORT_NAME - ); - - my $earlypattern = join('|', 'USE_(?:'.join('|', @use_early).')', - @other_early); - - while ($whole =~ /^($earlypattern)[+?:!]?=/gmo) { - my $lineno = &linenumber($`); - &perror("FATAL: $file [$lineno]: $1 is set after ". - "including bsd.port.pre.mk."); - } - } - - # - # whole file: anything after bsd.port(.post).mk - # - print "OK: checking for anything after bsd.port(.post).mk.\n" - if ($verbose); - if ($whole =~ /^\.include\s+<bsd\.port(?:\.post)\.mk>\s*[^\s]/m) { - &perror("FATAL: $file: do not include anything after ". - "bsd.port(.post).mk."); - } - - # - # whole file: USE_* as a user-settable option - # - print "OK: checking for USE_* as a user-settable option.\n" if ($verbose); - while ($whole =~ /\n\s*\.\s*(?:el)?if[^\n]*?\b(\w*USE_)(\w+)(?\![^\n]*\n#?\.error)/g) { - my $lineno = &linenumber($`); - &perror("WARN: $file [$lineno]: is $1$2 a user-settable option? ". - "Consider using WITH_$2 instead.") - if ($1.$2 ne 'USE_GCC'); - } - - # - # whole file: NO_CHECKSUM - # - # XXX Don't compress newlines since it messes up line number calculation. - #$whole =~ s/\n#[^\n]*/\n/g; - #$whole =~ s/\n\n+/\n/g; - print "OK: checking NO_CHECKSUM.\n" if ($verbose); - if ($whole =~ /\nNO_CHECKSUM/) { - my $lineno = &linenumber($`); - &perror("FATAL: $file [$lineno]: use of NO_CHECKSUM discouraged. ". - "it is intended to be a user variable."); - } - - # - # whole file: PKGNAME - # - print "OK: checking PKGNAME.\n" if ($verbose); - if ($whole =~ /\nPKGNAME.?=/) { - my $lineno = &linenumber($`); - &perror("FATAL: $file [$lineno]: PKGNAME is obsoleted by PORTNAME, ". - "PORTVERSION, PKGNAMEPREFIX and PKGNAMESUFFIX."); - } - - # - # whole file: IS_INTERACTIVE/NOPORTDOCS - # - print "OK: checking IS_INTERACTIVE.\n" if ($verbose); - if ($whole =~ /\nIS_INTERACTIVE/) { - if ($whole !~ /defined\((BATCH|FOR_CDROM)\)/) { - my $lineno = &linenumber($`); - &perror("WARN: $file [$lineno]: use of IS_INTERACTIVE ". - "discouraged. provide batch mode by using BATCH and/or ". - "FOR_CDROM."); - } - } - print "OK: checking for use of NOPORTDOCS.\n" if ($verbose); - if ($whole =~ /NOPORTSDOC/) { - my $lineno = &linenumber($`); - &perror("WARN: $file [$lineno]: NOPORTSDOC found. Do you ". - "mean NOPORTDOCS?"); - } - if ($sharedocused && $whole !~ /defined\s*\(?NOPORTDOCS\)?/ - && $whole !~ /def\s*\(?NOPORTDOCS\)?/ - && $whole !~ m#(\$[\{\(]PREFIX[\}\)]|$localbase)/share/doc#) { - &perror("WARN: $file: use \".if !defined(NOPORTDOCS)\" to wrap ". - "installation of files into $localbase/share/doc."); - } - - # - # whole file: direct use of command names - # - my %cmdnames = (); - print "OK: checking direct use of command names.\n" if ($verbose); - foreach my $i (qw( -awk basename cat chmod chown cp echo expr false file find gmake grep gzcat -ldconfig ln md5 mkdir mv patch perl rm rmdir ruby sed sh touch tr which xargs xmkmf - )) { - $cmdnames{$i} = "\$\{\U$i\E\}"; - } - $cmdnames{'env'} = '${SETENV}'; - $cmdnames{'gunzip'} = '${GUNZIP_CMD}'; - $cmdnames{'gzip'} = '${GZIP_CMD}'; - $cmdnames{'install'} = '${INSTALL_foobaa}'; - $cmdnames{'python'} = '${PYTHON_CMD}'; - $cmdnames{'strip'} = '${STRIP_CMD}'; - foreach my $i (qw(aclocal autoconf autoheader automake autoreconf autoupdate autoscan ifnames libtool libtoolize)) { - $autocmdnames{$i} = "\$\{" . ( ( $i !~ /auto|aclocal|libtool/ ) ? "AUTO" : "" ) . "\U$i\E\}"; - } - # - # ignore parameter string to echo command. - # note that we leave the command as is, since we need to check the - # use of echo itself. - $j = $whole; - $j =~ s/([ \t][\@\-]{0,2})(echo|\$[\{\(]ECHO[\}\)]|\$[\{\(]ECHO_MSG[\}\)])[ \t]+("(\\'|\\"|[^"])*"|'(\\'|\\"|[^'])*')[ \t]*;?(\n?)/$1$2;$3/g; #" - foreach my $i (keys %cmdnames) { - # XXX This is a hack. Really, we should break $j up into individual - # lines, and go through each one. - while ($j =~ /^(.*$i.*)$/gm) { - my $curline = $1; - my $lineno = &linenumber($`); - if ($curline =~ /(^|\s+)[\@\-]{0,2}$i\b/ - && $curline !~ /^[A-Z]+_TARGET[?+]?=[^\n]+$i/m - && $curline !~ /^IGNORE(.)?=[^\n]+$i/m - && $curline !~ /^BROKEN(.)?=[^\n]+$i/m - && $curline !~ /^RESTRICTED(.)?=[^\n]+$i/m - && $curline !~ /^NO_PACKAGE(.)?=[^\n]+$i/m - && $curline !~ /^NO_CDROM(.)?=[^\n]+$i/m - && $curline !~ /^CATEGORIES(.)?=[^\n]+$i/m - && $curline !~ /^COMMENT(.)?=[^\n]+$i/m) { - &perror("WARN: $file [$lineno]: possible direct use of ". - "command \"$i\" found. use ". - "$cmdnames{$i} instead."); - } - } - } - - foreach my $i (keys %autocmdnames) { - # XXX Same hack as above. - while ($j =~ /^(.*($i\d*).*)$/gm) { - my $lm = $1; - my $sm = $2; - my $lineno = &linenumber($`); - if ($lm =~ /(^|\s+)[\@\-]{0,2}($i\d*)\b/ - && $lm !~ /^[A-Z]+_TARGET[?+]?=[^\n]+($i\d*)/m - && $lm !~ /^IGNORE(.)?=[^\n]+($i\d*)/m - && $lm !~ /^BROKEN(.)?=[^\n]+($i\d*)/m - && $lm !~ /^RESTRICTED(.)?=[^\n]+($i\d*)/m - && $lm !~ /^NO_PACKAGE(.)?=[^\n]+($i\d*)/m - && $lm !~ /^NO_CDROM(.)?=[^\n]+($i\d*)/m - && $lm !~ /^CATEGORIES(.)?=[^\n]+($i\d*)/m - && $lm !~ /^COMMENT(.)?=[^\n]+($i\d*)/m) { - &perror("WARN: $file [$lineno]: possible direct use of ". - "command \"$sm\" found. Use $autocmdnames{$i} ". - "instead and set according USE_*_VER= flag"); - } - } - } - - # - # whole file: ldconfig must come with "true" command - # - if ($ldconfigwithtrue - && $j =~ /(ldconfig|\$[{(]LDCONFIG[)}])/ - && $j !~ /(\/usr\/bin\/true|\$[{(]TRUE[)}])/) { - my $lineno = &linenumber($`); - &perror("FATAL: $file [$lineno]: ldconfig must be used with ". - "\"||\${TRUE}\"."); - } - - # - # whole file: ${GZIP_CMD} -9 (or any other number) - # - if ($j =~ /\${GZIP_CMD}\s+-(\w+(\s+-)?)*(\d)/) { - my $lineno = &linenumber($`); - &perror("WARN: $file [$lineno]: possible use of \"\${GZIP_CMD} -$3\" ". - "found. \${GZIP_CMD} includes \"-\${GZIP}\" which ". - "sets the compression level."); - } - - # - # whole file: ${MKDIR} -p - # - if ($j =~ /\${MKDIR}\s+-p/) { - my $lineno = &linenumber($`); - &perror("WARN: $file [$lineno]: possible use of \"\${MKDIR} -p\" ". - "found. \${MKDIR} includes ". - "\"-p\" by default."); - } - - # - # whole file: full path name - # - &abspathname($whole, $file); - - # - # whole file: SITE_PERL - # - print "OK: checking SITE_PERL.\n" if ($verbose); - if ($whole =~ /\nSITE_PERL[?:]?=/) { - my $lineno = &linenumber($`); - &perror("FATAL: $file [$lineno]: use of SITE_PERL discouraged. ". - "it is set in bsd.port.mk."); - } - - # - # whole file: ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} - # - if ($j =~ m'\${(?:LOCALBASE|PREFIX)}/lib/perl5/site_perl/\${PERL_VER}') { - my $lineno = &linenumber($`); - &perror("WARN: $file [$lineno]: possible use of \"\${LOCALBASE}/lib/perl5/site_perl/\${PERL_VER}\" ". - "found. use \"\${SITE_PERL}\" instead."); - } - - # - # whole file: USE_GNOME check - # - if ($whole =~ /^USE_GNOME[?:]?=\s*(.*)$/m) { - if ($1 =~ /gnomehack/) { - $use_gnome_hack = 1; - } - } - - # - # whole file: check for deprecated USE_MESA - # - if ($whole =~ /^USE_MESA[?:]?=/m) { - my $lineno = &linenumber($`); - &perror("WARN: $file [$lineno]: USE_MESA is deprecated". - ". use USE_GL instead."); - } - - # - # slave port check - # - my $masterdir = $makevar{MASTERDIR}; - if ($masterdir ne '' && $masterdir ne $makevar{'.CURDIR'}) { - $slaveport = 1; - print "OK: slave port detected, checking for inclusion of $masterdir/Makefile.\n" - if ($verbose); - if ($whole !~ /\n\.include\s+[<"]\$\{MASTERDIR\}\/Makefile[">]\s*$/) { - &perror('FATAL: $file: the last line of a slave port\'s Makefile has to be'. - ' .include "${MASTERDIR}/Makefile"'); - } - print "OK: checking master port in $masterdir.\n" if ($verbose); - if (! -e "$masterdir/Makefile") { - &perror("WARN: unable to locate master port in $masterdir"); - } - } - - # - # break the makefile into sections. - # - $tmp = $rawwhole; - # keep comment, blank line, comment in the same section - $tmp =~ s/(#.*\n)\n+(#.*)/$1$2/g; - @sections = split(/\n\n+/, $tmp); - for ($i = 0; $i <= $#sections; $i++) { - if ($sections[$i] !~ /\n$/) { - $sections[$i] .= "\n"; - } - } - $idx = 0; - - # - # section 1: comment lines. - # - print "OK: checking comment section of $file.\n" if ($verbose); - my @linestocheck = split("\n", <<EOF); -Whom -Date [cC]reated -EOF - if ($osname eq 'NetBSD') { - unshift(@linestocheck, '(New )?[pP](ackage|ort)s [cC]ollection [mM]akefile [fF]or'); - } else { - unshift(@linestocheck, '(New )?[pP]orts [cC]ollection [mM]akefile [fF]or'); - } - $tmp = $sections[$idx++]; - $tmp = "\n" . $tmp; # to make the begin-of-line check easier - - if ($tmp =~ /\n[^#]/) { - &perror("FATAL: $file: non-comment line in comment section."); - } - foreach my $i (@linestocheck) { - $j = $i; - $j =~ s/\(.*\)\?//g; - $j =~ s/\[(.)[^\]]*\]/$1/g; - if ($tmp !~ /# $i:[ \t]+\S+/) { - &perror("FATAL: $file: no \"$j\" line in comment section."); - } else { - print "OK: \"$j\" seen in $file.\n" if ($verbose); - } - } - if ($tmp =~ m/Version [rR]equired/) { - &perror("WARN: $file: Version required is no longer needed in the comment section."); - } - my $tmp2 = ""; - for (split(/\n/, $tmp)) { - $tmp2 .= $_ if (m/\$$rcsidstr/); - } - if ($tmp2 !~ /#(\s+)\$$rcsidstr([^\$]*)\$$/) { - - &perror("FATAL: $file: no \$$rcsidstr\$ line in comment ". - "section."); - } else { - print "OK: \$$rcsidstr\$ seen in $file.\n" if ($verbose); - if ($1 ne ' ') { - &perror("WARN: $file: please use single whitespace ". - "right before \$$rcsidstr\$ tag."); - } - if ($2 ne '') { - if ($verbose || $newport) { # XXX - &perror("WARN: $file: ". - ($newport ? 'for new port, ' - : 'is it a new port? if so, '). - "make \$$rcsidstr\$ tag in comment ". - "section empty, to make CVS happy."); - } - } - } - - # - # for the rest of the checks, comment lines are not important. - # - for ($i = 0; $i < scalar(@sections); $i++) { - $sections[$i] = "\n" . $sections[$i]; - $sections[$i] =~ s/\n#[^\n]*//g; - $sections[$i] =~ s/\n\n+/\n/g; - $sections[$i] =~ s/\\\n/ /g; - $sections[$i] =~ s/^\n//; - } - - # - # - # section 2: PORTNAME/PORTVERSION/... - # - print "OK: checking first section of $file (PORTNAME/...).\n" - if ($verbose); - $tmp = $sections[$idx++]; - - # check the order of items. - &checkorder('PORTNAME', $tmp, $file, qw( -PORTNAME PORTVERSION PORTREVISION PORTEPOCH CATEGORIES MASTER_SITES -MASTER_SITE_SUBDIR PKGNAMEPREFIX PKGNAMESUFFIX DISTNAME EXTRACT_SUFX -DISTFILES DIST_SUBDIR EXTRACT_ONLY - )); - - # check the items that has to be there. - $tmp = "\n" . $tmp; - print "OK: checking PORTNAME/PORTVERSION.\n" if ($verbose); - if ($tmp !~ /\nPORTNAME(.)?=/) { - &perror("FATAL: $file: PORTNAME has to be there.") unless ($slaveport && $makevar{PORTNAME} ne ''); - } elsif ($1 ne '') { - &perror("WARN: $file: unless this is a master port, PORTNAME has to be set by \"=\", ". - "not by \"$1=\".") unless ($masterport); - } - if ($tmp !~ /\nPORTVERSION(.)?=/) { - &perror("FATAL: $file: PORTVERSION has to be there.") unless ($slaveport && $makevar{PORTVERSION} ne ''); - } elsif ($1 ne '') { - &perror("WARN: $file: unless this is a master port, PORTVERSION has to be set by \"=\", ". - "not by \"$1=\".") unless ($masterport); - } - if ($newport) { - print "OK: checking for existence of PORTREVISION in new port.\n" - if ($verbose); - if ($tmp =~ /^PORTREVISION(.)?=/m) { - &perror("WARN: $file: new ports should not set PORTREVISION."); - } - } - if ($newport) { - print "OK: checking for existence of PORTEPOCH in new port.\n" - if ($verbose); - if ($tmp =~ /^PORTEPOCH(.)?=/m) { - &perror("WARN: $file: new ports should not set PORTEPOCH."); - } - } - print "OK: checking CATEGORIES.\n" if ($verbose); - if ($tmp !~ /\nCATEGORIES(.)?=/) { - &perror("FATAL: $file: CATEGORIES has to be there.") unless ($slaveport && $makevar{CATEGORIES} ne ''); - } elsif (($i = $1) ne '' && $i =~ /[^?+]/) { - &perror("WARN: $file: unless this is a master port, CATEGORIES should be set by \"=\", \"?=\", or \"+=\", ". - "not by \"$i=\".") unless ($masterport); - } - - @cat = split(/\s+/, $makevar{CATEGORIES}); - if (@cat == 0) { - &perror("FATAL: $file: CATEGORIES left blank. set it to \"misc\"". - " if nothing seems apropriate."); - } - - if ($committer && $makevar{'.CURDIR'} =~ m'/([^/]+)/[^/]+/?$') { - if ($cat[0] ne $1 && $makevar{PKGCATEGORY} ne $1 ) { - &perror("FATAL: $file: category \"$1\" must be listed first"); - } - } - -#MICHAEL: can these three lang cat checks be combined? - # skip the first category specification if it's a language specific one. - if (grep($_ eq $cat[0], @lang_cat)) { - $has_lang_cat = 1; - $port_lang = $lang_pref{$cat[0]}; - shift @cat; - } - - # skip further if more language specific ones follow. - if (@cat && grep($_ eq $cat[0], @lang_cat)) { - &perror("WARN: $file: multiple language specific categories detected. ". - "are you sure?"); - do { - shift @cat; - } while (@cat && grep($_ eq $cat[0], @lang_cat)); - } - - # check x11 in CATEGORIES - if ($newxdef) { -#MICHAEL: I don't understand this line - if (2 <= @cat && $cat[1] eq "x11") { - &perror("WARN: $file: only specific kind of apps should ". - "specify \"x11\" in CATEGORIES. ". - "Do you mean just USE_XLIB? ". - "Then remove \"x11\" from CATEGORIES."); - } - } - - if (2 <= @cat) { - # skip the first one that we know is _not_ language specific. - shift @cat; - - # any language specific one after non language specific ones? - foreach my $cat (@cat) { - if (grep($_ eq $cat, @lang_cat)) { - $has_lang_cat = 1; - $port_lang = $lang_pref{$cat}; - &perror("WARN: $file: when you specify multiple categories, ". - "language specific category should come first."); - } - } - } - - # check the URL - if (($tmp =~ /\nMASTER_SITES[+?]?=[ \t]*([^\n]*)\n/ - && $1 !~ /^[ \t]*$/) || ($makevar{MASTER_SITES} ne '')) { - print "OK: seen MASTER_SITES, sanity checking URLs.\n" - if ($verbose); - my @sites = split(/\s+/, $1); - my $skipnext = 0; - foreach my $i (@sites) { - if ($skipnext) { - $skipnext = 0; - next; - } - $skipnext++ if ($i =~ /^#/); - if ($i =~ m#^\w+://#) { - &urlcheck($i, $file); - unless (&is_predefined($i, $file)) { - print "OK: URL \"$i\" ok.\n" - if ($verbose); - } - } else { - print "OK: non-URL \"$i\" ok.\n" - if ($verbose); - } - } - } else { - &perror("WARN: $file: no MASTER_SITES found. is it ok?"); - } - - # check DISTFILES and related items. - $distfiles = $1 if ($tmp =~ /\nDISTFILES[+?]?=[ \t]*([^\n]+)\n/); - #$portname = $1 if ($tmp =~ /\nPORTNAME[+?]?=[ \t]*([^\n]+)\n/); - #$portversion = $1 if ($tmp =~ /\nPORTVERSION[+?]?=[ \t]*([^\n]+)\n/); - $portname = $makevar{PORTNAME}; - $portversion = $makevar{PORTVERSION}; - $distname = $1 if ($tmp =~ /\nDISTNAME[+?]?=[ \t]*([^\n]+)\n/); - $extractsufx = $1 if ($tmp =~ /\nEXTRACT_SUFX[+?]?=[ \t]*([^\n]+)\n/); - - # check bogus EXTRACT_SUFX. - if ($extractsufx ne '') { - print "OK: seen EXTRACT_SUFX, checking value.\n" if ($verbose); - if ($distfiles ne '') { - &perror("WARN: $file: no need to define EXTRACT_SUFX if ". - "DISTFILES is defined."); - } - if ($extractsufx eq '.tar.gz') { - &perror("WARN: $file: EXTRACT_SUFX is \".tar.gz.\" ". - "by default. you don't need to specify it."); - } - } else { - print "OK: no EXTRACT_SUFX seen, using default value.\n" - if ($verbose); - $extractsufx = '.tar.gz'; - } - - print "OK: sanity checking PORTNAME/PORTVERSION.\n" if ($verbose); - if ($distname ne '' && $distname eq "$portname-$portversion") { - &perror("WARN: $file: DISTNAME is \${PORTNAME}-\${PORTVERSION} by ". - "default, you don't need to define DISTNAME."); - } - if ($portname =~ /^$re_lang_short/) { - &perror("FATAL: $file: language prefix is automatically". - " set by PKGNAMEPREFIX.". - " you must remove it from PORTNAME."); - } - if ($portname =~ /\$[\{\(].+[\}\)]/) { - &perror("WARN: $file: using variable in PORTNAME.". - " consider using PKGNAMEPREFIX and/or PKGNAMESUFFIX."); - } elsif ($portname =~ /-/ && $distname ne '') { - &perror("WARN: $file: using hyphen in PORTNAME.". - " consider using PKGNAMEPREFIX and/or PKGNAMESUFFIX."); - } - if ($portversion eq '') { - &perror("FATAL: $file: PORTVERSION must be specified"); - } - if ($portversion =~ /^pl[0-9]*$/ - || $portversion =~ /^[0-9]*[A-Za-z]?[0-9]*(\.[0-9]*[A-Za-z]?[0-9]*)*$/) { - print "OK: PORTVERSION \"$portversion\" looks fine.\n" if ($verbose); - } elsif ($portversion =~ /^[^\-]*\$[{\(].+[\)}][^\-]*$/) { - &perror("WARN: $file: using variable, \"$portversion\", as version ". - "number"); - } elsif ($portversion =~ /-/) { - &perror("FATAL: $file: PORTVERSION should not contain a hyphen.". - "should modify \"$portversion\"."); - } else { - &perror("FATAL: $file: PORTVERSION looks illegal. ". - "should modify \"$portversion\"."); - - } - - # if DISTFILES have only single item, it is better to avoid DISTFILES - # and to use combination of DISTNAME and EXTRACT_SUFX. - # example: - # DISTFILES=package-1.0.tgz - # should be - # DISTNAME= package-1.0 - # EXTRACT_SUFX= .tgz - if ($distfiles =~ /^\S+$/ && $distfiles !~ /:[^\/:]+$/) { - $bogusdistfiles++; - print "OK: seen DISTFILES with single item, checking value.\n" - if ($verbose); - &perror("WARN: $file: use of DISTFILES with single file ". - "discouraged. distribution filename should be set by ". - "DISTNAME and EXTRACT_SUFX."); - if ($distfiles eq (($distname ne '') ? $distname : "$portname-$portversion") . $extractsufx) { - &perror("WARN: $file: definition of DISTFILES not necessary. ". - "DISTFILES is \${DISTNAME}/\${EXTRACT_SUFX} ". - "by default."); - } - - # display advice only in certain cases. -#MICHAEL: will this work with multiple distfiles in this list? what about -# doing the same sort of thing for DISTNAME, is it needed? - if ($distfiles =~ /^\Q$i\E([\-.].+)$/) { - &perror("WARN: $file: how about \"EXTRACT_SUFX=$1\"". - ", instead of DISTFILES?"); - } - } - - # additional checks for committer. - if ($committer && $has_lang_cat) { - &perror("WARN: $file: be sure to include language code ". - "\"$port_lang-\" ". - "in the module alias name."); - } - - if ($committer) { - if (opendir(DIR, ".")) { - my @tgz = grep(/\.tgz$/, readdir(DIR)); - closedir(DIR); - - if (@tgz) { - my $tgz = (2 <= @tgz) - ? '{' . join(',', @tgz) . '}' - : $tgz[0]; - - &perror("WARN: be sure to remove $portdir/$tgz ". - "before committing the port."); - } - } - } - - push(@varnames, qw( -PORTNAME PORTVERSION PORTREVISION PORTEPOCH CATEGORIES MASTER_SITES -MASTER_SITE_SUBDIR PKGNAMEPREFIX PKGNAMESUFFIX DISTNAME EXTRACT_SUFX -DISTFILES EXTRACT_ONLY - )); - - # - # section 3: PATCH_SITES/PATCHFILES(optional) - # - print "OK: checking second section of $file (PATCH*: optional).\n" - if ($verbose); - $tmp = $sections[$idx]; - - if ($tmp =~ /(PATCH_SITES|PATCH_SITE_SUBDIR|PATCHFILES|PATCH_DIST_STRIP)/) { - &checkearlier($file, $tmp, @varnames); - - if ($tmp =~ /^PATCH_SITES=/) { - print "OK: seen PATCH_SITES.\n" if ($verbose); - $tmp =~ s/^[^\n]+\n//; - } - if ($tmp =~ /^PATCH_SITE_SUBDIR=/) { - print "OK: seen PATCH_SITE_SUBDIR.\n" if ($verbose); - $tmp =~ s/^[^\n]+\n//; - } - if ($tmp =~ /^PATCHFILES=/) { - print "OK: seen PATCHFILES.\n" if ($verbose); - $tmp =~ s/^[^\n]+\n//; - } - if ($tmp =~ /^PATCH_DIST_STRIP=/) { - print "OK: seen PATCH_DIST_STRIP.\n" if ($verbose); - $tmp =~ s/^[^\n]+\n//; - } - - &checkextra($tmp, 'PATCH_SITES', $file); - - $idx++; - } - - push(@varnames, qw( -PATCH_SITES PATCHFILES PATCH_DIST_STRIP - )); - - # - # section 4: MAINTAINER - # - print "OK: checking third section of $file (MAINTAINER).\n" - if ($verbose); - $tmp = $sections[$idx++]; - - &checkearlier($file, $tmp, @varnames); - &checkorder('MAINTAINER', $tmp, $file, qw( -MAINTAINER COMMENT - )); - - $tmp = "\n" . $tmp; - if ($tmp =~ /\nMAINTAINER\??=([^\n]+)/) { - my $addr = $1; - $addr =~ s/^\s*//; - $addr =~ s/\s*$//; - if ($addr =~ /[\s,<>()]/) { - &perror("FATAL: $file: MAINTAINER should be a single address without comment."); - } - if ($addr !~ /^[^\@]+\@[\w\d\-\.]+$/) { - &perror("FATAL: $file: MAINTAINER address, $addr, does not appear to be a valid email address."); - } - $tmp =~ s/\nMAINTAINER\??=[^\n]+//; - } elsif ($whole !~ /\nMAINTAINER[?]?=/) { - &perror("FATAL: $file: no MAINTAINER listed.") unless ($slaveport && $makevar{MAINTAINER} ne ''); - } - $tmp =~ s/\n\n+/\n/g; - - # check COMMENT - if ($tmp !~ /\nCOMMENT(.)?=/) { - &perror("FATAL: $file: COMMENT has to be there.") unless ($slaveport && $makevar{COMMENT} ne ''); - } elsif ($1 ne '') { - &perror("WARN: $file: unless this is a master port, COMMENT has to be set by \"=\", ". - "not by \"$1=\".") unless ($masterport); - } else { # check for correctness - if (($makevar{COMMENT} !~ /^["0-9A-Z]/) || ($makevar{COMMENT} =~ m/\.$/)) { #" - &perror("WARN: $file: COMMENT should begin with a capital, and end without a period"); - } elsif (length($makevar{COMMENT}) > 70) { - &perror("WARN: $file: COMMENT exceeds 70 characters limit."); - } - } - - push(@varnames, qw( -MAINTAINER COMMENT - )); - - # - # section 5: *_DEPENDS (may not be there) - # - print "OK: checking fourth section of $file (*_DEPENDS).\n" - if ($verbose); - $tmp = $sections[$idx]; - - # NOTE: EXEC_DEPENDS is obsolete, so it should not be listed. - @linestocheck = qw( -EXTRACT_DEPENDS LIB_DEPENDS PATCH_DEPENDS BUILD_DEPENDS RUN_DEPENDS -FETCH_DEPENDS DEPENDS DEPENDS_TARGET - ); - - if ($tmp =~ /(LIB_|BUILD_|RUN_|FETCH_)?DEPENDS/) { - &checkearlier($file, $tmp, @varnames); - - my %seen_depends; - - if (!defined $ENV{'PORTSDIR'}) { - $ENV{'PORTSDIR'} = $portsdir; - } - foreach my $i (grep(/^[A-Z_]*DEPENDS[?+]?=/, split(/\n/, $tmp))) { - $i =~ s/^([A-Z_]*DEPENDS)[?+]?=[ \t]*//; - $j = $1; - $seen_depends{$j}++; - if ($j ne 'DEPENDS' && - $i =~ /^\${([A-Z_]+DEPENDS)}\s*$/ && - $seen_depends{$1} && - $j ne $1) - { - print "OK: $j refers to $1, skipping checks.\n" - if ($verbose); - next; - } - print "OK: checking ports listed in $j.\n" - if ($verbose); - foreach my $k (split(/\s+/, $i)) { - my @l = split(':', $k); - - print "OK: checking dependency value for $j.\n" - if ($verbose); - if (($j eq 'DEPENDS' - && scalar(@l) != 1 && scalar(@l) != 2) - || ($j ne 'DEPENDS' - && scalar(@l) != 2 && scalar(@l) != 3)) { - &perror("WARN: $file: wrong dependency value ". - "for $j. $j requires ". - ($j eq 'DEPENDS' - ? "1 or 2 " - : "2 or 3 "). - "colon-separated tuples."); - next; - } - my %m = (); - if ($j eq 'DEPENDS') { - $m{'dir'} = $l[0]; - $m{'tgt'} = $l[1]; - } else { - $m{'dep'} = $l[0]; - $m{'dir'} = $l[1]; - $m{'tgt'} = $l[2]; - } - print "OK: dep=\"$m{'dep'}\", ". - "dir=\"$m{'dir'}\", tgt=\"$m{'tgt'}\"\n" - if ($verbose); - - # check USE_PERL5 - if ($m{'dep'} =~ /^perl5(\.\d+)?$/) { - &perror("WARN: $file: dependency to perl5 ". - "listed in $j. consider using ". - "USE_PERL5."); - } - - # check USE_GMAKE - if ($m{'dep'} =~ /^(gmake|\${GMAKE})$/) { - &perror("WARN: $file: dependency to $1 ". - "listed in $j. consider using ". - "USE_GMAKE."); - } - - # check USE_QT - if ($m{'dep'} =~ /^(qt\d)+$/) { - &perror("WARN: $file: dependency to $1 ". - "listed in $j. consider using ". - "USE_QT."); - } - - # check USE_GETOPT_LONG - if ($m{'dep'} =~ /^(gnugetopt\.\d)+$/) { - &perror("WARN: $file: dependency to $1 ". - "listed in $j. consider using ". - "USE_GETOPT_LONG."); - } - - # check backslash in LIB_DEPENDS - if ($osname eq 'NetBSD' && $j eq 'LIB_DEPENDS' - && $m{'dep'} =~ /\\\\./) { - &perror("WARN: $file: use of backslashes in ". - "$j is deprecated."); - } - - # check for PREFIX - if ($m{'dep'} =~ /\${PREFIX}/) { - &perror("FATAL: $file: \${PREFIX} must not be ". - "contained in *_DEPENDS. ". - "use \${LOCALBASE} or ". - "\${X11BASE} instead."); - } - - # check port dir existence - $k = $m{'dir'}; - $k =~ s/\${PORTSDIR}/$ENV{'PORTSDIR'}/; - $k =~ s/\$[\({]PORTSDIR[\)}]/$ENV{'PORTSDIR'}/; - if (! -d $k) { - &perror("WARN: $file: no port directory $k ". - "found, even though it is ". - "listed in $j."); - } else { - print "OK: port directory $k found.\n" - if ($verbose); - } - } - } - foreach my $i (@linestocheck) { - $tmp =~ s/$i[?+]?=[^\n]+\n//g; - } - - &checkextra($tmp, '*_DEPENDS', $file); - - $idx++; - } - - push(@varnames, @linestocheck); - &checkearlier($file, $tmp, @varnames); - - # - # Makefile 6: check the rest of file - # - print "OK: checking the rest of the $file.\n" if ($verbose); - $tmp = join("\n\n", @sections[$idx .. scalar(@sections)-1]); - - $tmp = "\n" . $tmp; # to make the begin-of-line check easier - - &checkearlier($file, $tmp, @varnames); - - # check WRKSRC/NO_WRKSUBDIR - # - # do not use DISTFILES/DISTNAME to control over WRKSRC. - # DISTNAME is for controlling distribution filename. - # example: - # DISTNAME= package - # DISTFILES=package-1.0.tgz - # should be - # DISTNAME= package-1.0 - # EXTRACT_SUFX=.tgz - # WRKSRC= ${WRKDIR}/package - # - print "OK: checking WRKSRC.\n" if ($verbose); - $wrksrc = $nowrksubdir = ''; - $wrksrc = $1 if ($tmp =~ /\nWRKSRC[+?]?=[ \t]*([^\n]*)\n/); - $nowrksubdir = $1 if ($tmp =~ /\nNO_WRKSUBDIR[+?]?=[ \t]*([^\n]*)\n/); - if ($nowrksubdir eq '') { - $realwrksrc = $wrksrc ? "$wrksrc/$distname" - : "\${WRKDIR}/$distname"; - } else { - $realwrksrc = $wrksrc ? $wrksrc : '${WRKDIR}'; - } - print "OK: WRKSRC seems to be $realwrksrc.\n" if ($verbose); - - if ($nowrksubdir eq '') { - print "OK: no NO_WRKSUBDIR, checking value of WRKSRC.\n" - if ($verbose); - if ($wrksrc eq 'work' || $wrksrc =~ /^$[\{\(]WRKDIR[\}\)]/) { - &perror("WARN: $file: WRKSRC is set to meaningless value ". - "\"$1\".". - ($nowrksubdir eq '' - ? " use \"NO_WRKSUBDIR=yes\" instead." - : "")); - } - if ($bogusdistfiles) { - if ($distname ne '' && $wrksrc eq '') { - &perror("WARN: $file: do not use DISTFILES and DISTNAME ". - "to control WRKSRC. how about ". - "\"WRKSRC=\${WRKDIR}/$distname\"?"); - } else { - &perror("WARN: $file: DISTFILES/DISTNAME affects WRKSRC. ". - "take caution when changing them."); - } - } - } else { - print "OK: seen NO_WRKSUBDIR, checking value of WRKSRC.\n" - if ($verbose); - if ($wrksrc eq 'work' || $wrksrc =~ /^$[\{\(]WRKDIR[\}\)]/) { - &perror("WARN: $file: definition of WRKSRC not necessary. ". - "WRKSRC is \${WRKDIR} by default."); - } - } - - # check RESTRICTED/NO_CDROM/NO_PACKAGE - print "OK: checking RESTRICTED/NO_CDROM/NO_PACKAGE.\n" if ($verbose); - if ($committer && $tmp =~ /\n(RESTRICTED|NO_CDROM|NO_PACKAGE)[+?]?=/) { - &perror("WARN: $file: \"$1\" found. do not forget to update ". - "ports/LEGAL."); - } - - # check NO_CONFIGURE/NO_PATCH - print "OK: checking NO_CONFIGURE/NO_PATCH.\n" if ($verbose); - if ($tmp =~ /\n(NO_CONFIGURE|NO_PATCH)[+?]?=/) { - &perror("FATAL: $file: \"$1\" was obsoleted. remove this."); - } - - # check MAN[1-9LN] - print "OK: checking MAN[0-9LN].\n" if ($verbose); - foreach my $i (keys %plistmanall) { - print "OK: pkg-plist MAN$i=$plistmanall{$i}\n" if ($verbose); - } - foreach my $i (split(//, $manchapters)) { - if ($tmp =~ /MAN\U$i\E=\s*([^\n]*)\n/) { - print "OK: Makefile MAN\U$i\E=$1\n" if ($verbose); - } - } - foreach my $i (split(//, $manchapters)) { - next if ($i eq ''); - if ($tmp =~ /MAN\U$i\E=\s*([^\n]*)\n/) { - @mman = grep($_ !~ /^\s*$/, split(/\s+/, $1)); - @pman = grep($_ !~ /^\s*$/, - split(/\s+/, $plistmanall{$i})); - foreach my $j (@mman) { - print "OK: checking $j (Makefile)\n" - if ($verbose); - if ($automan && grep($_ eq $j, @pman)) { - &perror("FATAL: $file: duplicated manpage ". - "entry $j: content of ". - "MAN\U$i\E will be automatically ". - "added to pkg-plist."); - } elsif (!$automan && !grep($_ eq $j, @pman)) { - &perror("WARN: $file: manpage $j ". - "MAN\U$i\E but not in pkg-plist."); - } - } - foreach my $j (@pman) { - print "OK: checking $j (pkg-plist)\n" if ($verbose); - if (!grep($_ eq $j, @mman)) { - &perror("WARN: $file: manpage $j in pkg-plist ". - "but not in MAN\U$i\E."); - } - } - } else { - if ($plistmanall{$i}) { - if ($manstrict) { - &perror("FATAL: $file: manpage for chapter ". - "$i must be listed in ". - "MAN\U$i\E. "); - } else { - &perror("WARN: $file: manpage for chapter ". - "$i should be listed in ". - "MAN\U$i\E, ". - "even if compression is ". - "not necessary."); - } - } - if ($mancompress && $plistman{$i}) { - &perror("WARN: $file: MAN\U$i\E will help you ". - "compressing manual page in chapter ". - "\"$i\"."); - } elsif (!$mancompress && $plistmangz{$i}) { - &perror("WARN: $file: MAN\U$i\E will help you ". - "uncompressing manual page in chapter ". - "\"$i\"."); - } - } - } - if ($tmp !~ /MANLANG/ && scalar(keys %manlangs)) { - $i = (keys %manlangs)[0]; - &perror("WARN: $file: how about using MANLANG for ". - "designating manual language, such as \"$i\"?"); - } - - # check INFO - print "OK: checking INFO.\n" if ($verbose); - if ($autoinfo && $tmp =~ /\nINFO=\s*([^\n]*)\n/) { - my @minfo = grep($_ !~ /^\s*$/, split(/\s+/, $1)); - foreach $i (@minfo) { - if ($i =~ /\.info(-\d+)?$/) { - &perror("FATAL: $file: do not include the .info extension ". - "on files listed in the INFO macro."); - } - } - } - - # check USE_X11 and USE_IMAKE - if ($tmp =~ /\nUSE_IMAKE[?+]?=/ - && $tmp =~ /\n(USE_X11)[?+]?=/) { - &perror("WARN: $file: since you already have USE_IMAKE, ". - "you don't need $1."); - } - # check USE_X11 and USE_IMAKE - if ($newxdef && $tmp =~ /\nUSE_IMAKE[?+]?=/ - && $tmp =~ /\n(USE_X_PREFIX)[?+]?=/) { - &perror("WARN: $file: since you already have USE_IMAKE, ". - "you don't need $1."); - } - - # check USE_X11 and USE_X_PREFIX - if ($newxdef && $tmp =~ /\nUSE_X11[?+]?=/ - && $tmp !~ /\nUSE_X_PREFIX[?+]?=/) { - &perror("FATAL: $file: meaning of USE_X11 was changed in Aug 1998. ". - "use USE_X_PREFIX instead."); - } - - # check direct use of important make targets. - if ($tmp =~ /\n(fetch|extract|patch|configure|build|install):/) { - &perror("FATAL: $file: direct redefinition of make target \"$1\" ". - "discouraged. redefine \"do-$1\" instead."); - } - - # check for incorrect use of the pre-everything target. - if ($tmp =~ /\npre-everything:[^:]/) { - &perror("FATAL: $file: use pre-everything:: instead of pre-everything:"); - } - - if ($tmp =~ /^pre-patch:/m && $use_gnome_hack) { - &perror("FATAL: $file: pre-patch target overwrites gnomehack component. ". - "use post-patch instead."); - } - - 1; -} - -sub perror { - my(@msg) = @_; - if ($msg[0] =~ /^FATAL/) { - $err++; - } else { - $warn++; - } - print join("\n", @msg) . "\n"; -} - -sub checkextra { - my($str, $section, $file) = @_; - - $str = "\n" . $str if ($str !~ /^\n/); - $str =~ s/\n#[^\n]*/\n/g; - $str =~ s/\n\.[^\n]+/\n/g; - $str =~ s/\n\n+/\n/g; - $str =~ s/^\s+//; - $str =~ s/\s+$//; - return if ($str eq ''); - - if ($str =~ /^([\w\d]+)/) { - &perror("WARN: $file: extra item placed in the ". - "$section section, ". - "for example, \"$1\"."); - } else { - &perror("WARN: $file: extra item placed in the ". - "$section section."); - } -} - -sub checkorder { - my($section, $str, $file, @order) = @_; - my(@items, $i, $j, $k, $invalidorder); - - print "OK: checking the order of $section section.\n" if ($verbose); - - @items = (); - foreach my $i (split("\n", $str)) { - $i =~ s/[+?]?=.*$//; - push(@items, $i); - } - - @items = reverse(@items); - $j = -1; - $invalidorder = 0; - while (scalar(@items)) { - $i = pop(@items); - $k = 0; - while ($k < scalar(@order) && $order[$k] ne $i) { - $k++; - } - if ($order[$k] eq $i) { - if ($k < $j) { - &perror("FATAL: $file: $i appears out-of-order."); - $invalidorder++; - } else { - print "OK: seen $i, in order.\n" if ($verbose); - } - $j = $k; - # This if condition tests for .if, .else (in all forms), - # .for and .endfor and .include - } elsif ($i !~ m/^\.(if|el|endif|for|endfor|include)/) { - &perror("FATAL: $file: extra item \"$i\" placed in the ". - "$section section."); - } - } - if ($invalidorder) { - &perror("FATAL: $file: order must be " . join('/', @order) . '.'); - } else { - print "OK: $section section is ordered properly.\n" - if ($verbose); - } -} - -sub checkearlier { - my($file, $str, @varnames) = @_; - my($i); - - print "OK: checking items that has to appear earlier.\n" if ($verbose); - foreach my $i (@varnames) { - if ($str =~ /\n$i\??=/) { - &perror("WARN: $file: \"$i\" has to appear earlier."); - } - } -} - -sub linenumber { - my $text = shift; - my @lines; - - @lines = split /\n/, $text; - - return scalar(@lines); -} - -sub abspathname { - my($str, $file) = @_; - my($s, $i, %cmdnames); - my($pre); - - # ignore parameter string to echo command - $str =~ s/[ \t][\@-]?(echo|\$[\{\(]ECHO[\}\)]|\$[\{\(]ECHO_MSG[\}\)])[ \t]+("(\\'|\\"|[^"])*"|'(\\'|\\"|[^"])*')[ \t]*[;\n]//; #' - - print "OK: checking direct use of full pathnames in $file.\n" - if ($verbose); - foreach my $s (split(/\n+/, $str)) { - $i = ''; - if ($s =~ /(^|[ \t\@'"-])(\/[\w\d])/) { #' - # suspected pathnames are recorded. - $i = $2 . $'; - $pre = $` . $1; - - if ($pre =~ /MASTER_SITE_SUBDIR/) { - # MASTER_SITE_SUBDIR lines are ok. - $i = ''; - } - } - if ($i ne '') { - $i =~ s/\s.*$//; - $i =~ s/['"].*$//; #' - $i = substr($i, 0, 20) . '...' if (20 < length($i)); - &perror("WARN: $file: possible use of absolute pathname ". - "\"$i\".") unless ($i =~ m,^/compat/,); - } - } - - print "OK: checking direct use of pathnames, phase 1.\n" if ($verbose); -%cmdnames = split(/\n|\t+/, <<EOF); -/usr/opt \${PORTSDIR} instead -$portsdir \${PORTSDIR} instead -$localbase \${PREFIX} or \${LOCALBASE}, as appropriate -/usr/X11 \${PREFIX} or \${X11BASE}, as appropriate -EOF - foreach my $i (keys %cmdnames) { - if ($str =~ /$i/) { - &perror("WARN: $file: possible direct use of \"$&\" ". - "found. if so, use $cmdnames{$i}."); - } - } - - print "OK: checking direct use of pathnames, phase 2.\n" if ($verbose); -%cmdnames = split(/\n|\t+/, <<EOF); -distfiles \${DISTDIR} instead -pkg \${PKGDIR} instead -files \${FILESDIR} instead -scripts \${SCRIPTDIR} instead -patches \${PATCHDIR} instead -work \${WRKDIR} instead -EOF - foreach my $i (keys %cmdnames) { - if ($str =~ /(\.\/|\$[\{\(]\.CURDIR[\}\)]\/|[ \t])(\b$i)\//) { - &perror("WARN: $file: possible direct use of \"$i\" ". - "found. if so, use $cmdnames{$i}."); - } - } -} - -sub is_predefined { - my($url, $file) = @_; - my($site, $site_re); - my $subdir_re = quotemeta quotemeta '/%SUBDIR%/'; - for my $site (keys %predefined) { - $site_re = quotemeta $site; - $site_re =~ s,$subdir_re,/(.*)/,; - - if ($url =~ /$site_re/) { - &perror("WARN: $file: how about using ". - "\"\${MASTER_SITE_$predefined{$site}}\" with ". - "\"MASTER_SITE_SUBDIR=$1\", instead of \"$url\"?"); - return &TRUE; - } - } - undef; -} - -sub urlcheck { - my ($url, $file) = @_; - if ($url !~ m#^\w+://#) { - &perror("WARN: $file: \"$url\" doesn't appear to be a URL to me."); - } - if ($url !~ m#/(:[^/:]+)?$#) { - &perror("FATAL: $file: URL \"$url\" should ". - "end with \"/\" or a group name (e.g. :something)."); - } - if ($url =~ m#://[^/]*:/#) { - &perror("FATAL: $file: URL \"$url\" contains ". - "extra \":\"."); - } - if ($osname == 'FreeBSD' && $url =~ m#(www\.freebsd\.org)/~.+/#i) { - &perror("WARN: $file: URL \"$url\", ". - "$1 should be ". - "people.FreeBSD.org"); - } -} -sub TRUE {1;} - -# Local variables: -# tab-width: 4 -# End: diff --git a/ports-mgmt/portlint/src/portlintgrep.pl b/ports-mgmt/portlint/src/portlintgrep.pl deleted file mode 100644 index 1bf267e0988d..000000000000 --- a/ports-mgmt/portlint/src/portlintgrep.pl +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/perl -# -# Copyright (c) 2003 Oliver Eikemeier. All rights reserved. -# -# BSD licensed. -# - -# -# List all the ports with FATAL errors: -# -# portlintgrep ^FATAL: -# - -require 5.005; -use diagnostics; -use strict; -use Carp; - -my $make = $ENV{MAKE} ? $ENV{MAKE} : '/usr/bin/make'; -my $portlint = $ENV{PORTLINT} ? $ENV{PORTLINT} : '/usr/local/bin/portlint'; -my $portsdir = $ENV{PORTSDIR} ? $ENV{PORTSDIR} : '/usr/ports'; -my $portlint_args = $ENV{PORTLINT_ARGS} ? $ENV{PORTLINT_ARGS} : ''; - -die "Usage: portlintgrep <regex>\n" if $#ARGV != 0; -my $regex = qr/$ARGV[0]/; - -my %failedports; - -my @categories = split ' ', `cd $portsdir; $make -VSUBDIR`; -foreach my $category (@categories) { - my @ports = split ' ', `cd "$portsdir/$category"; $make -VSUBDIR`; - foreach my $port (@ports) { - my @result = - `cd "$portsdir/$category/$port"; $portlint $portlint_args`; - map chomp, @result; - my @filteredresult = grep /$regex/o, @result; - if (@filteredresult) { - my $maintainer = - `cd "$portsdir/$category/$port"; $make -VMAINTAINER`; - chomp $maintainer; - push @{$failedports{$maintainer}}, "$category/$port"; - print join("\n ", - "$category/$port <$maintainer>:", - @filteredresult), - "\n"; - } - } -} - -print "\nPorts sorted by maintainer:\n"; -foreach my $maintainer (sort { lc $a cmp lc $b } keys %failedports) { - print join("\n - ", $maintainer, @{$failedports{$maintainer}}), "\n"; -} diff --git a/ports-mgmt/portsman/Makefile b/ports-mgmt/portsman/Makefile deleted file mode 100644 index b35e802acdb8..000000000000 --- a/ports-mgmt/portsman/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# New ports collection makefile for: portsman -# Date created: 18 January 2003 -# Whom: Anselm R. Garbe <anselmg@t-online.de> -# -# $FreeBSD$ -# - -PORTNAME= portsman -PORTVERSION= 0.2 -PORTREVISION= 1 -CATEGORIES= sysutils -MASTER_SITES= http://download.berlios.de/portsman/ -# temporary -DISTNAME= ${PORTNAME}-${PORTVERSION}-rc2 - -MAINTAINER= anselmg@t-online.de -COMMENT= An ncurses based front-end to manage the FreeBSD ports collection - -.include <bsd.port.pre.mk> - -.if ${OSVERSION} < 400000 -LIB_DEPENDS= ncurses.5:${PORTSDIR}/devel/ncurses -.endif - -MAN1= portsman.1 -MAN5= portsmanrc.5 -GNU_CONFIGURE= yes -USE_REINPLACE= yes - -post-patch: - @${REINPLACE_CMD} -e "/^pmanrcdir/s|etc$$|etc/portsman|" \ - ${WRKSRC}/config/Makefile.in - -.include <bsd.port.post.mk> diff --git a/ports-mgmt/portsman/distinfo b/ports-mgmt/portsman/distinfo deleted file mode 100644 index 7afed1b62f1d..000000000000 --- a/ports-mgmt/portsman/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (portsman-0.2-rc2.tar.gz) = 624c5ad75088afc802e52008a017dbdd diff --git a/ports-mgmt/portsman/pkg-descr b/ports-mgmt/portsman/pkg-descr deleted file mode 100644 index d650c63b08ce..000000000000 --- a/ports-mgmt/portsman/pkg-descr +++ /dev/null @@ -1,7 +0,0 @@ -Ports manager is a ncurses based, graphical front-end to manage -the FreeBSD ports collection. It behaves like a package manager -and comes with many features. - -WWW: http://portsman.berlios.de --- - Anselm R. Garbe diff --git a/ports-mgmt/portsman/pkg-plist b/ports-mgmt/portsman/pkg-plist deleted file mode 100644 index eb2c31c3c646..000000000000 --- a/ports-mgmt/portsman/pkg-plist +++ /dev/null @@ -1,3 +0,0 @@ -bin/portsman -etc/portsman/portsmanrc.sample -@dirrm etc/portsman diff --git a/ports-mgmt/porttools/Makefile b/ports-mgmt/porttools/Makefile deleted file mode 100644 index 379bca4845e6..000000000000 --- a/ports-mgmt/porttools/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# New ports collection makefile for: porttools -# Date created: 2003-06-18 -# Whom: Sergei Kolobov <sergei@kolobov.com> -# -# $FreeBSD$ -# - -PORTNAME= porttools -PORTVERSION= 0.50 -CATEGORIES= devel -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= ${PORTNAME} - -MAINTAINER= sergei@FreeBSD.org -COMMENT= Tools for testing and submitting port updates and new ports - -RUN_DEPENDS= portlint:${PORTSDIR}/devel/portlint \ - sudo:${PORTSDIR}/security/sudo - -.if !defined(NOPORTDOCS) -INSTALL_TARGET= install install-docs -.endif - -MAKE_ENV= PREFIX="${PREFIX}" DATADIR="${DATADIR}" DOCSDIR="${DOCSDIR}" -MAN1= port.1 -MAN5= porttools.5 - -.include <bsd.port.mk> diff --git a/ports-mgmt/porttools/distinfo b/ports-mgmt/porttools/distinfo deleted file mode 100644 index 0c19888ba949..000000000000 --- a/ports-mgmt/porttools/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (porttools-0.50.tar.gz) = 51ceae820b3f9ed2114ff6adfc09606f diff --git a/ports-mgmt/porttools/pkg-descr b/ports-mgmt/porttools/pkg-descr deleted file mode 100644 index 8768dfde6d30..000000000000 --- a/ports-mgmt/porttools/pkg-descr +++ /dev/null @@ -1,7 +0,0 @@ -FreeBSD Port Tools consist of the following small scripts: -- testport: a script to automate testing a new port or a port update -- pr-new: a script to simplify submitting a Problem Report (PR) for a new port -- pr-update: a script to simplify submitting a PR with a port update - -Author: Sergei Kolobov <sergei@kolobov.com> -WWW: http://sourceforge.net/projects/porttools/ diff --git a/ports-mgmt/porttools/pkg-plist b/ports-mgmt/porttools/pkg-plist deleted file mode 100644 index 3d7b3ced22fe..000000000000 --- a/ports-mgmt/porttools/pkg-plist +++ /dev/null @@ -1,15 +0,0 @@ -@comment $FreeBSD$ -bin/port -%%DATADIR%%/cmd_create -%%DATADIR%%/cmd_diff -%%DATADIR%%/cmd_fetch -%%DATADIR%%/cmd_help -%%DATADIR%%/cmd_submit -%%DATADIR%%/cmd_test -%%DATADIR%%/util_diff -%%PORTDOCS%%%%DOCSDIR%%/LICENSE -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/NEWS -%%PORTDOCS%%%%DOCSDIR%%/THANKS -%%PORTDOCS%%%%DOCSDIR%%/TODO -%%PORTDOCS%%@dirrm %%DOCSDIR%% diff --git a/ports-mgmt/portupgrade-devel/Makefile b/ports-mgmt/portupgrade-devel/Makefile deleted file mode 100644 index d7db95747c02..000000000000 --- a/ports-mgmt/portupgrade-devel/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# New ports collection makefile for: portupgrade -# Date created: 18 March 2001 -# Whom: Akinori MUSHA aka knu <knu@idaemons.org> -# -# $FreeBSD$ -# - -PORTNAME= portupgrade -PORTVERSION= 20030723 -CATEGORIES= sysutils -MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \ - ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= knu -DISTNAME= pkgtools-${DISTVERSION} - -DISTVERSION= 20030427 - -.if ${DISTVERSION} != ${PORTVERSION} -PATCH_SITES= ${MASTER_SITES} -PATCH_SITE_SUBDIR= ${MASTER_SITE_SUBDIR} -PATCHFILES= ${DISTNAME}-${PORTVERSION}.diff.bz2 -PATCH_DIST_STRIP= -p1 -.endif - -MAINTAINER= knu@FreeBSD.org -COMMENT= FreeBSD ports/packages administration and management tool suite - -RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/bdb1.so:${PORTSDIR}/databases/ruby-bdb1 -# For PKG_DBDRIVER={bdb_btree,bdb_hash,bdb} -# ${RUBY_SITEARCHLIBDIR}/bdb.so:${PORTSDIR}/databases/ruby-bdb - -USE_BZIP2= yes -USE_RUBY= yes -USE_RUBY_FEATURES= optparse ruby18 - -MAKE_ARGS= PREFIX="${PREFIX}" RUBY="${RUBY}" - -MAN1= pkg_deinstall.1 \ - pkg_fetch.1 \ - pkg_glob.1 \ - pkg_sort.1 \ - pkgdb.1 \ - portcvsweb.1 \ - portsclean.1 \ - portsdb.1 \ - portupgrade.1 \ - portversion.1 -MAN5= pkgtools.conf.5 -MLINKS= pkgdb.1 pkg_which.1 \ - portupgrade.1 portinstall.1 \ - portsdb.1 ports_glob.1 -MANCOMPRESSED= maybe - -INSTALL_TARGET= install -.if !defined(NOPORTDOCS) -INSTALL_TARGET+= install-doc -.endif - -.include <bsd.port.pre.mk> - -# pkg_create(1) must support -b. (4.5-RELEASE or later) -# XXX: PKG_CMD is not defined yet.. -PKG_CREATE_OK!= /usr/sbin/pkg_create 2>&1 | ${GREP} ' -b ' || ${TRUE} -.if empty(PKG_CREATE_OK) -IGNORE= pkg_create does not support -b. Please update /usr/sbin/pkg_* to those of the latest RELENG_4 -.endif - -post-install: - if [ ! -f ${PREFIX}/etc/pkgtools.conf ]; then \ - ${CP} -p ${PREFIX}/etc/pkgtools.conf.sample ${PREFIX}/etc/pkgtools.conf; \ - fi - -.include <bsd.port.post.mk> diff --git a/ports-mgmt/portupgrade-devel/distinfo b/ports-mgmt/portupgrade-devel/distinfo deleted file mode 100644 index 1c7809cf0bee..000000000000 --- a/ports-mgmt/portupgrade-devel/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -MD5 (pkgtools-20030427.tar.bz2) = 8692b4965c5bf9ed1d7303b368e7b0c5 -MD5 (pkgtools-20030427-20030723.diff.bz2) = 94e9510c16744c04824d0843ae4b2488 diff --git a/ports-mgmt/portupgrade-devel/pkg-descr b/ports-mgmt/portupgrade-devel/pkg-descr deleted file mode 100644 index 0c41ed3fdc1f..000000000000 --- a/ports-mgmt/portupgrade-devel/pkg-descr +++ /dev/null @@ -1,21 +0,0 @@ -Portupgrade is a tool to upgrade installed packages via ports or -packages. You can upgrade installed packages without having to -reinstall depending or dependent packages. It can automatically trace -dependency chains up and down upgrading packages recursively. - -This package also includes the following utilities: -portinstall: Helps you install new ports in a handy way. -portcvsweb: Instantly lets you browse change history via CVSweb. -portversion: Replaces pkg_version(1) and helps you upgrade packages - with portupgrade(1). (runs much faster) -portsclean: Cleans ports workdir's, unreferenced distfiles, - old and orphan shared libraries, and stale packages. -portsdb: Creates binary database from the ports INDEX. -ports_glob: Expands ports globs. -pkg_deinstall: Wraps pkg_delete(1) and provides additional features. -pkg_fetch: Fetches packages from a remote site. -pkg_glob: Expands package globs. -pkg_which: Checks which package a file came from quickly. -pkgdb: Manages and searches the package database. - -Author: Akinori MUSHA <knu@FreeBSD.org> diff --git a/ports-mgmt/portupgrade-devel/pkg-plist b/ports-mgmt/portupgrade-devel/pkg-plist deleted file mode 100644 index 381c951fc74d..000000000000 --- a/ports-mgmt/portupgrade-devel/pkg-plist +++ /dev/null @@ -1,43 +0,0 @@ -etc/rc.d/000.pkgtools.sh -@exec /bin/mkdir -p %D/lib/compat/pkg -@unexec /bin/rmdir %D/lib/compat/pkg 2>/dev/null || true -sbin/make_describe_pass1 -sbin/make_describe_pass2 -sbin/pkg_deinstall -sbin/pkg_fetch -sbin/pkg_glob -sbin/pkg_sort -sbin/pkg_which -sbin/pkgdb -sbin/portcvsweb -sbin/portinstall -sbin/ports_glob -sbin/portsclean -sbin/portsdb -sbin/portupgrade -sbin/portversion -%%RUBY_SITELIBDIR%%/pkg.rb -%%RUBY_SITELIBDIR%%/pkgdb.rb -%%RUBY_SITELIBDIR%%/pkginfo.rb -%%RUBY_SITELIBDIR%%/pkgmisc.rb -%%RUBY_SITELIBDIR%%/pkgtools.rb -%%RUBY_SITELIBDIR%%/pkgtsort.rb -%%RUBY_SITELIBDIR%%/pkgversion.rb -%%RUBY_SITELIBDIR%%/portinfo.rb -%%RUBY_SITELIBDIR%%/ports.rb -%%RUBY_SITELIBDIR%%/portsdb.rb -@unexec if cmp -s %D/etc/pkgtools.conf %D/etc/pkgtools.conf.sample; then rm -f %D/etc/pkgtools.conf; fi -etc/pkgtools.conf.sample -@exec [ -f %B/pkgtools.conf ] || cp %B/%f %B/pkgtools.conf -etc/pkgtools.status-pkg.sh -share/zsh/site-functions/_pkgtools -@unexec [ -f %D/bin/zsh ] || rmdir %D/share/zsh/site-functions 2>/dev/null || true -@unexec rmdir %D/share/zsh 2>/dev/null || true -%%PORTDOCS%%share/examples/pkgtools/bash/complete.sample -%%PORTDOCS%%@dirrm share/examples/pkgtools/bash -%%PORTDOCS%%share/examples/pkgtools/tcsh/complete.sample -%%PORTDOCS%%@dirrm share/examples/pkgtools/tcsh -%%PORTDOCS%%@dirrm share/examples/pkgtools -%%PORTDOCS%%share/doc/pkgtools/ChangeLog -%%PORTDOCS%%share/doc/pkgtools/README -%%PORTDOCS%%@dirrm share/doc/pkgtools diff --git a/ports-mgmt/portupgrade/Makefile b/ports-mgmt/portupgrade/Makefile deleted file mode 100644 index d7db95747c02..000000000000 --- a/ports-mgmt/portupgrade/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# New ports collection makefile for: portupgrade -# Date created: 18 March 2001 -# Whom: Akinori MUSHA aka knu <knu@idaemons.org> -# -# $FreeBSD$ -# - -PORTNAME= portupgrade -PORTVERSION= 20030723 -CATEGORIES= sysutils -MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \ - ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= knu -DISTNAME= pkgtools-${DISTVERSION} - -DISTVERSION= 20030427 - -.if ${DISTVERSION} != ${PORTVERSION} -PATCH_SITES= ${MASTER_SITES} -PATCH_SITE_SUBDIR= ${MASTER_SITE_SUBDIR} -PATCHFILES= ${DISTNAME}-${PORTVERSION}.diff.bz2 -PATCH_DIST_STRIP= -p1 -.endif - -MAINTAINER= knu@FreeBSD.org -COMMENT= FreeBSD ports/packages administration and management tool suite - -RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/bdb1.so:${PORTSDIR}/databases/ruby-bdb1 -# For PKG_DBDRIVER={bdb_btree,bdb_hash,bdb} -# ${RUBY_SITEARCHLIBDIR}/bdb.so:${PORTSDIR}/databases/ruby-bdb - -USE_BZIP2= yes -USE_RUBY= yes -USE_RUBY_FEATURES= optparse ruby18 - -MAKE_ARGS= PREFIX="${PREFIX}" RUBY="${RUBY}" - -MAN1= pkg_deinstall.1 \ - pkg_fetch.1 \ - pkg_glob.1 \ - pkg_sort.1 \ - pkgdb.1 \ - portcvsweb.1 \ - portsclean.1 \ - portsdb.1 \ - portupgrade.1 \ - portversion.1 -MAN5= pkgtools.conf.5 -MLINKS= pkgdb.1 pkg_which.1 \ - portupgrade.1 portinstall.1 \ - portsdb.1 ports_glob.1 -MANCOMPRESSED= maybe - -INSTALL_TARGET= install -.if !defined(NOPORTDOCS) -INSTALL_TARGET+= install-doc -.endif - -.include <bsd.port.pre.mk> - -# pkg_create(1) must support -b. (4.5-RELEASE or later) -# XXX: PKG_CMD is not defined yet.. -PKG_CREATE_OK!= /usr/sbin/pkg_create 2>&1 | ${GREP} ' -b ' || ${TRUE} -.if empty(PKG_CREATE_OK) -IGNORE= pkg_create does not support -b. Please update /usr/sbin/pkg_* to those of the latest RELENG_4 -.endif - -post-install: - if [ ! -f ${PREFIX}/etc/pkgtools.conf ]; then \ - ${CP} -p ${PREFIX}/etc/pkgtools.conf.sample ${PREFIX}/etc/pkgtools.conf; \ - fi - -.include <bsd.port.post.mk> diff --git a/ports-mgmt/portupgrade/distinfo b/ports-mgmt/portupgrade/distinfo deleted file mode 100644 index 1c7809cf0bee..000000000000 --- a/ports-mgmt/portupgrade/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -MD5 (pkgtools-20030427.tar.bz2) = 8692b4965c5bf9ed1d7303b368e7b0c5 -MD5 (pkgtools-20030427-20030723.diff.bz2) = 94e9510c16744c04824d0843ae4b2488 diff --git a/ports-mgmt/portupgrade/pkg-descr b/ports-mgmt/portupgrade/pkg-descr deleted file mode 100644 index 0c41ed3fdc1f..000000000000 --- a/ports-mgmt/portupgrade/pkg-descr +++ /dev/null @@ -1,21 +0,0 @@ -Portupgrade is a tool to upgrade installed packages via ports or -packages. You can upgrade installed packages without having to -reinstall depending or dependent packages. It can automatically trace -dependency chains up and down upgrading packages recursively. - -This package also includes the following utilities: -portinstall: Helps you install new ports in a handy way. -portcvsweb: Instantly lets you browse change history via CVSweb. -portversion: Replaces pkg_version(1) and helps you upgrade packages - with portupgrade(1). (runs much faster) -portsclean: Cleans ports workdir's, unreferenced distfiles, - old and orphan shared libraries, and stale packages. -portsdb: Creates binary database from the ports INDEX. -ports_glob: Expands ports globs. -pkg_deinstall: Wraps pkg_delete(1) and provides additional features. -pkg_fetch: Fetches packages from a remote site. -pkg_glob: Expands package globs. -pkg_which: Checks which package a file came from quickly. -pkgdb: Manages and searches the package database. - -Author: Akinori MUSHA <knu@FreeBSD.org> diff --git a/ports-mgmt/portupgrade/pkg-plist b/ports-mgmt/portupgrade/pkg-plist deleted file mode 100644 index 381c951fc74d..000000000000 --- a/ports-mgmt/portupgrade/pkg-plist +++ /dev/null @@ -1,43 +0,0 @@ -etc/rc.d/000.pkgtools.sh -@exec /bin/mkdir -p %D/lib/compat/pkg -@unexec /bin/rmdir %D/lib/compat/pkg 2>/dev/null || true -sbin/make_describe_pass1 -sbin/make_describe_pass2 -sbin/pkg_deinstall -sbin/pkg_fetch -sbin/pkg_glob -sbin/pkg_sort -sbin/pkg_which -sbin/pkgdb -sbin/portcvsweb -sbin/portinstall -sbin/ports_glob -sbin/portsclean -sbin/portsdb -sbin/portupgrade -sbin/portversion -%%RUBY_SITELIBDIR%%/pkg.rb -%%RUBY_SITELIBDIR%%/pkgdb.rb -%%RUBY_SITELIBDIR%%/pkginfo.rb -%%RUBY_SITELIBDIR%%/pkgmisc.rb -%%RUBY_SITELIBDIR%%/pkgtools.rb -%%RUBY_SITELIBDIR%%/pkgtsort.rb -%%RUBY_SITELIBDIR%%/pkgversion.rb -%%RUBY_SITELIBDIR%%/portinfo.rb -%%RUBY_SITELIBDIR%%/ports.rb -%%RUBY_SITELIBDIR%%/portsdb.rb -@unexec if cmp -s %D/etc/pkgtools.conf %D/etc/pkgtools.conf.sample; then rm -f %D/etc/pkgtools.conf; fi -etc/pkgtools.conf.sample -@exec [ -f %B/pkgtools.conf ] || cp %B/%f %B/pkgtools.conf -etc/pkgtools.status-pkg.sh -share/zsh/site-functions/_pkgtools -@unexec [ -f %D/bin/zsh ] || rmdir %D/share/zsh/site-functions 2>/dev/null || true -@unexec rmdir %D/share/zsh 2>/dev/null || true -%%PORTDOCS%%share/examples/pkgtools/bash/complete.sample -%%PORTDOCS%%@dirrm share/examples/pkgtools/bash -%%PORTDOCS%%share/examples/pkgtools/tcsh/complete.sample -%%PORTDOCS%%@dirrm share/examples/pkgtools/tcsh -%%PORTDOCS%%@dirrm share/examples/pkgtools -%%PORTDOCS%%share/doc/pkgtools/ChangeLog -%%PORTDOCS%%share/doc/pkgtools/README -%%PORTDOCS%%@dirrm share/doc/pkgtools diff --git a/ports-mgmt/qtpkg/Makefile b/ports-mgmt/qtpkg/Makefile deleted file mode 100644 index e57c5d71ed61..000000000000 --- a/ports-mgmt/qtpkg/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# New ports collection makefile for: qtpkg -# Date created: Wed Jan 3 2001 -# Whom: Trenton Schulz <twschulz@cord.edu> -# -# $FreeBSD$ -# - -PORTNAME= qtpkg -PORTVERSION= 1.0 -PORTREVISION= 1 -CATEGORIES= sysutils -# mastersite disappeared around July 6 2003 -MASTER_SITES= # http://gauss.cord.edu/homepages/twschulz/demo/ -DISTNAME= qtpkg - -MAINTAINER= ports@FreeBSD.org -COMMENT= A Qt based package removal tool -MAKE_ENV= LIBS="-lqt-mt ${PTHREAD_LIBS}" CFLAGS="${PTHREAD_CFLAGS}" - -USE_QT_VER= 3 - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/qtpkg ${PREFIX}/sbin - -.include <bsd.port.mk> diff --git a/ports-mgmt/qtpkg/distinfo b/ports-mgmt/qtpkg/distinfo deleted file mode 100644 index bb5358f4442d..000000000000 --- a/ports-mgmt/qtpkg/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (qtpkg.tar.gz) = 0910416a0c23240e3f71d77f825618da diff --git a/ports-mgmt/qtpkg/files/patch-Makefile b/ports-mgmt/qtpkg/files/patch-Makefile deleted file mode 100644 index 155585330057..000000000000 --- a/ports-mgmt/qtpkg/files/patch-Makefile +++ /dev/null @@ -1,25 +0,0 @@ - -$FreeBSD$ - ---- Makefile 2001/01/23 16:32:54 1.1 -+++ Makefile 2001/01/23 16:36:12 -@@ -9,13 +9,13 @@ - - CC = cc - CXX = c++ --CFLAGS = -pipe -Wall -W -O2 -DNO_DEBUG --CXXFLAGS = -pipe -Wall -W -O2 -DNO_DEBUG --INCPATH = -I/usr/local/include -I/usr/X11R6/include/qt2 -+CFLAGS += -pipe -Wall -W -DNO_DEBUG -+CXXFLAGS += ${CFLAGS} -+INCPATH = -I$(LOCALBASE)/include -I$(X11BASE)/include/ - LINK = c++ --LIBS = $(SUBLIBS) -L/usr/local/lib -L/usr/X11R6/lib -lqt2 -lXext -lX11 -lm --MOC = /usr/X11R6/bin/moc2 --UIC = /usr/X11R6/bin/uic -+LIBS += $(SUBLIBS) -L$(LOCALBASE)/lib -L$(X11BASE)/lib -lXext -lX11 -lm -+MOC = $(X11BASE)/bin/moc -+UIC = $(X11BASE)/bin/uic - - TAR = tar -cf - GZIP = gzip -9f diff --git a/ports-mgmt/qtpkg/pkg-descr b/ports-mgmt/qtpkg/pkg-descr deleted file mode 100644 index aa1413f5ac39..000000000000 --- a/ports-mgmt/qtpkg/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -qtpkg simplifies the removal of packages by simulating the add/remove -programs dialog as seen in Windows. Handy when you can't remember the -correct version number. It also allows you to read the description of the -package and its packing list. diff --git a/ports-mgmt/qtpkg/pkg-plist b/ports-mgmt/qtpkg/pkg-plist deleted file mode 100644 index c8de90e3b80d..000000000000 --- a/ports-mgmt/qtpkg/pkg-plist +++ /dev/null @@ -1 +0,0 @@ -sbin/qtpkg |