aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/barry/Makefile34
-rw-r--r--ports-mgmt/barry/distinfo2
-rw-r--r--ports-mgmt/barry/files/patch-Makefile.in11
-rw-r--r--ports-mgmt/barry/files/patch-history.h92
-rw-r--r--ports-mgmt/barry/files/patch-orphanedfilesdialog.cc11
-rw-r--r--ports-mgmt/barry/files/patch-port.cc11
-rw-r--r--ports-mgmt/barry/files/patch-portlistview.cc11
-rw-r--r--ports-mgmt/barry/pkg-descr3
-rw-r--r--ports-mgmt/barry/pkg-plist32
-rw-r--r--ports-mgmt/bpm/Makefile29
-rw-r--r--ports-mgmt/bpm/distinfo2
-rw-r--r--ports-mgmt/bpm/files/patch-src::refresh.c55
-rw-r--r--ports-mgmt/bpm/pkg-descr17
-rw-r--r--ports-mgmt/bpm/pkg-plist14
-rw-r--r--ports-mgmt/p5-FreeBSD-Portindex/Makefile65
-rw-r--r--ports-mgmt/p5-FreeBSD-Portindex/distinfo2
-rw-r--r--ports-mgmt/p5-FreeBSD-Portindex/pkg-descr13
-rw-r--r--ports-mgmt/p5-FreeBSD-Portindex/pkg-plist15
-rw-r--r--ports-mgmt/p5-FreeBSD-Ports/Makefile24
-rw-r--r--ports-mgmt/p5-FreeBSD-Ports/distinfo2
-rw-r--r--ports-mgmt/p5-FreeBSD-Ports/pkg-descr17
-rw-r--r--ports-mgmt/p5-FreeBSD-Ports/pkg-plist7
-rw-r--r--ports-mgmt/pib/Makefile28
-rw-r--r--ports-mgmt/pib/distinfo2
-rw-r--r--ports-mgmt/pib/files/patch-Makefile10
-rw-r--r--ports-mgmt/pib/files/patch-pib71
-rw-r--r--ports-mgmt/pib/files/patch-tkPort.h12
-rw-r--r--ports-mgmt/pib/pkg-descr5
-rw-r--r--ports-mgmt/pib/pkg-plist5
-rw-r--r--ports-mgmt/pkg_cutleaves/Makefile51
-rw-r--r--ports-mgmt/pkg_cutleaves/distinfo2
-rw-r--r--ports-mgmt/pkg_cutleaves/pkg-descr3
-rw-r--r--ports-mgmt/pkg_install-devel/Makefile109
-rw-r--r--ports-mgmt/pkg_install-devel/distinfo2
-rw-r--r--ports-mgmt/pkg_install-devel/files/Makefile.inc4
-rw-r--r--ports-mgmt/pkg_install-devel/pkg-deinstall28
-rw-r--r--ports-mgmt/pkg_install-devel/pkg-descr17
-rw-r--r--ports-mgmt/pkg_install-devel/pkg-install46
-rw-r--r--ports-mgmt/pkg_install-devel/pkg-plist7
-rw-r--r--ports-mgmt/pkg_install-devel/pkg-req21
-rw-r--r--ports-mgmt/pkg_install/Makefile63
-rw-r--r--ports-mgmt/pkg_install/distinfo2
-rw-r--r--ports-mgmt/pkg_install/files/Makefile.inc4
-rw-r--r--ports-mgmt/pkg_install/files/patch-Makefile.inc15
-rw-r--r--ports-mgmt/pkg_install/files/patch-lib_Makefile19
-rw-r--r--ports-mgmt/pkg_install/pkg-descr9
-rw-r--r--ports-mgmt/pkg_install/pkg-plist5
-rw-r--r--ports-mgmt/pkg_remove/Makefile29
-rw-r--r--ports-mgmt/pkg_remove/pkg-descr18
-rw-r--r--ports-mgmt/pkg_remove/src/pkg_remove.txt34
-rw-r--r--ports-mgmt/pkg_rmleaves/Makefile25
-rw-r--r--ports-mgmt/pkg_rmleaves/distinfo2
-rw-r--r--ports-mgmt/pkg_rmleaves/pkg-descr3
-rw-r--r--ports-mgmt/pkg_trackinst/Makefile29
-rw-r--r--ports-mgmt/pkg_trackinst/distinfo2
-rw-r--r--ports-mgmt/pkg_trackinst/pkg-descr10
-rw-r--r--ports-mgmt/pkg_trackinst/pkg-plist37
-rw-r--r--ports-mgmt/pkg_tree/Makefile28
-rw-r--r--ports-mgmt/pkg_tree/distinfo2
-rw-r--r--ports-mgmt/pkg_tree/files/patch-Makefile13
-rw-r--r--ports-mgmt/pkg_tree/files/patch-pkg_tree65
-rw-r--r--ports-mgmt/pkg_tree/pkg-descr13
-rw-r--r--ports-mgmt/port-authoring-tools/Makefile29
-rw-r--r--ports-mgmt/port-authoring-tools/pkg-descr2
-rw-r--r--ports-mgmt/port-maintenance-tools/Makefile32
-rw-r--r--ports-mgmt/port-maintenance-tools/pkg-descr5
-rw-r--r--ports-mgmt/portaudit-db/Makefile44
-rw-r--r--ports-mgmt/portaudit-db/database/portaudit.txt84
-rw-r--r--ports-mgmt/portaudit-db/database/portaudit.xlist26
-rw-r--r--ports-mgmt/portaudit-db/database/portaudit.xml1107
-rw-r--r--ports-mgmt/portaudit-db/database/portaudit2vuxml.pl149
-rw-r--r--ports-mgmt/portaudit-db/files/packaudit.conf9
-rw-r--r--ports-mgmt/portaudit-db/files/packaudit.sh142
-rw-r--r--ports-mgmt/portaudit-db/files/portaudit2vuxml.awk95
-rw-r--r--ports-mgmt/portaudit-db/files/vuxml2html.xslt329
-rw-r--r--ports-mgmt/portaudit-db/files/vuxml2portaudit.xslt92
-rw-r--r--ports-mgmt/portaudit-db/pkg-descr16
-rw-r--r--ports-mgmt/portaudit-db/pkg-plist8
-rw-r--r--ports-mgmt/portaudit/Makefile82
-rw-r--r--ports-mgmt/portaudit/files/portaudit-cmd.sh474
-rw-r--r--ports-mgmt/portaudit/files/portaudit.1175
-rw-r--r--ports-mgmt/portaudit/files/portaudit.conf19
-rw-r--r--ports-mgmt/portaudit/files/portaudit.sh61
-rw-r--r--ports-mgmt/portaudit/pkg-deinstall19
-rw-r--r--ports-mgmt/portaudit/pkg-descr16
-rw-r--r--ports-mgmt/portaudit/pkg-install36
-rw-r--r--ports-mgmt/portaudit/pkg-plist7
-rw-r--r--ports-mgmt/portaudit/pkg-req32
-rw-r--r--ports-mgmt/portbrowser/Makefile31
-rw-r--r--ports-mgmt/portbrowser/distinfo2
-rw-r--r--ports-mgmt/portbrowser/pkg-descr4
-rw-r--r--ports-mgmt/portcheckout/Makefile24
-rw-r--r--ports-mgmt/portcheckout/distinfo2
-rw-r--r--ports-mgmt/portcheckout/files/patch-aa47
-rw-r--r--ports-mgmt/portcheckout/files/patch-ab12
-rw-r--r--ports-mgmt/portcheckout/pkg-descr7
-rw-r--r--ports-mgmt/portdowngrade/Makefile48
-rw-r--r--ports-mgmt/portdowngrade/distinfo2
-rw-r--r--ports-mgmt/portdowngrade/pkg-descr8
-rw-r--r--ports-mgmt/porteasy/Makefile36
-rw-r--r--ports-mgmt/porteasy/pkg-descr22
-rw-r--r--ports-mgmt/porteasy/pkg-plist1
-rw-r--r--ports-mgmt/porteasy/src/porteasy.8356
-rw-r--r--ports-mgmt/porteasy/src/porteasy.pl1365
-rw-r--r--ports-mgmt/portell/Makefile49
-rw-r--r--ports-mgmt/portell/distinfo2
-rw-r--r--ports-mgmt/portell/files/patch-portell.py26
-rw-r--r--ports-mgmt/portell/pkg-descr10
-rw-r--r--ports-mgmt/portlint/Makefile46
-rw-r--r--ports-mgmt/portlint/pkg-descr15
-rw-r--r--ports-mgmt/portlint/pkg-plist3
-rw-r--r--ports-mgmt/portlint/src/portlint.1169
-rw-r--r--ports-mgmt/portlint/src/portlint.pl2640
-rw-r--r--ports-mgmt/portlint/src/portlintgrep.pl53
-rw-r--r--ports-mgmt/portmanager/Makefile79
-rw-r--r--ports-mgmt/portmanager/distinfo2
-rw-r--r--ports-mgmt/portmanager/files/patch-0.2.9_168
-rw-r--r--ports-mgmt/portmanager/files/patch-0.2.9_280
-rw-r--r--ports-mgmt/portmanager/files/patch-0.2.9_3833
-rw-r--r--ports-mgmt/portmanager/files/patch-0.2.9_4725
-rw-r--r--ports-mgmt/portmanager/files/patch-0.2.9_511
-rw-r--r--ports-mgmt/portmanager/pkg-descr21
-rw-r--r--ports-mgmt/portmanager/pkg-message18
-rw-r--r--ports-mgmt/portmanager/pkg-plist20
-rw-r--r--ports-mgmt/portmk/Makefile61
-rw-r--r--ports-mgmt/portmk/Mk/bsd.port.mk808
-rw-r--r--ports-mgmt/portmk/Mk/bsd.port.post.mk3579
-rw-r--r--ports-mgmt/portmk/Mk/bsd.port.pre.mk419
-rw-r--r--ports-mgmt/portmk/Mk/bsd.port.subdir.mk3
-rw-r--r--ports-mgmt/portmk/files/ChangeLog3
-rw-r--r--ports-mgmt/portmk/files/Features80
-rw-r--r--ports-mgmt/portmk/files/KnownIssues2
-rw-r--r--ports-mgmt/portmk/files/ReadMe45
-rw-r--r--ports-mgmt/portmk/files/make.conf3
-rw-r--r--ports-mgmt/portmk/files/omake.sh3
-rw-r--r--ports-mgmt/portmk/files/portmk4.patch23
-rw-r--r--ports-mgmt/portmk/files/portmk5.patch23
-rw-r--r--ports-mgmt/portmk/pkg-descr19
-rw-r--r--ports-mgmt/portmk/pkg-message14
-rw-r--r--ports-mgmt/portmk/scripts/distfiles.sh1103
-rw-r--r--ports-mgmt/portmk/scripts/options.pl373
-rw-r--r--ports-mgmt/portmk/scripts/options.sh299
-rw-r--r--ports-mgmt/portmk/scripts/ranksites-fping.pl139
-rw-r--r--ports-mgmt/portmk/scripts/ranksites-geoip.pl393
-rw-r--r--ports-mgmt/portsman/Makefile34
-rw-r--r--ports-mgmt/portsman/distinfo2
-rw-r--r--ports-mgmt/portsman/files/patch-freebsd520
-rw-r--r--ports-mgmt/portsman/pkg-descr7
-rw-r--r--ports-mgmt/portsman/pkg-plist3
-rw-r--r--ports-mgmt/portsnap/Makefile54
-rw-r--r--ports-mgmt/portsnap/distinfo2
-rw-r--r--ports-mgmt/portsnap/pkg-descr15
-rw-r--r--ports-mgmt/portsnap/pkg-message20
-rw-r--r--ports-mgmt/porttools/Makefile36
-rw-r--r--ports-mgmt/porttools/distinfo2
-rw-r--r--ports-mgmt/porttools/files/patch-cmd_test.in30
-rw-r--r--ports-mgmt/porttools/files/patch-util_diff.in18
-rw-r--r--ports-mgmt/porttools/pkg-descr9
-rw-r--r--ports-mgmt/porttools/pkg-plist16
-rw-r--r--ports-mgmt/portupgrade-devel/Makefile81
-rw-r--r--ports-mgmt/portupgrade-devel/distinfo4
-rw-r--r--ports-mgmt/portupgrade-devel/files/patch-CAN-2005-061075
-rw-r--r--ports-mgmt/portupgrade-devel/files/patch-Makefile.compat11
-rw-r--r--ports-mgmt/portupgrade-devel/files/patch-bin-portsclean.124
-rw-r--r--ports-mgmt/portupgrade-devel/files/patch-bin-portupgrade22
-rw-r--r--ports-mgmt/portupgrade-devel/files/patch-etc-Makefile14
-rw-r--r--ports-mgmt/portupgrade-devel/files/patch-lib_portsdb.rb11
-rw-r--r--ports-mgmt/portupgrade-devel/pkg-descr21
-rw-r--r--ports-mgmt/portupgrade-devel/pkg-plist41
-rw-r--r--ports-mgmt/portupgrade/Makefile81
-rw-r--r--ports-mgmt/portupgrade/distinfo4
-rw-r--r--ports-mgmt/portupgrade/files/patch-CAN-2005-061075
-rw-r--r--ports-mgmt/portupgrade/files/patch-Makefile.compat11
-rw-r--r--ports-mgmt/portupgrade/files/patch-bin-portsclean.124
-rw-r--r--ports-mgmt/portupgrade/files/patch-bin-portupgrade22
-rw-r--r--ports-mgmt/portupgrade/files/patch-etc-Makefile14
-rw-r--r--ports-mgmt/portupgrade/files/patch-lib_portsdb.rb11
-rw-r--r--ports-mgmt/portupgrade/pkg-descr21
-rw-r--r--ports-mgmt/portupgrade/pkg-plist41
-rw-r--r--ports-mgmt/qtpkg/Makefile26
-rw-r--r--ports-mgmt/qtpkg/distinfo2
-rw-r--r--ports-mgmt/qtpkg/files/patch-Makefile25
-rw-r--r--ports-mgmt/qtpkg/pkg-descr4
-rw-r--r--ports-mgmt/vulnerability-test-port/Makefile35
-rw-r--r--ports-mgmt/vulnerability-test-port/pkg-descr20
185 files changed, 0 insertions, 19626 deletions
diff --git a/ports-mgmt/barry/Makefile b/ports-mgmt/barry/Makefile
deleted file mode 100644
index 132128a176e2..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.7
-PORTREVISION= 1
-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
-
-BUILD_DEPENDS= ${LOCALBASE}/sbin/portsdb:${PORTSDIR}/sysutils/portupgrade
-RUN_DEPENDS= ${LOCALBASE}/sbin/portsdb:${PORTSDIR}/sysutils/portupgrade
-
-USE_BZIP2= yes
-USE_KDELIBS_VER=3
-USE_REINPLACE= yes
-GNU_CONFIGURE= yes
-
-post-patch:
- @${FIND} ${WRKSRC} -name "*.h" -and -not -name "linklocator.h" | \
- ${XARGS} ${REINPLACE_CMD} -e 's/^};/}/g'
- @${REINPLACE_CMD} "s,-lpthread,${PTHREAD_LIBS},g" ${WRKSRC}/configure
-
-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 b57844b7c68b..000000000000
--- a/ports-mgmt/barry/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (barry-0.7.tar.bz2) = 7224ce33ef28b4938b4731f4e4a4cb93
-SIZE (barry-0.7.tar.bz2) = 705508
diff --git a/ports-mgmt/barry/files/patch-Makefile.in b/ports-mgmt/barry/files/patch-Makefile.in
deleted file mode 100644
index 5b741ce02b5f..000000000000
--- a/ports-mgmt/barry/files/patch-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/Makefile.in.orig Sun Apr 24 02:27:28 2005
-+++ src/Makefile.in Sun Apr 24 02:27:43 2005
-@@ -240,7 +240,7 @@
- INCLUDES = $(all_includes)
-
- barry_LDFLAGS = $(KDE_RPATH) $(all_libraries)
--barry_LDADD = $(LIB_KIO) $(LIB_KHTML)
-+barry_LDADD = $(LIB_KIO) $(LIB_KHTML) $(LIBPTHREAD)
-
- barry_SOURCES = actionprogressdialog.cc application.cc configdialog.cc \
- databaseinfodialog.cc databasewrapper.cc dependlistview.cc \
diff --git a/ports-mgmt/barry/files/patch-history.h b/ports-mgmt/barry/files/patch-history.h
deleted file mode 100644
index 8d02392e68d8..000000000000
--- a/ports-mgmt/barry/files/patch-history.h
+++ /dev/null
@@ -1,92 +0,0 @@
---- src/history.h.bak Sun Jun 8 22:09:10 2003
-+++ src/history.h Sun Apr 24 02:18:42 2005
-@@ -22,44 +22,7 @@
-
- namespace Barry
- {
-- class History;
--
-- class Command
-- {
-- public:
-- enum CreationFlags {
-- None = 0x0, Run = 0x1, Register = 0x2
-- };
-- virtual ~Command();
--
-- template <class T>
-- static T *create( CreationFlags flags = None )
-- {
-- T *cmd = new T;
-- if ( flags & Register )
-- History::self().registerCommand( cmd );
-- if ( flags & Run )
-- cmd->exec();
-- return cmd;
-- }
--
-- void unexec();
-- void exec();
-- virtual QString text() const = 0;
--
-- protected:
-- Command();
-- bool executed() const { return m_executed; }
--
-- private:
-- Command( const Command &rhs );
-- Command &operator=( const Command &rhs );
--
-- virtual void doExec() = 0;
-- virtual void doUnexec() = 0;
--
-- bool m_executed;
-- };
-+ class Command;
-
- class History : public QObject
- {
-@@ -100,6 +63,43 @@
- unsigned int m_maxEntries;
- KToolBarPopupAction *m_backAction;
- KToolBarPopupAction *m_forwardAction;
-+ };
-+
-+ class Command
-+ {
-+ public:
-+ enum CreationFlags {
-+ None = 0x0, Run = 0x1, Register = 0x2
-+ };
-+ virtual ~Command();
-+
-+ template <class T>
-+ static T *create( CreationFlags flags = None )
-+ {
-+ T *cmd = new T;
-+ if ( flags & Register )
-+ History::self().registerCommand( cmd );
-+ if ( flags & Run )
-+ cmd->exec();
-+ return cmd;
-+ }
-+
-+ void unexec();
-+ void exec();
-+ virtual QString text() const = 0;
-+
-+ protected:
-+ Command();
-+ bool executed() const { return m_executed; }
-+
-+ private:
-+ Command( const Command &rhs );
-+ Command &operator=( const Command &rhs );
-+
-+ virtual void doExec() = 0;
-+ virtual void doUnexec() = 0;
-+
-+ bool m_executed;
- };
- };
-
diff --git a/ports-mgmt/barry/files/patch-orphanedfilesdialog.cc b/ports-mgmt/barry/files/patch-orphanedfilesdialog.cc
deleted file mode 100644
index 9b8df25563c1..000000000000
--- a/ports-mgmt/barry/files/patch-orphanedfilesdialog.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/orphanedfilesdialog.cc.orig Sun Apr 24 02:21:02 2005
-+++ src/orphanedfilesdialog.cc Sun Apr 24 02:21:10 2005
-@@ -52,7 +52,7 @@
- ++i;
- return i;
- }
--};
-+}
-
- using namespace Barry;
-
diff --git a/ports-mgmt/barry/files/patch-port.cc b/ports-mgmt/barry/files/patch-port.cc
deleted file mode 100644
index 6b04f6133751..000000000000
--- a/ports-mgmt/barry/files/patch-port.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/port.cc.orig Sun Apr 24 02:21:49 2005
-+++ src/port.cc Sun Apr 24 02:21:55 2005
-@@ -64,7 +64,7 @@
- QString m_link;
- long long m_size;
- };
--};
-+}
-
- // This would be nice in Qt
- template <class Container>
diff --git a/ports-mgmt/barry/files/patch-portlistview.cc b/ports-mgmt/barry/files/patch-portlistview.cc
deleted file mode 100644
index 0681fd041528..000000000000
--- a/ports-mgmt/barry/files/patch-portlistview.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/portlistview.cc.orig Sun Apr 24 02:22:33 2005
-+++ src/portlistview.cc Sun Apr 24 02:22:41 2005
-@@ -42,7 +42,7 @@
- QListViewItem *m_oldItem;
- QListViewItem *m_newItem;
- };
--};
-+}
-
- using namespace Barry;
-
diff --git a/ports-mgmt/barry/pkg-descr b/ports-mgmt/barry/pkg-descr
deleted file mode 100644
index 5eff7c940b5d..000000000000
--- a/ports-mgmt/barry/pkg-descr
+++ /dev/null
@@ -1,3 +0,0 @@
-A nice KDE frontend to the ports system.
-
-WWW: http://www.student.uni-oldenburg.de/frerich.raabe/barry/
diff --git a/ports-mgmt/barry/pkg-plist b/ports-mgmt/barry/pkg-plist
deleted file mode 100644
index 6671c8f4f68e..000000000000
--- a/ports-mgmt/barry/pkg-plist
+++ /dev/null
@@ -1,32 +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/deinstall-port.png
-share/apps/barry/eventsrc
-share/apps/barry/install-port.png
-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/port-installed.png
-share/apps/barry/port-not-installed.png
-share/apps/barry/shadow1.png
-share/apps/barry/splashscreen.html
-share/apps/barry/upgrade-port.png
-share/icons/crystalsvg/16x16/apps/barry.png
-share/icons/crystalsvg/32x32/apps/barry.png
-share/icons/crystalsvg/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/pl/LC_MESSAGES/barry.mo
-share/locale/sv/LC_MESSAGES/barry.mo
-@dirrm share/applnk/Utilities
-@dirrm share/apps/barry
-@dirrm share/icons/crystalsvg/16x16/apps
-@dirrm share/icons/crystalsvg/32x32/apps
-@dirrm share/icons/crystalsvg/48x48/apps
diff --git a/ports-mgmt/bpm/Makefile b/ports-mgmt/bpm/Makefile
deleted file mode 100644
index d095824ee14f..000000000000
--- a/ports-mgmt/bpm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-# New ports collection makefile for: bpm
-# Date created: 23 July 2004
-# Whom: sethk
-#
-# $FreeBSD$
-#
-
-PORTNAME= bpm
-PORTVERSION= 0.4.1b
-PORTREVISION= 5
-CATEGORIES= sysutils
-MASTER_SITES= http://www.meowfishies.com/code/bpm/
-EXTRACT_SUFX= .tgz
-MAINTAINER= sethk@meowfishies.com
-COMMENT= A graphical BSD ports collection manager
-
-RUN_DEPENDS= portupgrade:${PORTSDIR}/sysutils/portupgrade
-
-USE_X_PREFIX= yes
-USE_GNOME= gtk20
-USE_REINPLACE= yes
-
-MAKE_ENV+= OSTYPE="${OPSYS}"
-
-post-patch:
- @${FIND} ${WRKSRC} -name Makefile | ${XARGS} \
- ${REINPLACE_CMD} -e "s|-lintl|-lintl -L${LOCALBASE}/lib|g"
-
-.include <bsd.port.mk>
diff --git a/ports-mgmt/bpm/distinfo b/ports-mgmt/bpm/distinfo
deleted file mode 100644
index 808dc6d1e368..000000000000
--- a/ports-mgmt/bpm/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (bpm-0.4.1b.tgz) = 2704ba7b6f6935a93b2973aa0e82028d
-SIZE (bpm-0.4.1b.tgz) = 98457
diff --git a/ports-mgmt/bpm/files/patch-src::refresh.c b/ports-mgmt/bpm/files/patch-src::refresh.c
deleted file mode 100644
index d5a05c3de215..000000000000
--- a/ports-mgmt/bpm/files/patch-src::refresh.c
+++ /dev/null
@@ -1,55 +0,0 @@
---- src/refresh.c.orig Mon Aug 23 22:40:08 2004
-+++ src/refresh.c Fri Dec 10 08:58:03 2004
-@@ -62,7 +62,13 @@
- __RCSID("$Id: refresh.c,v 1.32 2004/08/24 02:40:08 sethk Exp $");
-
- /* XXX use libinstall/lib.h */
-+#if __FreeBSD_version >= 600000
-+#define INDEX_FN PORTS_BASE "/INDEX-6"
-+#elif __FreeBSD_version >= 500036
-+#define INDEX_FN PORTS_BASE "/INDEX-5"
-+#else
- #define INDEX_FN PORTS_BASE "/INDEX"
-+#endif
- #define INDEX_MAXLN 4096
- #define DB_DIR "/var/db/pkg"
- #define ITER_BYTES (128 * 1024)
-@@ -183,10 +189,12 @@
- if (*sp == '|')
- ++i;
-
-- if (i != (PFIELD_NFIELD - 1))
-+ if (i < (PFIELD_NFIELD - 1))
- {
- #ifdef DEBUG
-- warnx("invalid number of fields");
-+ warnx("invalid number of fields (%d should be %d)",
-+ i + 1,
-+ PFIELD_NFIELD);
- #endif /* DEBUG */
- return FALSE;
- }
-@@ -195,12 +203,9 @@
-
- for (i = 0; i < PFIELD_NFIELD; ++i)
- {
-- if (i < PFIELD_NFIELD - 1)
-- {
-- if (!(sp = strchr(line, '|')))
-- break;
-- *sp++ = '\0';
-- }
-+ if (!(sp = strchr(line, '|')) && i < PFIELD_NFIELD - 1)
-+ break;
-+ *sp++ = '\0';
-
- switch (i)
- {
-@@ -320,7 +325,6 @@
-
- if (_refresh_index_parse(ln, portdp, rdp) != TRUE)
- {
-- _refresh_portfree(portdp);
- #ifdef DEBUG
- warnx("%s:%u: invalid format", INDEX_FN, rdp->rd_linec);
- #endif /* DEBUG */
diff --git a/ports-mgmt/bpm/pkg-descr b/ports-mgmt/bpm/pkg-descr
deleted file mode 100644
index 8400a536e1f0..000000000000
--- a/ports-mgmt/bpm/pkg-descr
+++ /dev/null
@@ -1,17 +0,0 @@
-BSD Ports Manipuator (BPM) is a graphical ports collection manager for
-FreeBSD. It has a GTK+ 2.0 interface and allows you to add, remove, or
-upgrade software packages on your system without requiring you to use a
-command-line. In addition, it can display details about available,
-installed, and out-of-date ports, as well as allowing you to search
-based on port descriptions.
-
-BPM uses the existing ports collection structure, allowing it to build
-ports from source and integrate seamlessly with other tools.
-
-This project started out as a clone of Ports Manager.app for
-DarwinPorts.
-
-WWW: http://www.meowfishies.com/bpm.rhtml
-
-- Seth
-sethk@meowfishies.com
diff --git a/ports-mgmt/bpm/pkg-plist b/ports-mgmt/bpm/pkg-plist
deleted file mode 100644
index fe24b9008851..000000000000
--- a/ports-mgmt/bpm/pkg-plist
+++ /dev/null
@@ -1,14 +0,0 @@
-bin/bpm
-bin/gtk-su
-libexec/bpm/term
-libexec/bpm/fetch-wrapper
-%%DATADIR%%/pixmaps/term_16.png
-%%DATADIR%%/pixmaps/term_24.png
-%%DATADIR%%/pixmaps/pkg_16.png
-%%DATADIR%%/pixmaps/pkg_24.png
-%%DATADIR%%/pixmaps/pkg_48.png
-%%DATADIR%%/pixmaps/lock_48.png
-share/locale/en_CA/LC_MESSAGES/bpm.mo
-@dirrm libexec/bpm
-@dirrm %%DATADIR%%/pixmaps
-@dirrm %%DATADIR%%
diff --git a/ports-mgmt/p5-FreeBSD-Portindex/Makefile b/ports-mgmt/p5-FreeBSD-Portindex/Makefile
deleted file mode 100644
index 5cfced360809..000000000000
--- a/ports-mgmt/p5-FreeBSD-Portindex/Makefile
+++ /dev/null
@@ -1,65 +0,0 @@
-# New ports collection Makefile for: FreeBSD::Portindex
-# Date created: 5 Nov 2004
-# Whom: Matthew Seaman <m.seaman@infracaninophile.co.uk>
-#
-# $FreeBSD$
-
-PORTNAME= FreeBSD-Portindex
-PORTVERSION= 1.4
-CATEGORIES= sysutils perl5
-MASTER_SITES= http://www.infracaninophile.co.uk/portindex/
-PKGNAMEPREFIX= p5-
-
-MAINTAINER= m.seaman@infracaninophile.co.uk
-COMMENT= Incremental FreeBSD ports INDEX file generation
-
-BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/BerkeleyDB.pm:${PORTSDIR}/databases/p5-BerkeleyDB
-RUN_DEPENDS= ${BUILD_DEPENDS}
-
-USE_BZIP2= yes
-PERL_CONFIGURE= yes
-
-CACHE_DIR?= /var/db/portindex
-CACHE_OWNER?= root
-CACHE_GROUP?= operator
-CACHE_MODE?= 0775
-
-CFG_FILE= portindex.cfg
-
-MAN1= find-updated.1 cache-init.1 cache-update.1 portindex.1
-
-.include <bsd.port.pre.mk>
-
-##
-## Needs a recent version of perl, preferably 5.8.6, but 5.6.1 should work
-##
-.if ${PERL_LEVEL} < 500601
-IGNORE= Port requires perl 5.6.x or (preferably) later. Install lang/perl5.8 and try again
-.endif
-
-.if ${PERL_LEVEL} < 500800
-BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Storable.pm:${PORTSDIR}/devel/p5-Storable
-.endif
-
-post-install: install-conf install-cache
-
-install-conf:
- cd ${WRKSRC} ; \
- ${INSTALL_DATA} ${CFG_FILE}.sample ${PREFIX}/etc/${CFG_FILE}.sample
- cd ${PREFIX}/etc ; \
- if ${TEST} ! -f ${CFG_FILE} ; then \
- ${CP} -p ${CFG_FILE}.sample ${CFG_FILE} ; \
- fi
-
-# Create the cache directory and make it writable by group 'operator'
-# by default. Only if the cache directory doesn't already exist.
-# Have to do this by hand if installing via pkg.
-
-install-cache:
- if ${TEST} ! -d ${CACHE_DIR} ; then \
- ${MKDIR} ${CACHE_DIR} ; \
- ${CHOWN} ${CACHE_OWNER}:${CACHE_GROUP} ${CACHE_DIR} ; \
- ${CHMOD} ${CACHE_MODE} ${CACHE_DIR} ; \
- fi
-
-.include <bsd.port.post.mk>
diff --git a/ports-mgmt/p5-FreeBSD-Portindex/distinfo b/ports-mgmt/p5-FreeBSD-Portindex/distinfo
deleted file mode 100644
index 67e71eca2b3d..000000000000
--- a/ports-mgmt/p5-FreeBSD-Portindex/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (FreeBSD-Portindex-1.4.tar.bz2) = 06815d6cad307944ea684a17785a7a6a
-SIZE (FreeBSD-Portindex-1.4.tar.bz2) = 24390
diff --git a/ports-mgmt/p5-FreeBSD-Portindex/pkg-descr b/ports-mgmt/p5-FreeBSD-Portindex/pkg-descr
deleted file mode 100644
index 684bba33590d..000000000000
--- a/ports-mgmt/p5-FreeBSD-Portindex/pkg-descr
+++ /dev/null
@@ -1,13 +0,0 @@
-
-cache-init, cache-update, find-updated and portindex are a set of perl
-scripts built around the common core of the FreeBSD::Portindex
-modules. Their use is to generate and maintain the ports INDEX or
-INDEX-5 files speedily and efficiently. Ultimately they work in a very
-similar way to the standard make index command, except that the
-FreeBSD::Portindex tools keep a cache of the make describe output from
-each port, and can update that cached data incrementally as the ports
-tree itself is updated.
-
-WWW: http://www.infracaninophile.co.uk/portindex/
-
-- Matthew Seaman <m.seaman@infracaninophile.co.uk>
diff --git a/ports-mgmt/p5-FreeBSD-Portindex/pkg-plist b/ports-mgmt/p5-FreeBSD-Portindex/pkg-plist
deleted file mode 100644
index 3e2d25069968..000000000000
--- a/ports-mgmt/p5-FreeBSD-Portindex/pkg-plist
+++ /dev/null
@@ -1,15 +0,0 @@
-bin/cache-init
-bin/cache-update
-bin/find-updated
-bin/portindex
-@unexec if cmp -s %D/etc/portindex.cfg.sample %D/etc/portindex.cfg ; then rm -f %D/etc/portindex.cfg ; fi
-etc/portindex.cfg.sample
-@exec [ ! -f %B/portindex.cfg ] && cp -p %B/%f %B/portindex.cfg || true
-%%SITE_PERL%%/FreeBSD/Portindex/Config.pm
-%%SITE_PERL%%/FreeBSD/Portindex/Port.pm
-%%SITE_PERL%%/FreeBSD/Portindex/Tree.pm
-%%SITE_PERL%%/%%PERL_ARCH%%/auto/FreeBSD/Portindex/.packlist
-@dirrm %%SITE_PERL%%/FreeBSD/Portindex
-@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/FreeBSD/Portindex
-@unexec rmdir %D/%%SITE_PERL%%/FreeBSD 2>/dev/null || true
-@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/FreeBSD 2>/dev/null || true
diff --git a/ports-mgmt/p5-FreeBSD-Ports/Makefile b/ports-mgmt/p5-FreeBSD-Ports/Makefile
deleted file mode 100644
index 7f6de0182169..000000000000
--- a/ports-mgmt/p5-FreeBSD-Ports/Makefile
+++ /dev/null
@@ -1,24 +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.04
-CATEGORIES= textproc perl5
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= tom
-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 4fe09490e541..000000000000
--- a/ports-mgmt/p5-FreeBSD-Ports/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (FreeBSD-Ports-0.04.tar.bz2) = d753ec6d359d5827bf1c724b42bf2bb1
-SIZE (FreeBSD-Ports-0.04.tar.bz2) = 16609
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 970acd68edd6..000000000000
--- a/ports-mgmt/pib/Makefile
+++ /dev/null
@@ -1,28 +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
-
-.include <bsd.port.pre.mk>
-
-do-install:
- ${MKDIR} ${PREFIX}/lib/pib
- ${INSTALL_SCRIPT} ${WRKSRC}/*.tcl ${PREFIX}/lib/pib
- ${INSTALL_DATA} ${WRKSRC}/libTkSteal.so.2* ${PREFIX}/lib/pib
- ${LN} -fs ${PREFIX}/lib/pib/pib.tcl ${PREFIX}/bin/pib
-
-.include <bsd.port.post.mk>
diff --git a/ports-mgmt/pib/distinfo b/ports-mgmt/pib/distinfo
deleted file mode 100644
index be9ac6812018..000000000000
--- a/ports-mgmt/pib/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (pib-1.2.tar.gz) = fa095bd1f9854aa296b4d35f8ba029f5
-SIZE (pib-1.2.tar.gz) = 33286
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/files/patch-tkPort.h b/ports-mgmt/pib/files/patch-tkPort.h
deleted file mode 100644
index f06866b80a73..000000000000
--- a/ports-mgmt/pib/files/patch-tkPort.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- tkPort.h.orig Wed Apr 13 17:30:58 2005
-+++ tkPort.h Wed Apr 13 17:30:13 2005
-@@ -133,8 +133,6 @@ extern int errno;
- * in any other header file.
- */
-
--extern void panic();
--
- /*
- * These functions do nothing under Unix, so we just eliminate calls them.
- */
-
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 cb2b035dee89..000000000000
--- a/ports-mgmt/pkg_cutleaves/Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-# New ports collection makefile for: pkg_cutleaves
-# Date created: 27 July 2003
-# Whom: Stefan Walter <sw@gegenunendlich.de>
-#
-# $FreeBSD$
-#
-
-PORTNAME= pkg_cutleaves
-PORTVERSION= 20040517
-CATEGORIES= sysutils
-MASTER_SITES= http://www.gegenunendlich.de/projects/${PORTNAME}/
-
-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
-
-WRKSRC= ${WRKDIR}/${PORTNAME}
-
-MAN1= pkg_cutleaves.1
-
-PLIST_FILES= sbin/pkg_cutleaves
-
-post-patch:
- @${REINPLACE_CMD} -e \
- 's,/usr/local/etc/pkg_leaves.exclude,${PREFIX}/etc/pkg_leaves.exclude,' \
- ${WRKSRC}/pkg_cutleaves.1
- @${REINPLACE_CMD} -e \
- 's,/usr/local/etc/pkg_leaves.exclude,${PREFIX}/etc/pkg_leaves.exclude,' \
- ${WRKSRC}/pkg_cutleaves
- @${REINPLACE_CMD} -e \
- 's,/usr/local/sbin/pkg_deinstall,${LOCALBASE}/sbin/pkg_deinstall,' \
- ${WRKSRC}/pkg_cutleaves
- @${REINPLACE_CMD} -e \
- 's,/usr/local/sbin/pkgdb,${LOCALBASE}/sbin/pkgdb,' \
- ${WRKSRC}/pkg_cutleaves
- @${REINPLACE_CMD} -e \
- 's,/var/db/pkg,${PKG_DBDIR},' \
- ${WRKSRC}/pkg_cutleaves
- @${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},' \
- ${WRKSRC}/pkg_cutleaves
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkg_cutleaves ${PREFIX}/sbin/pkg_cutleaves
- ${INSTALL_MAN} ${WRKSRC}/pkg_cutleaves.1 ${MAN1PREFIX}/man/man1
-
-.include <bsd.port.mk>
diff --git a/ports-mgmt/pkg_cutleaves/distinfo b/ports-mgmt/pkg_cutleaves/distinfo
deleted file mode 100644
index 3638a4d90543..000000000000
--- a/ports-mgmt/pkg_cutleaves/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (pkg_cutleaves-20040517.tar.gz) = 24e981428c439f85209578916996d389
-SIZE (pkg_cutleaves-20040517.tar.gz) = 5091
diff --git a/ports-mgmt/pkg_cutleaves/pkg-descr b/ports-mgmt/pkg_cutleaves/pkg-descr
deleted file mode 100644
index 7aa045b16eac..000000000000
--- a/ports-mgmt/pkg_cutleaves/pkg-descr
+++ /dev/null
@@ -1,3 +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)).
diff --git a/ports-mgmt/pkg_install-devel/Makefile b/ports-mgmt/pkg_install-devel/Makefile
deleted file mode 100644
index 6e7d688b42c0..000000000000
--- a/ports-mgmt/pkg_install-devel/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-# New ports collection makefile for: pkg_install
-# Date created: 25 Jan 2004
-# Whom: Oliver Eikemeier
-#
-# $FreeBSD$
-#
-
-PORTNAME= pkg_install
-PORTVERSION= 20040811
-CATEGORIES= sysutils
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= eik
-PKGNAMESUFFIX= -devel
-
-MAINTAINER= clement@FreeBSD.org
-COMMENT= Development version of the FreeBSD 5.x package tools
-
-CONFLICTS= pkg_install-[0-9]*
-
-MANCOMPRESSED= yes
-
-MAN1= pkg_add.1 pkg_create.1 pkg_delete.1 \
- pkg_info.1 pkg_version.1
-
-PKGREQ= ${WRKDIR}/pkg-req
-
-.if defined(PREFIX)
-.if ${PREFIX} == "/usr"
-PKGNAMESUFFIX= -base-devel
-.endif
-.endif
-
-BACKUPDIR?= /var/backups
-
-.if !defined(NOCRYPT) && !defined(NO_OPENSSL)
-USE_OPENSSL= yes
-MAN1+= pkg_check.1 pkg_sign.1
-PLIST_SUB+= OPENSSL=""
-CFLAGS+= -I${OPENSSLINC}
-LDFLAGS+= -L${OPENSSLLIB}
-.else
-MAKE_ARGS= -DNO_OPENSSL
-PLIST_SUB+= OPENSSL="@comment "
-.endif
-
-.include <bsd.port.pre.mk>
-
-.if defined(DFOSVERSION)
-PKG_OSVERSION= ${DFOSVERSION}
-SED_SCRIPT= -e 's/%%OSVERSIONCHK%%/"$$OSVERSION" -ge 110000/g'
-.else
-PKG_OSVERSION= ${OSVERSION}
-SED_SCRIPT= -e 's/%%OSVERSIONCHK%%/"$$OSVERSION" -ge 491101 -a "$$OSVERSION" -lt 500000 -o "$$OSVERSION" -ge 502120/g'
-.endif
-
-pre-everything::
- @${ECHO} "======================================================================================="
- @${ECHO}
- @${ECHO} "Build ${PKGNAME} with PREFIX=/usr to replace the base package tools"
- @${ECHO}
- @${ECHO} "======================================================================================="
-
-.if !defined(DFOSVERSION) && ${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
-
-# __FBSDID is undefied for old FreeBSD versions and DragonFlyBSD
-.if defined(DFOSVERSION) || ${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
-
-post-build:
- @${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-req >${WRKDIR}/pkg-req
-
-.if !defined(PACKAGE_BUILDING)
-pre-install:
- @${SETENV} PKG_PREFIX=${PREFIX:Q} OSVERSION=${PKG_OSVERSION:Q} ${SH} ${PKGREQ} ${PKGNAME} INSTALL
-.endif
-
-# Call pkg-install in `do-install:' instead of `pre-install:' because it might
-# deinstall pkg_info, which is fatal during `check-already-installed:'.
-do-install:
- ${SETENV} PKG_PREFIX=${PREFIX:Q} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
- @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
-
-test: build
- @(cd ${BUILD_WRKSRC}/version && ${SH} test-pkg_version.sh)
-
-.include <bsd.port.post.mk>
diff --git a/ports-mgmt/pkg_install-devel/distinfo b/ports-mgmt/pkg_install-devel/distinfo
deleted file mode 100644
index d2b7959ad937..000000000000
--- a/ports-mgmt/pkg_install-devel/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (pkg_install-20040811.tar.gz) = d95f6a6a11cfba51cd4ea451f444ae47
-SIZE (pkg_install-20040811.tar.gz) = 88003
diff --git a/ports-mgmt/pkg_install-devel/files/Makefile.inc b/ports-mgmt/pkg_install-devel/files/Makefile.inc
deleted file mode 100644
index 3f26acacff36..000000000000
--- a/ports-mgmt/pkg_install-devel/files/Makefile.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-# $FreeBSD$
-
-BINDIR=%%PREFIX%%/sbin
-MANDIR=%%MANPREFIX%%/man/man
diff --git a/ports-mgmt/pkg_install-devel/pkg-deinstall b/ports-mgmt/pkg_install-devel/pkg-deinstall
deleted file mode 100644
index 08ffba959763..000000000000
--- a/ports-mgmt/pkg_install-devel/pkg-deinstall
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-PAX=/bin/pax
-ECHO_CMD=echo
-RM=/bin/rm
-BACKUPDIR=/var/backups
-
-PREFIX=${PKG_PREFIX:-/usr/local}
-if [ "${PREFIX}" = "/usr" ]; then
- MANPREFIX="${PREFIX}/share"
-else
- MANPREFIX="${PREFIX}"
-fi
-
-case $2 in
-POST-DEINSTALL)
- if [ "${PREFIX}" = "/usr" ]; then
- if [ -e "${BACKUPDIR}/pkg_install.tgz" ]; then
- ${PAX} -r -pe -z -f "${BACKUPDIR}/pkg_install.tgz"
- ${RM} "${BACKUPDIR}/pkg_install.tgz"
- ${ECHO_CMD} "===> Base pkg_install restored."
- fi
- fi
- ;;
-esac
diff --git a/ports-mgmt/pkg_install-devel/pkg-descr b/ports-mgmt/pkg_install-devel/pkg-descr
deleted file mode 100644
index abe2ae1d30b3..000000000000
--- a/ports-mgmt/pkg_install-devel/pkg-descr
+++ /dev/null
@@ -1,17 +0,0 @@
-Development version of the FreeBSD 5.x pkg_install suite of tools
-
-This version fixes some bugs of the -CURRENT tools. You should
-only install it it you have problems with the current version
-or want to test the new features.
-
-If you want to replace the base system tools, install via:
- make install PREFIX=/usr
-You can revert to the normal tools simply by uninstalling the
-port or restoring them with:
- cd /usr/src/usr.sbin/pkg_install; make install
-if you have the sources installed.
-
-WWW: http://cvs.sf.net/viewcvs.py/portaudit/pkg_install/
-
--- Oliver Eikemeier
-eik@FreeBSD.org
diff --git a/ports-mgmt/pkg_install-devel/pkg-install b/ports-mgmt/pkg_install-devel/pkg-install
deleted file mode 100644
index 72ac81eaf581..000000000000
--- a/ports-mgmt/pkg_install-devel/pkg-install
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-PAX=/bin/pax
-ECHO_CMD=echo
-MKDIR="/bin/mkdir -p"
-RM=/bin/rm
-BACKUPDIR=/var/backups
-
-TOOLS="add check create delete info sign update version"
-
-PREFIX=${PKG_PREFIX:-/usr/local}
-if [ "${PREFIX}" = "/usr" ]; then
- MANPREFIX="${PREFIX}/share"
-else
- MANPREFIX="${PREFIX}"
-fi
-
-case $2 in
-PRE-INSTALL)
- if [ "${PREFIX}" = "/usr" ]; then
- if [ -e "${BACKUPDIR}/pkg_install.tgz" ]; then
- ${ECHO_CMD} "===> Please remove \`\`${BACKUPDIR}/pkg_install.tgz'' manually."
- exit 1
- fi
- if [ "${PREFIX}" = "/usr" ]; then
- files=""
- for tool in ${TOOLS}; do
- if [ -e "${PREFIX}/sbin/pkg_${tool}" ]; then
- files="${files} ${PREFIX}/sbin/pkg_${tool}"
- fi
- if [ -e "${MANPREFIX}/man/man1/pkg_${tool}.1.gz" ]; then
- files="${files} ${MANPREFIX}/man/man1/pkg_${tool}.1.gz"
- ${RM} -f "${MANPREFIX}/man/cat1/pkg_${tool}.1.gz"
- fi
- done
- ${MKDIR} ${BACKUPDIR}
- ${PAX} -w -z -f "${BACKUPDIR}/pkg_install.tgz" ${files}
- ${RM} -f ${files}
- ${ECHO_CMD} "===> Base pkg_install saved."
- fi
- fi
- ;;
-esac
diff --git a/ports-mgmt/pkg_install-devel/pkg-plist b/ports-mgmt/pkg_install-devel/pkg-plist
deleted file mode 100644
index 565e68ca0ecf..000000000000
--- a/ports-mgmt/pkg_install-devel/pkg-plist
+++ /dev/null
@@ -1,7 +0,0 @@
-sbin/pkg_add
-%%OPENSSL%%sbin/pkg_check
-sbin/pkg_create
-sbin/pkg_delete
-sbin/pkg_info
-%%OPENSSL%%sbin/pkg_sign
-sbin/pkg_version
diff --git a/ports-mgmt/pkg_install-devel/pkg-req b/ports-mgmt/pkg_install-devel/pkg-req
deleted file mode 100644
index caf4ed361cf9..000000000000
--- a/ports-mgmt/pkg_install-devel/pkg-req
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-if [ -z "$OSVERSION" ]; then
- if [ -x /sbin/sysctl ]; then
- OSVERSION=`/sbin/sysctl -n kern.osreldate`
- else
- OSVERSION=`/usr/sbin/sysctl -n kern.osreldate`
- fi
-fi
-
-case $2 in
-INSTALL)
- if [ %%OSVERSIONCHK%% ]; then
- echo "$1: Your base pkg_install tools are already up-to-date."
- exit 1
- fi
- ;;
-esac
diff --git a/ports-mgmt/pkg_install/Makefile b/ports-mgmt/pkg_install/Makefile
deleted file mode 100644
index c0397f641ea3..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= 20050720
-CATEGORIES= sysutils
-MASTER_SITES= ${MASTER_SITE_LOCAL} \
- http://people.FreeBSD.org/~marcus/
-MASTER_SITE_SUBDIR= marcus
-
-MAINTAINER= portmgr@freebsd.org
-COMMENT= FreeBSD -CURRENT version of the pkg 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
-
-post-patch:
-.if ${OSVERSION} < 440001 || ( ${OSVERSION} >= 500000 && ${OSVERSION} < 500024 )
- @${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 a84c0daee3cc..000000000000
--- a/ports-mgmt/pkg_install/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (pkg_install-20050720.tar.gz) = 4692daaa320b6d2d603765fe77f4cf30
-SIZE (pkg_install-20050720.tar.gz) = 88511
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-Makefile.inc b/ports-mgmt/pkg_install/files/patch-Makefile.inc
deleted file mode 100644
index 2f032e6e7d86..000000000000
--- a/ports-mgmt/pkg_install/files/patch-Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
---- Makefile.inc.orig Tue Dec 21 05:16:03 2004
-+++ Makefile.inc Sat Feb 26 17:02:17 2005
-@@ -7,9 +7,11 @@
- .endif
-
- .if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && \
-- defined(LDADD) && ${LDADD:M-lfetch} != ""
-+ defined(LDADD)
-+.if ${LDADD:M-lfetch} != ""
- DPADD+= ${LIBSSL} ${LIBCRYPTO}
- LDADD+= -lssl -lcrypto
-+.endif
- .endif
-
- # Inherit BINDIR from one level up.
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 daa6c5966548..000000000000
--- a/ports-mgmt/pkg_install/files/patch-lib_Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
---- lib/Makefile.orig Sun Oct 24 11:33:07 2004
-+++ lib/Makefile Sat Feb 26 17:03:27 2005
-@@ -1,11 +1,15 @@
- # $FreeBSD: /tmp/pcvs/ports/ports-mgmt/pkg_install/files/patch-lib_Makefile,v 1.4 2005-02-26 22:06:42 marcus Exp $
-
- LIB= install
--INTERNALLIB=
- 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
-
- WARNS?= 3
- WFORMAT?= 1
-+
-+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 f5b765f0faae..000000000000
--- a/ports-mgmt/pkg_install/pkg-descr
+++ /dev/null
@@ -1,9 +0,0 @@
-FreeBSD -CURRENT 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 944303a7ba87..000000000000
--- a/ports-mgmt/pkg_remove/Makefile
+++ /dev/null
@@ -1,29 +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
-
-PLIST_FILES= bin/pkg_remove
-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/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_rmleaves/Makefile b/ports-mgmt/pkg_rmleaves/Makefile
deleted file mode 100644
index a2a87b67b138..000000000000
--- a/ports-mgmt/pkg_rmleaves/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# New ports collection makefile for: pkg_rmleaves
-# Date created: 26 December 2004
-# Whom: Timothy Redaelli <drizzt@gufi.org>
-#
-# $FreeBSD$
-#
-
-PORTNAME= pkg_rmleaves
-PORTVERSION= 20041223
-CATEGORIES= sysutils
-MASTER_SITES= http://utenti.gufi.org/~drizzt/${PORTNAME}/
-
-MAINTAINER= drizzt@gufi.org
-COMMENT= Interactive script for deinstalling 'leaf' packages
-
-NO_BUILD= yes
-
-WRKSRC= ${WRKDIR}/${PORTNAME}
-
-PLIST_FILES= sbin/pkg_rmleaves
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/pkg_rmleaves ${PREFIX}/sbin/pkg_rmleaves
-
-.include <bsd.port.mk>
diff --git a/ports-mgmt/pkg_rmleaves/distinfo b/ports-mgmt/pkg_rmleaves/distinfo
deleted file mode 100644
index f8d9da8a5767..000000000000
--- a/ports-mgmt/pkg_rmleaves/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (pkg_rmleaves-20041223.tar.gz) = 9eaa0b99ccebdaf08a4a9eef07695218
-SIZE (pkg_rmleaves-20041223.tar.gz) = 1034
diff --git a/ports-mgmt/pkg_rmleaves/pkg-descr b/ports-mgmt/pkg_rmleaves/pkg-descr
deleted file mode 100644
index 18db9a6e3cec..000000000000
--- a/ports-mgmt/pkg_rmleaves/pkg-descr
+++ /dev/null
@@ -1,3 +0,0 @@
-pkg_rmleaves finds packages that are not requested by any other installed
-package and lets you decide (in a beauty dialog interface) for each one
-if you want to keep it or delete it.
diff --git a/ports-mgmt/pkg_trackinst/Makefile b/ports-mgmt/pkg_trackinst/Makefile
deleted file mode 100644
index 0da87bbe4a27..000000000000
--- a/ports-mgmt/pkg_trackinst/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-# New ports collection makefile for: pkg_trackinst
-# Date created: 3 May 2005
-# Whom: Hye-Shik Chang <perky@FreeBSD.org>
-#
-# $FreeBSD$
-
-PORTNAME= pkg_trackinst
-PORTVERSION= 1.2.2
-CATEGORIES= sysutils
-MASTER_SITES= http://people.freebsd.org/~perky/distfiles/
-
-MAINTAINER= perky@FreeBSD.org
-COMMENT= PkgDB/pkg-plist generator by tracking installation
-
-USE_PYTHON= 2.3+
-USE_REINPLACE= yes
-MAKE_ENV= PYTHON_CMD=${PYTHON_CMD}
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 501105
-IGNORE= requires dynamically-linked base programs
-.endif
-
-post-patch:
- ${REINPLACE_CMD} 's,/usr/local,${PREFIX},g' \
- ${WRKSRC}/PkgTrackInst/cmd_support.py
-
-.include <bsd.port.post.mk>
diff --git a/ports-mgmt/pkg_trackinst/distinfo b/ports-mgmt/pkg_trackinst/distinfo
deleted file mode 100644
index 5ad0ecb891dd..000000000000
--- a/ports-mgmt/pkg_trackinst/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (pkg_trackinst-1.2.2.tar.gz) = 8b798b048699144329d5af578974c05e
-SIZE (pkg_trackinst-1.2.2.tar.gz) = 14090
diff --git a/ports-mgmt/pkg_trackinst/pkg-descr b/ports-mgmt/pkg_trackinst/pkg-descr
deleted file mode 100644
index 544f7253727d..000000000000
--- a/ports-mgmt/pkg_trackinst/pkg-descr
+++ /dev/null
@@ -1,10 +0,0 @@
-This package provides two commands:
-
- * pkg_trackinst:
- Tracks installation of unpackaged software and writes pkgdb
- entry using the install log. Then, it also creates a binary
- package for the installed package.
-
- * pkg_genplist:
- Generates `pkg-plist' of a port in current directory automatically
- by a test installation.
diff --git a/ports-mgmt/pkg_trackinst/pkg-plist b/ports-mgmt/pkg_trackinst/pkg-plist
deleted file mode 100644
index de6c913c10fc..000000000000
--- a/ports-mgmt/pkg_trackinst/pkg-plist
+++ /dev/null
@@ -1,37 +0,0 @@
-bin/pkg_genplist
-bin/pkg_trackinst
-lib/insthook.so
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/InstallSession.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/InstallSession.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/InstallSession.pyo
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/PkgDbInfoForm.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/PkgDbInfoForm.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/PkgDbInfoForm.pyo
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/PkgDbWriter.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/PkgDbWriter.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/PkgDbWriter.pyo
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/PlistWriter.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/PlistWriter.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/PlistWriter.pyo
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/TerminalSlider.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/TerminalSlider.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/TerminalSlider.pyo
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/Trackers.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/Trackers.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/Trackers.pyo
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/__init__.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/__init__.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/__init__.pyo
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/cmd_support.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/cmd_support.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/cmd_support.pyo
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/compat23.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/compat23.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/compat23.pyo
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/genplist_main.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/genplist_main.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/genplist_main.pyo
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/main.py
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/main.pyc
-%%PYTHON_SITELIBDIR%%/PkgTrackInst/main.pyo
-@dirrm %%PYTHON_SITELIBDIR%%/PkgTrackInst
diff --git a/ports-mgmt/pkg_tree/Makefile b/ports-mgmt/pkg_tree/Makefile
deleted file mode 100644
index 2ea7846a3d54..000000000000
--- a/ports-mgmt/pkg_tree/Makefile
+++ /dev/null
@@ -1,28 +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
-PLIST_FILES= bin/pkg_tree
-
-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 5195ed9db9f4..000000000000
--- a/ports-mgmt/pkg_tree/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (pkg_tree-1.1.tar.gz) = b41c4a28a7ed727962bb137914f81030
-SIZE (pkg_tree-1.1.tar.gz) = 5006
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/port-authoring-tools/Makefile b/ports-mgmt/port-authoring-tools/Makefile
deleted file mode 100644
index ec3939be0205..000000000000
--- a/ports-mgmt/port-authoring-tools/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-# New ports collection makefile for: port-authoring-tools
-# Date created: 3 April 2004
-# Whom: Mark Linimon <linimon@FreeBSD.org>
-#
-# $FreeBSD$
-#
-
-PORTNAME= port-authoring-tools
-PORTVERSION= 1.0
-CATEGORIES= sysutils
-MASTER_SITES= # empty
-DISTFILES= # empty
-EXTRACT_ONLY= # empty
-
-MAINTAINER= linimon@FreeBSD.org
-COMMENT= "meta-port" for tools to test and submit changes to ports
-
-# note: portlint is brought in by porttools
-RUN_DEPENDS= \
- ${LOCALBASE}/bin/cvsup:${PORTSDIR}/net/cvsup-without-gui \
- ${LOCALBASE}/bin/fastest_cvsup:${PORTSDIR}/sysutils/fastest_cvsup \
- ${LOCALBASE}/sbin/libchk:${PORTSDIR}/sysutils/libchk \
- ${LOCALBASE}/bin/port:${PORTSDIR}/devel/porttools
-
-NO_BUILD= yes
-
-do-install: # empty
-
-.include <bsd.port.mk>
diff --git a/ports-mgmt/port-authoring-tools/pkg-descr b/ports-mgmt/port-authoring-tools/pkg-descr
deleted file mode 100644
index c2c9017f93cb..000000000000
--- a/ports-mgmt/port-authoring-tools/pkg-descr
+++ /dev/null
@@ -1,2 +0,0 @@
-Here is a meta-port for a set of tools that will help port maintainers
-to test and submit changes to the FreeBSD Ports Collection.
diff --git a/ports-mgmt/port-maintenance-tools/Makefile b/ports-mgmt/port-maintenance-tools/Makefile
deleted file mode 100644
index 4e1b575c9870..000000000000
--- a/ports-mgmt/port-maintenance-tools/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-# New ports collection makefile for: port-maintenance-tools
-# Date created: 3 April 2004
-# Whom: Mark Linimon <linimon@FreeBSD.org>
-#
-# $FreeBSD$
-#
-
-PORTNAME= port-maintenance-tools
-PORTVERSION= 1.0
-CATEGORIES= sysutils
-MASTER_SITES= # empty
-DISTFILES= # empty
-EXTRACT_ONLY= # empty
-
-MAINTAINER= linimon@FreeBSD.org
-COMMENT= "meta-port" for administrative tools to maintain ports
-
-# note: portuprade is brought in by pkg_cutleaves
-RUN_DEPENDS= \
- ${LOCALBASE}/bin/cvsup:${PORTSDIR}/net/cvsup-without-gui \
- ${LOCALBASE}/bin/fastest_cvsup:${PORTSDIR}/sysutils/fastest_cvsup \
- ${LOCALBASE}/sbin/pkg_cutleaves:${PORTSDIR}/sysutils/pkg_cutleaves \
- ${LOCALBASE}/bin/pkg_tree:${PORTSDIR}/sysutils/pkg_tree \
- ${LOCALBASE}/bin/porteasy:${PORTSDIR}/misc/porteasy \
- ${LOCALBASE}/bin/portell:${PORTSDIR}/misc/portell \
- ${LOCALBASE}/sbin/portdowngrade:${PORTSDIR}/sysutils/portdowngrade
-
-NO_BUILD= yes
-
-do-install: # empty
-
-.include <bsd.port.mk>
diff --git a/ports-mgmt/port-maintenance-tools/pkg-descr b/ports-mgmt/port-maintenance-tools/pkg-descr
deleted file mode 100644
index e2f2646f3e94..000000000000
--- a/ports-mgmt/port-maintenance-tools/pkg-descr
+++ /dev/null
@@ -1,5 +0,0 @@
-Here is a meta-port for a collection of tools that will help you
-manage your ports tree, both for installation, deinstallation,
-updating, and browsing. Many FreeBSD administrators and users
-find these tools to be helpful, especially when working with
-building ports from their sources.
diff --git a/ports-mgmt/portaudit-db/Makefile b/ports-mgmt/portaudit-db/Makefile
deleted file mode 100644
index db754b90df57..000000000000
--- a/ports-mgmt/portaudit-db/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-# New ports collection makefile for: portaudit-db
-# Date created: 12 Jun 2004
-# Whom: Oliver Eikemeier
-#
-# $FreeBSD$
-#
-
-PORTNAME= portaudit-db
-PORTVERSION= 0.2.3
-CATEGORIES= security
-DISTFILES=
-
-MAINTAINER= secteam@FreeBSD.org
-COMMENT= Creates a portaudit database from a current ports tree
-
-RUN_DEPENDS= xsltproc:${PORTSDIR}/textproc/libxslt
-
-DEPENDS_ARGS+= WITHOUT_PYTHON=yes
-
-DATABASEDIR?= ${AUDITFILE:H}
-
-PLIST_SUB+= DATABASEDIR="${DATABASEDIR}"
-
-SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
- -e "s|%%DATADIR%%|${DATADIR}|g" \
- -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
- -e "s|%%PORTSDIR%%|${PORTSDIR}|g" \
- -e "s|%%PORTVERSION%%|${PORTVERSION}|g" \
- -e "s|%%DATABASEDIR%%|${DATABASEDIR}|g"
-
-do-build:
- @for f in packaudit.sh packaudit.conf; do \
- ${SED} ${SED_SCRIPT} "${FILESDIR}/$$f" > "${WRKDIR}/$$f"; \
- done
-
-do-install:
- @${INSTALL_SCRIPT} ${WRKDIR}/packaudit.sh ${PREFIX}/bin/packaudit
- @${INSTALL_DATA} ${WRKDIR}/packaudit.conf ${PREFIX}/etc/packaudit.conf.sample
- @${MKDIR} ${DATADIR}
- @${INSTALL_SCRIPT} ${FILESDIR}/portaudit2vuxml.awk ${DATADIR}
- @${INSTALL_DATA} ${FILESDIR}/vuxml2html.xslt ${FILESDIR}/vuxml2portaudit.xslt ${DATADIR}
- @${MKDIR} ${DATABASEDIR}
-
-.include <bsd.port.mk>
diff --git a/ports-mgmt/portaudit-db/database/portaudit.txt b/ports-mgmt/portaudit-db/database/portaudit.txt
deleted file mode 100644
index ccb7b401f54c..000000000000
--- a/ports-mgmt/portaudit-db/database/portaudit.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-# portaudit text based database
-# $FreeBSD$
-apache>=2.*<2.0.49_1|http://www.osvdb.org/6472 http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2004-0488|mod_ssl stack-based buffer overflow|662cd99e-bc9d-11d8-916c-000347dd607f
-apache+mod_ssl*<1.3.31+2.8.18|http://www.osvdb.org/6472 http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2004-0488|mod_ssl stack-based buffer overflow|662cd99e-bc9d-11d8-916c-000347dd607f
-ru-apache+mod_ssl<1.3.31+30.20+2.8.18|http://www.osvdb.org/6472 http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2004-0488|mod_ssl stack-based buffer overflow|662cd99e-bc9d-11d8-916c-000347dd607f
-apache<1.3.31_1|http://www.osvdb.org/6839 http://www.apacheweek.com/features/security-13|mod_proxy buffer overflow (CAN-2004-0492)|5bcd500c-bc9d-11d8-916c-000347dd607f
-apache+mod_ssl*<1.3.31+2.8.18_4|http://www.osvdb.org/6839 http://www.apacheweek.com/features/security-13|mod_proxy buffer overflow (CAN-2004-0492)|5bcd500c-bc9d-11d8-916c-000347dd607f
-ru-apache+mod_ssl<=1.3.31+30.20+2.8.18|http://www.osvdb.org/6839 http://www.apacheweek.com/features/security-13|mod_proxy buffer overflow (CAN-2004-0492)|5bcd500c-bc9d-11d8-916c-000347dd607f
-dbmail{-mysql,-postgresql}<1.2.8a|http://mailman.fastxs.net/pipermail/dbmail/2004-June/004960.html|DBMail: remote exploitable buffer overflow|3b9b196e-bd12-11d8-b071-00e08110b673
-smtpproxy<=1.1.3|http://0xbadc0ded.org/advisories/0402.txt|smtpproxy: remotely exploitable format string vulnerability|1abf65f9-bc9d-11d8-916c-000347dd607f
-subversion{,-perl,-python}<1.0.5|http://www.osvdb.org/6935 http://subversion.tigris.org/security/CAN-2004-0413-advisory.txt|subversion: remote exploitable buffer overflow in 'svn://' parser|4616bc3b-bd0f-11d8-a252-02e0185c0b53
-imp<3.2.4|http://article.gmane.org/gmane.comp.horde.imp/14421/|imp: XSS hole exploited via the Content-type header of malicious emails|911f1b19-bd20-11d8-84f9-000bdb1444a4
-chora<1.2.2|http://article.gmane.org/gmane.comp.horde.chora/610/|chora: hole in the diff code that allowed malicious input|9e09399d-bd21-11d8-84f9-000bdb1444a4
-squirrelmail<1.4.3a|http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2004-0519 http://www.rs-labs.com/adv/RS-Labs-Advisory-2004-1.txt|SquirrelMail XSS vulnerability|89a0de27-bf66-11d8-a252-02e0185c0b53
-ja-squirrelmail<1.4.3a,1|http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2004-0519 http://www.rs-labs.com/adv/RS-Labs-Advisory-2004-1.txt|SquirrelMail XSS vulnerability|89a0de27-bf66-11d8-a252-02e0185c0b53
-webmin<1.150|http://www.webmin.com/changes-1.150.html http://www.osvdb.org/6729 http://www.osvdb.org/6730|Multiple vulnerabilities in Webmin|ab61715f-c027-11d8-b00e-000347a4fa7d
-racoon<20040617a|http://lists.netsys.com/pipermail/full-disclosure/2004-June/022617.html http://www.securityfocus.com/archive/1/366023 http://securitytracker.com/alerts/2004/Jun/1010495.html http://orange.kame.net/dev/cvsweb.cgi/kame/kame/kame/racoon/crypto_openssl.c#rev1.86 http://www.securityfocus.com/bid/10546 http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0607|Racoon may validate invalid certificates|a96c1d37-c033-11d8-b00e-000347a4fa7d
-ircd-hybrid<=7.0_1|http://lists.netsys.com/pipermail/full-disclosure/2004-June/022820.html http://www.securityfocus.com/archive/1/366486 http://www.osvdb.org/7242|ircd-hybrid-7 low-bandwidth DoS|23aafa20-c28a-11d8-864c-02e0185c0b53
-ircd-hybrid-ru<=7.1_2|http://lists.netsys.com/pipermail/full-disclosure/2004-June/022820.html http://www.securityfocus.com/archive/1/366486 http://www.osvdb.org/7242|ircd-hybrid-7 low-bandwidth DoS|23aafa20-c28a-11d8-864c-02e0185c0b53
-{,??-}aspell<=0.50.5_2|http://nettwerked.mg2.org/advisories/wlc http://marc.theaimsgroup.com/?l=bugtraq&m=108761564006503&w=2 http://www.securityfocus.com/bid/10497|Buffer overflow in word-list-compress|b7b03bab-c296-11d8-bfb2-000bdb1444a4
-linux-aspell<=0.50.4.1|http://nettwerked.mg2.org/advisories/wlc http://marc.theaimsgroup.com/?l=bugtraq&m=108761564006503&w=2 http://www.securityfocus.com/bid/10497|Buffer overflow in word-list-compress|b7b03bab-c296-11d8-bfb2-000bdb1444a4
-bnbt<7.5b3|http://www.osvdb.org/6336|BNBT Authorization Header DoS|0f9b3542-c35f-11d8-8898-000d6111a684
-scorched3d<0.37.2|http://marc.theaimsgroup.com/?l=bugtraq&m=108152473130133&w=2 http://www.osvdb.org/5086 http://www.freebsd.org/cgi/query-pr.cgi?pr=67541 http://secunia.com/advisories/11319 http://security.gentoo.org/glsa/glsa-200404-12.xml|Scorched 3D server chat box format string vulnerability|36808860-c363-11d8-8898-000d6111a684
-super<3.23.0|http://www.secunia.com/advisories/11899 http://www.debian.org/security/2004/dsa-522 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0579|super format string vulnerability|fae06c04-c38c-11d8-8898-000d6111a684
-mailman<2.1.5|http://mail.python.org/pipermail/mailman-announce/2004-May/000072.html http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0412 http://www.osvdb.org/6422|mailman allows 3rd parties to retrieve member passwords|2a405a43-c396-11d8-8898-000d6111a684
-roundup<0.7.3|http://www.osvdb.org/6691 http://secunia.com/advisories/11801 http://xforce.iss.net/xforce/xfdb/16350 http://securityfocus.com/bid/10495 http://mail.python.org/pipermail/python-announce-list/2004-May/003126.html|Roundup remote file disclosure vulnerability|40800696-c3b0-11d8-864c-02e0185c0b53
-sqwebmail<4.0.5|http://www.securityfocus.com/archive/1/366595|Sqwebmail XSS vulnerability|c3e56efa-c42f-11d8-864c-02e0185c0b53
-isc-dhcp3<3.0.1.r11|http://www.cert.org/advisories/CA-2003-01.html http://www.kb.cert.org/vuls/id/284857 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0026|ISC DHCPD minires library contains multiple buffer overflows|f71745cd-c509-11d8-8898-000d6111a684
-isc-dhcp3<3.0.1.r11_1|http://www.kb.cert.org/vuls/id/149953 http://www.securityfocus.com/bid/6628 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0039|ISC "dhcrelay" fails to limit hop count when malicious bootp packet is received|02957734-c50b-11d8-8898-000d6111a684
-icecast2<2.0.1,1|http://secunia.com/advisories/11578 http://www.osvdb.org/6075|Icecast remote DoS vulnerability|8de7cf18-c5ca-11d8-8898-000d6111a684
-rssh<2.2.1|http://secunia.com/advisories/11926 http://www.securityfocus.com/archive/1/366691 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0609 http://www.securityfocus.com/bid/10574 http://www.osvdb.org/7239|rssh file existence information disclosure weakness|a4815970-c5cc-11d8-8898-000d6111a684
-sup<=2.0|http://secunia.com/advisories/11898 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0451|CMU SUP logging format string vulnerabilities|238ea8eb-c5cf-11d8-8898-000d6111a684
-rlpr<2.04_1|http://secunia.com/advisories/11906 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0393 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0454 http://www.osvdb.org/7194 http://www.osvdb.org/7195 http://securitytracker.com/id?1010545 http://www.securityfocus.com/archive/1/367045|rlpr "msg()" buffer overflow and format string vulnerabilities|29a72da5-c5ea-11d8-8898-000d6111a684
-pure-ftpd<1.0.19|http://www.pureftpd.org/ http://www.osvdb.org/7415|Pure-FTPd DoS when maximum number of connections is reached|ec5cf461-c691-11d8-8898-000d6111a684
-libxine<1.0.r4|http://www.xinehq.de/index.php/security/XSA-2004-3 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0433 http://secunia.com/advisories/11500|xine-lib RTSP handling vulnerabilities|83cbd52c-c8e8-11d8-8898-000d6111a684
-apache>=2.*<2.0.49_3|http://www.guninski.com/httpd1.html http://www.apacheweek.com/features/security-20 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0493 http://secunia.com/advisories/11956 http://www.osvdb.org/7269|Apache input header folding DoS vulnerability|81a8c9c2-c94f-11d8-8898-000d6111a684
-isakmpd<20040611|http://lists.netsys.com/pipermail/full-disclosure/2004-June/022399.html http://www.osvdb.org/6951 http://www.secunia.com/advisories/11827 http://www.securityfocus.com/bid/10496|isakmpd security association deletion vulnerability|9a73a5b4-c9b5-11d8-95ca-02e081301d81
-krb5<1.3.4|http://web.mit.edu/kerberos/advisories/MITKRB5-SA-2004-001-an_to_ln.txt http://cve.mitre.org/cgi-bin/cvename.cgi?name=2004-0523 http://www.osvdb.org/6846 http://secunia.com/advisories/11753 http://www.kb.cert.org/vuls/id/686862 http://www.securityfocus.com/bid/10448|MIT Kerberos 5 krb5_aname_to_localname() buffer overflow|5177b6e5-c9b7-11d8-95ca-02e081301d81
-png<1.2.5_6|http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-1363 http://rhn.redhat.com/errata/RHSA-2003-006.html http://www.osvdb.org/7191 http://www.securityfocus.com/bid/6431|libpng row buffer overflow|1b78d43f-d32b-11d8-b479-02e0185c0b53
-linux-png<1.0.14_3|http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-1363 http://rhn.redhat.com/errata/RHSA-2003-006.html http://www.osvdb.org/7191 http://www.securityfocus.com/bid/6431|libpng row buffer overflow|1b78d43f-d32b-11d8-b479-02e0185c0b53
-{ja-,}bugzilla<2.16.6|http://www.bugzilla.org/security/2.16.5/ http://secunia.com/advisories/12057 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0704 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0705 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0707 http://www.securityfocus.com/bid/10698|multiple vulnerabilities in Bugzilla|672975cb-d526-11d8-b479-02e0185c0b53
-wv<=1.0.0_1|http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0645 http://www.idefense.com/application/poi/display?id=115&type=vulnerabilities&flashstatus=false http://secunia.com/advisories/12040 http://www.osvdb.org/7761|wv library datetime field buffer overflow|7a5430df-d562-11d8-b479-02e0185c0b53
-ru-apache+mod_ssl<1.3.31+30.20+2.8.19|http://www.mail-archive.com/modssl-users@modssl.org/msg16853.html http://www.mail-archive.com/modssl-users@modssl.org/msg16855.html http://secunia.com/advisories/12077 http://www.osvdb.org/7929|mod_ssl format string vulnerability|a3b7cb56-d8a7-11d8-9b0a-000347a4fa7d
-apache+mod_ssl*<1.3.31+2.8.19|http://www.mail-archive.com/modssl-users@modssl.org/msg16853.html http://www.mail-archive.com/modssl-users@modssl.org/msg16855.html http://secunia.com/advisories/12077 http://www.osvdb.org/7929|mod_ssl format string vulnerability|a3b7cb56-d8a7-11d8-9b0a-000347a4fa7d
-subversion<1.0.6|http://subversion.tigris.org/security/mod_authz_svn-copy-advisory.txt http://secunia.com/advisories/12079 http://www.osvdb.org/8239|mod_authz_svn access control bypass|cc35a97d-da35-11d8-9b0a-000347a4fa7d
-subversion-{perl,python}<1.0.6|http://subversion.tigris.org/security/mod_authz_svn-copy-advisory.txt http://secunia.com/advisories/12079 http://www.osvdb.org/8239|mod_authz_svn access control bypass|cc35a97d-da35-11d8-9b0a-000347a4fa7d
-phpbb<2.0.10|http://secunia.com/advisories/12114 http://www.phpbb.com/support/documents.php?mode=changelog#209 http://www.osvdb.org/8164 http://www.osvdb.org/8165 http://www.osvdb.org/8166|phpBB cross site scripting vulnerabilities|c59dbaf0-dbe1-11d8-9b0a-000347a4fa7d
-l2tpd<=0.69_2|http://www.securityfocus.com/archive/1/365211 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0649 http://www.osvdb.org/6726 http://secunia.com/advisories/11788|l2tpd BSS-based buffer overflow|807b9ddd-dc11-11d8-9b0a-000347a4fa7d
-dropbear<0.43|http://matt.ucc.asn.au/dropbear/dropbear.html http://secunia.com/advisories/12153|Dropbear DSS verification vulnerability|0316f983-dfb6-11d8-9b0a-000347a4fa7d
-nessus<2.0.12|http://www.osvdb.org/8167 http://secunia.com/advisories/12127 http://www.securityfocus.com/bid/10784|Nessus "adduser" race condition vulnerability|054e4aad-dfb6-11d8-9b0a-000347a4fa7d
-nessus-devel>=2.*<2.1.1|http://www.osvdb.org/8167 http://secunia.com/advisories/12127 http://www.securityfocus.com/bid/10784|Nessus "adduser" race condition vulnerability|054e4aad-dfb6-11d8-9b0a-000347a4fa7d
-pavuk<=0.9.28_5|http://www.securityfocus.com/archive/1/370248 http://archives.neohapsis.com/archives/fulldisclosure/2004-07/1119.html http://secunia.com/advisories/12152 http://www.osvdb.org/8242 http://www.securityfocus.com/bid/10797 http://www.gentoo.org/cgi-bin/viewcvs.cgi/net-misc/pavuk/files/pavuk-0.9.28-digest_auth.c.patch|pavuk digest auth buffer overflow|f67ea071-dfb8-11d8-9b0a-000347a4fa7d
-lcdproc<0.4.5|http://sourceforge.net/project/shownotes.php?release_id=230910 http://secunia.com/advisories/11333 http://www.securityfocus.com/archive/1/360209 http://www.securityfocus.com/bid/10085 http://www.osvdb.org/5157 http://www.osvdb.org/5158 http://www.osvdb.org/5159 http://www.osvdb.org/5160|LCDProc buffer overflow/format string vulnerabilities|62d23317-e072-11d8-9a79-000347dd607f
-dansguardian<2.8.0.1|http://secunia.com/advisories/12191 http://www.securityfocus.com/archive/1/370346 http://www.osvdb.org/8270|DansGuardian banned extension filter bypass vulnerability|f6fd9200-e20e-11d8-9b0a-000347a4fa7d
-imp<3.2.5|http://www.greymagic.com/security/advisories/gm005-mc/ http://cvs.horde.org/diff.php/imp/docs/CHANGES?r1=1.389.2.106&r2=1.389.2.109&ty=h http://secunia.com/advisories/12202|XSS hole in the HTML viewer - This vulnerability only exists when using the Internet Explorer to access IMP and only when using the inline MIME viewer for HTML messages.|49189b47-e24d-11d8-9f75-000bdb1444a4
-phpMyAdmin<2.5.7.1|http://www.securityfocus.com/archive/1/367486 http://www.securityfocus.com/bid/10629 http://secunia.com/SA11974 http://www.osvdb.org/7314 http://www.osvdb.org/7315|phpMyAdmin configuration manipulation and code injection|56648b44-e301-11d8-9b0a-000347a4fa7d
-gnutls<1.0.17|http://www.hornik.sk/SA/SA-20040802.txt http://secunia.com/advisories/12156|GnuTLS certificate chain verification DoS|84ab58cf-e4ac-11d8-9b0a-000347a4fa7d
-gnutls-devel>=1.1.*<1.1.12|http://www.hornik.sk/SA/SA-20040802.txt http://secunia.com/advisories/12156|GnuTLS certificate chain verification DoS|84ab58cf-e4ac-11d8-9b0a-000347a4fa7d
-{linux-,}opera<7.54|http://www.opera.com/freebsd/changelogs/754/ http://www.greymagic.com/security/advisories/gm008-op/ http://secunia.com/advisories/12233 http://www.osvdb.org/8331|Opera "location" object write access vulnerability|0deed2ce-e6f5-11d8-9a79-000347dd607f
-putty<0.55|http://www.chiark.greenend.org.uk/~sgtatham/putty/changes.html http://www.coresecurity.com/common/showdoc.php?idx=417&idxseccion=10 http://www.osvdb.org/8299 http://secunia.com/advisories/12212|modified server can execute commands on the client|4424f4db-e697-11d8-bf04-000c763e9a47
-cfengine2<2.1.8|http://www.coresecurity.com/common/showdoc.php?idx=387&idxseccion=10 http://secunia.com/advisories/12251|cfengine authentication heap corruption|f2a1dc8b-ea66-11d8-9440-000347a4fa7d
-sympa<4.1.2|http://secunia.com/advisories/12286 http://www.sympa.org/release.html http://xforce.iss.net/xforce/xfdb/16984 http://www.securityfocus.com/bid/10941|Sympa unauthorized list creation|4a160c54-ed46-11d8-81b0-000347a4fa7d
-phpgedview<2.65.5|http://sourceforge.net/forum/forum.php?forum_id=344342 http://secunia.com/advisories/10602 http://www.osvdb.org/3473 http://www.osvdb.org/3474 http://www.osvdb.org/3475 http://www.osvdb.org/3476 http://www.osvdb.org/3477 http://www.osvdb.org/3478 http://www.osvdb.org/3479 http://www.osvdb.org/3480 http://www.osvdb.org/3481 http://www.osvdb.org/3482 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0067 http://www.securityfocus.com/archive/1/349698|phpGedView: muliple vulnerabilities|c35d4cae-eed0-11d8-81b0-000347a4fa7d
-{ja-,}phpgroupware<0.9.14.007|http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0016 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0017 http://www.securityfocus.com/bid/9386 http://www.securityfocus.com/bid/9387 http://xforce.iss.net/xforce/xfdb/13489 http://xforce.iss.net/xforce/xfdb/14846 http://www.osvdb.org/2691 http://www.osvdb.org/6857 http://secunia.com/advisories/10046|phpGroupWare calendar and infolog SQL injection, calendar server side script execution|96fc0f03-ef13-11d8-81b0-000347a4fa7d
-{ja-,}phpgroupware<0.9.16.002|http://freshmeat.net/releases/168144 http://www.osvdb.org/8354 http://xforce.iss.net/xforce/xfdb/16970|phpGroupWare stores passwords in plain text|82f16a40-ef12-11d8-81b0-000347a4fa7d
-gallery<1.4.4.1|http://archives.neohapsis.com/archives/fulldisclosure/2004-08/0757.html http://xforce.iss.net/xforce/xfdb/17021 http://www.osvdb.org/9019 http://secunia.com/advisories/12316 http://www.securityfocus.com/bid/10968|Gallery arbitrary PHP file upload|031663de-f0a6-11d8-81b0-000347a4fa7d
-apache>=2.*<2.0.50_2|http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0751 http://issues.apache.org/bugzilla/show_bug.cgi?id=30134 http://issues.apache.org/bugzilla/show_bug.cgi?id=27945 http://issues.apache.org/bugzilla/show_bug.cgi?id=29690|potential security flaws in mod_ssl|0e08f539-f151-11d8-81b0-000347a4fa7d
-a2ps-{a4,letter,letterdj}<4.13b_2|http://www.freebsd.org/cgi/query-pr.cgi?pr=70618 http://secunia.com/advisories/12375 http://www.osvdb.org/9176 http://www.securityfocus.com/bid/11025|a2ps: Possible execution of shell commands as local user|8091fcea-f35e-11d8-81b0-000347a4fa7d
-{ja-,}xv<=3.10a_3|http://secunia.com/advisories/12352 http://www.securityfocus.com/archive/1/372345 http://www.osvdb.org/9115 http://www.osvdb.org/9118 http://www.osvdb.org/9119 http://www.osvdb.org/9120 http://www.securityfocus.com/bid/10985|multiple buffer overflows in xv|34c453ba-f686-11d8-81b0-000347a4fa7d
-nss<3.9|http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0564 http://secunia.com/advisories/11096 http://www.osvdb.org/4197|Mozilla / NSS S/MIME DoS vulnerability|65532ad9-f69b-11d8-81b0-000347a4fa7d
-{ja-,ru-,}gaim<0.82|http://www.osvdb.org/9261 http://www.osvdb.org/9262 http://www.osvdb.org/9263 http://www.osvdb.org/9264 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0754 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0784 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0785 http://www.securityfocus.com/bid/11056 http://gaim.sourceforge.net/security/index.php|multiple vulnerabilities in gaim|8b29b312-fa6e-11d8-81b0-000347a4fa7d
-{ja-,}samba<2.2.11.*|http://www.samba.org/samba/history/samba-2.2.11.html http://secunia.com/advisories/12397 http://www.osvdb.org/9362|samba printer change notification request DoS|d8ce23a5-fadc-11d8-81b0-000347a4fa7d
-squid>=2.5.*<2.5.6_7|http://secunia.com/advisories/12444 http://www.squid-cache.org/bugs/show_bug.cgi?id=1045 http://www.securityfocus.com/bid/11098|Squid NTLM authentication helper DoS|7c351421-fdbd-11d8-81b0-000347a4fa7d
-FreeBSD>=502120<503000|http://secunia.com/advisories/11129 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0797 http://www.osvdb.org/9360 http://www.osvdb.org/9361 http://www.securityfocus.com/bid/11051|zlib DoS vulnerability|1b98165f-fdd9-11d8-81b0-000347a4fa7d
-FreeBSD>=600000<600001|http://secunia.com/advisories/11129 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0797 http://www.osvdb.org/9360 http://www.osvdb.org/9361 http://www.securityfocus.com/bid/11051|zlib DoS vulnerability|1b98165f-fdd9-11d8-81b0-000347a4fa7d
-{ja-,}phpgroupware<0.9.16.003|http://secunia.com/advisories/12466 http://phpgroupware.org/ http://www.osvdb.org/9729 http://freshmeat.net/releases/171909|XSS vulnerability in phpGroupWare wiki module|64726098-00aa-11d9-81b0-000347a4fa7d
-star>=1.5.*<1.5.a.46|http://lists.berlios.de/pipermail/star-users/2004-August/000239.html http://secunia.com/advisories/12484|Vulnerability in star versions that support ssh for remote tape access|6a5b2998-01c0-11d9-81b0-000347a4fa7d
-multi-gnome-terminal<=1.6.2_1|http://www.gentoo.org/security/en/glsa/glsa-200409-10.xml http://cvs.sourceforge.net/viewcvs.py/multignometerm/multignometerm/gnome-terminal/enhanced_gui.c?r1=text&tr1=1.252&r2=text&tr2=1.253&diff_format=u http://www.osvdb.org/9752|Possible information leak in multi-gnome-terminal|cad7a2f4-01c2-11d9-81b0-000347a4fa7d
-usermin<1.090|http://secunia.com/advisories/12488 http://www.webmin.com/uchanges.html http://www.lac.co.jp/security/csl/intelligence/SNSadvisory_e/77_e.html http://www.osvdb.org/9775 http://www.osvdb.org/9776|Usermin remote shell command injection and insecure installation vulnerability|9ef2a3cf-01c3-11d9-81b0-000347a4fa7d
-mpg123<=0.59r_13|http://secunia.com/advisories/12478 http://www.osvdb.org/9748 http://www.alighieri.org/advisories/advisory-mpg123.txt http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0805|mpg123 layer 2 decoder buffer overflow|780671ac-01e0-11d9-81b0-000347a4fa7d
-imp<3.2.6|http://thread.gmane.org/gmane.comp.horde.imp/15488 http://cvs.horde.org/diff.php/imp/docs/CHANGES?r1=1.389.2.109&r2=1.389.2.111&ty=h|XSS hole in the HTML viewer - The script vulnerabilities can only be exposed with certain browsers and allow XSS attacks when viewing HTML messages with the HTML MIME viewer.|efc4819b-0b2d-11d9-bfe1-000bdb1444a4
-koffice<1.3.2_1,1|http://kde.org/info/security/advisory-20041021-1.txt|Multiple integer overflow and integer arithmetic flaws in imported xpdf code|ecf6713f-2549-11d9-945e-00e018f69096
-kdegraphics>=3.2.0<3.3.0_1|http://kde.org/info/security/advisory-20041021-1.txt|Multiple integer overflow and integer arithmetic flaws in imported xpdf code|6a04bf0e-254b-11d9-945e-00e018f69096
-horde{-php5}=3.0|http://thread.gmane.org/gmane.comp.horde.user/10059|Horde: two XSS vulnerabilities can be exposed by making an authenticated user click on a specially crafted URL and allows to execute JavaScript code in the context of Horde.|338d1723-5f03-11d9-92a7-000bdb1444a4
diff --git a/ports-mgmt/portaudit-db/database/portaudit.xlist b/ports-mgmt/portaudit-db/database/portaudit.xlist
deleted file mode 100644
index 034472c025f7..000000000000
--- a/ports-mgmt/portaudit-db/database/portaudit.xlist
+++ /dev/null
@@ -1,26 +0,0 @@
-# portaudit exclude list
-# $FreeBSD$
-3362f2c1-8344-11d8-a41f-0020ed76ef5a
-5e7f58c3-b3f8-4258-aeb8-795e5e940ff8
-4aec9d58-ce7b-11d8-858d-000d610a3b12
-78348ea2-ec91-11d8-b913-000c41e2cdad
-641859e8-eca1-11d8-b913-000c41e2cdad
-603fe36d-ec9d-11d8-b913-000c41e2cdad
-2de14f7a-dad9-11d8-b59a-00061bc2ad93
-7a9d5dfe-c507-11d8-8898-000d6111a684
-3a408f6f-9c52-11d8-9366-0020ed76ef5a
-e5e2883d-ceb9-11d8-8898-000d6111a684
-74d06b67-d2cf-11d8-b479-02e0185c0b53
-265c8b00-d2d0-11d8-b479-02e0185c0b53
-4764cfd6-d630-11d8-b479-02e0185c0b53
-730db824-e216-11d8-9b0a-000347a4fa7d
-f9e3e60b-e650-11d8-9b0a-000347a4fa7d
-abe47a5a-e23c-11d8-9b0a-000347a4fa7d
-a713c0f9-ec54-11d8-9440-000347a4fa7d
-5b8f9a02-ec93-11d8-b913-000c41e2cdad
-65a17a3f-ed6e-11d8-aff1-00061bc2ad93
-e811aaf1-f015-11d8-876f-00902714cc7c
-ebffe27a-f48c-11d8-9837-000c41e2cdad
-0d3a5148-f512-11d8-9837-000c41e2cdad
-b6cad7f3-fb59-11d8-9837-000c41e2cdad
-d2102505-f03d-11d8-81b0-000347a4fa7d
diff --git a/ports-mgmt/portaudit-db/database/portaudit.xml b/ports-mgmt/portaudit-db/database/portaudit.xml
deleted file mode 100644
index 61aac6d73564..000000000000
--- a/ports-mgmt/portaudit-db/database/portaudit.xml
+++ /dev/null
@@ -1,1107 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright (c) 2004 Oliver Eikemeier
-
-Redistribution and use in source (XML) and 'compiled' forms (SGML,
-HTML, PDF, PostScript, RTF and so forth) with or without modification,
-are permitted provided that the following conditions are met:
-
-- Redistributions of source code (XML) must retain the above copyright
- notice, this list of conditions and the following disclaimer as
- the first lines of this file unmodified.
-
-- Redistributions in compiled form (transformed to other DTDs,
- converted to PDF, PostScript, RTF and other formats) 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 DOCUMENTATION 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 DOCUMENTATION,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- $FreeBSD$
-
--->
-<!DOCTYPE vuxml PUBLIC "-//vuxml.org//DTD VuXML 1.1//EN" "http://www.vuxml.org/dtd/vuxml-1/vuxml-11.dtd">
-<vuxml xmlns="http://www.vuxml.org/apps/vuxml-1">
-
- <vuln vid="42e330ab-82a4-11d8-868e-000347dd607f">
- <topic>MPlayer remotely exploitable buffer overflow in the ASX parser</topic>
- <affects>
- <package>
- <name>mplayer{,-gtk}{,-esound}</name>
- <range><lt>0.92</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>A remotely exploitable buffer overflow vulnerability was found in
- MPlayer. A malicious host can craft a harmful ASX header,
- and trick MPlayer into executing arbitrary code upon parsing that header.</p>
- </body>
- </description>
- <references>
- <url>http://www.mplayerhq.hu/</url>
- <url>http://www.securityfocus.com/archive/1/339330</url>
- <url>http://www.securityfocus.com/archive/1/339193</url>
- <cvename>CAN-2003-0835</cvename>
- <bid>8702</bid>
- </references>
- <dates>
- <discovery>2003-09-24</discovery>
- <entry>2004-03-30</entry>
- </dates>
- </vuln>
-
- <vuln vid="d8c46d74-8288-11d8-868e-000347dd607f">
- <topic>MPlayer remotely exploitable buffer overflow in the HTTP parser</topic>
- <affects>
- <package>
- <name>mplayer{,-gtk}{,-esound}</name>
- <range><lt>0.92.1</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>A remotely exploitable buffer overflow vulnerability was found in
- MPlayer. A malicious host can craft a harmful HTTP header (&quot;Location:&quot;),
- and trick MPlayer into executing arbitrary code upon parsing that header.</p>
- </body>
- </description>
- <references>
- <url>http://www.mplayerhq.hu/</url>
- <url>http://www.securityfocus.com/archive/1/359029</url>
- <url>http://www.securityfocus.com/archive/1/359025</url>
- <cvename>CAN-2004-0386</cvename>
- </references>
- <dates>
- <discovery>2004-03-29</discovery>
- <entry>2004-03-30</entry>
- </dates>
- </vuln>
-
- <vuln vid="1ed556e6-734f-11d8-868e-000347dd607f">
- <cancelled superseded="1a448eb7-6988-11d8-873f-0020ed76ef5a"/>
- </vuln>
-
- <vuln vid="4aec9d58-ce7b-11d8-858d-000d610a3b12">
- <cancelled superseded="c63936c1-caed-11d8-8898-000d6111a684"/>
- </vuln>
-
- <vuln vid="c63936c1-caed-11d8-8898-000d6111a684">
- <topic>SSLtelnet remote format string vulnerability</topic>
- <affects>
- <package>
- <name>SSLtelnet</name>
- <range><le>0.13_1</le></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>SSLtelnet contains a format string vulnerability
- that could allow remote code execution.</p>
- </body>
- </description>
- <references>
- <mlist msgid="FB24803D1DF2A34FA59FC157B77C970502D684B7@idserv04.idef.com">http://lists.freebsd.org/pipermail/freebsd-ports/2004-June/013878.html</mlist>
- <url>http://www.idefense.com/application/poi/display?id=114&amp;type=vulnerabilities&amp;flashstatus=false</url>
- <cvename>CAN-2004-0640</cvename>
- <url>http://www.osvdb.org/7594</url>
- <url>http://secunia.com/advisories/12032</url>
- </references>
- <dates>
- <discovery>2003-04-03</discovery>
- <entry>2004-06-30</entry>
- </dates>
- </vuln>
-
- <vuln vid="7eded4b8-e6fe-11d8-b12f-0a001f31891a">
- <cancelled superseded="2de14f7a-dad9-11d8-b59a-00061bc2ad93"/>
- </vuln>
-
- <vuln vid="f72ccf7c-e607-11d8-9b0a-000347a4fa7d">
- <cancelled superseded="6f955451-ba54-11d8-b88c-000d610a3b12"/>
- </vuln>
-
- <vuln vid="9fb5bb32-d6fa-11d8-b479-02e0185c0b53">
- <cancelled superseded="40800696-c3b0-11d8-864c-02e0185c0b53"/>
- </vuln>
-
- <vuln vid="78348ea2-ec91-11d8-b913-000c41e2cdad">
- <cancelled superseded="ab166a60-e60a-11d8-9b0a-000347a4fa7d"/>
- </vuln>
-
- <vuln vid="ab166a60-e60a-11d8-9b0a-000347a4fa7d">
- <topic>Acrobat Reader handling of malformed uuencoded pdf files</topic>
- <affects>
- <package>
- <name>acroread</name>
- <range><lt>5.09</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Remote exploitation of an input validation error in the uudecoding
- feature of Adobe Acrobat Reader (Unix) 5.0 allows an attacker to execute
- arbitrary code.</p>
- </body>
- </description>
- <references>
- <url>http://www.osvdb.org/7429</url>
- <url>http://freshmeat.net/releases/164883</url>
- <cvename>CAN-2004-0630</cvename>
- <cvename>CAN-2004-0631</cvename>
- <url>http://secunia.com/advisories/12285</url>
- <url>http://xforce.iss.net/xforce/xfdb/16972</url>
- <url>http://xforce.iss.net/xforce/xfdb/16973</url>
- <url>http://www.idefense.com/application/poi/display?id=124&amp;type=vulnerabilities&amp;flashstatus=false</url>
- <url>http://www.idefense.com/application/poi/display?id=125&amp;type=vulnerabilities&amp;flashstatus=false</url>
- <url>http://www.osvdb.org/8654</url>
- <url>http://www.osvdb.org/8655</url>
- <bid>10931</bid>
- <bid>10932</bid>
- </references>
- <dates>
- <discovery>2004-03-30</discovery>
- <entry>2004-08-04</entry>
- </dates>
- </vuln>
-
- <vuln vid="603fe36d-ec9d-11d8-b913-000c41e2cdad">
- <cancelled superseded="a4bd1cd3-eb25-11d8-978e-00e018f69096"/>
- </vuln>
-
- <vuln vid="cd95b452-eca6-11d8-afa6-ed04757064bb">
- <cancelled superseded="a4bd1cd3-eb25-11d8-978e-00e018f69096"/>
- </vuln>
-
- <vuln vid="a4bd1cd3-eb25-11d8-978e-00e018f69096">
- <topic>KDElibs temporary directory vulnerability</topic>
- <affects>
- <package>
- <name>kdelibs</name>
- <range><lt>3.2.3_5</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>In some cases the
- integrity of symlinks used by KDE are not ensured and that
- these symlinks can be pointing to stale locations. This can
- be abused by a local attacker to create or truncate arbitrary
- files or to prevent KDE applications from functioning
- correctly (Denial of Service).</p>
- </body>
- </description>
- <references>
- <url>http://www.kde.org/info/security/advisory-20040811-1.txt</url>
- <cvename>CAN-2004-0689</cvename>
- <url>http://www.osvdb.org/8589</url>
- <url>http://secunia.com/advisories/12276</url>
- </references>
- <dates>
- <discovery>2004-06-23</discovery>
- <entry>2004-08-12</entry>
- <modified>2004-08-13</modified>
- </dates>
- </vuln>
-
- <vuln vid="608ceab8-eca3-11d8-afa6-ed04757064bb">
- <topic>DCOPServer Temporary Filename Vulnerability</topic>
- <affects>
- <package>
- <name>kdelibs</name>
- <range><lt>3.2.3_4</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>KDE's DCOPServer creates
- temporary files in an insecure manner. Since the temporary
- files are used for authentication related purposes this can
- potentially allow a local attacker to compromise the account of
- any user which runs a KDE application.</p>
- </body>
- </description>
- <references>
- <url>http://www.kde.org/info/security/advisory-20040811-2.txt</url>
- <cvename>CAN-2004-0690</cvename>
- <url>http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261386</url>
- <url>http://www.osvdb.org/8590</url>
- <url>http://secunia.com/advisories/12276</url>
- </references>
- <dates>
- <discovery>2004-07-25</discovery>
- <entry>2004-08-12</entry>
- <modified>2004-08-13</modified>
- </dates>
- </vuln>
-
- <vuln vid="641859e8-eca1-11d8-b913-000c41e2cdad">
- <cancelled superseded="2e395baa-eb26-11d8-978e-00e018f69096"/>
- </vuln>
-
- <vuln vid="2e395baa-eb26-11d8-978e-00e018f69096">
- <topic>Konqueror frame injection vulnerability</topic>
- <affects>
- <package>
- <name>kdebase</name>
- <range><lt>3.2.3_1</lt></range>
- </package>
- <package>
- <name>kdelibs</name>
- <range><lt>3.2.3_3</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>The Konqueror webbrowser allows websites to load webpages into
- a frame of any other frame-based webpage that the user may have open.</p>
- </body>
- </description>
- <references>
- <url>http://www.kde.org/info/security/advisory-20040811-3.txt</url>
- <cvename>CAN-2004-0721</cvename>
- <url>http://secunia.com/advisories/11978</url>
- <url>http://www.heise.de/newsticker/meldung/48793</url>
- <url>http://bugs.kde.org/show_bug.cgi?id=84352</url>
- </references>
- <dates>
- <discovery>2004-07-01</discovery>
- <entry>2004-08-11</entry>
- <modified>2004-08-13</modified>
- </dates>
- </vuln>
-
- <vuln vid="2de14f7a-dad9-11d8-b59a-00061bc2ad93">
- <topic>Multiple Potential Buffer Overruns in Samba</topic>
- <affects>
- <package>
- <name>samba</name>
- <range><ge>3.*</ge><lt>3.0.5,1</lt></range>
- <range><lt>2.2.10</lt></range>
- </package>
- <package>
- <name>ja-samba</name>
- <range><lt>2.2.10.*</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Evgeny Demidov discovered that the Samba server has a
- buffer overflow in the Samba Web Administration Tool (SWAT)
- on decoding Base64 data during HTTP Basic Authentication.
- Versions 3.0.2 through 3.0.4 are affected.</p>
- <p>Another buffer overflow bug has been found in the code
- used to support the "mangling method = hash" smb.conf
- option. The default setting for this parameter is "mangling
- method = hash2" and therefore not vulnerable. Versions
- between 2.2.0 through 2.2.9 and 3.0.0 through 3.0.4 are affected.
- </p>
- </body>
- </description>
- <references>
- <cvename>CAN-2004-0600</cvename>
- <cvename>CAN-2004-0686</cvename>
- <mlist msgid="web-53121174@cgp.agava.net">http://www.securityfocus.com/archive/1/369698</mlist>
- <mlist msgid="200407222031.25086.bugtraq@beyondsecurity.com">http://www.securityfocus.com/archive/1/369706</mlist>
- <url>http://www.samba.org/samba/whatsnew/samba-3.0.5.html</url>
- <url>http://www.samba.org/samba/whatsnew/samba-2.2.10.html</url>
- <url>http://www.osvdb.org/8190</url>
- <url>http://www.osvdb.org/8191</url>
- <url>http://secunia.com/advisories/12130</url>
- </references>
- <dates>
- <discovery>2004-07-14</discovery>
- <entry>2004-07-21</entry>
- <modified>2004-07-22</modified>
- </dates>
- </vuln>
-
- <vuln vid="7a9d5dfe-c507-11d8-8898-000d6111a684">
- <topic>isc-dhcp3-server buffer overflow in logging mechanism</topic>
- <affects>
- <package>
- <name>isc-dhcp3-{relay,server}</name>
- <range><ge>3.0.1.r12</ge><lt>3.0.1.r14</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>A buffer overflow exists in the logging functionality
- of the DHCP daemon which could lead to Denial of Service
- attacks and has the potential to allow attackers to
- execute arbitrary code.</p>
- </body>
- </description>
- <references>
- <cvename>CAN-2004-0460</cvename>
- <url>http://www.osvdb.org/7237</url>
- <uscertta>TA04-174A</uscertta>
- <certvu>317350</certvu>
- <mlist msgid="BAY13-F94UHMuEEkHMz0005c4f7@hotmail.com">http://www.securityfocus.com/archive/1/366801</mlist>
- <mlist msgid="40DFAB69.1060909@sympatico.ca">http://www.securityfocus.com/archive/1/367286</mlist>
- </references>
- <dates>
- <discovery>2004-06-22</discovery>
- <entry>2004-06-25</entry>
- <modified>2004-06-28</modified>
- </dates>
- </vuln>
-
- <vuln vid="3a408f6f-9c52-11d8-9366-0020ed76ef5a">
- <topic>libpng denial-of-service</topic>
- <affects>
- <package>
- <name>linux-png</name>
- <range><le>1.0.14_3</le></range>
- <range><ge>1.2.*</ge><le>1.2.2</le></range>
- </package>
- <package>
- <name>png</name>
- <range><lt>1.2.5_4</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Steve Grubb reports a buffer read overrun in
- libpng's png_format_buffer function. A specially
- constructed PNG image processed by an application using
- libpng may trigger the buffer read overrun and possibly
- result in an application crash.</p>
- </body>
- </description>
- <references>
- <cvename>CAN-2004-0421</cvename>
- <url>http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=120508</url>
- <url>http://rhn.redhat.com/errata/RHSA-2004-181.html</url>
- <url>http://secunia.com/advisories/11505</url>
- <url>http://www.osvdb.org/5726</url>
- <bid>10244</bid>
- <url>http://www.mozilla.org/projects/security/known-vulnerabilities.html#mozilla1.7</url>
- </references>
- <dates>
- <discovery>2004-04-29</discovery>
- <entry>2004-05-02</entry>
- <modified>2004-08-10</modified>
- </dates>
- </vuln>
-
- <vuln vid="e5e2883d-ceb9-11d8-8898-000d6111a684">
- <topic>MySQL authentication bypass / buffer overflow</topic>
- <affects>
- <package>
- <name>mysql-server</name>
- <range><ge>4.1.*</ge><lt>4.1.3</lt></range>
- <range><ge>5.*</ge><le>5.0.0_2</le></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>By submitting a carefully crafted authentication packet, it is possible
- for an attacker to bypass password authentication in MySQL 4.1. Using a
- similar method, a stack buffer used in the authentication mechanism can
- be overflowed.</p>
- </body>
- </description>
- <references>
- <url>http://www.nextgenss.com/advisories/mysql-authbypass.txt</url>
- <url>http://dev.mysql.com/doc/mysql/en/News-4.1.3.html</url>
- <url>http://secunia.com/advisories/12020</url>
- <url>http://www.osvdb.org/7475</url>
- <url>http://www.osvdb.org/7476</url>
- <mlist msgid="Pine.LNX.4.44.0407080940550.9602-200000@pineapple.shacknet.nu">http://archives.neohapsis.com/archives/vulnwatch/2004-q3/0003.html</mlist>
- <cvename>CAN-2004-0627</cvename>
- <cvename>CAN-2004-0628</cvename>
- <certvu>184030</certvu>
- <certvu>645326</certvu>
- </references>
- <dates>
- <discovery>2004-07-01</discovery>
- <entry>2004-07-05</entry>
- </dates>
- </vuln>
-
- <vuln vid="74d06b67-d2cf-11d8-b479-02e0185c0b53">
- <topic>multiple vulnerabilities in ethereal</topic>
- <affects>
- <package>
- <name>ethereal{,-lite}</name>
- <name>tethereal{,-lite}</name>
- <range><lt>0.10.4</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Issues have been discovered in multiple protocol dissectors.</p>
- </body>
- </description>
- <references>
- <url>http://www.ethereal.com/appnotes/enpa-sa-00014.html</url>
- <cvename>CAN-2004-0504</cvename>
- <cvename>CAN-2004-0505</cvename>
- <cvename>CAN-2004-0506</cvename>
- <cvename>CAN-2004-0507</cvename>
- <url>http://secunia.com/advisories/11608</url>
- <bid>10347</bid>
- <url>http://www.osvdb.org/6131</url>
- <url>http://www.osvdb.org/6132</url>
- <url>http://www.osvdb.org/6133</url>
- <url>http://www.osvdb.org/6134</url>
- </references>
- <dates>
- <discovery>2004-05-13</discovery>
- <entry>2004-07-11</entry>
- </dates>
- </vuln>
-
- <vuln vid="265c8b00-d2d0-11d8-b479-02e0185c0b53">
- <topic>multiple vulnerabilities in ethereal</topic>
- <affects>
- <package>
- <name>ethereal{,-lite}</name>
- <name>tethereal{,-lite}</name>
- <range><lt>0.10.5</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Issues have been discovered in multiple protocol dissectors.</p>
- </body>
- </description>
- <references>
- <url>http://www.ethereal.com/appnotes/enpa-sa-00015.html</url>
- <cvename>CAN-2004-0633</cvename>
- <cvename>CAN-2004-0634</cvename>
- <cvename>CAN-2004-0635</cvename>
- <url>http://secunia.com/advisories/12024</url>
- <bid>10672</bid>
- <url>http://www.osvdb.org/7536</url>
- <url>http://www.osvdb.org/7537</url>
- <url>http://www.osvdb.org/7538</url>
- </references>
- <dates>
- <discovery>2004-07-06</discovery>
- <entry>2004-07-11</entry>
- </dates>
- </vuln>
-
- <vuln vid="4764cfd6-d630-11d8-b479-02e0185c0b53">
- <topic>PHP memory_limit and strip_tags() vulnerabilities</topic>
- <affects>
- <package>
- <name>php4</name>
- <name>php4-{cgi,cli,dtc,horde,nms}</name>
- <name>mod_php4-twig</name>
- <range><lt>4.3.8</lt></range>
- </package>
- <package>
- <name>mod_php4</name>
- <range><lt>4.3.8,1</lt></range>
- </package>
- <package>
- <name>php5</name>
- <name>php5-{cgi,cli}</name>
- <range><lt>5.0.0</lt></range>
- </package>
- <package>
- <name>mod_php5</name>
- <range><lt>5.0.0,1</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Stefan Esser has reported two vulnerabilities in PHP, which can
- be exploited by malicious people to bypass security functionality
- or compromise a vulnerable system. An error within PHP's memory_limit
- request termination allows remote code execution on PHP servers
- with activated memory_limit. A binary safety problem within PHP's
- strip_tags() function may allow injection of arbitrary tags in
- Internet Explorer and Safari browsers.</p>
- </body>
- </description>
- <references>
- <url>http://www.php.net/ChangeLog-4.php</url>
- <url>http://www.php.net/ChangeLog-5.php</url>
- <url>http://security.e-matters.de/advisories/112004.html</url>
- <url>http://security.e-matters.de/advisories/122004.html</url>
- <url>http://secunia.com/advisories/12064</url>
- <url>http://www.osvdb.org/7870</url>
- <url>http://www.osvdb.org/7871</url>
- <cvename>CAN-2004-0594</cvename>
- <cvename>CAN-2004-0595</cvename>
- </references>
- <dates>
- <discovery>2007-07-07</discovery>
- <entry>2004-07-15</entry>
- </dates>
- </vuln>
-
- <vuln vid="730db824-e216-11d8-9b0a-000347a4fa7d">
- <topic>Mozilla / Firefox user interface spoofing vulnerability</topic>
- <affects>
- <package>
- <name>firefox</name>
- <range><le>0.9.1_1</le></range>
- </package>
- <package>
- <name>linux-mozilla</name>
- <range><le>1.7.1</le></range>
- </package>
- <package>
- <name>linux-mozilla-devel</name>
- <range><le>1.7.1</le></range>
- </package>
- <package>
- <name>mozilla</name>
- <range><le>1.7.1,2</le></range>
- <range><ge>1.8.*,2</ge><le>1.8.a2,2</le></range>
- </package>
- <package>
- <name>mozilla-gtk1</name>
- <range><le>1.7.1_1</le></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>A vulnerability has been reported in Mozilla and Firefox,
- allowing malicious websites to spoof the user interface.</p>
- </body>
- </description>
- <references>
- <url>http://bugzilla.mozilla.org/show_bug.cgi?id=252198</url>
- <url>http://www.nd.edu/~jsmith30/xul/test/spoof.html</url>
- <url>http://secunia.com/advisories/12188</url>
- <bid>10832</bid>
- <cvename>CAN-2004-0764</cvename>
- </references>
- <dates>
- <discovery>2004-07-19</discovery>
- <entry>2004-07-30</entry>
- </dates>
- </vuln>
-
- <vuln vid="f9e3e60b-e650-11d8-9b0a-000347a4fa7d">
- <topic>libpng stack-based buffer overflow and other code concerns</topic>
- <affects>
- <package>
- <name>png</name>
- <range><le>1.2.5_7</le></range>
- </package>
- <package>
- <name>linux-png</name>
- <range><le>1.0.14_3</le></range>
- <range><ge>1.2.*</ge><le>1.2.2</le></range>
- </package>
- <package>
- <name>firefox</name>
- <range><lt>0.9.3</lt></range>
- </package>
- <package>
- <name>thunderbird</name>
- <range><lt>0.7.3</lt></range>
- </package>
- <package>
- <name>linux-mozilla</name>
- <range><lt>1.7.2</lt></range>
- </package>
- <package>
- <name>linux-mozilla-devel</name>
- <range><lt>1.7.2</lt></range>
- </package>
- <package>
- <name>mozilla</name>
- <range><lt>1.7.2,2</lt></range>
- <range><ge>1.8.*,2</ge><le>1.8.a2,2</le></range>
- </package>
- <package>
- <name>mozilla-gtk1</name>
- <range><lt>1.7.2</lt></range>
- </package>
- <package>
- <name>netscape-{communicator,navigator}</name>
- <range><le>4.78</le></range>
- </package>
- <package>
- <name>linux-netscape-{communicator,navigator}</name>
- <name>{ja,ko}-netscape-{communicator,navigator}-linux</name>
- <range><le>4.8</le></range>
- </package>
- <package>
- <name>{,ja-}netscape7</name>
- <range><le>7.1</le></range>
- </package>
- <package>
- <name>{de-,fr-,pt_BR-}netscape7</name>
- <range><le>7.02</le></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Chris Evans has discovered multiple vulnerabilities in libpng,
- which can be exploited by malicious people to compromise a
- vulnerable system or cause a DoS (Denial of Service).</p>
- </body>
- </description>
- <references>
- <mlist msgid="Pine.LNX.4.58.0408041840080.20655@sphinx.mythic-beasts.com">http://www.securityfocus.com/archive/1/370853</mlist>
- <url>http://scary.beasts.org/security/CESA-2004-001.txt</url>
- <url>http://www.osvdb.org/8312</url>
- <url>http://www.osvdb.org/8313</url>
- <url>http://www.osvdb.org/8314</url>
- <url>http://www.osvdb.org/8315</url>
- <url>http://www.osvdb.org/8316</url>
- <cvename>CAN-2004-0597</cvename>
- <cvename>CAN-2004-0598</cvename>
- <cvename>CAN-2004-0599</cvename>
- <certvu>388984</certvu>
- <certvu>236656</certvu>
- <certvu>160448</certvu>
- <certvu>477512</certvu>
- <certvu>817368</certvu>
- <certvu>286464</certvu>
- <url>http://secunia.com/advisories/12219</url>
- <url>http://secunia.com/advisories/12232</url>
- <url>http://bugzilla.mozilla.org/show_bug.cgi?id=251381</url>
- <url>http://www.mozilla.org/projects/security/known-vulnerabilities.html#mozilla1.7.2</url>
- <uscertta>TA04-217A</uscertta>
- <url>http://dl.sourceforge.net/sourceforge/libpng/ADVISORY.txt</url>
- </references>
- <dates>
- <discovery>2004-08-04</discovery>
- <entry>2004-08-04</entry>
- <modified>2004-08-12</modified>
- </dates>
- </vuln>
-
- <vuln vid="abe47a5a-e23c-11d8-9b0a-000347a4fa7d">
- <topic>Mozilla certificate spoofing</topic>
- <affects>
- <package>
- <name>firefox</name>
- <range><ge>0.9.1</ge><le>0.9.2</le></range>
- </package>
- <package>
- <name>linux-mozilla</name>
- <range><lt>1.7.2</lt></range>
- </package>
- <package>
- <name>linux-mozilla-devel</name>
- <range><lt>1.7.2</lt></range>
- </package>
- <package>
- <name>mozilla</name>
- <range><lt>1.7.2,2</lt></range>
- <range><ge>1.8.*,2</ge><le>1.8.a2,2</le></range>
- </package>
- <package>
- <name>mozilla-gtk1</name>
- <range><lt>1.7.2</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Mozilla and Mozilla Firefox contains a flaw that may
- allow a malicious user to spoof SSL certification.</p>
- </body>
- </description>
- <references>
- <mlist msgid="003a01c472ba$b2060900$6501a8c0@sec">http://www.securityfocus.com/archive/1/369953</mlist>
- <url>http://www.cipher.org.uk/index.php?p=advisories/Certificate_Spoofing_Mozilla_FireFox_25-07-2004.advisory</url>
- <url>http://secunia.com/advisories/12160</url>
- <url>http://bugzilla.mozilla.org/show_bug.cgi?id=253121</url>
- <url>http://www.mozilla.org/projects/security/known-vulnerabilities.html#mozilla1.7.2</url>
- <url>http://www.osvdb.org/8238</url>
- <bid>10796</bid>
- <cvename>CAN-2004-0763</cvename>
- </references>
- <dates>
- <discovery>2004-07-25</discovery>
- <entry>2004-07-30</entry>
- <modified>2004-08-05</modified>
- </dates>
- </vuln>
-
- <vuln vid="a713c0f9-ec54-11d8-9440-000347a4fa7d">
- <topic>ImageMagick png and bmp vulnerabilities</topic>
- <affects>
- <package>
- <name>ImageMagick{,-nox11}</name>
- <range><lt>6.0.6</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Glenn Randers-Pehrson has contributed a fix for the png
- vulnerabilities discovered by Chris Evans.</p>
- <p>Furthermore, Marcus Meissner has discovered and patched a buffer
- overrun associated with decoding runlength-encoded BMP images.</p>
- </body>
- </description>
- <references>
- <url>http://studio.imagemagick.org/pipermail/magick-users/2004-August/013218.html</url>
- <url>http://studio.imagemagick.org/pipermail/magick-developers/2004-August/002011.html</url>
- <url>http://freshmeat.net/releases/169228</url>
- <url>http://secunia.com/advisories/12236</url>
- <url>http://secunia.com/advisories/12479</url>
- <url>http://www.freebsd.org/ports/portaudit/f9e3e60b-e650-11d8-9b0a-000347a4fa7d.html</url>
- </references>
- <dates>
- <discovery>2004-08-04</discovery>
- <entry>2004-08-04</entry>
- <modified>2004-09-03</modified>
- </dates>
- </vuln>
-
- <vuln vid="0139e7e0-e850-11d8-9440-000347a4fa7d">
- <topic>CVStrac remote code execution vulnerability</topic>
- <affects>
- <package>
- <name>cvstrac</name>
- <range><lt>1.1.4</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>CVStrac contains a flaw that may allow a remote attacker
- to execute arbitrary commands.</p>
- </body>
- </description>
- <references>
- <mlist msgid="20040805175709.6995.qmail@web50508.mail.yahoo.com">http://www.securityfocus.com/archive/1/370955</mlist>
- <url>http://secunia.com/advisories/12090</url>
- <url>http://www.osvdb.org/8373</url>
- <url>http://www.cvstrac.org/cvstrac/chngview?cn=316</url>
- </references>
- <dates>
- <discovery>2004-08-05</discovery>
- <entry>2004-08-13</entry>
- </dates>
- </vuln>
-
- <vuln vid="5b8f9a02-ec93-11d8-b913-000c41e2cdad">
- <topic>gaim remotely exploitable vulnerabilities in MSN component</topic>
- <affects>
- <package>
- <name>{ja-,ru-,}gaim</name>
- <range><lt>0.81_1</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Sebastian Krahmer discovered several remotely exploitable
- buffer overflow vulnerabilities in the MSN component of
- gaim.</p>
- </body>
- </description>
- <references>
- <cvename>CAN-2004-0500</cvename>
- <url>http://secunia.com/advisories/12125</url>
- <url>http://www.osvdb.org/8382</url>
- <url>http://www.osvdb.org/8961</url>
- <url>http://www.osvdb.org/8962</url>
- <url>http://www.suse.com/de/security/2004_25_gaim.html</url>
- <bid>10865</bid>
- </references>
- <dates>
- <discovery>2004-08-12</discovery>
- <entry>2004-08-12</entry>
- <modified>2004-08-30</modified>
- </dates>
- </vuln>
-
- <vuln vid="65a17a3f-ed6e-11d8-aff1-00061bc2ad93">
- <topic>jftpgw remote syslog format string vulnerability</topic>
- <affects>
- <package>
- <name>jftpgw</name>
- <range><lt>0.13.5</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Remote authenticated users can execute arbitrary code by
- passing a malicious string containing format specifiers.</p>
- </body>
- </description>
- <references>
- <cvename>CAN-2004-0448</cvename>
- <bid>10438</bid>
- <url>http://secunia.com/advisories/11732</url>
- <url>http://www.debian.org/security/2004/dsa-510</url>
- </references>
- <dates>
- <discovery>2004-05-29</discovery>
- <entry>2004-08-13</entry>
- </dates>
- </vuln>
-
- <vuln vid="e811aaf1-f015-11d8-876f-00902714cc7c">
- <cancelled superseded="a800386e-ef7e-11d8-81b0-000347a4fa7d"/>
- </vuln>
-
- <vuln vid="a800386e-ef7e-11d8-81b0-000347a4fa7d">
- <topic>ruby CGI::Session insecure file creation</topic>
- <affects>
- <package>
- <name>ruby{,_r,_static}</name>
- <range><lt>1.6.8.2004.07.28</lt></range>
- <range><ge>1.8.*</ge><lt>1.8.2.p2</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Rubys CGI session management store session information insecurely,
- which can be exploited by a local attacker to take over a session.</p>
- </body>
- </description>
- <references>
- <cvename>CAN-2004-0755</cvename>
- <url>http://secunia.com/advisories/12290</url>
- <url>http://www.debian.org/security/2004/dsa-537</url>
- <url>http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/ChangeLog?rev=1.2673.2.410</url>
- <url>http://www.osvdb.org/8845</url>
- </references>
- <dates>
- <discovery>2004-07-22</discovery>
- <entry>2004-08-16</entry>
- <modified>2004-08-16</modified>
- </dates>
- </vuln>
-
- <vuln vid="ebffe27a-f48c-11d8-9837-000c41e2cdad">
- <cancelled superseded="eda0ade6-f281-11d8-81b0-000347a4fa7d"/>
- </vuln>
-
- <vuln vid="eda0ade6-f281-11d8-81b0-000347a4fa7d">
- <topic>Qt 3.x BMP heap-based overflow, GIF and XPM DoS NULL pointer dereference</topic>
- <affects>
- <package>
- <name>qt</name>
- <range><ge>3.*</ge><lt>3.3.3</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Chris Evans has discovered flaws in th handling of various bitmap
- formats, allowing the execution of arbitrary code or causing a DoS.</p>
- </body>
- </description>
- <references>
- <url>http://scary.beasts.org/security/CESA-2004-004.txt</url>
- <url>http://secunia.com/advisories/12325</url>
- <cvename>CAN-2004-0691</cvename>
- <cvename>CAN-2004-0692</cvename>
- <cvename>CAN-2004-0693</cvename>
- <url>http://www.osvdb.org/9026</url>
- <url>http://xforce.iss.net/xforce/xfdb/17040</url>
- <url>http://xforce.iss.net/xforce/xfdb/17041</url>
- <url>http://xforce.iss.net/xforce/xfdb/17042</url>
- </references>
- <dates>
- <discovery>2004-08-18</discovery>
- <entry>2004-08-20</entry>
- </dates>
- </vuln>
-
- <vuln vid="0d3a5148-f512-11d8-9837-000c41e2cdad">
- <cancelled superseded="bacbc357-ea65-11d8-9440-000347a4fa7d"/>
- </vuln>
-
- <vuln vid="bacbc357-ea65-11d8-9440-000347a4fa7d">
- <topic>SpamAssassin DoS vulnerability</topic>
- <affects>
- <package>
- <name>p5-Mail-SpamAssassin</name>
- <range><lt>2.64</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Unspecified malformed messages can be used to
- cause a DoS (Denial of Service).</p>
- </body>
- </description>
- <references>
- <url>http://secunia.com/advisories/12255</url>
- <mlist msgid="20040805034902.6DF465900BB@radish.jmason.org>">http://marc.theaimsgroup.com/?l=spamassassin-announce&amp;m=109168121628767&amp;w=2</mlist>
- <cvename>CAN-2004-0796</cvename>
- <bid>10957</bid>
- </references>
- <dates>
- <discovery>2004-08-05</discovery>
- <entry>2004-08-10</entry>
- </dates>
- </vuln>
-
- <vuln vid="77cc070b-fdbe-11d8-81b0-000347a4fa7d">
- <topic>vpopmail multiple vulnerabilities</topic>
- <affects>
- <package>
- <name>vpopmail</name>
- <range><lt>5.4.6</lt></range>
- </package>
- <package>
- <name>vpopmail-devel</name>
- <range><lt>5.5.0</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Inter7 vpopmail (vchkpw) versions 5.4.2 and earlier contain
- buffer overflows and format string vulnerabilities in the file vsybase.c</p>
- <p>The buffer overflows are not fixed in versions 5.4.6/5.5.0, but are
- believed to be very hard to exploit, and only by administrators able to add users.</p>
- </body>
- </description>
- <references>
- <url>http://www.osvdb.org/9146</url>
- <url>http://www.osvdb.org/9147</url>
- <url>http://www.osvdb.org/9148</url>
- <bid>10962</bid>
- <url>http://secunia.com/advisories/12441</url>
- <url>http://cvs.sourceforge.net/viewcvs.py/vpopmail/vpopmail/vsybase.c?r1=1.9.2.1&amp;r2=1.9.2.2</url>
- <url>http://www.kupchino.org.ru/unl0ck/advisories/vpopmail.txt</url>
- <mlist msgid="200408181347.12199.bugtraq@beyondsecurity.com">http://www.securityfocus.com/archive/1/372257</mlist>
- <mlist msgid="58114.66.79.185.80.1092936304.squirrel@mail.xyxx.com">http://www.securityfocus.com/archive/1/372468</mlist>
- <url>http://xforce.iss.net/xforce/xfdb/17016</url>
- <url>http://xforce.iss.net/xforce/xfdb/17017</url>
- <url>http://security.gentoo.org/glsa/glsa-200409-01.xml</url>
- </references>
- <dates>
- <discovery>2004-08-17</discovery>
- <entry>2004-09-03</entry>
- </dates>
- </vuln>
-
- <vuln vid="d2102505-f03d-11d8-81b0-000347a4fa7d">
- <topic>multiple vulnerabilities in the cvs server code</topic>
- <affects>
- <package>
- <name>cvs+ipv6</name>
- <range><lt>1.11.17</lt></range>
- </package>
- <package>
- <name>FreeBSD</name>
- <range><lt>491101</lt></range>
- <range><ge>500000</ge><lt>502114</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Stefan Esser reports multiple remote exploitable vulnerabilites
- in the cvs code base.</p>
- <p>Additionaly there exists an undocumented switch to the history
- command allows an attacker to determine whether arbitrary files
- exist and whether the CVS process can access them.</p>
- </body>
- </description>
- <references>
- <cvename>CAN-2004-0414</cvename>
- <cvename>CAN-2004-0416</cvename>
- <cvename>CAN-2004-0417</cvename>
- <cvename>CAN-2004-0418</cvename>
- <cvename>CAN-2004-0778</cvename>
- <url>http://secunia.com/advisories/11817</url>
- <url>http://secunia.com/advisories/12309</url>
- <url>http://security.e-matters.de/advisories/092004.html</url>
- <url>http://www.idefense.com/application/poi/display?id=130&amp;type=vulnerabilities&amp;flashstatus=false</url>
- <url>https://ccvs.cvshome.org/source/browse/ccvs/NEWS?rev=1.116.2.104</url>
- <url>http://www.osvdb.org/6830</url>
- <url>http://www.osvdb.org/6831</url>
- <url>http://www.osvdb.org/6832</url>
- <url>http://www.osvdb.org/6833</url>
- <url>http://www.osvdb.org/6834</url>
- <url>http://www.osvdb.org/6835</url>
- <url>http://www.osvdb.org/6836</url>
- <url>http://www.packetstormsecurity.org/0405-exploits/cvs_linux_freebsd_HEAP.c</url>
- <bid>10499</bid>
- </references>
- <dates>
- <discovery>2004-05-20</discovery>
- <entry>2004-08-17</entry>
- </dates>
- </vuln>
-
- <vuln vid="59669fc9-fdf4-11d8-81b0-000347a4fa7d">
- <topic>multiple vulnerabilities in LHA</topic>
- <affects>
- <package>
- <name>lha</name>
- <range><le>1.14i_4</le></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Multiple vulnerabilities have been found in the LHA code by Lukasz Wojtow
- and Thomas Biege.</p>
- <p>Successful exploitation may allow execution of arbitrary code.</p>
- </body>
- </description>
- <references>
- <url>http://secunia.com/advisories/12435</url>
- <cvename>CAN-2004-0694</cvename>
- <cvename>CAN-2004-0745</cvename>
- <cvename>CAN-2004-0769</cvename>
- <cvename>CAN-2004-0771</cvename>
- <mlist msgid="20040606162856.29866.qmail@www.securityfocus.com">http://www.securityfocus.com/archive/1/365386</mlist>
- <mlist msgid="20040515110900.24784.qmail@www.securityfocus.com">http://www.securityfocus.com/archive/1/363418</mlist>
- <url>http://lw.ftw.zamosc.pl/lha-exploit.txt</url>
- <url>http://www.osvdb.org/9519</url>
- <url>http://www.osvdb.org/9520</url>
- <url>http://www.osvdb.org/9521</url>
- <url>http://www.osvdb.org/9522</url>
- <bid>10354</bid>
- <bid>11093</bid>
- <url>http://rhn.redhat.com/errata/RHSA-2004-323.html</url>
- </references>
- <dates>
- <discovery>2004-05-19</discovery>
- <entry>2004-09-03</entry>
- </dates>
- </vuln>
-
- <vuln vid="fdbbed57-f933-11d8-a776-00e081220a76">
- <topic>cdrtools local privilege escalation</topic>
- <affects>
- <package>
- <name>cdrtools</name>
- <range><lt>2.0.3_4</lt></range>
- </package>
- <package>
- <name>cdrtools-cjk</name>
- <range><lt>2.0.3.20030714_4</lt></range>
- </package>
- <package>
- <name>cdrtools-devel</name>
- <range><lt>2.01a38</lt></range>
- </package>
- </affects>
- <description>
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p>Max Vozeler found a flaw in in cdrecord allowing a local root exploit</p>
- </body>
- </description>
- <references>
- <url>ftp://ftp.berlios.de/pub/cdrecord/alpha/AN-2.01a38</url>
- <url>http://www.osvdb.org/9395</url>
- <cvename>CAN-2004-0806</cvename>
- <mlist msgid="E1C0yA3-0002cc-00@newraff.debian.org">http://lists.debian.org/debian-devel-changes/2004/08/msg03421.html</mlist>
- <bid>11075</bid>
- <url>http://secunia.com/advisories/12481</url>
- </references>
- <dates>
- <discovery>2004-08-28</discovery>
- <entry>2004-08-30</entry>
- </dates>
- </vuln>
-</vuxml>
diff --git a/ports-mgmt/portaudit-db/database/portaudit2vuxml.pl b/ports-mgmt/portaudit-db/database/portaudit2vuxml.pl
deleted file mode 100644
index d352bb2f8661..000000000000
--- a/ports-mgmt/portaudit-db/database/portaudit2vuxml.pl
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Copyright (c) 2004 Oliver Eikemeier. 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.
-#
-# 3. Neither the name of the author nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED "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
-# COPYRIGHT OWNER 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$
-#
-# portaudit to VuXML converter, use with
-# portaudit2vuxml.pl <uuid>
-# and edit the entry to suit your needs.
-#
-
-require 5.005;
-use strict;
-use Cwd 'abs_path';
-
-my $portsdir = $ENV{PORTSDIR} ? $ENV{PORTSDIR} : '/usr/ports';
-
-my $portauditdb = "$portsdir/security/portaudit-db/database/portaudit.txt";
-
-my $uuid = $ARGV[0];
-
-$#ARGV == 0 && $uuid =~ /^[0-9a-f]{8}(?:-[0-9a-f]{4}){4}[0-9a-f]{8}$/
- or die "usage: $0 $uuid <uuid>\n";
-
-my $today=`date -u +%Y-%m-%d`;
-chomp $today;
-
-my @pkg;
-my $url;
-my $topic;
-
-open PORTAUDITDB, "<$portauditdb"
- or die "Can't open $portauditdb: $!\n";
-
-while (<PORTAUDITDB>) {
- chomp;
- next if /^(?:#|$)/;
- my @line = split /\|/;
- next if $#line < 3 || $line[3] ne $uuid;
- push @pkg, $line[0];
- $url = $line[1];
- $topic = $line[2];
-}
-
-close PORTAUDITDB;
-
-$url =~ s/</&lt;/g;
-$url =~ s/>/&gt;/g;
-$url =~ s/&/&amp;/g;
-
-$topic =~ s/</&lt;/g;
-$topic =~ s/>/&gt;/g;
-$topic =~ s/&/&amp;/g;
-
-my %oper = (
- '<' => 'lt',
- '<=' => 'le',
- '=' => 'eq',
- '>=' => 'ge',
- '>' => 'gt'
-);
-
-if (@pkg) {
- print " <vuln vid=\"$uuid\">\n";
- print " <topic>$topic</topic>\n";
- print " <affects>\n";
- foreach (@pkg) {
- my @vers = split /((?:<|>)=?|=)/;
- my $pkgname = shift @vers;
- print " <package>\n";
- print " <name>$pkgname</name>\n";
- if (@vers) {
- print " <range>";
- while (@vers) {
- my $op = $oper{shift @vers};
- my $v = shift @vers;
- print "<$op>$v</$op>";
- }
- print "</range>\n";
- }
- print " </package>\n";
- }
- print " </affects>\n";
-
- print " <description>\n";
- print " <body xmlns=\"http://www.w3.org/1999/xhtml\">\n";
- print " <p>Please <a href=\"mailto:security\@FreeBSD.org?subject=vid%20$uuid\">contact\n";
- print " the FreeBSD Security Team</a> for more information.</p>\n";
- print " </body>\n";
- print " </description>\n";
- print " <references>\n";
-
- foreach (split ' ', $url) {
- if (m'^http://cve\.mitre\.org/cgi-bin/cvename\.cgi\?name=(.+)$') {
- print " <cvename>$1</cvename>\n"
- }
- elsif (m'^(http://www\.securityfocus\.com/archive/.+)$') {
- print " <mlist>$1</mlist>\n"
- }
- elsif (m'^http://www\.securityfocus\.com/bid/(.+)$') {
- print " <bid>$1</bid>\n"
- }
- elsif (m'^(http://(?:article\.gmane\.org|lists\.netsys\.com|marc\.theaimsgroup\.com)/.+)$') {
- print " <mlist>$1</mlist>\n"
- }
- elsif (m'^http://www\.kb\.cert\.org/vuls/id/(.+)$') {
- print " <certvu>$1</certvu>\n"
- }
- elsif (m'^http://www\.cert\.org/advisories/(.+)\.html$') {
- print " <certsa>$1</certsa>\n"
- }
- else {
- print " <url>$_</url>\n";
- }
- }
-
- print " </references>\n";
- print " <dates>\n";
- print " <discovery>2000-00-00</discovery>\n";
- print " <entry>$today</entry>\n";
- print " </dates>\n";
- print " </vuln>\n";
-}
diff --git a/ports-mgmt/portaudit-db/files/packaudit.conf b/ports-mgmt/portaudit-db/files/packaudit.conf
deleted file mode 100644
index 6b952effc14f..000000000000
--- a/ports-mgmt/portaudit-db/files/packaudit.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# $FreeBSD$
-#
-# packaudit.conf sample file
-#
-
-# avoid network access
-export SGML_CATALOG_FILES="%%LOCALBASE%%/share/xml/catalog"
-XSLTPROC_EXTRA_ARGS="--catalogs --nonet"
diff --git a/ports-mgmt/portaudit-db/files/packaudit.sh b/ports-mgmt/portaudit-db/files/packaudit.sh
deleted file mode 100644
index 4d0e245da6a8..000000000000
--- a/ports-mgmt/portaudit-db/files/packaudit.sh
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/bin/sh -e
-#
-# Copyright (c) 2004 Oliver Eikemeier. 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.
-#
-# 3. Neither the name of the author nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED "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
-# COPYRIGHT OWNER 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$
-#
-
-AWK=/usr/bin/awk
-BASENAME=/usr/bin/basename
-CAT=/bin/cat
-DATE=/bin/date
-ENV=/usr/bin/env
-MD5=/sbin/md5
-MKDIR="/bin/mkdir -p"
-MKTEMP=/usr/bin/mktemp
-RM=/bin/rm
-SED=/usr/bin/sed
-TAR=/usr/bin/tar
-XSLTPROC=%%LOCALBASE%%/bin/xsltproc
-
-PORTSDIR="${PORTSDIR:-%%PORTSDIR%%}"
-VUXMLDIR="${VUXMLDIR:-$PORTSDIR/security/vuxml}"
-PORTAUDITDBDIR="${PORTAUDITDBDIR:-$PORTSDIR/security/portaudit-db}"
-
-DATABASEDIR="${DATABASEDIR:-%%DATABASEDIR%%}"
-
-STYLESHEET="%%DATADIR%%/vuxml2portaudit.xslt"
-
-PUBLIC_HTML="${PUBLIC_HTML:-$HOME/public_html/portaudit}"
-HTMLSHEET="%%DATADIR%%/vuxml2html.xslt"
-BASEURL="${BASEURL:-http://www.freebsd.org/ports/portaudit/}"
-
-PORTAUDIT2VUXML="%%DATADIR%%/portaudit2vuxml.awk"
-
-[ -d "$DATABASEDIR" ] || $MKDIR "$DATABASEDIR"
-
-if [ ! -w "$DATABASEDIR" ]; then
- echo "$DATABASEDIR is not writable by you, exiting."
- exit 1
-fi
-
-TMPNAME=`$BASENAME "$0"`
-
-VULVER=`$SED -En -e '/^.*\\$FreeBSD\: [^$ ]+,v ([0-9]+(\.[0-9]+)+) [^$]+\\$.*$/{s//\1/p;q;}' "$VUXMLDIR/vuln.xml"`
-VULURL="http://cvsweb.freebsd.org/ports/security/vuxml/vuln.xml?rev=$VULVER"
-
-[ -r "%%PREFIX%%/etc/packaudit.conf" ] && . "%%PREFIX%%/etc/packaudit.conf"
-
-if [ -d "$PUBLIC_HTML" -a -w "$PUBLIC_HTML" ]; then
- VULNMD5=`$CAT "$VUXMLDIR/vuln.xml" "$PORTAUDITDBDIR/database/portaudit.xml" "$PORTAUDITDBDIR/database/portaudit.txt" | $MD5`
- if [ -f "$PUBLIC_HTML/portaudit.md5" ]; then
- VULNMD5_OLD=`$CAT "$PUBLIC_HTML/portaudit.md5"`
- fi
- if [ "$VULNMD5" != "$VULNMD5_OLD" ]; then
- echo -n "$VULNMD5" > "$PUBLIC_HTML/portaudit.md5"
- TMPXML=`$MKTEMP -t "$TMPNAME.$$"` || exit 1
- $PORTAUDIT2VUXML "$PORTAUDITDBDIR/database/portaudit.txt" "$PORTAUDITDBDIR/database/portaudit.xml" > "$TMPXML"
- $XSLTPROC $XSLTPROC_EXTRA_ARGS --stringparam vulurl "$VULURL" --stringparam extradoc "$TMPXML" \
- -o "$PUBLIC_HTML/" "$HTMLSHEET" "$VUXMLDIR/vuln.xml"
- $RM "$TMPXML"
- fi
-fi
-
-TMPDIR=`$MKTEMP -d -t "$TMPNAME.$$"` || exit 1
-
-TESTPORT="vulnerability-test-port>=2000<`$DATE -u +%Y.%m.%d`"
-TESTURL="http://cvsweb.freebsd.org/ports/security/vulnerability-test-port/"
-TESTREASON="Not vulnerable, just a test port (database: `$DATE -u +%Y-%m-%d`)"
-
-XLIST_FILE="$PORTAUDITDBDIR/database/portaudit.xlist"
-
-cd "$TMPDIR" || exit 1
-{
- $DATE -u "+#CREATED: %Y-%m-%d %H:%M:%S"
- echo "# Created by packaudit %%PORTVERSION%%"
- echo "$TESTPORT|$TESTURL|$TESTREASON"
- echo "# Please refer to the original document for copyright information:"
- echo "# $VULURL"
- $XSLTPROC $XSLTPROC_EXTRA_ARGS --stringparam baseurl "$BASEURL" "$STYLESHEET" "$VUXMLDIR/vuln.xml" \
- | $AWK -F\| -v XLIST_FILE="$XLIST_FILE" '
- BEGIN {
- while((getline < XLIST_FILE) > 0)
- if(!/^(#|$)/)
- ignore[$1]=1
- }
- /^(#|$)/ || !($4 in ignore) {
- print
- }
- '
- echo "# This part is in the public domain"
- $XSLTPROC $XSLTPROC_EXTRA_ARGS --stringparam baseurl "$BASEURL" "$STYLESHEET" "$PORTAUDITDBDIR/database/portaudit.xml"
- $AWK -F\| '
- /^(#|$)/ {
- print
- next
- }
- {
- if ($4)
- print $1 FS "'"$BASEURL"'" $4 ".html" FS $3 FS $4
- else
- print
- }
- ' "$PORTAUDITDBDIR/database/portaudit.txt"
-} | $AWK -F\| -v XLIST_FILE="$XLIST_FILE" '
- /^(#|$)/ {
- print
- next
- }
- {
- print $1 "|" $2 "|" $3
- }
-' > auditfile
-echo "#CHECKSUM: MD5 `$MD5 < auditfile`" >> auditfile
-$TAR -jcf "$DATABASEDIR/auditfile.tbz" auditfile
-cd
-$RM -Rf "$TMPDIR"
diff --git a/ports-mgmt/portaudit-db/files/portaudit2vuxml.awk b/ports-mgmt/portaudit-db/files/portaudit2vuxml.awk
deleted file mode 100644
index c02929077d0a..000000000000
--- a/ports-mgmt/portaudit-db/files/portaudit2vuxml.awk
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/awk -f
-
- BEGIN {
- XMLFILE=ARGV[2]
- delete ARGV[2]
- while (getline < XMLFILE) {
- if (/<\/vuxml>/)
- break
- print
- }
- XML=$0
- FS="|"
- }
-
- /^(#|$)/ { next }
-
- {
- if (PKG[$4])
- PKG[$4]=PKG[$4] FS $1
- else
- PKG[$4]=$1
- gsub(/</, "&lt;")
- gsub(/>/, "&gt;")
- gsub(/&/, "&amp;")
- URL[$4]=$2
- TOPIC[$4]=$3
- }
-
- END {
- OPN["<"]="lt"
- OPN["<="]="le"
- OPN["="]="eq"
- OPN[">="]="ge"
- OPN[">"]="gt"
-
- for (UUID in PKG) {
- print " <vuln vid=\"" UUID "\">"
- print " <topic>" TOPIC[UUID] "</topic>"
-
- print " <affects>"
- split(PKG[UUID], APKG)
- for (TPKG in APKG) {
- VERS=APKG[TPKG]
- print " <package>"
- if (match(VERS, /(<|>)=?|=/) > 0) {
- print " <name>" substr(VERS, 1, RSTART-1) "</name>"
- printf " <range>"
- do {
- OP=substr(VERS, RSTART, RLENGTH)
- LEN=length(VERS)
- VERS=substr(VERS, RSTART+RLENGTH, LEN+1-RSTART-RLENGTH)
- NEXTRANGE=match(VERS, /(<|>)=?|=/)
- if (NEXTRANGE > 0)
- printf "<%s>%s</%s>", OPN[OP], substr(VERS, 1, RSTART-1), OPN[OP]
- else
- printf "<%s>%s</%s>", OPN[OP], VERS, OPN[OP]
- } while (NEXTRANGE > 0)
- printf "</range>\n"
- }
- else {
- print " <name>" VERS "</name>"
- }
- print " </package>"
- }
- print " </affects>"
-
- print " <description>"
- print " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
- print " <p>Please <a href=\"mailto:security@FreeBSD.org?subject=vid%20" UUID "\">contact"
- print " the FreeBSD Security Team</a> for more information.</p>"
- print " </body>"
- print " </description>"
- print " <references>"
-
- split(URL[UUID], URLS, / /)
- for (U in URLS) {
- if (!URLS[U])
- continue
- print " <url>" URLS[U] "</url>"
- }
-
- print " </references>"
- print " <dates>"
- print " <discovery>2000-00-00</discovery>"
- print " <entry>2000-00-00</entry>"
- print " </dates>"
- print " </vuln>"
- print ""
- }
- print XML
- while (getline < XMLFILE) {
- print
- }
- close(XMLFILE)
- }
diff --git a/ports-mgmt/portaudit-db/files/vuxml2html.xslt b/ports-mgmt/portaudit-db/files/vuxml2html.xslt
deleted file mode 100644
index 2c892170292a..000000000000
--- a/ports-mgmt/portaudit-db/files/vuxml2html.xslt
+++ /dev/null
@@ -1,329 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- $FreeBSD$
-
-Copyright (c) 2004 Oliver Eikemeier. 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.
-3. Neither the name of the author nor the names of its contributors may be
- used to endorse or promote products derived from this software without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED "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
-COPYRIGHT OWNER 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.
-
-
-VuXML to HTML converter.
-
-Usage:
- xsltproc -o html/ vuxml2html.xslt vuxml.xml
-
--->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:vuxml="http://www.vuxml.org/apps/vuxml-1" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xhtml vuxml" version="1.0">
- <xsl:output method="xml"/>
- <xsl:strip-space elements="vuxml:affects vuxml:package vuxml:name vuxml:range" />
-<!-- whole vuxml file -->
- <xsl:template match="vuxml:vuxml">
-<!-- index page, xhtml strict -->
- <xsl:document href="index.html" method="xml" indent="yes" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>portaudit: Vulnerability list</title>
- <xsl:call-template name="css"/>
- </head>
- <body>
- <div>
- <xsl:call-template name="bar"/>
- </div>
- <h1>Vulnerabilities</h1>
- <table>
- <xsl:for-each select="vuxml:vuln | document($extradoc)/vuxml:vuxml/vuxml:vuln">
- <xsl:sort select="(vuxml:dates/vuxml:modified | vuxml:dates/vuxml:entry)[1]" order="descending"/>
- <tr>
- <td>
- <xsl:value-of select="(vuxml:dates/vuxml:modified | vuxml:dates/vuxml:entry)[1]"/>
- </td>
- <td>
- <a href="{translate(@vid, 'ABCDEF', 'abcdef')}.html">
- <xsl:value-of select="vuxml:topic"/>
- </a>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- <p>
- <a href="index-pkg.html">[Sorted by package name]</a>
- </p>
- <xsl:call-template name="foo">
- <xsl:with-param name="vid">index</xsl:with-param>
- </xsl:call-template>
- </body>
- </html>
- </xsl:document>
-<!-- index page by packages, xhtml strict -->
- <xsl:document href="index-pkg.html" method="xml" indent="yes" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>portaudit: Vulnerability list by packages</title>
- <xsl:call-template name="css"/>
- </head>
- <body>
- <div>
- <xsl:call-template name="bar"/>
- </div>
- <h1>Vulnerabilities</h1>
- <table>
- <xsl:for-each select="//vuxml:affects/vuxml:package/vuxml:name | document($extradoc)//vuxml:affects/vuxml:package/vuxml:name">
- <xsl:sort select="translate(., 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>
- <xsl:sort select="(ancestor-or-self::vuxml:vuln/vuxml:dates/vuxml:modified | ancestor-or-self::vuxml:vuln/vuxml:dates/vuxml:entry)[1]" order="descending"/>
- <tr>
- <td>
- <xsl:value-of select="."/>
- </td>
- <td>
- <a href="{translate(ancestor-or-self::vuxml:vuln/@vid, 'ABCDEF', 'abcdef')}.html">
- <xsl:value-of select="ancestor-or-self::vuxml:vuln/vuxml:topic"/>
- </a>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- <p>
- <a href="index.html">[Sorted by last modification]</a>
- </p>
- <xsl:call-template name="foo">
- <xsl:with-param name="vid">index</xsl:with-param>
- </xsl:call-template>
- </body>
- </html>
- </xsl:document>
-<!-- individual pages, xhtml strict -->
- <xsl:for-each select="vuxml:vuln | document($extradoc)/vuxml:vuxml/vuxml:vuln">
- <xsl:document href="{translate(@vid, 'ABCDEF', 'abcdef')}.html" method="xml" indent="yes" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <xsl:choose>
- <xsl:when test="vuxml:cancelled">
- <title>portaudit: Cancelled entry</title>
- </xsl:when>
- <xsl:otherwise>
- <title>portaudit: <xsl:value-of select="vuxml:topic"/></title>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="css"/>
- </head>
- <body>
- <div>
- <xsl:call-template name="bar"/>
- </div>
- <xsl:choose>
- <xsl:when test="vuxml:cancelled">
- <h1>
- Cancelled entry
- </h1>
- <xsl:if test="vuxml:cancelled/@superseded">
- <h2>References:</h2>
- <ul>
- <li>Superseded by <a href="./{vuxml:cancelled/@superseded}.html">entry
- <xsl:value-of select="vuxml:cancelled/@superseded"/></a></li>
- </ul>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <h1>
- <xsl:value-of select="vuxml:topic"/>
- </h1>
- <h2>Description:</h2>
- <xsl:copy-of select="vuxml:description/xhtml:body/*"/>
- <h2>References:</h2>
- <ul>
- <xsl:apply-templates select="vuxml:references"/>
- </ul>
- <h2>Affects:</h2>
- <ul>
- <xsl:for-each select="vuxml:affects/vuxml:package">
- <xsl:for-each select="vuxml:name">
- <xsl:variable name="name" select="."/>
- <xsl:for-each select="../vuxml:range">
- <li>
- <xsl:value-of select="$name"/>
- <xsl:apply-templates/>
- </li>
- </xsl:for-each>
- </xsl:for-each>
- </xsl:for-each>
- <xsl:for-each select="vuxml:affects/vuxml:system">
- <xsl:for-each select="vuxml:name">
- <xsl:variable name="name" select="."/>
- <xsl:for-each select="../vuxml:range">
- <li>
- <xsl:value-of select="$name"/>
- <xsl:apply-templates/>
- </li>
- </xsl:for-each>
- </xsl:for-each>
- </xsl:for-each>
- </ul>
- <title>portaudit: <xsl:value-of select="vuxml:topic"/></title>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:call-template name="foo">
- <xsl:with-param name="vid" select="@vid"/>
- </xsl:call-template>
- </body>
- </html>
- </xsl:document>
- </xsl:for-each>
-<!-- end of vuxml file processing -->
- </xsl:template>
-<!-- vulnerability references -->
- <xsl:template match="vuxml:bid">
- <li>BugTraq ID <a href="http://www.securityfocus.com/bid/{.}"><xsl:value-of select="."/></a></li>
- </xsl:template>
- <xsl:template match="vuxml:certsa">
- <li>CERT security advisory <a href="http://www.cert.org/advisories/{.}.html"><xsl:value-of select="."/></a></li>
- </xsl:template>
- <xsl:template match="vuxml:certvu">
- <li>CERT vulnerability note <a href="http://www.kb.cert.org/vuls/id/{.}"><xsl:value-of select="."/></a></li>
- </xsl:template>
- <xsl:template match="vuxml:cvename">
- <li>CVE name <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name={.}"><xsl:value-of select="."/></a></li>
- </xsl:template>
- <xsl:template match="vuxml:freebsdsa">
- <li>FreeBSD security advisory <a href="ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-{.}.asc">FreeBSD-<xsl:value-of select="."/></a></li>
- </xsl:template>
- <xsl:template match="vuxml:freebsdpr">
- <li>FreeBSD PR <a href="http://www.freebsd.org/cgi/query-pr.cgi?pr={.}"><xsl:value-of select="."/></a></li>
- </xsl:template>
- <xsl:template match="vuxml:mlist">
- <li>List post: <a href="{.}">&lt;<xsl:value-of select="."/>&gt;</a>
- <xsl:if test="@msgid"><a href="http://www.google.com/search?q={@msgid}">(search)</a></xsl:if>
- </li>
- </xsl:template>
- <xsl:template match="vuxml:url">
- <li>URL: <a href="{.}">&lt;<xsl:value-of select="."/>&gt;</a></li>
- </xsl:template>
- <xsl:template match="vuxml:uscertsa">
- <li>US-CERT security alert <a href="http://www.us-cert.gov/cas/alerts/{.}.html"><xsl:value-of select="."/></a></li>
- </xsl:template>
- <xsl:template match="vuxml:uscertta">
- <li>US-CERT technical security alert <a href="http://www.us-cert.gov/cas/techalerts/{.}.html"><xsl:value-of select="."/></a></li>
- </xsl:template>
-<!-- comparison operators -->
- <xsl:template match="vuxml:lt">
- <xsl:text> &lt;</xsl:text>
- <xsl:value-of select="text()"/>
- </xsl:template>
- <xsl:template match="vuxml:le">
- <xsl:text> &lt;=</xsl:text>
- <xsl:value-of select="text()"/>
- </xsl:template>
- <xsl:template match="vuxml:gt">
- <xsl:text> &gt;</xsl:text>
- <xsl:value-of select="text()"/>
- </xsl:template>
- <xsl:template match="vuxml:ge">
- <xsl:text> &gt;=</xsl:text>
- <xsl:value-of select="text()"/>
- </xsl:template>
- <xsl:template match="vuxml:eq">
- <xsl:text> =</xsl:text>
- <xsl:value-of select="text()"/>
- </xsl:template>
-<!-- style sheet -->
- <xsl:template name="css">
- <link rel="shortcut icon" href="http://www.freebsd.org/favicon.ico" type="image/x-icon"/>
- <style type="text/css">
- <xsl:comment>
- <xsl:text>
- body {
- background-color : #ffffff;
- color : #000000;
- }
-
- a:link { color: #0000ff }
- a:visited { color: #840084 }
- a:active { color: #0000ff }
-
- h1 { color: #990000 }
-
- img { color: white; border:none }
-
- table {
- border: none;
- margin-top: 10px;
- margin-bottom: 10px;
- }
-
- th {
- text-align: left;
- padding: 3px;
- border: none;
- vertical-align: top;
- }
-
- td {
- padding: 3px;
- border: none;
- vertical-align: top;
- }
-
- tr.odd {
- background: #eeeeee;
- color: inherit;
- }
- </xsl:text>
- </xsl:comment>
- </style>
- </xsl:template>
-<!-- xhtml elements -->
- <xsl:template name="bar">
- <img src="http://www.freebsd.org/gifs/bar.gif" alt="Navigation Bar" height="33" width="565" usemap="#bar"/>
- <map id="bar" name="bar">
- <area shape="rect" coords="1,1,111,33" href="http://www.freebsd.org/" alt="Top"/>
- <area shape="rect" coords="112,16,196,33" href="http://www.freebsd.org/ports/index.html" alt="Applications"/>
- <area shape="rect" coords="197,16,256,33" href="http://www.freebsd.org/support.html" alt="Support"/>
- <area shape="rect" coords="257,16,365,33" href="http://www.freebsd.org/docs.html" alt="Documentation"/>
- <area shape="rect" coords="366,16,424,33" href="http://www.freebsd.org/commercial/commercial.html" alt="Vendors"/>
- <area shape="rect" coords="425,16,475,33" href="http://www.freebsd.org/search/search.html" alt="Search"/>
- <area shape="rect" coords="476,16,516,33" href="http://www.freebsd.org/search/index-site.html" alt="Index"/>
- <area shape="rect" coords="517,16,565,33" href="http://www.freebsd.org/" alt="Top"/>
- <area shape="rect" coords="0,0,565,33" href="http://www.freebsd.org/" alt="Top"/>
- </map>
- </xsl:template>
- <xsl:template name="foo">
- <xsl:param name="vid"/>
- <hr/>
- <p><strong>Disclaimer:</strong> The data contained on this page is derived from the VuXML document,
- please refer to the <a href="{$vulurl}">the original document</a> for copyright information. The author of
- portaudit makes no claim of authorship or ownership of any of the information contained herein.</p>
- <p>
- If you have found a vulnerability in a FreeBSD port not listed in the
- database, please <a href="mailto:security@FreeBSD.org?subject=vid%20{$vid}">contact
- the FreeBSD Security Team</a>. Refer to
- <a href="http://www.freebsd.org/security/#how">"FreeBSD Security
- Information"</a> for more information.
- </p>
- <hr/>
- <address title="Oliver Eikemeier">
- Oliver Eikemeier <a href="mailto:eik@FreeBSD.org?subject=portaudit">&lt;eik@FreeBSD.org&gt;</a>
- </address>
- </xsl:template>
-</xsl:stylesheet>
diff --git a/ports-mgmt/portaudit-db/files/vuxml2portaudit.xslt b/ports-mgmt/portaudit-db/files/vuxml2portaudit.xslt
deleted file mode 100644
index 60beed5ec52e..000000000000
--- a/ports-mgmt/portaudit-db/files/vuxml2portaudit.xslt
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- $FreeBSD$
-
-Copyright (c) 2004 Oliver Eikemeier. 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.
-3. Neither the name of the author nor the names of its contributors may be
- used to endorse or promote products derived from this software without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED "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
-COPYRIGHT OWNER 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.
-
-
-VuXML to portaudit database converter.
-
-Usage:
- xsltproc -o auditfile vuxml2portaudit.xslt vuxml.xml
-
--->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vuxml="http://www.vuxml.org/apps/vuxml-1" version="1.0">
- <xsl:output method="text"/>
- <xsl:variable name="newline">
- <xsl:text>&#010;</xsl:text>
- </xsl:variable>
-<!-- xxx -->
- <xsl:strip-space elements="vuxml:affects vuxml:package vuxml:name vuxml:range"/>
- <xsl:template match="/">
- <xsl:text># Converted by vuxml2portaudit
-</xsl:text>
- <xsl:for-each select="vuxml:vuxml/vuxml:vuln">
- <xsl:variable name="topic" select="normalize-space(vuxml:topic)"/>
- <xsl:variable name="vid" select="translate(@vid, 'ABCDEF', 'abcdef')"/>
- <xsl:for-each select="vuxml:affects/vuxml:package">
- <xsl:for-each select="vuxml:name">
- <xsl:variable name="name" select="."/>
- <xsl:for-each select="../vuxml:range">
- <xsl:value-of select="$name"/>
- <xsl:apply-templates/>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="$baseurl"/>
- <xsl:value-of select="$vid"/>
- <xsl:text>.html</xsl:text>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="$topic"/>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="$vid"/>
- <xsl:value-of select="$newline"/>
- </xsl:for-each>
- </xsl:for-each>
- </xsl:for-each>
- </xsl:for-each>
- </xsl:template>
-<!-- xxx -->
- <xsl:template match="vuxml:lt">
- <xsl:text>&lt;</xsl:text>
- <xsl:value-of select="text()"/>
- </xsl:template>
- <xsl:template match="vuxml:le">
- <xsl:text>&lt;=</xsl:text>
- <xsl:value-of select="text()"/>
- </xsl:template>
- <xsl:template match="vuxml:gt">
- <xsl:text>&gt;</xsl:text>
- <xsl:value-of select="text()"/>
- </xsl:template>
- <xsl:template match="vuxml:ge">
- <xsl:text>&gt;=</xsl:text>
- <xsl:value-of select="text()"/>
- </xsl:template>
- <xsl:template match="vuxml:eq">
- <xsl:text>=</xsl:text>
- <xsl:value-of select="text()"/>
- </xsl:template>
-</xsl:stylesheet>
diff --git a/ports-mgmt/portaudit-db/pkg-descr b/ports-mgmt/portaudit-db/pkg-descr
deleted file mode 100644
index 85b315a9d87b..000000000000
--- a/ports-mgmt/portaudit-db/pkg-descr
+++ /dev/null
@@ -1,16 +0,0 @@
-In contrast to security/portaudit, which is designed to be an
-install-and-forget solution, portaudit-db requires a current
-ports tree and generates a database that can be used locally
-or distributed over a network.
-
-Furthermore committers that want to add entries to the VuXML
-database may use this port to check their changes locally.
-It also features a file `database/portaudit.txt' where UUIDs
-for vulnerabilities can be allocated before they have been
-investigated thoroughly and moved to the VuXML database by
-the security officer team.
-
-Call `packaudit' after upgrading your ports tree.
-
-WWW: http://people.freebsd.org/~eik/portaudit/
-Oliver Eikemeier <eik@FreeBSD.org>
diff --git a/ports-mgmt/portaudit-db/pkg-plist b/ports-mgmt/portaudit-db/pkg-plist
deleted file mode 100644
index 46e9b0674f4c..000000000000
--- a/ports-mgmt/portaudit-db/pkg-plist
+++ /dev/null
@@ -1,8 +0,0 @@
-bin/packaudit
-etc/packaudit.conf.sample
-%%DATADIR%%/portaudit2vuxml.awk
-%%DATADIR%%/vuxml2html.xslt
-%%DATADIR%%/vuxml2portaudit.xslt
-@dirrm %%DATADIR%%
-@exec mkdir -p %%DATABASEDIR%%
-@unexec rmdir %%DATABASEDIR%% 2>/dev/null || true
diff --git a/ports-mgmt/portaudit/Makefile b/ports-mgmt/portaudit/Makefile
deleted file mode 100644
index 914dd0c95f35..000000000000
--- a/ports-mgmt/portaudit/Makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-# New ports collection makefile for: portaudit
-# Date created: 25 Jan 2004
-# Whom: Oliver Eikemeier
-#
-# $FreeBSD$
-#
-
-PORTNAME= portaudit
-PORTVERSION= 0.5.10
-CATEGORIES= security
-DISTFILES=
-
-MAINTAINER= secteam@FreeBSD.org
-COMMENT= Checks installed ports against a list of security vulnerabilities
-
-MAN1= portaudit.1
-
-PERIODICDIR?= ${PREFIX}/etc/periodic
-DATABASEDIR?= /var/db/portaudit
-
-PKGREQ= ${WRKDIR}/pkg-req
-PKGINSTALL= ${WRKDIR}/pkg-install
-PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
-
-PLIST_SUB+= PERIODICDIR="${PERIODICDIR:S,^${PREFIX}/,,}" \
- DATABASEDIR="${DATABASEDIR}"
-
-REQPKGVER= 20040623
-
-SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
- -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
- -e "s|%%PORTSDIR%%|${PORTSDIR}|g" \
- -e "s|%%INDEXFILE%%|${INDEXFILE}|g" \
- -e "s|%%DATABASEDIR%%|${DATABASEDIR}|g" \
- -e "s|%%PORTVERSION%%|${PORTVERSION}|g" \
- -e "s|%%REQPKGVER%%|${REQPKGVER}|g" \
- -e "s|%%BZIP2_CMD%%|${BZIP2_CMD}|g" \
-
-.include <bsd.port.pre.mk>
-
-.if !defined(DFOSVERSION)
-.if ${OSVERSION} < 491101 || ${OSVERSION} >= 500000 && ${OSVERSION} < 502120
-RUN_DEPENDS= ${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install-devel
-.endif
-.else
-.if ${DFOSVERSION} < 110000
-RUN_DEPENDS= ${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install-devel
-.endif
-.endif
-
-.if defined(BZIP2DEPENDS)
-RUN_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2
-.endif
-
-do-build:
-.for f in portaudit-cmd.sh portaudit.sh portaudit.1 portaudit.conf
- @${SED} ${SED_SCRIPT} ${FILESDIR}/${f} >${WRKDIR}/${f}
-.endfor
-
-post-build:
-.for f in pkg-req pkg-install pkg-deinstall
- @${SED} ${SED_SCRIPT} ${PKGDIR}/${f} >${WRKDIR}/${f}
-.endfor
-
-pre-install:
-.if !defined(PACKAGE_BUILDING)
- @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGREQ} ${PKGNAME} INSTALL
-.endif
- @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
-do-install:
- @${INSTALL_SCRIPT} ${WRKDIR}/portaudit-cmd.sh ${PREFIX}/sbin/portaudit
- @${INSTALL_DATA} ${WRKDIR}/portaudit.conf ${PREFIX}/etc/portaudit.conf.sample
- @${INSTALL_MAN} ${WRKDIR}/portaudit.1 ${MAN1PREFIX}/man/man1
- @${MKDIR} ${PERIODICDIR}/security
- @${INSTALL_SCRIPT} ${WRKDIR}/portaudit.sh ${PERIODICDIR}/security/410.portaudit
- @${MKDIR} ${DATABASEDIR}
-
-post-install:
- @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-
-.include <bsd.port.post.mk>
diff --git a/ports-mgmt/portaudit/files/portaudit-cmd.sh b/ports-mgmt/portaudit/files/portaudit-cmd.sh
deleted file mode 100644
index b16c7e368dab..000000000000
--- a/ports-mgmt/portaudit/files/portaudit-cmd.sh
+++ /dev/null
@@ -1,474 +0,0 @@
-#!/bin/sh -efu
-#
-# Copyright (c) 2004 Oliver Eikemeier. 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.
-#
-# 3. Neither the name of the author nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED "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
-# COPYRIGHT OWNER 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$
-#
-
-portaudit_confs()
-{
- : ${portaudit_dir="%%DATABASEDIR%%"}
- : ${portaudit_filename="auditfile.tbz"}
-
- : ${portaudit_fetch_env=""}
- : ${portaudit_fetch_cmd="fetch -1mp"}
-
- : ${portaudit_sites="http://www.FreeBSD.org/ports/"}
-
- : ${portaudit_fixed=""}
-
- if [ -r %%PREFIX%%/etc/portaudit.conf ]; then
- . %%PREFIX%%/etc/portaudit.conf
- fi
-}
-
-extract_auditfile()
-{
- %%BZIP2_CMD%% -dc -- "$portaudit_dir/$portaudit_filename" | \
- tar -xOf - auditfile
-}
-
-checksum_auditfile()
-{
- chksum1=`extract_auditfile |
- sed -nE -e '$s/^#CHECKSUM: *MD5 *([0-9a-f]{32})$/\1/p'`
- chksum2=`extract_auditfile | sed -e '$d' | md5`
- [ "$chksum1" = "$chksum2" ];
-}
-
-getcreated_auditfile()
-{
- extract_auditfile |
- sed -nE -e '1s/^#CREATED: *([0-9]{4})-?([0-9]{2})-?([0-9]{2}) *([0-9]{2}):?([0-9]{2}):?([0-9]{2}).*$/\1-\2-\3 \4:\5:\6/p'
-}
-
-gettimestamp_auditfile()
-{
- extract_auditfile |
- sed -nE -e '1s/^#CREATED: *([0-9]{4})-?([0-9]{2})-?([0-9]{2}).*$/\1\2\3/p'
-}
-
-checkexpiry_auditfile()
-{
- created=`gettimestamp_auditfile`
- expiry=`date -u -v-$1d '+%Y%m%d'`
- [ "$created" -gt "$expiry" ];
-}
-
-portaudit_prerequisites()
-{
- if $prerequisites_checked; then
- return 0
- fi
-
- if [ -z "${pkg_info:-}" ]; then
- if [ -x "%%LOCALBASE%%/sbin/pkg_info" ]; then
- pkg_info="%%LOCALBASE%%/sbin/pkg_info"
- else
- pkg_info="/usr/sbin/pkg_info"
- fi
- fi
-
- if [ -z "${pkg_version:-}"]; then
- case "$pkg_info" in
- */*)
- pkg_version="${pkg_info%/*}/pkg_version";;
- *)
- pkg_version="pkg_version";;
- esac
- fi
-
- PKG_INSTALL_VER=`$pkg_info -qP 2>/dev/null`
- if [ -z "$PKG_INSTALL_VER" -o "$PKG_INSTALL_VER" -lt %%REQPKGVER%% ]; then
- echo "$pkg_info is too old, please update port sysutils/pkg_install-devel"
- return 1
- fi
-
- if [ ! -r "$portaudit_dir/$portaudit_filename" ]; then
- echo "portaudit: Database missing, run \`portaudit -F' to update." >&2
- return 2
- elif ! checksum_auditfile; then
- echo "portaudit: Corrupt database." >&2
- return 2
- elif ! checkexpiry_auditfile 14; then
- echo "portaudit: Database too old." >&2
- return 2
- fi
-
- prerequisites_checked=true
- return 0
-}
-
-audit_installed()
-{
- local rc=0
- local osversion=`sysctl -n kern.osreldate`
-
- fixedre=`echo -n $portaudit_fixed | tr -c '[:alnum:]- \t\n' 'x' | tr -s ' \t\n' '|'`
-
- extract_auditfile | awk -F\| "$PRINTAFFECTED_AWK"'
- BEGIN { vul=0; fixedre="'"$fixedre"'" }
- /^(#|\$)/ { next }
- $2 !~ /'"$opt_restrict"'/ { next }
- $1 ~ /^FreeBSD[<=>!]/ {
- if (fixedre && $2 ~ fixedre) next
- if (!system("'"$pkg_version"' -T \"FreeBSD-'"$osversion"'\" \"" $1 "\"")) {
- print_affected("FreeBSD-'"$osversion"'", \
- "To disable this check add the uuid to \`portaudit_fixed'"'"' in %%PREFIX%%/etc/portaudit.conf")
- }
- next
- }
- {
- cmd="'"$pkg_info"' -E \"" $1 "\""
- while((cmd | getline pkg) > 0) {
- vul++
- print_affected(pkg, "")
- }
- close(cmd)
- }
- END {
- if ("'$opt_quiet'" == "false") {
- print vul " problem(s) in your installed packages found."
- }
- if (vul > 0) {
- if ("'$opt_quiet'" == "false") {
- print "\nYou are advised to update or deinstall" \
- " the affected package(s) immediately."
- }
- exit(1)
- }
- }
- ' || rc=$?
-
- return $rc
-}
-
-audit_file()
-{
- local rc=0
- local TMPFILE=
-
- case "$1" in
- -)
- TMPFILE=`mktemp -t portaudit`
- cat > "$TMPFILE"
- FILE="$TMPFILE"
- ;;
- http://*|ftp://*|https://*|file://*)
- echo "portaudit: Can't audit remote file $1" >&2
- return 2
- ;;
- *)
- if [ -r "$1" ]; then
- FILE="$1"
- else
- echo "portaudit: Can't read $1" >&2
- return 2
- fi
- ;;
- esac
-
- extract_auditfile | awk -F\| "$PRINTAFFECTED_AWK"'
- BEGIN { vul=0 }
- /^(#|\$)/ { next }
- {
- cmd="'"$pkg_version"' -T - \"" $1 "\" <\"'"$FILE"'\""
- while((cmd | getline pkg) > 0) {
- if ($2 !~ /'"$opt_restrict"'/)
- continue
- vul++
- print_affected(pkg, "")
- }
- close(cmd)
- }
- END {
- print vul " problem(s) found."
- if (vul > 0) {
- exit(1)
- }
- }
- ' || rc=$?
-
- if [ -n "$TMPFILE" ]; then
- rm "$TMPFILE"
- fi
- return $rc
-}
-
-audit_args()
-{
- local VULCNT=0
- while [ $# -gt 0 ]; do
- case "$1" in
- /*|-)
- echo "portaudit: $1 is a file, please use the -f option" >&2
- ;;
- http://*|ftp://*|https://*|file://*)
- echo "portaudit: Can't audit remote file $1" >&2
- ;;
- *)
- if VLIST=`extract_auditfile | awk -F\| '
- /^(#|\$)/ { next }
- $2 !~ /'"$opt_restrict"'/ { next }
- { print }
- ' | $pkg_version -T "$1" -`; then
- VULCNT=$(($VULCNT+1))
- echo "$VLIST" | awk -F\| "$PRINTAFFECTED_AWK"'
- { print_affected("'"$1"'", "") }
- '
- fi
- ;;
- esac
- shift
- done
- $opt_quiet || echo "$VULCNT problem(s) found."
- if [ $VULCNT -gt 0 ]; then
- return 1
- fi
-}
-
-audit_cwd()
-{
- if [ ! -r "Makefile" ]; then
- echo "portaudit: No Makefile here" >&2
- return 2
- fi
-
- PKGNAME=`make -VPKGNAME 2>/dev/null || true"`
-
- if [ -z "$PKGNAME" ]; then
- echo "portaudit: Can't determine the package name" >&2
- return 2
- fi
-
- if VLIST=`extract_auditfile | awk -F\| '
- /^(#|\$)/ { next }
- $2 !~ /'"$opt_restrict"'/ { next }
- { print }
- ' | $pkg_version -T "$PKGNAME" -`; then
- echo "$VLIST" | awk -F\| "$PRINTAFFECTED_AWK"'
- { print_affected("'"$PKGNAME"'", "") }
- '
- return 1
- fi
-}
-
-fetch_auditfile()
-{
- local rc=2
-
- if [ ! -d "$portaudit_dir" ]; then
- if ! mkdir -p "$portaudit_dir"; then
- echo "Couldn't create $portaudit_dir, try running \`portaudit -F' as root" >&2
- return 2
- fi
- fi
- if [ ! -w "$portaudit_dir" ]; then
- echo "Couldn't write to $portaudit_dir, try running \`portaudit -F' as root" >&2
- return 2
-
- fi
- cd "$portaudit_dir"
- if [ -r "$portaudit_filename" ]; then
- cp -f "$portaudit_filename" "$portaudit_filename.old"
- fi
-
- $opt_verbose && echo "Attempting to fetch from $portaudit_sites."
- urls=`echo "$portaudit_sites" | tr -s ' \t' '\n' | sed -E -e "s/?\$/$portaudit_filename"`
-
- if ! env $portaudit_fetch_env $portaudit_fetch_cmd $urls; then
- echo "Couldn't fetch database." >&2
- elif [ ! -f "$portaudit_dir/$portaudit_filename" ] ; then
- echo "portaudit: No database." >&2
- elif ! checksum_auditfile; then
- echo "portaudit: Database corrupt." >&2
- elif ! checkexpiry_auditfile 7; then
- echo "portaudit: Database too old." >&2
- else
- $opt_quiet || echo "New database installed."
- rc=0
- break
- fi
-
- if [ -f "$portaudit_filename.old" ]; then
- if [ $rc -eq 0 ]; then
- rm -f "$portaudit_filename.old"
- else
- mv -f "$portaudit_filename.old" "$portaudit_filename"
- $opt_quiet || echo "Old database restored."
- fi
- fi
- if [ -f "$portaudit_filename" ]; then
- chmod a=r "$portaudit_filename"
- fi
-
- return $rc
-}
-
-portaudit_confs
-
-opt_audit=false
-opt_auditcwd=false
-opt_dbversion=false
-opt_fetch=false
-opt_file=
-opt_quiet=false
-opt_restrict=
-opt_verbose=false
-opt_version=false
-opt_expiry=
-
-if [ $# -eq 0 ] ; then
- opt_audit=true
-fi
-
-while getopts aCdf:Fqr:vVX: opt; do
- case "$opt" in
- a)
- opt_audit=true;;
- C)
- opt_auditcwd=true;;
- d)
- opt_dbversion=true;;
- f)
- opt_file="$OPTARG";;
- F)
- opt_fetch=true;;
- q)
- opt_quiet=true;;
- r)
- opt_restrict="$OPTARG";;
- v)
- opt_verbose=true;;
- V)
- opt_version=true;;
- X)
- opt_expiry="$OPTARG";;
- ?)
- echo "Usage: $0 -aCdFVvq [-X days] [-r pattern] [-f file] [pkg-name ...]"
- exit 2;;
- esac
-done
-
-shift $(($OPTIND-1))
-
-ret=0
-
-if $opt_version; then
- echo "portaudit version %%PORTVERSION%%"
-fi
-
-if $opt_fetch; then
- if ! fetch_auditfile; then
- echo "portaudit: Download failed." >&2
- exit 2
- fi
-elif [ -n "$opt_expiry" ]; then
- if [ ! -r "$portaudit_dir/$portaudit_filename" ] || ! checkexpiry_auditfile "$opt_expiry"; then
- $opt_quiet || echo "Downloading fresh database."
- if ! fetch_auditfile; then
- echo "portaudit: Download failed." >&2
- exit 2
- fi
- ret=1
- fi
-fi
-
-if $opt_dbversion; then
- if [ ! -f "$portaudit_dir/$portaudit_filename" ]; then
- echo "portaudit: Database missing, run \`portaudit -F' to update." >&2
- exit 2
- fi
- if ! checksum_auditfile; then
- echo "portaudit: Database corrupt." >&2
- exit 2
- fi
- created=`getcreated_auditfile`
- echo "Database created: `date -j -f '%Y-%m-%d %H:%M:%S %Z' \"$created GMT\"`"
-fi
-
-prerequisites_checked=false
-
-if $opt_quiet; then
- PRINTAFFECTED_AWK='
- function print_affected(apkg, note) {
- print apkg
- }
- '
-elif $opt_verbose; then
- PRINTAFFECTED_AWK='
- function print_affected(apkg, note) {
- split(apkg, thepkg)
- print "Affected package: " thepkg[1] " (matched by " $1 ")"
- print "Type of problem: " $3 "."
- split($2, ref, / /)
- for (r in ref)
- print "Reference: <" ref[r] ">"
- if (note)
- print "Note: " note
- print ""
- }
- '
-else
- PRINTAFFECTED_AWK='
- function print_affected(apkg, note) {
- split(apkg, thepkg)
- print "Affected package: " thepkg[1]
- print "Type of problem: " $3 "."
- split($2, ref, / /)
- for (r in ref)
- print "Reference: <" ref[r] ">"
- if (note)
- print "Note: " note
- print ""
- }
- '
-fi
-
-if $opt_audit; then
- portaudit_prerequisites
- audit_installed || ret=$?
-fi
-
-if $opt_auditcwd; then
- portaudit_prerequisites
- audit_cwd || ret=$?
-fi
-
-if [ -n "$opt_file" ]; then
- portaudit_prerequisites
- audit_file "$opt_file" || ret=$?
-fi
-
-if [ $# -gt 0 ]; then
- portaudit_prerequisites
- audit_args "$@" || ret=$?
-fi
-
-exit $ret
diff --git a/ports-mgmt/portaudit/files/portaudit.1 b/ports-mgmt/portaudit/files/portaudit.1
deleted file mode 100644
index da683a2a6e8b..000000000000
--- a/ports-mgmt/portaudit/files/portaudit.1
+++ /dev/null
@@ -1,175 +0,0 @@
-.\" Copyright (c) 2004 Oliver Eikemeier. 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.
-.\"
-.\" 3. Neither the name of the author nor the names of its contributors may be
-.\" used to endorse or promote products derived from this software without
-.\" specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED "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
-.\" COPYRIGHT OWNER 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$
-.\"
-.Dd July 3, 2005
-.Os
-.Dt PORTAUDIT \&1 "FreeBSD ports collection"
-.
-.
-.Sh NAME
-.
-.Nm portaudit
-.Nd system to check installed packages for known vulnerabilities
-.
-.
-.Sh SYNOPSIS
-.
-.Nm
-.Op Fl aCdFqvV
-.Op Fl X Ar days
-.Op Fl f Ar file
-.Op Fl r Ar eregex
-.Op Ar pkg-name ...
-.
-.
-.Sh DESCRIPTION
-.
-.Nm
-checks installed packages for known vulnerabilities and generates reports
-including references to security advisories.
-Its intended audience is system administrators and individual users.
-.Pp
-.Nm
-uses a database maintained by port committers and the FreeBSD security team
-to check if security advisories for any installed packages exist.
-Note that a current ports tree (or any local copy of the ports tree) is not
-required for operation.
-.Pp
-This package also installs a script into %%PREFIX%%/etc/periodic/security
-that regularly updates this database and includes a report of vulnerable
-packages in the daily security report.
-.Pp
-If you have a vulnerable package installed, you are advised to update or
-deinstall it immediately.
-.
-.
-.Sh OPTIONS
-.
-The following options are supported:
-.Bl -tag -width ".Fl X"
-.It Fl a
-Print a vulnerability report for all installed packages.
-.It Fl C
-Print a vulnerability report for the port in the current working directory.
-Mostly useful for port developers.
-.It Fl d
-Print the creation date of the database.
-.It Fl F
-Fetch the current database from the
-.Fx
-servers.
-.It Fl q
-Quiet mode.
-.It Fl V
-Show
-.Nm
-version number.
-.It Fl v
-Verbose mode.
-.It Fl X Ar days
-Download a fresh database when the local is at least
-.Ar days
-old.
-.It Fl f Ar file
-Check the packages listed in
-.Ar file
-for known vulnerabilities.
-.It Fl r Ar eregex
-Restrict listed vulnerabilities to those where a reference matches
-.Xr egrep 1
-pattern
-.Ar eregex .
-Useful to test new entries.
-.It Ar pkg-name ...
-Test whether
-.Ar pkg-name
-is listed in the audit database.
-.El
-.Pp
-If no options are given,
-.Nm
-prints a vulnerability report for all installed packages.
-.
-.
-.Sh EXAMPLES
-.
-.Bl -item
-.It
-Fetch the current database and print its creation date:
-.Pp
-.Dl "portaudit -Fd"
-.It
-Print a vulnerability report for all installed packages:
-.Pp
-.Dl "portaudit -a"
-.It
-Print a vulnerability report for a remote machine:
-.Pp
-.Dl "ssh remote.example pkg_info | awk '{ print $1 }' | xargs portaudit"
-.It
-Print a vulnerability report for the local INDEX:
-.Pp
-.Dl "portaudit -f %%PORTSDIR%%/%%INDEXFILE%%"
-.It
-Print a vulnerability report for the current set of prebuild packages:
-.Pp
-.Dl "curl -l ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/All/ | sed -n -e 's/\.t[bg]z[[:cntrl:]]*$//p' | portaudit -f -"
-.El
-.
-.
-.Sh FILES
-.
-.Pa %%PREFIX%%/etc/portaudit.conf ,
-.Pa %%DATABASEDIR%%/auditfile.tbz
-.
-.
-.Sh SEE ALSO
-.
-.Xr ports 7 ,
-.Xr periodic.conf 5 ,
-.Pa http://www.FreeBSD.org/ports/portaudit/ ,
-.Pa http://www.FreeBSD.org/security/#adv ,
-.Pa http://FreeBSD.VuXML.org/ .
-.
-.
-.Sh BUGS
-.
-Sure to be some.
-.
-.
-.Sh AUTHOR
-.
-.An Oliver Eikemeier Aq eik@FreeBSD.org
-.
-.
-.Sh HISTORY
-.
-Package auditing first appeared in
-.Nx 1.4.3 .
diff --git a/ports-mgmt/portaudit/files/portaudit.conf b/ports-mgmt/portaudit/files/portaudit.conf
deleted file mode 100644
index c4b7362594c8..000000000000
--- a/ports-mgmt/portaudit/files/portaudit.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Sample configuration file for portaudit(1)
-#
-# copy to %%PREFIX%%/etc/portaudit.conf
-#
-# $FreeBSD$
-#
-
-# specify a proxy if needed, see fetch(3)
-#portaudit_fetch_env="FTP_PROXY=http://ftp.proxy.sample/ HTTP_PROXY=http://http.proxy.sample:80/"
-
-# default fetch command
-#portaudit_fetch_cmd="fetch -1amp"
-
-# specify a local mirror that generates databases with portaudit-db here
-#portaudit_sites="http://www.FreeBSD.org/ports/"
-
-# this vulnerability has been fixed in your FreeBSD version
-#portaudit_fixed="d2102505-f03d-11d8-81b0-000347a4fa7d"
diff --git a/ports-mgmt/portaudit/files/portaudit.sh b/ports-mgmt/portaudit/files/portaudit.sh
deleted file mode 100644
index 8e3b460ec750..000000000000
--- a/ports-mgmt/portaudit/files/portaudit.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh -f
-#
-# Copyright (c) 2004 Oliver Eikemeier. 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.
-#
-# 3. Neither the name of the author nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED "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
-# COPYRIGHT OWNER 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$
-#
-
-# If there is a global system configuration file, suck it in.
-#
-if [ -r /etc/defaults/periodic.conf ]; then
- . /etc/defaults/periodic.conf
- source_periodic_confs
-fi
-
-rc=0
-case "${daily_status_security_portaudit_enable:-YES}" in
- [Nn][Oo])
- ;;
- *)
- echo
- echo "Checking for a current audit database:"
- echo
- %%PREFIX%%/sbin/portaudit -X "${daily_status_security_portaudit_expiry:-2}" || rc=$?
- if [ $rc -lt 2 ]; then
- %%PREFIX%%/sbin/portaudit -d
- echo
- echo "Checking for packages with security vulnerabilities:"
- echo
- echo %%PREFIX%%/sbin/portaudit -a |
- su -fm "${daily_status_security_portaudit_user:-nobody}" || rc=$?
- fi
- ;;
-esac
-
-exit "$rc"
diff --git a/ports-mgmt/portaudit/pkg-deinstall b/ports-mgmt/portaudit/pkg-deinstall
deleted file mode 100644
index 948c7135abb6..000000000000
--- a/ports-mgmt/portaudit/pkg-deinstall
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-case $2 in
-POST-DEINSTALL)
- echo
- echo "The portaudit package has been deleted."
- if [ -f "%%DATABASEDIR%%/auditfile.tbz" ]; then
- echo "If you're *not* upgrading and won't be using"
- echo "it any longer, you may want to remove the"
- echo "portaudit database:"
- echo
- echo " rm -Rf %%DATABASEDIR%%"
- fi
- echo
- ;;
-esac
diff --git a/ports-mgmt/portaudit/pkg-descr b/ports-mgmt/portaudit/pkg-descr
deleted file mode 100644
index 9dd30dd115f6..000000000000
--- a/ports-mgmt/portaudit/pkg-descr
+++ /dev/null
@@ -1,16 +0,0 @@
-portaudit provides a system to check if installed ports are listed in a
-database of published security vulnerabilities.
-
-After installation it will update this security database automatically and
-include its reports in the output of the daily security run.
-
-If you have found a vulnerability not listed in the database, please contact
-the FreeBSD Security Officer <security-officer@FreeBSD.org>. Refer to
-
- http://www.freebsd.org/security/#sec
-
-for more information.
-
-WWW: http://people.freebsd.org/~eik/portaudit/
-
-Oliver Eikemeier <eik@FreeBSD.org>
diff --git a/ports-mgmt/portaudit/pkg-install b/ports-mgmt/portaudit/pkg-install
deleted file mode 100644
index 6ee3e0433e46..000000000000
--- a/ports-mgmt/portaudit/pkg-install
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-PREFIX="${PREFIX:-%%PREFIX%%}"
-
-case $2 in
-PRE-INSTALL)
- if egrep -qs "^(FETCH|MASTER_SITE)_" "$PREFIX/etc/portaudit.conf" ;then
- echo
- echo "*** WARNING ***"
- echo
- echo "The preference file format has changed. Please edit"
- echo " $PREFIX/etc/portaudit.conf"
- echo
- fi
- if egrep -qs "^daily_status_portaudit_" "/etc/periodic.conf" ;then
- echo
- echo "*** WARNING ***"
- echo
- echo "The periodic(8) names have changed. Please edit"
- echo " /etc/periodic.conf"
- echo
- fi
- ;;
-POST-INSTALL)
- if [ ! -f "%%DATABASEDIR%%/auditfile.tbz" ]; then
- echo
- echo "===> To check your installed ports for known vulnerabilities now, do:"
- echo
- echo " $PREFIX/sbin/portaudit -Fda"
- echo
- fi
- ;;
-esac
diff --git a/ports-mgmt/portaudit/pkg-plist b/ports-mgmt/portaudit/pkg-plist
deleted file mode 100644
index 84b4ccaaf52e..000000000000
--- a/ports-mgmt/portaudit/pkg-plist
+++ /dev/null
@@ -1,7 +0,0 @@
-sbin/portaudit
-etc/portaudit.conf.sample
-%%PERIODICDIR%%/security/410.portaudit
-@unexec rmdir %D/%%PERIODICDIR%%/security 2>/dev/null || true
-@unexec rmdir %D/%%PERIODICDIR%% 2>/dev/null || true
-@exec mkdir -p %%DATABASEDIR%%
-@unexec rmdir %%DATABASEDIR%% 2>/dev/null || true
diff --git a/ports-mgmt/portaudit/pkg-req b/ports-mgmt/portaudit/pkg-req
deleted file mode 100644
index 5a8ba2d087db..000000000000
--- a/ports-mgmt/portaudit/pkg-req
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-case $2 in
-INSTALL)
- if [ -z "${PKG_INFO}" ]; then
- if [ -x "%%LOCALBASE%%/sbin/pkg_info" ]; then
- PKG_INFO="%%LOCALBASE%%/sbin/pkg_info"
- else
- PKG_INFO="/usr/sbin/pkg_info"
- fi
- fi
-
- if [ ! -x "${PKG_INFO}" ]; then
- echo "${PKG_INFO} missing, please install port sysutils/pkg_install-devel"
- exit 1
- fi
-
- PKG_INSTALL_VER=`${PKG_INFO} -qP 2>/dev/null`
- if [ -z "${PKG_INSTALL_VER}" -o "${PKG_INSTALL_VER}" -lt %%REQPKGVER%% ]; then
- echo "${PKG_INFO} is too old, please update port sysutils/pkg_install-devel"
- exit 1
- fi
-
- if [ "`echo FreeBSD | tr -s .`" != "FreeBSD" ]; then
- echo "tr(1) is broken."
- exit 1
- fi
- ;;
-esac
diff --git a/ports-mgmt/portbrowser/Makefile b/ports-mgmt/portbrowser/Makefile
deleted file mode 100644
index 6922b1d39db6..000000000000
--- a/ports-mgmt/portbrowser/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-# New ports collection makefile for: portbrowser
-# Date created: 8 November, 2004
-# Whom: hrs
-#
-# $FreeBSD$
-
-PORTNAME= portbrowser
-PORTVERSION= 0.3
-PORTREVISION= 2
-CATEGORIES= sysutils
-MASTER_SITES= http://www.bytelabs.org/
-DISTNAME= pb-browser-${PORTVERSION}
-EXTRACT_SUFX= .tgz
-
-MAINTAINER= hrs@FreeBSD.org
-COMMENT= Graphical frontend for the BSD ports system
-
-USE_GNOME= gtk20
-USE_REINPLACE= yes
-MAKE_ENV= MANDIR=${PREFIX}/man/man \
- BINDIR=${PREFIX}/bin \
- NOMANCOMPRESS=YES
-PLIST_FILES= bin/pbrowser
-
-MAN1= pbrowser.1
-
-post-patch:
- @${REINPLACE_CMD} -e 's|"INDEX"|"${INDEXFILE}"|' \
- ${WRKSRC}/src/pkgobject.h
-
-.include <bsd.port.mk>
diff --git a/ports-mgmt/portbrowser/distinfo b/ports-mgmt/portbrowser/distinfo
deleted file mode 100644
index 7392d9afb462..000000000000
--- a/ports-mgmt/portbrowser/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (pb-browser-0.3.tgz) = 5ea939c43b382e4a3e05ed6a5b7de48e
-SIZE (pb-browser-0.3.tgz) = 44706
diff --git a/ports-mgmt/portbrowser/pkg-descr b/ports-mgmt/portbrowser/pkg-descr
deleted file mode 100644
index a087512f4817..000000000000
--- a/ports-mgmt/portbrowser/pkg-descr
+++ /dev/null
@@ -1,4 +0,0 @@
-The PortBrowser is a FREE, easy to use implementation
-of a frontend written for the BSD ports system.
-
-WWW: http://www.bytelabs.org/devel.html
diff --git a/ports-mgmt/portcheckout/Makefile b/ports-mgmt/portcheckout/Makefile
deleted file mode 100644
index 5370ee92e9b7..000000000000
--- a/ports-mgmt/portcheckout/Makefile
+++ /dev/null
@@ -1,24 +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
-PLIST_FILES= bin/portcheckout
-
-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 5cb8bae101ce..000000000000
--- a/ports-mgmt/portcheckout/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (portcheckout-2.0.tar.gz) = 930a626eb8761f5012b6105e553e75ad
-SIZE (portcheckout-2.0.tar.gz) = 4981
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/portdowngrade/Makefile b/ports-mgmt/portdowngrade/Makefile
deleted file mode 100644
index 7ebf370b9eee..000000000000
--- a/ports-mgmt/portdowngrade/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-# New ports collection makefile for: portdowngrade
-# Date created: 2003/02/13
-# Whom: Heiner <h.eichmann@gmx.de>
-#
-# $FreeBSD$
-#
-
-PORTNAME= portdowngrade
-PORTVERSION= 0.6
-CATEGORIES= sysutils
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR= ${PORTNAME}
-
-MAINTAINER= h.eichmann@gmx.de
-COMMENT= Sets a port back to a previous version
-
-LIB_DEPENDS= popt.0:${PORTSDIR}/devel/popt
-
-POPT_INCLUDE= `pkg_info -xL ^popt | ${GREP} popt.h | ${SED} -e 's?/popt.h??'`
-POPT_LIB= `pkg_info -xL ^popt | ${GREP} libpopt.a | ${SED} -e 's?/libpopt.a??'`
-CONFIGURE_ENV= CPPFLAGS="-I${POPT_INCLUDE}" \
- LIBS="-lpopt -L${POPT_LIB}"
-.if defined(DEFAULT_CVS_SERVER)
-CONFIGURE_ARGS+= --enable-default-server=${DEFAULT_CVS_SERVER}
-.endif
-
-GNU_CONFIGURE= yes
-CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-USE_GMAKE= yes
-
-USE_BZIP2= yes
-
-MAN1= portdowngrade.1
-PLIST_FILES= sbin/portdowngrade
-
-pre-everything::
-.if !defined(DEFAULT_CVS_SERVER)
- @${ECHO_MSG} ""
- @${ECHO_MSG} "Press CTRL-C and define DEFAULT_CVS_SERVER"
- @${ECHO_MSG} "(e.g. make DEFAULT_CVS_SERVER=\":pserver:anoncvs@anoncvs. ... .FreeBSD.org:/home/ncvs\" install)"
- @${ECHO_MSG} "if you want to use a special CVS server as default. See"
- @${ECHO_MSG} "http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/anoncvs.html"
- @${ECHO_MSG} "for a list of possible cvs server"
- @${ECHO_MSG} ""
- @sleep 3
-.endif
-
-.include <bsd.port.mk>
diff --git a/ports-mgmt/portdowngrade/distinfo b/ports-mgmt/portdowngrade/distinfo
deleted file mode 100644
index b474e53c7024..000000000000
--- a/ports-mgmt/portdowngrade/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (portdowngrade-0.6.tar.bz2) = 4f7b2cfa79dd9d320b2442b49aef62ce
-SIZE (portdowngrade-0.6.tar.bz2) = 84926
diff --git a/ports-mgmt/portdowngrade/pkg-descr b/ports-mgmt/portdowngrade/pkg-descr
deleted file mode 100644
index 94e505406b16..000000000000
--- a/ports-mgmt/portdowngrade/pkg-descr
+++ /dev/null
@@ -1,8 +0,0 @@
-Portdowngrade helps to downgrade FreeBSD ports by analyzing the history
-of commits to the port and presenting the user the list of changes. By
-selecting one, the port can be set back to a previous version easily.
-
-WWW: http://sourceforge.net/projects/portdowngrade/
-
---
-h.eichmann@gmx.de
diff --git a/ports-mgmt/porteasy/Makefile b/ports-mgmt/porteasy/Makefile
deleted file mode 100644
index d12af106037e..000000000000
--- a/ports-mgmt/porteasy/Makefile
+++ /dev/null
@@ -1,36 +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.8.3
-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
-
-.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 6b52c1b30876..000000000000
--- a/ports-mgmt/porteasy/pkg-plist
+++ /dev/null
@@ -1 +0,0 @@
-bin/porteasy
diff --git a/ports-mgmt/porteasy/src/porteasy.8 b/ports-mgmt/porteasy/src/porteasy.8
deleted file mode 100644
index b3fd25241dcf..000000000000
--- a/ports-mgmt/porteasy/src/porteasy.8
+++ /dev/null
@@ -1,356 +0,0 @@
-.\"-
-.\" Copyright (c) 2000-2004 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 31, 2004
-.Dt PORTEASY 8
-.Os
-.Sh NAME
-.Nm porteasy
-.Nd fetch and build ports
-.Sh SYNOPSIS
-.Nm
-.Op Fl AabCceFfhIikLlRSsuVvw
-.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 | Fl D Ns Ar VAR | Fl D Ns Ar VAR Ns = Ns Ar 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 one of the FreeBSD project's anonymous CVS servers.
-Note that this forces the use of
-.Xr ssh 1 ,
-regardless of the
-.Fl R
-and
-.Fl S
-options.
-.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
-Force the use of
-.Xr rsh 1
-to connect to remote CVS repositories.
-By default,
-.Nm
-respects the existing
-.Ev CVS_RSH
-setting.
-This option is ignored when using anoncvs.
-.It Fl r Ar dir
-Specify the location of the CVS repository.
-.It Fl S
-Force the use of
-.Xr ssh 1
-to connect to remote CVS repositories.
-By default,
-.Nm
-respects the existing
-.Ev CVS_RSH
-setting.
-This option is ignored when using anoncvs.
-.It Fl s
-Indicate the installation status of the selected ports.
-Each selected port is listed with a symbol indicating its status:
-.Bl -tag -width 3n
-.It Ql \&!
-Not installed.
-.It Ql " "
-Up-to-date.
-.It Ql \&<
-Older than the version in the ports tree.
-.It Ql \&>
-Newer than the version in the ports tree.
-.El
-.Pp
-If the
-.Fl s
-option is specified and no ports are specified on the command line,
-all installed ports are selected as if the
-.Fl I
-option had been specified.
-.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
-.Fl D Ns Ar VAR ,
-.Fl D Ns Ar VAR Ns = Ns Ar VAL
-or
-.Ar VAR Ns = Ns Ar 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 ports tree infrastructure
-If the
-.Fl u
-option was specified, the root of the ports tree and important
-subdirectories
-.Po
-.Pa Mk ,
-.Pa Templates
-and
-.Pa Tools
-.Pc
-are updated using
-.Xr cvs 1 .
-If possible, an up-to-date index is retrieved from the
-.Fx
-website; otherwise, the version obtained from CVS will be used.
-.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 (except, if the
-.Fl e
-option was specified,
-those that are already installed) 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 sometimes fails to detect
-that 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 selected ports are listed with their status.
-.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 checksum
-target on every selected port.
-This fetches the distfiles and verifies their checksums.
-.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
-.Pp
-The following variables are removed from the environment before any
-work is performed:
-.Ev CLASSPATH ,
-.Ev LD_* ,
-.Ev JAVA_* ,
-.Ev USE_* ,
-.Ev WANT_* .
-.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 ff794e7604b2..000000000000
--- a/ports-mgmt/porteasy/src/porteasy.pl
+++ /dev/null
@@ -1,1365 +0,0 @@
-#!/usr/bin/perl -w
-#-
-# Copyright (c) 2000-2004 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.8.3";
-my $COPYRIGHT = "Copyright (c) 2000-2004 Dag-Erling Smørgrav. " .
- "All rights reserved.";
-
-# Constants
-sub ANONCVS_ROOT { ":ext:anoncvs\@anoncvs.FreeBSD.org:/home/ncvs" }
-sub REQ_EXPLICIT { 1 }
-sub REQ_IMPLICIT { 2 }
-
-sub PATH_BZIP2 { "/usr/bin/bzip2" }
-sub PATH_CVS { "/usr/bin/cvs" }
-sub PATH_FETCH { "/usr/bin/fetch" }
-sub PATH_LDCONFIG { "/sbin/ldconfig" }
-sub PATH_MAKE { "/usr/bin/make" }
-sub PATH_RSH { "/usr/bin/rsh" }
-sub PATH_SSH { "/usr/bin/ssh" }
-
-# Global parameters
-my $dbdir = "/var/db/pkg"; # Package database directory
-my $index = undef; # INDEX file
-my $moved = undef; # MOVED 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 anoncvs1.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 $have_moved; # MOVED 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 %moved; # Ports that have moved
-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", "-T");
- 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 root of the ports tree
-#
-sub update_root() {
-
- 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 root of the ports tree");
- cd($portsdir);
- } else {
- cd($portsdir);
- cvs("update", "-l")
- or bsd::errx(1, "error updating the root of the ports tree");
- }
- if ($packages && ! -d "$portsdir/packages") {
- mkdir("$portsdir/packages", 0777)
- or bsd::errx(1, "error creating the package directory");
- }
- cvs("update", "Mk", "Templates", "Tools")
- or bsd::errx(1, "error updating the ports infrastructure");
- $moved = "$portsdir/MOVED";
-}
-
-#
-# Update the index
-#
-sub update_index() {
-
- my $ifn; # Index file name
-
- cd($portsdir);
- $ifn = capture(\&cmd, ("make", "-VINDEXFILE"));
- if ($update || ! -f $ifn) {
- my $izfn = "$ifn.bz2";
- info("Retrieving $izfn");
- if (!cmd(&PATH_FETCH, $verbose ? "-mv" : "-m",
- "http://www.freebsd.org/ports/$izfn") || ! -f $izfn) {
- bsd::errx(1, "Failed to retrieve index file");
- }
- if (! -f $ifn || (stat($izfn))[9] > (stat($ifn))[9]) {
- info("Decompressing $izfn");
- if (!cmd(&PATH_BZIP2, "-dfk", $izfn)) {
- bsd::errx(1, "Failed to decompress index file");
- }
- }
- }
- $index = "$portsdir/$ifn";
- 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);
- update_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;
-}
-
-#
-# Read the list of moved ports
-#
-sub read_moved() {
-
- local *MOVED; # File handle
- my $line; # Line from file
-
- return if ($have_moved);
- info("Reading $moved");
- sysopen(MOVED, $moved, O_RDONLY)
- or bsd::err(1, "can't open $moved");
- while ($line = <MOVED>) {
- if ($line =~ m/^([\w\/-]+)\|([\w\/-]*)\|([\d-]+)\|(.*)$/) {
- $moved{$1} = [ $2, $3, $4 ];
- }
- }
- $have_moved = 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'");
- my $portre = $port;
- $portre =~ s/([^\w\*\?])/\\$1/g;
- $portre =~ s/\*/\.\*/g;
- $portre =~ s/\?/\./g;
- @suggest = grep(/^$portre/i, keys(%ports));
- if (@suggest == 1 && $suggest[0] =~ m/^$portre[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;
-}
-
-#
-# Find out if a port has moved
-#
-sub find_moved($) {
- my $port = shift; # Port to check
-
- my $date = "1900-01-01";
-
- if (!$have_moved) {
- read_moved();
- }
- while (exists($moved{$port}) && $moved{$port}->[1] gt $date) {
- if (!$moved{$port}->[0]) {
- info("$port was removed" .
- " on $moved{$port}->[1]: $moved{$port}->[2]");
- return undef;
- }
- info("$port was renamed to $moved{$port}->[0]" .
- " on $moved{$port}->[1]: $moved{$port}->[2]");
- ($port, $date) = @{$moved{$port}};
- }
- return $port;
-}
-
-#
-# 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) {
- $realport = find_moved($realport);
- }
- }
- 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) {
- warn("$port has no known origin\n");
- return undef;
- }
- info("$port -> $origin\n");
- $origin = find_moved($origin);
- return $origin;
-}
-
-#
-# Get list of installed ports
-#
-sub get_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");
- $origin = get_origin($port);
- if (!defined($origin) || !$origin) {
- bsd::warnx("$port has no known origin");
- } else {
- if ($installed{$origin}) {
- bsd::warnx("$origin is already installed as " .
- join(', ', @{$installed{$origin}}));
- } else {
- $installed{$origin} = [ ];
- }
- push(@{$installed{$origin}}, $port);
- }
- }
- 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.
- sysopen(FILE, "$portsdir/$port/Makefile", O_RDONLY)
- 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 =~ s/^\$\{PORTSDIR}/..\/../;
- $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 file
-#
-sub find_file($) {
- my $file = shift; # File to find
-
- my $dir; # Directory
-
- if ($file =~ m|^/|) {
- if (-e $file) {
- info("$file is installed");
- return 1;
- }
- return 0;
- }
- foreach $dir (split(/:/, $ENV{'PATH'})) {
- if (-x "$dir/$file") {
- info("$file is installed as $dir/$file");
- 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_file, split(' ', $dependvars));
- }
- return keys(%{$port_dep{$port}});
-}
-
-#
-# Update a batch of port directories
-#
-my %have_updated;
-sub update_ports(@) {
- my @origins = @_;
-
- my %need_update;
-
- foreach my $origin (@origins) {
- my ($category, $port) = split('/', $origin);
- if (!exists($have_updated{$category}) ||
- !exists($have_updated{$category}->{$port})) {
- if (!exists($need_update{$category})) {
- $need_update{$category} = { };
- }
- $need_update{$category}->{$port} = 1;
- }
- }
- if (keys(%need_update)) {
- cd($portsdir);
- cvs("update", "-l", keys(%need_update))
- or bsd::errx(1, "error updating categories");
- foreach my $category (keys(%need_update)) {
- if (!exists($have_updated{$category})) {
- $have_updated{$category} = { };
- }
- cd("$portsdir/$category");
- cvs("update", keys(%{$need_update{$category}}))
- or bsd::errx(1, "error updating $category ports");
- foreach my $port (keys(%{$need_update{$category}})) {
- $have_updated{$category}->{$port} = 1;
- }
- }
- }
-}
-
-#
-# Update all necessary files to build the specified ports
-#
-sub update_ports_tree(@) {
- my @ports = @_; # Ports to update
-
- my @more_ports; # Additional ports to update
- my %processed; # Hash of processed ports
- my $n; # Pass count
-
- @more_ports = @ports;
- @ports = ();
- for ($n = 0; ; ++$n) {
- my $item; # Iterator
- my $master; # Master port
- my $dependency; # Dependency
-
- setproctitle("updating");
-
- if (@more_ports) {
- info("Ports added since previous pass:", join(' ', @more_ports));
- update_ports(@more_ports);
- push(@ports, @more_ports);
- @more_ports = ();
- }
- info("Pass $n:", @ports - keys(%processed));
- info("Ports:", sort(@ports));
- info("Processed:", sort(keys(%processed)));
- last if (keys(%processed) == @ports);
-
- # Process all unprocessed ports we know of so far
- foreach my $port (@ports) {
- next if ($processed{$port});
- if (! -f "$portsdir/$port/Makefile") {
- bsd::warnx("$port does not exist in $portsdir");
- $pkgname{$port} = $installed{$port}->[0] || "";
- $processed{$port} = 1;
- next;
- }
- setproctitle("updating $port");
-
- # See if the port has an unprocessed master port
- if (($master = find_master($port)) && !$processed{$master}) {
- info("$port has unprocessed master: $master");
- update_ports($master);
- }
-
- # Find the port's package name
- if (!exists($pkgname{$port})) {
- my $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});
- add_port($dependency, &REQ_IMPLICIT);
- info("Adding $dependency to back of line");
- push(@more_ports, $dependency)
- unless(grep({ $_ eq $dependency } (@ports, @more_ports)));
- }
-
- # Mark port as processed
- info("marking $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 %plist_sub; # Substitution list
- my $prefix; # Prefix
-
- foreach (split(' ', capture(\&make, ($port, "-VPLIST_SUB")))) {
- next unless m/^(\w+)=\"?(.*?)\"?$/;
- $plist_sub{$1} = $2;
- }
- $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();
- s/\%\%(\w+)\%\%/$plist_sub{$1}/g;
- $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; # Newest version
-
- # Shortcut
- if ($inst eq $port) {
- return '=';
- }
-
- # Compare port epochs
- my ($inst_epoch, $port_epoch) = (0, 0);
- $inst =~ s/,(\d+)$//
- and $inst_epoch = $1;
- $port =~ s/,(\d+)$//
- and $port_epoch = $1;
- if ($inst_epoch != $port_epoch) {
- return ($inst_epoch > $port_epoch) ? '>' : '<';
- }
-
- # Split it into components
- my @a = split(/[\._-]/, $inst);
- my @b = split(/[\._-]/, $port);
-
- # 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 '=';
-}
-
-#
-# Show port status
-#
-sub show_port_status($) {
- my $port = shift; # Port to show status for
-
- my $cmp; # Comparator
-
- if ($installed{$port}) {
- foreach my $pkg (@{$installed{$port}}) {
- if (-d "$portsdir/$port") {
- $cmp = cmp_version($pkg, $pkgname{$port});
- } else {
- $cmp = '?';
- }
- if ($cmp eq '=') {
- print(" $pkg\n");
- } else {
- printf(" $cmp $pkg ($pkgname{$port})\n");
- }
- }
- } else {
- printf(" ! $port\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, "checksum")
- 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");
- if (!make($port, @makeargs)) {
- 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
- -R, --use-rsh Force use of rsh for cvs :ext: method
- -S, --use-ssh Force use of ssh for cvs :ext: method
- -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|use-rsh" => sub { $ENV{'CVS_RSH'} = &PATH_RSH },
- "r|cvsroot=s" => \$cvsroot,
- "S|use-ssh" => sub { $ENV{'CVS_RSH'} = &PATH_SSH },
- "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 && !$installed &&
- ($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;
- }
-
- # Set and check CVS root
- if ($anoncvs && !$cvsroot) {
- $ENV{'CVS_RSH'} = &PATH_SSH;
- $cvsroot = &ANONCVS_ROOT;
- }
- 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");
- }
-
- # Unset potentially troublesom environment variables
- foreach my $var (sort(keys(%ENV))) {
- if ($var =~ m/^(CLASSPATH|(LD|USE|JAVA|WANT)_\w+)$/) {
- bsd::warnx("Removing $var from environment");
- delete($ENV{$var});
- }
- }
-
- # Step 1: update the ports tree infrastructure
- $release = `uname -r`;
- update_root();
-
- # Step 2: build list of explicitly required ports
- foreach my $arg (@ARGV) {
- if ($arg =~ m/^(?:-D)?([A-Z0-9_]+)=(.*)$/) {
- $ENV{$1} = $2;
- } elsif ($arg =~ m/^-D([A-Z0-9_]+)$/) {
- $ENV{$1} = '';
- } else {
- $err += add_port($arg, &REQ_EXPLICIT);
- ++$requested;
- }
- }
- if ($err) {
- bsd::errx(1, "some required ports were not found.");
- }
- if ($installed || $status || $exclude) {
- get_installed();
- }
- if ($installed || ($status && $requested == 0)) {
- foreach $port (keys(%installed)) {
- add_port($port, &REQ_EXPLICIT);
- }
- }
-
- # 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 (defined($installed{$port})) {
- info("$port is already installed");
- delete $reqd{$port};
- }
- }
- }
-
- # Step 5: list selected ports
- if ($list) {
- foreach $port (sort(keys(%reqd))) {
- print((($reqd{$port} & &REQ_EXPLICIT) ? " * " : " "),
- "$port ($pkgname{$port})\n");
- }
- }
-
- # Step 6: list installed ports
- if ($status) {
- foreach $port (sort({ $pkgname{$a} cmp $pkgname{$b} } keys(%reqd))) {
- show_port_status($port);
- }
- }
-
- # 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)) {
- 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 c948a5a378ad..000000000000
--- a/ports-mgmt/portell/Makefile
+++ /dev/null
@@ -1,49 +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.2
-PORTREVISION= 1
-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
-NO_BUILD= YES
-
-PLIST_FILES= bin/portell
-PORTDOCS= README.txt
-
-post-extract:
- ${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//' ${WRKSRC}/portell.py
- ${REINPLACE_CMD} -e 's/free/freebsd/' ${WRKSRC}/portell.py
- ${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 0460852a21bb..000000000000
--- a/ports-mgmt/portell/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (portell-0.2.zip) = 0473f21d5b1884b40cb2eab183c210ef
-SIZE (portell-0.2.zip) = 1780
diff --git a/ports-mgmt/portell/files/patch-portell.py b/ports-mgmt/portell/files/patch-portell.py
deleted file mode 100644
index 51177d7a848b..000000000000
--- a/ports-mgmt/portell/files/patch-portell.py
+++ /dev/null
@@ -1,26 +0,0 @@
-
-$FreeBSD$
-
---- portell.py.orig
-+++ portell.py
-@@ -14,12 +14,16 @@
- PORTELL_DB = "/var/db/portell.db"
-
- PORTS_DIR = "/usr/ports/"
--
-+IGNORE_DIRS = { "distfiles":None, "Tools":None, "packages":None }
-
- def write_pathname(d, dirname, names):
-- '/'.join(dirname.split('/')[:5]) # chop port path subdirs
-- d[os.path.basename(dirname)] = dirname
--
-+ dirs=dirname.split('/')
-+ if len(dirs)==4:
-+ if IGNORE_DIRS.has_key(dirs[3]):
-+ del names[:]
-+ elif len(dirs)==5:
-+ d[dirs[4]] = dirname
-+ del names[:]
-
- def update_db(msg):
- print msg
diff --git a/ports-mgmt/portell/pkg-descr b/ports-mgmt/portell/pkg-descr
deleted file mode 100644
index 6fb8b68df0cc..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
-given 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/portlint/Makefile b/ports-mgmt/portlint/Makefile
deleted file mode 100644
index 13486ebdd772..000000000000
--- a/ports-mgmt/portlint/Makefile
+++ /dev/null
@@ -1,46 +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.7.2
-PORTREVISION= 1
-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_RUN= 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 eb6ae80c5f63..000000000000
--- a/ports-mgmt/portlint/pkg-descr
+++ /dev/null
@@ -1,15 +0,0 @@
-portlint makes a small set of sanity checks for port directory.
-
-usage: portlint.pl [-AabCchvtN] [-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 committer mode
- -C pedantic committer mode (equivalent to -abct)
- -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: 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 b97dc00aebe1..000000000000
--- a/ports-mgmt/portlint/src/portlint.1
+++ /dev/null
@@ -1,169 +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 directories
-.Sh SYNOPSIS
-.Nm portlint
-.Op Fl abchvtACNV
-.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
-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
-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 A
-Turn on all additional checks.
-.It Fl C
-Pedantic committer flag. This is equivalent to
-.Fl abct .
-.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 ENVIRONMENT
-The following environment variables affect the execution of
-.Nm :
-.Bl -tag -width ".Ev PL_CVS_IGNORE"
-.It Ev PL_CVS_IGNORE
-Set to a Perl-compatible regular expression, of patterns
-to ignore when checking to see if files are in the CVS
-repository. For example,
-.Li '^\ed+$|^pr-patch$' .
-.It Ev PORTSDIR
-The fully-qualified path to the ports tree.
-For example,
-.Dq Li /usr/ports .
-.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 have 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 6f533a254a37..000000000000
--- a/ports-mgmt/portlint/src/portlint.pl
+++ /dev/null
@@ -1,2640 +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$
-# $MCom: portlint/portlint.pl,v 1.79 2005/07/03 04:49:07 marcus Exp $
-#
-
-use vars qw/ $opt_a $opt_A $opt_b $opt_C $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 = 7;
-my $micro = 2;
-
-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 [-AabCchvtN] [-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 committer mode
- -C pedantic committer mode (equivalent to -abct)
- -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 DISTVERSIONPREFIX DISTVERSION DISTVERSIONSUFFIX
- 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 USE_LIBTOOL_VER
- INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PKGINSTALLVER
- PLIST_FILES OPTIONS INSTALLS_OMF
-);
-
-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
-my $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{qw(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 (/[^-.a-zA-Z0-9_\+]/) {
- &perror("Warning: $fullname: only use characters ".
- "[-_.a-zA-Z0-9+] for patch or script names.");
- } 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 (/README.html/) {
- &perror("FATAL: $fullname: for safety, be sure to cleanup ".
- "README.html 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.")
- unless (eval { /$ENV{'PL_CVS_IGNORE'}/, 1 } &&
- /$ENV{'PL_CVS_IGNORE'}/);
- }
- 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) {
- &perror("WARN: $file: add \"WWW: UR:\" for this port if possible");
- }
-
- 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($inforemoveseen, $infoinstallseen, $infoseen) = (0, 0, 0);
- my($infobeforeremove, $infoafterinstall) = (0, 0);
- my($infooverwrite) = (0);
- my($rcsidseen) = (0);
-
- my(@exec_info) = ();
- my(@unexec_info) = ();
- my(@infofile) = ();
-
- my $seen_dirrm_docsdir;
-
- 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\%\%.");
- }
- $seen_dirrm_docsdir++ if /^(\%\%PORTDOCS\%\%)?\@dirrm\s+\%\%DOCSDIR\%\%/ || /^(\%\%PORTDOCS\%\%)?\@unexec\s+(\/bin\/)?rmdir\s+\%D\/\%\%DOCSDIR\%\%\s+2\>\s*\/dev\/null\s+\|\|\s+(\/usr\/bin\/)?true/;
- 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 (!$autoinfo && $_ =~ /^\@exec[ \t]+install-info\s+(.+)\s+(.+)$/) {
- $infoinstallseen = $.;
- push(@exec_info, $1);
- } 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.");
- }
- if (/scrollkeeper/) {
- &perror("WARN: $file [$.]: possible ".
- "direct use of scrollkeeper commands ".
- "in PLIST found. Use ".
- "INSTALLS_OMF instead ".
- "(see http://www.FreeBSD.org/gnome/docs/porting.html ".
- "for more details).");
- }
- } elsif ($_ =~ /^\@(comment)/) {
- $rcsidseen++ if (/\$$rcsidstr[:\$]/);
- } elsif ($_ =~ /^\@(owner|group|mode)\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 ($_ =~ /charset\.alias$/ || $_ =~ /locale\.alias$/) {
- &perror("WARN: $file [$.]: installing charset.alias or locale.alias, ".
- "please add USE_GETTEXT=yes and use libintl from devel/gettext ".
- "instead of from outdated bundled one if possible. ".
- "See http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/71531 ".
- "for more details.");
- }
-
- if ($_ =~ /\.la$/ && $makevar{USE_LIBTOOL_VER} eq '') {
- &perror("WARN: $file [$.]: installing libtool archives, ".
- "please use USE_LIBTOOL_VER in Makefile if possible. ".
- "See http://www.FreeBSD.org/gnome/docs/porting.html ".
- "for a way to completely eliminate .la files.");
- }
-
- if ($_ =~ /\%gconf.*\.xml/ || $_ =~ /gconf.*\.schemas?/) {
- &perror("FATAL: $file [$.]: explicitly listing \%gconf key files ".
- "or GConf schema files in the plist is not supported. ".
- "Use GCONF_SCHEMAS in the Makefile instead. ".
- "See http://www.FreeBSD.org/gnome/docs/porting.html ".
- "for more details.");
- }
-
- if ($_ =~ m|lib/pkgconfig/[^\.]+.pc$|) {
- &perror("FATAL: $file [$.]: installing pkg-config files into ".
- "lib/pkgconfig. All pkg-config files must be installed ".
- "into libdata/pkgconfig for them to be found by pkg-config.");
- }
-
- if ($_ =~ m|^lib/lib[^\/]+\.so(\.\d+)?$| &&
- $makevar{INSTALLS_SHLIB} eq '') {
- &perror("WARN: $file [$.]: installing shared libraries, ".
- "please define INSTALLS_SHLIB as appropriate");
- }
-
- if ($_ =~ m|\.omf$| && $makevar{INSTALLS_OMF} eq '') {
- &perror("WARN: $file [$.]: installing OMF files, ".
- "please define INSTALLS_OMF (see the FreeBSD GNOME ".
- "porting guide at ".
- "http://www.FreeBSD.org/gnome/docs/porting.html ".
- "for more details)");
- }
-
- 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 (!$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");
- }
-
- {
- my $tmpportname = quotemeta($makevar{PORTNAME});
- if ($_ =~ /^share\/$tmpportname\//) {
- &perror("WARN: $file [$.]: consider using DATADIR 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++;
- }
- }
-
- if ($sharedocused && !$seen_dirrm_docsdir) {
- &perror("WARN: $file: Both ``\%\%PORTDOCS\%\%\@dirrm \%\%DOCSDIR\%\%'' and ``\%\%PORTDOCS\%\%\@unexec \%D/\%\%DOCSDIR\%\% 2>/dev/null || true'' are missing. At least one should be used.");
- }
-
- 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)) {
- close(IN);
- return 1;
- }
-
- 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-Z][A-Za-z0-9]+)(:[^\n]+)?\$/) {
- my $lineno = &linenumber($`);
- &perror("WARN: $file [$lineno]: includes possible RCS tag \"\$$1\$\". ".
- "use binary mode (-ko) on commit/import.") unless
- $1 eq $rcsidstr;
- }
-
- if ($committer && $whole =~ /\wjavavm\w/) {
- my $lineno = &linenumber($`);
- &perror("WARN: $file [$lineno]: since javavmwrapper 2.0, the ".
- "``javavm'' command to invoke a JVM is deprecated. Use ".
- "``java'' instead");
- }
-
- 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, $distversionprefix, $distversion, $distversionsuffix, $distname, $extractsufx) = ('', '', '', '', '');
- my $masterport = 0;
- my $slaveport = 0;
- my $use_gnome_hack = 0;
- my $use_java = 0;
- my $use_ant = 0;
- my($realwrksrc, $wrksrc, $nowrksubdir) = ('', '', '');
- my(@mman, @pman);
- my(@mopt, @oopt);
- my($pkg_version, $versiondir, $versionfile) = ('', '', '');
- my $useindex = 0;
- my %deprecated = ();
- my %autocmdnames = ();
- my $pre_mk_line = 0;
-
- 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 of .elseif
- #
- print "OK: checking for use of .elseif.\n" if ($verbose);
- if ($whole =~ /^\.\s*elseif/m) {
- my $lineno = &linenumber($`);
- &perror("FATAL: $file [$lineno]: use of .elseif is not supported ".
- "in all versions of FreeBSD. Use .elif instead.");
- }
-
- #
- # whole file: PLIST_FILES and PLIST_DIRS
- #
- print "OK: checking PLIST_FILES and PLIST_DIRS.\n" if ($verbose);
- if ($whole =~ /\nPLIST_FILES.?=/ || $whole =~ /\nPLIST_DIRS.?=/) {
- if (-f 'pkg-plist') {
- my $lineno = &linenumber($`);
- &perror("WARN: $file [$lineno]: You may remove pkg-plist ".
- "if you use PLIST_FILES and/or PLIST_DIRS.");
- }
- my @plist_files = split(/\s+/, $makevar{PLIST_FILES});
- foreach my $plist_file (@plist_files) {
- if ($plist_file =~ m|^lib/lib[^\/]+\.so(\.\d+)?$| &&
- $makevar{INSTALLS_SHLIB} eq '') {
- &perror("WARN: PLIST_FILES: installing shared libraries, ".
- "please define INSTALLS_SHLIB as appropriate");
- last;
- }
- }
- foreach my $plist_file (@plist_files) {
- if ($plist_file =~ m|\.omf$| && $makevar{INSTALLS_OMF} eq '') {
- &perror("WARN: PLIST_FILES: installing OMF files, ".
- "please define INSTALLS_OMF (see the FreeBSD GNOME ".
- "porting guide at ".
- "http://www.FreeBSD.org/gnome/docs/porting.html ".
- "for more details)");
- last;
- }
- }
-
- }
-
- #
- # whole file: USE_* used too late
- #
- pos($whole) = 0;
- if ($whole =~ /^\.include\s+<bsd\.port\.pre\.mk>$/gm) {
- # Remember position
- $pre_mk_line = &linenumber($`) + 1;
- print "OK: checking for USE_* used too late.\n" if ($verbose);
- my @use_early = qw(
- APACHE
- BZIP2
- GNUSTEP
- IMAKE
- JAVA
- KDE(?:BASE|LIBS)_VER
- (?:LIB)?RUBY
- LINUX_PREFIX
- OPENSSL
- PHP
- PYTHON
- QT2?
- QT_VER
- X_PREFIX
- ZIP
- );
-
- my @other_early = qw(
- EMACS_PORT_NAME
- OPTIONS
- );
-
- 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: check OPTIONS
- #
- pos($whole) = 0;
- print "OK: checking OPTIONS.\n" if ($verbose);
- @oopt = ($makevar{OPTIONS} =~ /(\w+)\s+\".*?\"\s+\w+/sg);
- while ($whole =~ /\n[^#\n]*?\(?\s*WITH(?:OUT)?_(\w+)\s*\)?/mg) {
- push @mopt, $1;
- my $lineno = &linenumber($`) + 1;
- &perror("FATAL: $file [$lineno]: option WITH(OUT)_$1 is used before ".
- "including bsd.port.pre.mk.")
- if (scalar(@oopt) && $lineno < $pre_mk_line);
- }
- foreach my $i (@oopt) {
- if (!grep(/^$i$/, @mopt)) {
- &perror("WARN: $file: $i is listed in OPTIONS, ".
- "but neither WITH_$i nor WITHOUT_$i appears.");
- }
- }
- foreach my $i (@mopt) {
- next if ($i eq 'NLS'); # skip WITHOUT_NLS
- if (!grep(/^$i$/, @oopt)) {
- # XXX: disable temporarily.
- # OPTIONS is still "in flux"
- #&perror("WARN: $file: WITH_$i or WITHOUT_$i appears, ".
- # "consider using OPTIONS macro.");
- }
- }
-
- #
- # 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: USE_SIZE
- #
- print "OK: checking USE_SIZE.\n" if ($verbose);
- if ($whole =~ /\nUSE_SIZE/) {
- my $lineno = &linenumber($`);
- &perror("WARN: $file [$lineno]: use of USE_SIZE is no longer ".
- "required.");
- }
-
- #
- # whole file: MACHINE_ARCH
- #
- print "OK: checking MACHINE_ARCH.\n" if ($verbose);
- if ($whole =~ /\nMACHINE_ARCH/) {
- my $lineno = &linenumber($`);
- &perror("FATAL: $file [$lineno]: MACHINE_ARCH should never be ".
- "overridden.");
- }
-
- #
- # whole file: BROKEN
- #
- print "OK: checking BROKEN.\n" if ($verbose);
- if ($whole =~ /\nBROKEN[+?]?=[ \t][^"]+\w+/) {
- my $lineno = &linenumber($`);
- &perror("WARN: $file [$lineno]: BROKEN messages should be ".
- "quoted.");
- }
-
- #
- # whole file: IGNORE
- #
- print "OK: checking IGNORE.\n" if ($verbose);
- if ($whole =~ /\nIGNORE[+?]?=[ \t]+"/) {
- my $lineno = &linenumber($`);
- &perror("WARN: $file [$lineno]: IGNORE messages should not ".
- "be quoted.");
- }
-
- #
- # 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: check for USE_GETTEXT
- #
- print "OK: checking for USE_GETTEXT without WITHOUT_NLS.\n" if ($verbose);
- if ($whole =~ /\nUSE_GETTEXT/ && $whole !~ /def(?:ined)?\s*\(?WITHOUT_NLS\)?/) {
- &perror("WARN: $file: Consider adding support for a WITHOUT_NLS ".
- "knob to conditionally disable gettext support.");
- }
-
- #
- # whole file: check for deprecated commands
- #
- print "OK: checking for deprecated macros.\n" if $verbose;
- %deprecated = (
- USE_LIBTOOL => 'USE_LIBTOOL_VER',
- USE_AUTOCONF => 'USE_AUTOHEADER_VER',
- USE_AUTOMAKE => 'USE_AUTOMAKE_VER',
- WANT_LIBTOOL => 'WANT_LIBTOOL_VER',
- WANT_AUTOCONF => 'WANT_AUTOCONF_VER',
- WANT_AUTOMAKE => 'WANT_AUTOMAKE_VER',
- USE_MESA => 'USE_GL',
- );
-
- for my $depmacro (keys %deprecated) {
- if ($whole =~ /\n($depmacro)[+?:!]?=/) {
- &perror("FATAL: $file: $depmacro is ".
- "deprecated, use $deprecated{$1} instead");
- }
- }
-
- if ($whole =~ /\n(_USE_BSD_JAVA_MK_1_0)[+?:!]?=/) {
- &perror("WARN: $file: This port uses bsd.java.mk 1.0 syntax. ".
- "You should consider updating it to 2.0 syntax. ".
- "Please refer to the Porter's Handbook for further ".
- "information");
- }
-
- #
- # 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 brandelf cat chmod chown cp cpio dialog dirname egrep expr
-false file find gmake grep gzcat ldconfig ln md5 mkdir mv objcopy paste patch
-pax perl printf rm rmdir ruby sed sh sort touch tr which xargs xmkmf
- )) {
- $cmdnames{$i} = "\$\{\U$i\E\}";
- }
- $cmdnames{'echo'} = '${ECHO_CMD} or ${ECHO_MSG}';
- $cmdnames{'env'} = '${SETENV}';
- $cmdnames{'gunzip'} = '${GUNZIP_CMD}';
- $cmdnames{'gzip'} = '${GZIP_CMD}';
- $cmdnames{'install'} = '${INSTALL_foobaa}';
- $cmdnames{'python'} = '${PYTHON_CMD}';
- $cmdnames{'strip'} = '${STRIP_CMD}';
- $cmdnames{'unzip'} = '${UNZIP_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; #"
- # ignore variables names in .for loops, but not what's at the end
- # of the for loop
- $j =~ s/(\.for +)([^ ]*)( .*)/$1$3/;
- 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(?:$|\s)/
- && $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 !~ /^MAINTAINER(.)?=[^\n]+$i/m
- && $curline !~ /^CATEGORIES(.)?=[^\n]+$i/m
- && $curline !~ /^#.+$/m
- && $curline !~ /\-\-$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 !~ /^MAINTAINER(.)?=[^\n]+($i\d*)/m
- && $lm !~ /^CATEGORIES(.)?=[^\n]+($i\d*)/m
- && $lm !~ /^#.+$/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");
- }
- }
- }
-
- #
- # while file: check for use of paths that have macro replacements
- #
- my %pathnames = ();
- print "OK: checking for paths that have macro replacements.\n"
- if ($verbose);
- $pathnames{'${PREFIX}/share/java/classes'} = 'JAVADIR';
- $pathnames{'${PREFIX}/share/java'} = 'JAVASHAREDIR';
- foreach my $i (keys %pathnames) {
- my $lineno = &linenumber($`);
- if ($j =~ m|$i|gm) {
- &perror("FATAL: $file [$lineno]: you should use ".
- "$pathnames{$i} rather than $i");
- }
- }
-
- #
- # 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: ${MACHINE_ARCH}
- #
- if ($j =~ /\${MACHINE_ARCH}\s*[!=]=/) {
- my $lineno = &linenumber($`);
- &perror("FATAL: $file [$lineno]: MACHINE_ARCH should never be tested ".
- "directly; use ARCH instead.");
- }
-
- #
- # 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: USE_JAVA check
- #
- if ($whole =~ /^USE_JAVA[?:]?=\s*(.*)$/m) {
- $use_java = 1;
- }
-
- #
- # whole file: USE_ANT check
- #
- if ($whole =~ /^USE_ANT[?:]?=\s*(.*)$/m) {
- $use_ant = 1;
- }
-
- #
- # whole file: USE_JAVA not defined, but other Java components are requested
- #
- if (!$use_java && ($use_ant || $whole =~ /^JAVA_VERSION[?:]?=\s*(.*)$/m ||
- $whole =~ /^JAVA_OS[?:]?=\s*(.*)$/m ||
- $whole =~ /^JAVA_VENDOR[?:]?=\s*(.*)$/m ||
- $whole =~ /^JAVA_RUN[?:]?=\s*(.*)$/m ||
- $whole =~ /^JAVA_BUILD[?:]?=\s*(.*)$/m ||
- $whole =~ /^USE_JIKES[?:]?=\s*(.*)$/m)) {
- &perror("FATAL: $file: the port uses Java features, but USE_JAVA ".
- "is not defined");
- }
-
- #
- # whole file: check for USE_ANT and USE_GMAKE both defined
- #
- if ($use_ant && $whole =~ /^USE_GMAKE[?:]?=\s*(.*)$/m) {
- &perror("WARN: $file: a port shall not define both USE_ANT ".
- "and USE_GMAKE");
- }
-
- #
- # whole file: check for JAVA_BUILD and NO_BUILD
- #
- if ($whole =~ /^NO_BUILD[?:]?=\s*(.*)$/m &&
- $whole =~ /^JAVA_BUILD[?:]?=\s*(.*)$/m) {
- &perror("FATAL: $file: JAVA_BUILD and NO_BUILD cannot be set ".
- "at the same time");
- }
-
- #
- # 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 =~ /^\.\s*include\s*[<"]bsd\.port(?:\.post)?\.mk[">]/m) {
- &perror("FATAL: $file: supposedly non-slave port with".
- " .CURDIR != MASTERDIR");
- } elsif ($whole =~ /^\.\s*include\s*[<"]bsd\.port\.pre\.mk[">]/m) {
- &perror("FATAL: $file: slave ports may not include".
- " bsd.port.pre.mk");
- }
- if ($whole !~ /\n\.include\s+"\$\{MASTERDIR\}\/Makefile"\s*$/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");
- }
- if ($whole !~ /^MASTERDIR=\s*\$\{\.CURDIR\}(?:\/\.\.){1,2}(?:\/[\w\@.+-]+){1,2}\s*$/m) {
- &perror("WARN: $file: slave ports must define MASTERDIR=".
- '${.CURDIR}/..(/../<category>)/<port>');
- }
- } else {
- #$slaveport = 0;
- print "OK: non-slave port detected, checking for anything after bsd.port(.post).mk.\n"
- if ($verbose);
- if ($whole !~ /\n\.include\s+<bsd\.port(?:\.post)?\.mk>\s*$/s) {
- &perror("FATAL: $file: the last line of Makefile has to be".
- ' .include <bsd.port(.post).mk>');
- }
- if ($whole =~ /^MASTERDIR\s*[+?:!]?\s*=/m) {
- &perror("WARN: $file: non-slave ports may not define 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 DISTVERSIONPREFIX DISTVERSION DISTVERSIONSUFFIX
-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/DISTVERSION.\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 !~ /\n(PORTVERSION|DISTVERSION)(.)?=/) {
- &perror("FATAL: $file: PORTVERSION or DISTVERSION has to be there.") unless ($slaveport && ($makevar{PORTVERSION} ne '' || $makevar{DISTVERSION} ne ''));
- } elsif ($2 ne '') {
- &perror("WARN: $file: unless this is a master port, PORTVERSION has to be set by \"=\", ".
- "not by \"$2=\".") unless ($masterport);
- }
- if ($tmp =~ /\nPORTVERSION.?=/ && $tmp =~ /\nDISTVERSION.?=/) {
- &perror("FATAL: $file: either PORTVERSION or DISTVERSION must be ".
- "specified, not both.");
- }
- 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 ($use_java && !grep /^java$/, @cat) {
- &perror("WARN: $file: the port uses Java but is not part of the ".
- "``java'' category");
- }
-
- if (scalar(@cat) == 1 && $cat[0] eq "java") {
- &perror("FATAL: $file: the ``java'' category shall not be the only ".
- "one for a port");
- }
-
- if ($newport && scalar(@cat) > 0 && $cat[0] eq "java") {
- &perror("WARN: $file: save for ports directly related to the Java ".
- "language, porters are encouraged not to use ``java'' as ".
- "the main category for a port");
- }
-
- if ($committer && $makevar{'.CURDIR'} =~ m'${portsdir}/([^/]+)/[^/]+/?$') {
- 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};
- $distversionprefix = $makevar{DISTVERSIONPREFIX};
- $distversion = $makevar{DISTVERSION};
- $distversionsuffix = $makevar{DISTVERSIONSUFFIX};
- $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/DISTVERSIONPREFIX/DISTVERSION/DISTVERSIONSUFFIX.\n" if ($verbose);
- if ($distname ne '') {
- if ($distname eq "$portname-$portversion") {
- &perror("WARN: $file: DISTNAME is \${PORTNAME}-\${PORTVERSION} by ".
- "default, you don't need to define DISTNAME.");
- } else {
- if ($distname eq "$portname-$distversionprefix$distversion$distversionsuffix") {
- &perror("WARN: $file: DISTNAME is \${PORTNAME}-\${DISTVERSIONPREFIX}\${DISTVERSION}\${DISTVERSIONSUFFIX} by ".
- "default, you don't need to define DISTNAME.");
- }
- }
- if ($distname =~ /PORTREVISION/) {
- &perror("FATAL: $file: DISTNAME contains a reference to ".
- "PORTREVISION. You should only be using PORTVERSION");
- }
- if ($distname =~ /PORTEPOCH/) {
- &perror("FATAL: $file: DISTNAME contains a reference to ".
- "PORTEPOCH. You should only be using PORTVERSION");
- }
- }
- if ($portname =~ /^$re_lang_short/) {
- &perror("FATAL: $file: language prefix is automatically".
- " set by PKGNAMEPREFIX.".
- " you must remove it from PORTNAME.");
- }
- if ($portname =~ /([|<>=! ])/) {
- &perror("FATAL: $file: PORTNAME contains the illegal character \"$1\".".
- " You should modify \"$portname\".");
- } elsif ($portname =~ /\$[\{\(].+[\}\)]/) {
- &perror("WARN: $file: using variable in PORTNAME.".
- " consider using PKGNAMEPREFIX and/or PKGNAMESUFFIX.");
- } elsif ($portname =~ /([^\w._@+-])/) {
- &perror("WARN: $file: using \"$1\" in PORTNAME.".
- " You should modify \"$portname\".");
- } elsif ($portname =~ /-/ && $distname ne '') {
- &perror("WARN: $file: using hyphen in PORTNAME.".
- " consider using PKGNAMEPREFIX and/or PKGNAMESUFFIX.");
- }
- if ($portversion eq '' && $distversion eq '') {
- &perror("FATAL: $file: either PORTVERSION or DISTVERSION 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 must not contain \"$1\". ".
- "You should modify \"$portversion\".");
- } else {
- &perror("FATAL: $file: PORTVERSION looks illegal. ".
- "You should modify \"$portversion\".");
-
- }
-
- $pkg_version = $makevar{PKG_VERSION};
-
- if ($makevar{CONFLICTS}) {
- print "OK: checking CONFLICTS.\n" if ($verbose);
- foreach my $conflict (split ' ', $makevar{CONFLICTS}) {
- my $selfconflict;
- if ($makevar{PKGINSTALLVER} >= 20040125) {
- $selfconflict = !system($pkg_version, '-T',
- $makevar{PKGNAME}, $conflict);
- } else {
- my $conflictre = $conflict;
- $conflictre =~ s/[.+]/\\$&/g;
- $conflictre =~ s/\*/.*/g;
- $conflictre =~ s/\?/./g;
- $conflictre =~ s/\[!/[^/g;
- $selfconflict = ($makevar{PKGNAME} =~ /^$conflictre$/);
- }
- if ($conflict !~ /(?:[<>=]|[]?*]$)/) {
- &perror("WARN: Conflict \"$conflict\" specified too narrow. ".
- "You should end it with a wildcard (-[0-9]*).");
- } elsif ($conflict !~ /[<>=-][^-]*[0-9][^-]*$/) {
- &perror("WARN: Conflict \"$conflict\" specified too broad. ".
- "You should end it with a version number fragment (-[0-9]*).");
- }
- if ($selfconflict) {
- &perror("FATAL: Package conflicts with itself. ".
- "You should remove \"$conflict\" from CONFLICTS.");
- }
- }
- }
-
- $versiondir = $ENV{VERSIONDIR} ? $ENV{VERSIONDIR} : '/var/db/chkversion';
-
- $versionfile = "$versiondir/VERSIONS";
- $useindex = !-r "$versionfile";
-
- $versionfile = "$portsdir/$makevar{INDEXFILE}"
- if $useindex;
-
- if (-r "$versionfile") {
- print "OK: checking if PORTVERSION is going backwards.\n" if ($verbose);
- open VERSIONS, "<$versionfile";
-
- while (<VERSIONS>) {
- my($origin, $version) = ('', '');
- chomp;
- next if /^(#|$)/;
- if ($useindex) {
- ($version, $origin) = split /\|/;
- $origin =~ s,^.*/([^/]+/[^/]+)/?$,$1,;
- } else {
- ($origin, $version) = split;
- }
- if ($origin eq $makevar{PKGORIGIN}) {
- my $newversion = $makevar{PKGNAME};
- my $oldversion = $version;
- my $result = '';
-
- $newversion =~ s/^.*-//;
- $oldversion =~ s/^.*-//;
-
- $result = `$pkg_version -t '$newversion' '$oldversion'`;
- chomp $result;
- if ($result eq '<') {
- &perror("FATAL: $file: $makevar{PKGNAME} < $version. ".
- "Choose another PORTVERSION or bump PORTEPOCH.");
- # $backwards{$origin} = "$pkgname{$origin} < $version";
- }
- last;
- }
- }
- close VERSIONS;
- }
-
- # 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_ICONV
- if ($m{'dep'} =~ /^(iconv\.\d+)$/) {
- &perror("WARN: $file: dependency to $1 ".
- "listed in $j. consider using ".
- "USE_ICONV.");
- }
-
- # check USE_GETTEXT
- if ($m{'dep'} =~ /^(intl\.\d+)$/) {
- &perror("WARN: $file: dependency to $1 ".
- "listed in $j. consider using ".
- "USE_GETTEXT.");
- }
-
- # 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 LIBLTDL
- if ($m{'dep'} =~ /^(ltdl\.\d)+$/) {
- &perror("WARN: $file: dependency to $1 ".
- "listed in $j. consider using ".
- "USE_LIBLTDL.");
- }
-
- # check JAVALIBDIR
- if ($m{'dep'} =~ m|share/java/classes|) {
- &perror("FATAL: $file: you should use \${JAVALIBDIR} ".
- "in BUILD_DEPENDS/RUN_DEPENDS to define ".
- "dependencies on JAR files installed in ".
- "\${JAVAJARDIR}");
- }
-
- # 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);
- }
- if ($tmp =~ /PERL_CONFIGURE=\s*/
- && $tmp =~ /MAN3PREFIX=\s*\${PREFIX}\/lib\/perl5\/\${PERL_VERSION}/) {
- &perror("WARN: $file: MAN3PREFIX is ".
- "\"\${PREFIX}/lib/perl5/\${PERL_VERSION}\" ".
- "when PERL_CONFIGURE is set. You do not need to specify it.");
- }
- 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.");
- }
-
- if ($tmp =~ /^do-build:/m && $use_ant) {
- &perror("FATAL: $file: USE_ANT is intended only for ports that ".
- "build with Ant. You should not override ``do-build'' when ".
- "defining USE_ANT");
- }
-
- 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);
-
- # trim all trailing backslash and newline
- $str =~ s/\\\n\s*/ /g;
-
- # ignore parameter string to reinplace command
- $str =~ s/([ \t][\@-]?(?:sed|\$[\{\(]SED[\}\)]|\$[\{\(]REINPLACE_CMD[\}\)]))((?:\s+\-\w+)*\s+(?:"(?:\\"|[^"\n])*"|'(?:\\'|[^'\n])*'))+(.*)/$1$3/g; #'
-
- # 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 = '';
- $s =~ s/#.*$//;
- 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/portmanager/Makefile b/ports-mgmt/portmanager/Makefile
deleted file mode 100644
index ea17af2ccd17..000000000000
--- a/ports-mgmt/portmanager/Makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-# New ports collection makefile for: portmanager
-# Date created: April 23, 2004
-# Whom: Michael C. Shultz <reso3w83@verizon.net>
-#
-# $FreeBSD$
-#
-
-PORTNAME= portmanager
-PORTVERSION= 0.2.9
-PORTREVISION= 5
-#-----------------------------------------
-#for local use, remove before submitting PR
-CATEGORIES= sysutils
-#CATEGORIES= local/sysutils
-#VALID_CATEGORIES+= ${CATEGORIES} # for FreeBSD to accept our local category
-#-----------------------------------------
-MASTER_SITES= http://portmanager.sunsite.dk/distfiles/ \
- ${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR= portmanager
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= FreeBSD installed ports status and safe update utility
-
-MAN1= portmanager.1
-MAN3= libMG.3 \
- MGdbAdd.3 \
- MGdbCreate.3 \
- MGdbDelete.3 \
- MGdbGetRecordQty.3 \
- MGdbGoTop.3 \
- MGdbSeek.3
-
-USE_GMAKE= yes
-GNU_CONFIGURE= yes
-CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
-
-#
-# if --with-bin=something then withvar=${PREFIX} + something
-# else defaults to withvar=${PREFIX} + /bin
-#
-# so --with-bindir=/bin will become ${PREFIX}/bin at configure
-# time.
-#
-CONFIGURE_ARGS= --with-prefix=${PREFIX} \
- --with-bindir=/bin \
- --with-etcdir=/etc/portmanager \
- --with-pkgdbdir=/var/db/pkg \
- --with-portsdir=${PORTSDIR} \
- --with-sharedir=/share/portmanager \
- --with-tempdir=/tmp
-
-.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+= --with-debug=yes
-.endif
-
-INSTALLS_SHLIB= yes
-USE_REINPLACE= yes
-INSTALL_TARGET= install info
-
-pre-fetch:
-.if !defined(WITH_DEBUG)
- @${ECHO} "***********************************************************************"
- @${ECHO} "* portmanager *"
- @${ECHO} "***********************************************************************"
- @${ECHO} "* *"
- @${ECHO} "* WITH_DEBUG=yes enables debug support and all compile warnings *"
- @${ECHO} "* *"
- @${ECHO} "***********************************************************************"
-.endif
-
-post-configure:
- @${REINPLACE_CMD} -e \
- 's|VERSION "${PORTVERSION}"|VERSION "${PORTVERSION}_${PORTREVISION}"|g' \
- ${WRKSRC}/externVars.h
-
-post-install:
- @${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.mk>
diff --git a/ports-mgmt/portmanager/distinfo b/ports-mgmt/portmanager/distinfo
deleted file mode 100644
index 2379ec5e05fb..000000000000
--- a/ports-mgmt/portmanager/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (portmanager-0.2.9.tar.gz) = 785d47f82a64b438cfc9de253fbd6a9f
-SIZE (portmanager-0.2.9.tar.gz) = 414994
diff --git a/ports-mgmt/portmanager/files/patch-0.2.9_1 b/ports-mgmt/portmanager/files/patch-0.2.9_1
deleted file mode 100644
index e6864d20022c..000000000000
--- a/ports-mgmt/portmanager/files/patch-0.2.9_1
+++ /dev/null
@@ -1,68 +0,0 @@
-diff -ruN --exclude=Makefile.in --exclude=externVars.h.in --exclude=config.h.in --exclude=config.h.in~ ./NEWS ../../0.2.9_1/portmanager/NEWS
---- ./NEWS Sun Feb 27 13:51:55 2005
-+++ ../../0.2.9_1/portmanager/NEWS Wed Mar 2 15:31:42 2005
-@@ -2,6 +2,10 @@
-
- NOTE to self: Monitor from 0.2.1 to 0.2.2 item 3.
-
-+from 0.2.9 to 0.2.9_1 (March 2005)
-+
-+ 1) Added warnings if portmanager is not run as root
-+
- from 0.2.8 to 0.2.9 (February 2005)
-
- 1) Fixed %done reporting in xterm title bar
-diff -ruN --exclude=Makefile.in --exclude=externVars.h.in --exclude=config.h.in --exclude=config.h.in~ ./libMG/src/MGdbCreate.c ../../0.2.9_1/portmanager/libMG/src/MGdbCreate.c
---- ./libMG/src/MGdbCreate.c Thu Feb 17 21:55:04 2005
-+++ ../../0.2.9_1/portmanager/libMG/src/MGdbCreate.c Wed Mar 2 15:34:11 2005
-@@ -68,7 +68,7 @@
- {
- fprintf(stderr, "%s ERROR: unable to open %s\n", id, db->parent.path);
- perror("error");
-- assert(0);
-+ return( NULL );
- }
-
- /*zzzzzzzzzzzzzz*/
-diff -ruN --exclude=Makefile.in --exclude=externVars.h.in --exclude=config.h.in --exclude=config.h.in~ ./libPMGR/src/PMGRrDbCreate.c ../../0.2.9_1/portmanager/libPMGR/src/PMGRrDbCreate.c
---- ./libPMGR/src/PMGRrDbCreate.c Thu Feb 17 09:39:55 2005
-+++ ../../0.2.9_1/portmanager/libPMGR/src/PMGRrDbCreate.c Wed Mar 2 15:38:33 2005
-@@ -78,6 +78,12 @@
- NULL);
- /*zzzzzzzzzzzzzz*/
-
-+ if( !property->installedPortsDb )
-+ {
-+ fprintf( stderr, "%s %s error: portmanager must be run as root\n", id, VERSION );
-+ exit(1);
-+ }
-+
- /*zzzzzzzzzzzzzz*/
- property->objIdx++;
- property->dependencyPortsDb = MGdbCreate(
-diff -ruN --exclude=Makefile.in --exclude=externVars.h.in --exclude=config.h.in --exclude=config.h.in~ ./libPMGR/src/PMGRrInitialize.c ../../0.2.9_1/portmanager/libPMGR/src/PMGRrInitialize.c
---- ./libPMGR/src/PMGRrInitialize.c Thu Feb 17 22:55:53 2005
-+++ ../../0.2.9_1/portmanager/libPMGR/src/PMGRrInitialize.c Wed Mar 2 15:55:57 2005
-@@ -38,6 +38,7 @@
-
- int PMGRrInitialize( structProperty* property, int argc, char** argv )
- {
-+ char id[] = "PMGRrInitialize";
- char* commandLineKey = NULL;
- int errorCode = 0;
- int idx = 0;
-@@ -164,6 +165,14 @@
- */
- property->commandLineDb = MGdbCreate( property->commandLineDbFileName, property->fieldCommandLineKey,
- property->fieldCommandLineValue, NULL );
-+
-+ if( !property->commandLineDb )
-+ {
-+ fprintf( stderr, "%s %s error: portmanager must be run as root\n", id, VERSION );
-+ exit(1);
-+ }
-+
-+
- idx = 1;
- while( idx < argc )
- {
diff --git a/ports-mgmt/portmanager/files/patch-0.2.9_2 b/ports-mgmt/portmanager/files/patch-0.2.9_2
deleted file mode 100644
index 891854dd4f8e..000000000000
--- a/ports-mgmt/portmanager/files/patch-0.2.9_2
+++ /dev/null
@@ -1,80 +0,0 @@
-diff -ruN --exclude=Makefile.in --exclude=externVars.h.in --exclude=config.h.in --exclude=config.h.in~ --exclude=Makefile ./libPMGR/src/PMGRrDbCreate.c ../../0.2.9_2/portmanager/libPMGR/src/PMGRrDbCreate.c
---- ./libPMGR/src/PMGRrDbCreate.c Wed Mar 2 15:38:33 2005
-+++ ../../0.2.9_2/portmanager/libPMGR/src/PMGRrDbCreate.c Thu Mar 3 19:25:56 2005
-@@ -28,6 +28,7 @@
- char pkgDir[] = PKGDBDIR;
- char* fieldKey = NULL;
- char* fieldValue = NULL;
-+ char* ignoredPortDir = NULL;
- char* installedPortDir = NULL;
- char* installedPortName = NULL;
- classDir* dir = NULL;
-@@ -35,39 +36,57 @@
- int QTY_configDb = 0;
- int dirMode = 7;
- int errorCode = 0;
-+ int stringSize = 0;
- signed int fopenIdx = 0;
- signed int mallocIdx = 0;
-
- property->objIdx = 0;
-
-- /***************************************************************/
-- /* add any ignored ports in config.db to ignore.db */
-- /***************************************************************/
-+ /*
-+ * add any ignored ports in config.db to ignore.db
-+ */
- IDX_configDb = 1;
- QTY_configDb = MGdbGetRecordQty( property->configDb );
-
--
- while( IDX_configDb < QTY_configDb )
- {
- fieldKey = MGdbGet( property->configDb, IDX_configDb, property->fieldKey );
-- if( !strcmp( fieldKey, "IGNORE" ) )
-+ if( strstr( fieldKey, "IGNORE" ) )
- {
- fieldValue = MGdbGet( property->configDb, IDX_configDb, property->fieldValue );
-+
-+ if( fieldValue[0] != '/' )
-+ {
-+ stringSize = 1 + strlen( fieldValue ) + 1;
-+ ignoredPortDir = malloc( stringSize );
-+ ignoredPortDir[0] = 0;
-+ strcat( ignoredPortDir, "/" );
-+ strcat( ignoredPortDir, fieldValue );
-+ }
-+ else
-+ {
-+ stringSize = strlen( fieldValue ) + 1;
-+ ignoredPortDir = malloc( stringSize );
-+ ignoredPortDir[0] = 0;
-+ strcat( ignoredPortDir, fieldValue );
-+ }
-+
- MGdbGoTop( property->ignoreDb );
-- if( !MGdbSeek( property->ignoreDb, property->fieldIgnorePortDir, fieldValue,
-+ if( !MGdbSeek( property->ignoreDb, property->fieldIgnorePortDir, ignoredPortDir,
- property->fieldIgnorePortDir ) )
- {
- fprintf( stdout, "%s %s info: adding %s to ignore.db reason: pm-020.conf option\n",
-- id, VERSION, fieldValue );
-- MGdbAdd( property->ignoreDb, fieldValue, "pm-020.conf option", NULL );
-+ id, VERSION, ignoredPortDir );
-+ MGdbAdd( property->ignoreDb, ignoredPortDir, "pm-020.conf option", NULL );
- }
-+ free( ignoredPortDir );
- }
- IDX_configDb++;
- }
-
-- /***************************************************************/
-- /* create initial data bases */
-- /***************************************************************/
-+ /*
-+ * create initial data bases
-+ */
-
- /*zzzzzzzzzzzzzz*/
- property->objIdx++;
diff --git a/ports-mgmt/portmanager/files/patch-0.2.9_3 b/ports-mgmt/portmanager/files/patch-0.2.9_3
deleted file mode 100644
index c72546230b67..000000000000
--- a/ports-mgmt/portmanager/files/patch-0.2.9_3
+++ /dev/null
@@ -1,833 +0,0 @@
-diff -bruN --exclude=HTML ./AUTHORS ../../0.2.9_3/portmanager/AUTHORS
---- ./AUTHORS Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/AUTHORS Sun Mar 13 10:26:54 2005
-@@ -1 +1,2 @@
- Michael C. Shultz ringworm01@gmail.com
-+Alistair Sutton <alistair.sutton@gmail.com>
-diff -bruN --exclude=HTML ./NEWS ../../0.2.9_3/portmanager/NEWS
---- ./NEWS Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/NEWS Sun Mar 13 21:27:57 2005
-@@ -1,6 +1,19 @@
- change log
-
--NOTE to self: Monitor from 0.2.1 to 0.2.2 item 3.
-+
-+from 0.2.9_2 to 0.2.9_3 (March 2005)
-+
-+1) Added check for really old ports in PMGRrAddDependencies that
-+aborts portmanager and provides suggestion on how to update manually.
-+This is to fix a seg fault when @comment DEPORIGIN: is missing in
-+a port's +CONTENTS file
-+
-+2) Incorporated Alistair Sutton's <alistair.sutton@gmail.com>
-+code that adds interactive update option "portmanager -ui".
-+
-+3) Slowly switching license from GNU to BSD.
-+
-+from 0.2.9 to 0.2.9_2 (March 2005)
-
- from 0.2.9 to 0.2.9_1 (March 2005)
-
-diff -bruN --exclude=HTML ./libMG/src/libMG.h ../../0.2.9_3/portmanager/libMG/src/libMG.h
---- ./libMG/src/libMG.h Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/libMG/src/libMG.h Fri Mar 11 02:34:09 2005
-@@ -67,6 +67,7 @@
- #define KEY_N 78
- #define KEY_SPACE 32
- #define KEY_X 88
-+#define KEY_Y 89
- #define KEY_n 110
- #define KEY_x 120
- #define LINEFEED 10
-@@ -74,6 +75,7 @@
- #define MAXPARAMETERS 256
- #define SPACE 32
- #define TAB 9
-+#define KEY_y 121
-
- #define SINGLE_LINES "------------------------------------------------------------------------"
- #define DOUBLE_LINES "========================================================================"
-diff -bruN --exclude=HTML ./libPMGR/src/PMGRrAddDependencies.c ../../0.2.9_3/portmanager/libPMGR/src/PMGRrAddDependencies.c
---- ./libPMGR/src/PMGRrAddDependencies.c Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/libPMGR/src/PMGRrAddDependencies.c Mon Mar 14 10:56:06 2005
-@@ -1,25 +1,31 @@
--/************************************************************************/
--/* Copyright (C) 2005 Michael C. Shultz */
--/* */
--/* This program is free software; you can redistribute it and/or modify */
--/* it under the terms of the GNU General Public License as published by */
--/* the Free Software Foundation; either version 2 of the License, or (at*/
--/* your option) any later version. */
--/* */
--/* This program is distributed in the hope that it will be useful, */
--/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
--/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
--/* GNU General Public License for more details. */
--/* */
--/* You should have received a copy of the GNU General Public License */
--/* along with this program; if not, write to the Free Software */
--/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA */
--/* 02111-1307, USA. */
--/* */
--/* Michael C. Shultz */
--/* ringworm01@gmail.com */
--/* Box 3238 Landers, CA 92285 */
--/************************************************************************/
-+/*
-+ Copyright (C) 2005 Michael C. Shultz
-+
-+ 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 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.
-+
-+ Michael C. Shultz
-+ ringworm01@gmail.com
-+ Box 3238 Landers, CA 92285
-+*/
- #include <libPMGR.h>
-
- int PMGRrAddDependencies( structProperty* property, char* portName )
-@@ -89,6 +95,7 @@
- assert(0);
- }
- buffer[0] = 0;
-+ buffer[bufferSize-1] = 0;
- fread(buffer, 1, bufferSize, contentsFileStream );
- buffPtr = buffer;
- portDependency = buffer;
-@@ -108,6 +115,17 @@
- portDependencyDir += strlen( "@comment DEPORIGIN:" );
- stringSize = strstr( portDependencyDir, "\n" ) - portDependencyDir;
- portDependencyDir[stringSize] = 0;
-+
-+
-+ if( strncmp( buffPtr, "@comment DEPORIGIN:", strlen( "@comment DEPORIGIN:" ) ) )
-+ {
-+ fprintf( stdout,
-+ "%s %s error: %s/%s \"@comment DEPORIGIN:\" is missing from +CONTENTS file, recommend you manually remove this port:\n",
-+ id, VERSION, PKGDBDIR, portName );
-+ fprintf( stdout, "pkg_delete -f %s/%s then find it in /usr/ports/{category}/{portname} and reinstall\n", PKGDBDIR, portName );
-+ exit(0);
-+ }
-+
-
- buffPtr = portDependencyDir + stringSize + 1;
-
-diff -bruN --exclude=HTML ./libPMGR/src/PMGRrDoUpgrade.c ../../0.2.9_3/portmanager/libPMGR/src/PMGRrDoUpgrade.c
---- ./libPMGR/src/PMGRrDoUpgrade.c Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/libPMGR/src/PMGRrDoUpgrade.c Fri Mar 11 13:08:35 2005
-@@ -1,39 +1,33 @@
--/************************************************************************/
--/* Copyright (C) 2004 Michael C. Shultz */
--/* */
--/* This program is free software; you can redistribute it and/or modify */
--/* it under the terms of the GNU General Public License as published by */
--/* the Free Software Foundation; either version 2 of the License, or (at*/
--/* your option) any later version. */
--/* */
--/* This program is distributed in the hope that it will be useful, */
--/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
--/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
--/* GNU General Public License for more details. */
--/* */
--/* You should have received a copy of the GNU General Public License */
--/* along with this program; if not, write to the Free Software */
--/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA */
--/* 02111-1307, USA. */
--/* */
--/* Michael C. Shultz */
--/* ringworm01@gmail.com */
--/* Box 3238 Landers, CA 92285 */
--/************************************************************************/
--#include <libPMGR.h>
--
- /*
-- * $Author: mike $
-- * $Revision: 1.2 $
-- * $Date: 2005/02/21 17:35:40 $
-- * $Id: PMGRrDoUpgrade.c,v 1.2 2005/02/21 17:35:40 mike Exp $
-- * $Log: PMGRrDoUpgrade.c,v $
-- * Revision 1.2 2005/02/21 17:35:40 mike
-- * PMGRrDoUpgrade: Added make check-conflicts so we no longer waste
-- * time trying to build a port that is going to fail at installation
-- * time. If there is a conflict port is pkg_delete -f'ed.
-- *
-- */
-+ Copyright (C) 2005 Michael C. Shultz
-+
-+ 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 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.
-+
-+ Michael C. Shultz
-+ ringworm01@gmail.com
-+ Box 3238 Landers, CA 92285
-+*/
-+
-+#include <libPMGR.h>
-
- int PMGRrDoUpgrade( structProperty* property, char* oldPortName )
- {
-@@ -54,9 +48,18 @@
- int mallocIdx = 0;
- int qty = 0;
- int stringSize = 0;
-+ int kkey = 1;
-+ int proceed = 0;
-+
-+ /*
-+ * gdb shows kkey == 0 here, weird!!!
-+ */
-+
-
-- /* this is so we can signal that the entire portmanager program needs to
-- terminate after updating this port*/
-+ /*
-+ * this is so we can signal that the entire portmanager program needs to
-+ * terminate after updating this port
-+ */
- if( strstr( oldPortName, "portmanager" ) )
- {
- property->portManagerUpdated = 1;
-@@ -65,12 +68,10 @@
- while( fflush( stdout ) );
-
- MGdbGoTop( property->outOfDatePortsDb );
-- oldPortDir = MGdbSeek( property->outOfDatePortsDb, property->fieldOldPortName, oldPortName,
-- property->fieldOldPortDir );
-+ oldPortDir = MGdbSeek( property->outOfDatePortsDb, property->fieldOldPortName, oldPortName, property->fieldOldPortDir );
- if( !oldPortDir )
- {
-- fprintf( stderr, "%s %s error(52): oldPortName %s not found in outOfDatePortsDb\n",
-- id, VERSION, oldPortName );
-+ fprintf( stderr, "%s %s error(52): oldPortName %s not found in outOfDatePortsDb\n", id, VERSION, oldPortName );
- while( fflush( stderr ) );
- return(9);
- }
-@@ -79,14 +80,69 @@
- options = MGdbSeek( property->configDb, property->fieldKey, oldPortDir, property->fieldValue );
-
- MGdbGoTop( property->outOfDatePortsDb );
-- reason = MGdbSeek( property->outOfDatePortsDb, property->fieldOldPortDir, oldPortDir,
-- property->fieldReason );
-+ reason = MGdbSeek( property->outOfDatePortsDb, property->fieldOldPortDir, oldPortDir, property->fieldReason );
-
- MGdbGoTop( property->outOfDatePortsDb );
-- reasonPortName = MGdbSeek( property->outOfDatePortsDb, property->fieldOldPortDir, oldPortDir,
-- property->fieldNewPortName );
-+ reasonPortName = MGdbSeek( property->outOfDatePortsDb, property->fieldOldPortDir, oldPortDir, property->fieldNewPortName );
-+
-+ /*
-+ * if interactive option was chosen, present prompt and get response
-+ */
-+ if( property->interactive == 1 )
-+ {
-+ while (!proceed)
-+ {
-+ fprintf( stdout, "Upgrade port %s reason: %s: Y/N [Y]? ", oldPortName, reasonPortName );
-+
-+ kkey = getc(stdin);
-+
-+ switch(kkey)
-+ {
-+ case KEY_ENTER:
-+ {
-+ proceed = 1;
-+ break;
-+ }
-+ case KEY_Y:
-+ {
-+ proceed = 1;
-+ kkey = getc(stdin);
-+ break;
-+ }
-+ case KEY_y:
-+ {
-+ proceed = 1;
-+ kkey = getc(stdin);
-+ break;
-+ }
-+ case KEY_N:
-+ {
-+ proceed = 1;
-+ fprintf( stdout, "\nSkipping port: %s\n", oldPortName );
-+ MGdbAdd( property->ignoreDb, oldPortDir, "interactively skipped", NULL );
-+ kkey = getc(stdin);
-+ return(0);
-+ }
-+ case KEY_n:
-+ {
-+ proceed = 1;
-+ fprintf( stdout, "\nSkipping port: %s\n", oldPortName );
-+ MGdbAdd( property->ignoreDb, oldPortDir, "interactively skipped", NULL );
-+ kkey = getc(stdin);
-+ return(0);
-+ }
-+ default:
-+ {
-+ fprintf( stdout, "Invalid option. Please enter either Y to upgrade or N to skip\n");
-+ kkey = getc(stdin);
-+ }
-+ }
-+
-+ }
-+ }
-
- fprintf( stdout, "UPGRADING %s reason %s %s\n", oldPortName, reason, reasonPortName );
-+
- fprintf( stdout, "%s\n", SINGLE_LINES );
- while( fflush( stdout ) );
- /************************************************************************/
-@@ -248,8 +304,6 @@
- /************************************************************************/
- /* Command "2" " make clean " */
- /************************************************************************/
--
--
- if( options )
- {
- stringSize = strlen( "cd " )
-diff -bruN --exclude=HTML ./libPMGR/src/PMGRrMissingDependencies.c ../../0.2.9_3/portmanager/libPMGR/src/PMGRrMissingDependencies.c
---- ./libPMGR/src/PMGRrMissingDependencies.c Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/libPMGR/src/PMGRrMissingDependencies.c Mon Mar 14 06:58:27 2005
-@@ -151,7 +151,7 @@
- strcat( command, "make " );
- strcat( command, " all-depends-list" );
- }
-- fprintf( stdout, "verifing dependency status of %s (may take awhile) by executing command:\n%s\n",
-+ fprintf( stdout, "verifying dependency status of %s (may take awhile) by executing command:\n%s\n",
- dependencyPortName, command );
- while( fflush( stdout ) );
- /*zzzzzzzzzzzzzz*/
-diff -bruN --exclude=HTML ./libPMGR/src/PMGRrShowLeavesDelete.c ../../0.2.9_3/portmanager/libPMGR/src/PMGRrShowLeavesDelete.c
---- ./libPMGR/src/PMGRrShowLeavesDelete.c Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/libPMGR/src/PMGRrShowLeavesDelete.c Fri Mar 11 01:42:38 2005
-@@ -54,32 +54,26 @@
- while( idx )
- {
- leafPortName = MGdbGet( property->installedPortsDb, idx, property->fieldInstalledPortName );
--
--
--
-- leafPortDirShort = MGdbGet( property->installedPortsDb, idx,
-- property->fieldInstalledPortDir );
-+ leafPortDirShort = MGdbGet( property->installedPortsDb, idx, property->fieldInstalledPortDir );
-
- /*
- * Make sure port isn't in ignore.db
- */
- MGdbGoTop( property->ignoreDb );
-- if( MGdbSeek( property->ignoreDb, property->fieldIgnorePortDir, leafPortDirShort,
-- property->fieldIgnorePortDir ) )
-+ if( MGdbSeek( property->ignoreDb, property->fieldIgnorePortDir, leafPortDirShort, property->fieldIgnorePortDir ) )
- {
--printf( " ignoring %s\n", leafPortDirShort );
-+ fprintf( stdout, " ignoring %s\n", leafPortDirShort );
- idx--;
- continue;
- }
-
- stringSize = strlen( PORTSDIR )
-- + strlen( MGdbGet( property->installedPortsDb, idx, property->fieldInstalledPortDir ) )
-- + 1;
-+ + strlen( MGdbGet( property->installedPortsDb, idx, property->fieldInstalledPortDir ) ) + 1;
- leafPortDir = (char*)malloc(stringSize);
- leafPortDir[0] = 0;
-- strcpy( leafPortDir, PORTSDIR );
--
-+ strcat( leafPortDir, PORTSDIR );
- strcat( leafPortDir, MGdbGet( property->installedPortsDb, idx, property->fieldInstalledPortDir ) );
-+
- MGdbGoTop( property->dependencyPortsDb );
- if( !MGdbSeek( property->dependencyPortsDb, property->fieldDependencyPortDir,
- MGdbGet( property->installedPortsDb, idx, property->fieldInstalledPortDir ),
-@@ -96,8 +90,7 @@
- fprintf( stdout, "%s %s\n\n", leafPortName, leafPortDir );
-
- stringSize = strlen( leafPortDir )
-- + strlen( "/pkg-descr" )
-- + 1;
-+ + strlen( "/pkg-descr" ) + 1;
- pkgDescFile = (char*)malloc( stringSize );
- pkgDescFile[0] = 0;
- strcat( pkgDescFile, leafPortDir );
-@@ -106,8 +99,7 @@
- if( MGrIfFileExist( pkgDescFile ) )
- {
- stringSize = strlen( "cat " )
-- + strlen( pkgDescFile )
-- + 1;
-+ + strlen( pkgDescFile ) + 1;
- command = (char*)malloc( stringSize );
- command[0] = 0;
- strcat( command, "cat " );
-@@ -121,8 +113,7 @@
- {
- stringSize = strlen( "grep COMMENT " )
- + strlen( leafPortDir )
-- + strlen( "/Makefile" )
-- + 1;
-+ + strlen( "/Makefile" ) + 1;
- command = (char*)malloc( stringSize );
- command[0] = 0;
- strcat( command, "grep COMMENT " );
-@@ -210,8 +201,7 @@
- int stringSize = 0;
-
- stringSize = strlen( "pkg_delete -f " )
-- + strlen( leafPortName )
-- + 1;
-+ + strlen( leafPortName ) + 1;
- command = (char*)malloc( stringSize );
- command[0] = 0;
- strcat( command, "pkg_delete -f " );
-@@ -231,8 +221,7 @@
-
- stringSize = strlen( "cd " )
- + strlen( leafPortDir )
-- + strlen( ";make distclean" )
-- + 1;
-+ + strlen( ";make distclean" ) + 1;
- command = (char*)malloc( stringSize );
- command[0] = 0;
- strcat( command, "cd " );
-diff -bruN --exclude=HTML ./libPMGR/src/PMGRrStatus.c ../../0.2.9_3/portmanager/libPMGR/src/PMGRrStatus.c
---- ./libPMGR/src/PMGRrStatus.c Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/libPMGR/src/PMGRrStatus.c Fri Mar 11 07:40:17 2005
-@@ -1,26 +1,31 @@
--/************************************************************************/
--/* Copyright (C) 2005 Michael C. Shultz */
--/* */
--/* This program is free software; you can redistribute it and/or modify */
--/* it under the terms of the GNU General Public License as published by */
--/* the Free Software Foundation; either version 2 of the License, or (at*/
--/* your option) any later version. */
--/* */
--/* This program is distributed in the hope that it will be useful, */
--/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
--/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
--/* GNU General Public License for more details. */
--/* */
--/* You should have received a copy of the GNU General Public License */
--/* along with this program; if not, write to the Free Software */
--/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA */
--/* 02111-1307, USA. */
--/* */
--/* Michael C. Shultz */
--/* ringworm01@gmail.com */
--/* Box 3238 Landers, CA 92285 */
--/************************************************************************/
-+/*
-+ Copyright (C) 2005 Michael C. Shultz
-
-+ 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 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.
-+
-+ Michael C. Shultz
-+ ringworm01@gmail.com
-+ Box 3238 Landers, CA 92285
-+*/
- #include <libPMGR.h>
- int PMGRrStatus(structProperty* property)
- {
-@@ -115,7 +120,7 @@
- fprintf( stdout, "portmanager shutting down\n" );
- exit(0);
- }
-- ungetc(answer, stdin);
-+ answer = getc(stdin);
-
- fprintf( stdout, "removing: %s\n", installedPortName );
- stringSize = strlen("pkg_delete -f ") + strlen(installedPortName) + 1;
-diff -bruN --exclude=HTML ./libPMGR/src/PMGRrUpgrade.c ../../0.2.9_3/portmanager/libPMGR/src/PMGRrUpgrade.c
---- ./libPMGR/src/PMGRrUpgrade.c Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/libPMGR/src/PMGRrUpgrade.c Fri Mar 11 07:39:07 2005
-@@ -1,25 +1,31 @@
--/************************************************************************/
--/* Copyright (C) 2004 Michael C. Shultz */
--/* */
--/* This program is free software; you can redistribute it and/or modify */
--/* it under the terms of the GNU General Public License as published by */
--/* the Free Software Foundation; either version 2 of the License, or (at*/
--/* your option) any later version. */
--/* */
--/* This program is distributed in the hope that it will be useful, */
--/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
--/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
--/* GNU General Public License for more details. */
--/* */
--/* You should have received a copy of the GNU General Public License */
--/* along with this program; if not, write to the Free Software */
--/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA */
--/* 02111-1307, USA. */
--/* */
--/* Michael C. Shultz */
--/* ringworm01@gmail.com */
--/* Box 3238 Landers, CA 92285 */
--/************************************************************************/
-+/*
-+ Copyright (C) 2005 Michael C. Shultz
-+
-+ 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 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.
-+
-+ Michael C. Shultz
-+ ringworm01@gmail.com
-+ Box 3238 Landers, CA 92285
-+*/
- #include "libPMGR.h"
-
- int checkForOldDepencies( structProperty* property, char* oldPortName);
-@@ -68,7 +74,6 @@
- property->cacheDb = MGdbOpen( property->cacheDbFileName );
- /*zzzzzzzzzzzzzzzzz*/
-
--
- /*
- * Set xterm title bar indicator
- */
-@@ -78,9 +83,10 @@
- TOTAL_outOfDatePortsDb = QTY_outOfDatePortsDb - 1;
- }
- percentDone = 100 - ( 100 * ( ( (float)QTY_outOfDatePortsDb - 1 ) / (float)TOTAL_outOfDatePortsDb ) );
--fprintf( stdout, "percentDone-=>%d = 100 - ( 100 * ( QTY_outOfDatePortsDb-=>%d / TOTAL_outOfDatePortsDb-=>%d ) ) \n",
-+ fprintf( stdout, "percentDone-=>%d = 100 - ( 100 * ( QTY_outOfDatePortsDb-=>%d / TOTAL_outOfDatePortsDb-=>%d ) ) \n",
- (int)percentDone, QTY_outOfDatePortsDb-1, TOTAL_outOfDatePortsDb );
--while( fflush( stdout ) );
-+ while( fflush( stdout ) );
-+
- if( !strncmp( getenv("TERM"), "xterm", 5 ) )
- {
- stringSize = strlen( id )
-diff -bruN --exclude=HTML ./libPMGR/src/libPMGR.h ../../0.2.9_3/portmanager/libPMGR/src/libPMGR.h
---- ./libPMGR/src/libPMGR.h Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/libPMGR/src/libPMGR.h Fri Mar 11 00:46:10 2005
-@@ -136,6 +136,9 @@
- int objIdx;
- int portManagerUpdated; /* 0=not updated 1=updated*/
- int verbose;
-+
-+ int interactive; /* 0 = non, 1 = interactive */
-+
- } structProperty;
-
- typedef struct
-diff -bruN --exclude=HTML ./portmanager/help.txt ../../0.2.9_3/portmanager/portmanager/help.txt
---- ./portmanager/help.txt Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/portmanager/help.txt Fri Mar 11 00:41:39 2005
-@@ -20,6 +20,9 @@
- -u or --upgrade
- upgrade installed ports
-
-+ -ui or --upgrade-interactive
-+ upgrade installed ports interactively
-+
- -v or --version
- portmanager VERSION information
-
-diff -bruN --exclude=HTML ./portmanager/portmanager.1 ../../0.2.9_3/portmanager/portmanager/portmanager.1
---- ./portmanager/portmanager.1 Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/portmanager/portmanager.1 Fri Mar 11 00:56:46 2005
-@@ -1,10 +1,8 @@
--.\" $ 0.2.6_3 $
--.\"
- .\" Process this file with
- .\" groff -man -Tascii portmanager.1 | less
- .\"
- .\"=======================================================================
--.Dd FEBRUARY 2005
-+.Dd MARCH 2005
- .Os FreeBSD
- .Dt PORTMANAGER 1 URM
- .\"=======================================================================
-@@ -59,6 +57,8 @@
- .It
- \fB\&-u\fR update installed ports
- .It
-+\fB\&-ui\fR upgrade installed ports interactively
-+.It
- \fB\&-v\fR portmanager version
- .El
- .sp
-@@ -199,6 +199,17 @@
- .sp
- Simply add a "local" directory to /usr/ports and install your local ports under that directory. Where a normal FreeBSD
- port may be in "sysutils/{portname} the example above would reside in "local/sysutils/{portname}".
-+.sp
-+\fBSwitching from XFree86-4 to xorg\fR
-+.sp
-+ 1) change /etc/make.conf from X_WINDOW_SYSTEM=xfree86-4
-+ to X_WINDOW_SYSTEM=xorg
-+.sp
-+ 2) pkg_delete -f /var/db/pkg/XFree86*
-+.sp
-+ 3) pkg_delete -f /var/db/pkg/wrapper*
-+.sp
-+ 4) run portmanager -u
- .sp
- \fBalternative configuration\fR
- .sp
-diff -bruN --exclude=HTML ./portmanager/portmanager.c ../../0.2.9_3/portmanager/portmanager/portmanager.c
---- ./portmanager/portmanager.c Thu Mar 3 18:54:33 2005
-+++ ../../0.2.9_3/portmanager/portmanager/portmanager.c Sun Mar 13 10:49:37 2005
-@@ -1,25 +1,31 @@
--/************************************************************************/
--/* Copyright (C) 2004 Michael C. Shultz */
--/* */
--/* This program is free software; you can redistribute it and/or modify */
--/* it under the terms of the GNU General Public License as published by */
--/* the Free Software Foundation; either VER 2 of the License, or (at */
--/* your option) any later VER. */
--/* */
--/* This program is distributed in the hope that it will be useful, */
--/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
--/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
--/* GNU General Public License for more details. */
--/* */
--/* You should have received a copy of the GNU General Public License */
--/* along with this program; if not, write to the Free Software */
--/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA */
--/* 02111-1307, USA. */
--/* */
--/* Michael C. Shultz */
--/* ringworm01@gmail.com */
--/* Box 3238 Landers, CA 92285 */
--/************************************************************************/
-+/*
-+ Copyright (C) 2005 Michael C. Shultz
-+
-+ 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 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.
-+
-+ Michael C. Shultz
-+ ringworm01@gmail.com
-+ Box 3238 Landers, CA 92285
-+*/
- #include <libPMGR.h>
-
- #define OFF -2
-@@ -55,6 +61,8 @@
- char status[] = "--status";
- char u[] = "-u";
- char upgrade[] = "--upgrade";
-+ char ui[] = "-ui";
-+ char upgradeInteractive[] = "--upgrade-interactive";
- char v[] = "-v";
- char version[] = "--version";
- char* buffer = NULL;
-@@ -67,74 +75,6 @@
- int stringSize = 0;
- structProperty property;
- char* bufferIdx = NULL;
--/*
--Here is a code snipit from sendmail's alias.c about db locking:
--
--rebuildaliases(map, automatic)
-- register MAP *map;
-- bool automatic;
--{
-- SM_FILE_T *af;
-- bool nolock = false;
-- bool success = false;
-- long sff = SFF_OPENASROOT|SFF_REGONLY|SFF_NOLOCK;
-- sigfunc_t oldsigint, oldsigquit;
--#ifdef SIGTSTP
-- sigfunc_t oldsigtstp;
--#endif // SIGTSTP
--
--
-- // try to lock the source file
-- if ((af = safefopen(map->map_file, O_RDWR, 0, sff)) == NULL)
-- {
-- struct stat stb;
--
-- if ((errno != EACCES && errno != EROFS) || automatic ||
-- (af = safefopen(map->map_file, O_RDONLY, 0, sff)) == NULL)
-- {
-- int saveerr = errno;
--
-- if (tTd(27, 1))
-- sm_dprintf("Can't open %s: %s\n",
-- map->map_file, sm_errstring(saveerr));
-- if (!automatic && !bitset(MF_OPTIONAL, map->map_mflags))
-- message("newaliases: cannot open %s: %s",
-- map->map_file, sm_errstring(saveerr));
-- errno = 0;
-- return false;
-- }
-- nolock = true;
-- if (tTd(27, 1) ||
-- fstat(sm_io_getinfo(af, SM_IO_WHAT_FD, NULL), &stb) < 0 ||
-- bitset(S_IWUSR|S_IWGRP|S_IWOTH, stb.st_mode))
-- message("warning: cannot lock %s: %s",
-- map->map_file, sm_errstring(errno));
-- }
--
--
-- // see if someone else is rebuilding the alias file
-- if (!nolock &&
-- !lockfile(sm_io_getinfo(af, SM_IO_WHAT_FD, NULL), map->map_file,
-- NULL, LOCK_EX|LOCK_NB))
-- {
-- // yes, they are -- wait until done
-- message("Alias file %s is locked (maybe being rebuilt)",
-- map->map_file);
-- if (OpMode != MD_INITALIAS)
-- {
-- // wait for other rebuild to complete
-- (void) lockfile(sm_io_getinfo(af, SM_IO_WHAT_FD, NULL),
-- map->map_file, NULL, LOCK_EX);
-- }
-- (void) sm_io_close(af, SM_TIME_DEFAULT);
-- errno = 0;
-- return false;
-- }
--
--
--
--*/
--
-
- /*
- * Insure only one instance of portmanager is running as there is no locking of
-@@ -236,11 +176,9 @@
- exit( 0 );
- }
-
-- property.ignoreDb = MGdbCreate( property.ignoreDbFileName, property.fieldIgnorePortDir, property.fieldIgnoreReason,
-- NULL );
-+ property.ignoreDb = MGdbCreate( property.ignoreDbFileName, property.fieldIgnorePortDir, property.fieldIgnoreReason, NULL );
-+ property.strikesDb = MGdbCreate( property.strikesDbFileName, property.field3strikesPortDir, property.fieldStrikes, NULL );
-
-- property.strikesDb = MGdbCreate( property.strikesDbFileName, property.field3strikesPortDir, property.fieldStrikes,
-- NULL );
- /*
- * convert pm-020.conf to config.db
- */
-@@ -303,8 +241,26 @@
- if( !strcmp( argv[idx], upgrade ) || !strcmp( argv[idx], u ) )
- {
- stringSize = strlen( "rm -f " )
-- + strlen( property.cacheDbFileName )
-- + 1;
-+ + strlen( property.cacheDbFileName ) + 1;
-+ command = malloc( stringSize );
-+ command[0] = 0;
-+ strcat( command, "rm -f " );
-+ strcat( command, property.cacheDbFileName );
-+ fprintf( stdout, "%s %s info: executing %s\n", id, VERSION, command );
-+ system( command );
-+ free( command );
-+
-+ property.interactive = 0;
-+
-+ selection = PMUPGRADE;
-+ break;
-+ }
-+
-+ if( !strcmp( argv[idx], upgradeInteractive ) || !strcmp( argv[idx], ui ) )
-+ {
-+
-+ stringSize = strlen( "rm -f " )
-+ + strlen( property.cacheDbFileName ) + 1;
- command = malloc( stringSize );
- command[0] = 0;
- strcat( command, "rm -f " );
-@@ -312,6 +268,9 @@
- fprintf( stdout, "%s %s info: executing %s\n", id, VERSION, command );
- system( command );
- free( command );
-+
-+ property.interactive = 1;
-+
- selection = PMUPGRADE;
- break;
- }
diff --git a/ports-mgmt/portmanager/files/patch-0.2.9_4 b/ports-mgmt/portmanager/files/patch-0.2.9_4
deleted file mode 100644
index 794a1707f679..000000000000
--- a/ports-mgmt/portmanager/files/patch-0.2.9_4
+++ /dev/null
@@ -1,725 +0,0 @@
-diff -ruN ../../0.2.9_3/portmanager/ChangeLog ./ChangeLog
---- ../../0.2.9_3/portmanager/ChangeLog Wed Apr 6 19:50:14 2005
-+++ ./ChangeLog Fri Apr 22 12:32:22 2005
-@@ -1,6 +1,32 @@
- change log
-
--NOTE to self: Monitor from 0.2.1 to 0.2.2 item 3.
-+from 0.2.9_3 to 0.2.9_4 (April 2005)
-+
-+1) Improved warning message if a +CONTENTS file is missing in PMGRrVerifyContentsFile.c
-+
-+2) PMGRrAddDependencies.c changed way stringSize is calculated for portDependency variable
-+to eliminate a potential buffer over run. While I have never duplicated a buffer overrun
-+the portmanager.core file received from "TJ Varghese" <tjv@wynet.com.my> from a FreeBSD
-+4.11 system proves it is possible.
-+
-+
-+from 0.2.9_2 to 0.2.9_3 (March 2005)
-+
-+1) Added check for really old ports in PMGRrAddDependencies that
-+aborts portmanager and provides suggestion on how to update manually.
-+This is to fix a seg fault when @comment DEPORIGIN: is missing in
-+a port's +CONTENTS file
-+
-+2) Incorporated Alistair Sutton's <alistair.sutton@gmail.com>
-+code that adds interactive update option "portmanager -ui".
-+
-+3) Slowly switching license from GNU to BSD.
-+
-+from 0.2.9 to 0.2.9_2 (March 2005)
-+
-+from 0.2.9 to 0.2.9_1 (March 2005)
-+
-+ 1) Added warnings if portmanager is not run as root
-
- from 0.2.8 to 0.2.9 (February 2005)
-
-@@ -23,7 +49,7 @@
-
- 2) Added conflict handling when upgrading ports
-
-- 3) If running in xter, now indicates %done in title bar.
-+ 3) If running in xterm, now indicates %done in title bar.
-
- from 0.2.6 to 0.2.7 (February 2005)
-
-@@ -33,7 +59,7 @@
-
- from 0.2.5 to 0.2.6 (February 2005)
-
-- Added -sl and -slid options to help users safely remove uneeded
-+ Added -sl and -slid options to help users safely remove unneeded
- ports ports from their system.
-
- from 0.2.4 to 0.2.5 (February 2005)
-@@ -51,7 +77,7 @@
-
- from 0.2.2 to 0.2.3 (January 2005)
-
-- Major rewrite of libMG routines. Now most datbase related code is
-+ Major rewrite of libMG routines. Now most database related code is
- object oriented, this will simplify adding user requested features
- in future releases.
-
-@@ -63,7 +89,7 @@
- for an index to the others. Be warned, many still need to be written,
- I'll try to add a few with each new version of portmanager.
-
-- One final thing, found a major openfile leak while running pmstatus
-+ One final thing, found a major open file leak while running pmstatus
- which is run once with portmanager -s or several times with
- portmanager -u. In this version (0.2.3) pmstatus and pmupgrade were
- merged into portmanager and the open files grew to:
-@@ -73,7 +99,7 @@
- After tracking down the problem and fixing it individual ports seem
- to build faster. It is likely that previous versions of portmanager
- caused a few ports to fail to build because it was hogging too many
-- open file handles, if so I appologize and promise to tighly monitor
-+ open file handles, if so I apologize and promise to tightly monitor
- memory leaks and open files in future versions. BTW, this version under
- extensive monitoring with top and fstat -p shows no leakage at all in my
- initial tests.
-@@ -97,10 +123,10 @@
-
- 5) pmupgrade.c fixed hard coded paths
-
-- 6) pmupgrade.c Major cleanup of code, seperated upgrade routine into
-+ 6) pmupgrade.c Major cleanup of code, separated upgrade routine into
- upgrade, checkForOldDepencies, and doUpgrade routines.
-
-- 7) fixed portmanager seg faulting when it selfupdates. (thanks to
-+ 7) fixed portmanager seg faulting when it self updates. (thanks to
- "Noah" <admin2@enabled.com> for reporting
-
- from 0.2.0 to 0.2.1 (December 2004)
-@@ -110,7 +136,7 @@
-
- 2) Replaced html docs with a portmanager.1 man page.
-
-- 3) Eleminated several useless header files
-+ 3) Eliminated several useless header files
-
- 4) Added better error checking or /var/db/{portname}/+CONTENTS
- files
-@@ -120,13 +146,13 @@
- from 0.1.9 to 0.2.0
-
- added patches (with some mods) provided by Gudin Francis to
-- pmupgrade.c (add error checking durring make) and
-+ pmupgrade.c (add error checking during make) and
- PMGRrMakeDescribe (modify's how make describe is called by
- placing options before target)
-
- reworked config file, now renamed to pm-020.conf
-
-- added -pkgadd switch though this may not be a permament change
-+ added -pkgadd switch though this may not be a permanent change
- yet.
-
- from 0.1.8 to 0.1.9
-@@ -155,9 +181,9 @@
-
- from 0.1.4 to 0.1.5
-
-- if pmStatus receives a segfault it will reset the cache
-- automatically. pmUpgrade and portmanager -s will automatically
-- retry pmStatus one time after a cache reset.
-+ if pmstatus receives a seg fault it will reset the cache
-+ automatically. pmupgrade and portmanager -s will automatically
-+ retry pmstatus one time after a cache reset.
-
- from 0.1.3 to 0.1.4
-
-@@ -202,10 +228,10 @@
-
- April 20, 2004
-
-- 1 Added portmanager the executable which serves to run pmUpgrade
-- and pmStatus.
-+ 1 Added portmanager the executable which serves to run pmupgrade
-+ and pmstatus.
-
-- 2 Renamed port from portManager to portmanager because the cap
-+ 2 Renamed port from portmanager to portmanager because the cap
- in the middle may be annoying to remember for users running it
- from the command line.
-
-diff -ruN ../../0.2.9_3/portmanager/NEWS ./NEWS
---- ../../0.2.9_3/portmanager/NEWS Wed Apr 6 19:50:14 2005
-+++ ./NEWS Fri Apr 22 12:31:39 2005
-@@ -1,5 +1,14 @@
- change log
-
-+from 0.2.9_3 to 0.2.9_4 (April 2005)
-+
-+1) Improved warning message if a +CONTENTS file is missing in PMGRrVerifyContentsFile.c
-+
-+2) PMGRrAddDependencies.c changed way stringSize is calculated for portDependency variable
-+to eliminate a potential buffer over run. While I have never duplicated a buffer overrun
-+the portmanager.core file received from "TJ Varghese" <tjv@wynet.com.my> from a FreeBSD
-+4.11 system proves it is possible.
-+
-
- from 0.2.9_2 to 0.2.9_3 (March 2005)
-
-@@ -40,7 +49,7 @@
-
- 2) Added conflict handling when upgrading ports
-
-- 3) If running in xter, now indicates %done in title bar.
-+ 3) If running in xterm, now indicates %done in title bar.
-
- from 0.2.6 to 0.2.7 (February 2005)
-
-@@ -50,7 +59,7 @@
-
- from 0.2.5 to 0.2.6 (February 2005)
-
-- Added -sl and -slid options to help users safely remove uneeded
-+ Added -sl and -slid options to help users safely remove unneeded
- ports ports from their system.
-
- from 0.2.4 to 0.2.5 (February 2005)
-@@ -68,7 +77,7 @@
-
- from 0.2.2 to 0.2.3 (January 2005)
-
-- Major rewrite of libMG routines. Now most datbase related code is
-+ Major rewrite of libMG routines. Now most database related code is
- object oriented, this will simplify adding user requested features
- in future releases.
-
-@@ -80,7 +89,7 @@
- for an index to the others. Be warned, many still need to be written,
- I'll try to add a few with each new version of portmanager.
-
-- One final thing, found a major openfile leak while running pmstatus
-+ One final thing, found a major open file leak while running pmstatus
- which is run once with portmanager -s or several times with
- portmanager -u. In this version (0.2.3) pmstatus and pmupgrade were
- merged into portmanager and the open files grew to:
-@@ -90,7 +99,7 @@
- After tracking down the problem and fixing it individual ports seem
- to build faster. It is likely that previous versions of portmanager
- caused a few ports to fail to build because it was hogging too many
-- open file handles, if so I appologize and promise to tighly monitor
-+ open file handles, if so I apologize and promise to tightly monitor
- memory leaks and open files in future versions. BTW, this version under
- extensive monitoring with top and fstat -p shows no leakage at all in my
- initial tests.
-@@ -114,10 +123,10 @@
-
- 5) pmupgrade.c fixed hard coded paths
-
-- 6) pmupgrade.c Major cleanup of code, seperated upgrade routine into
-+ 6) pmupgrade.c Major cleanup of code, separated upgrade routine into
- upgrade, checkForOldDepencies, and doUpgrade routines.
-
-- 7) fixed portmanager seg faulting when it selfupdates. (thanks to
-+ 7) fixed portmanager seg faulting when it self updates. (thanks to
- "Noah" <admin2@enabled.com> for reporting
-
- from 0.2.0 to 0.2.1 (December 2004)
-@@ -127,7 +136,7 @@
-
- 2) Replaced html docs with a portmanager.1 man page.
-
-- 3) Eleminated several useless header files
-+ 3) Eliminated several useless header files
-
- 4) Added better error checking or /var/db/{portname}/+CONTENTS
- files
-@@ -137,13 +146,13 @@
- from 0.1.9 to 0.2.0
-
- added patches (with some mods) provided by Gudin Francis to
-- pmupgrade.c (add error checking durring make) and
-+ pmupgrade.c (add error checking during make) and
- PMGRrMakeDescribe (modify's how make describe is called by
- placing options before target)
-
- reworked config file, now renamed to pm-020.conf
-
-- added -pkgadd switch though this may not be a permament change
-+ added -pkgadd switch though this may not be a permanent change
- yet.
-
- from 0.1.8 to 0.1.9
-@@ -172,9 +181,9 @@
-
- from 0.1.4 to 0.1.5
-
-- if pmStatus receives a segfault it will reset the cache
-- automatically. pmUpgrade and portmanager -s will automatically
-- retry pmStatus one time after a cache reset.
-+ if pmstatus receives a seg fault it will reset the cache
-+ automatically. pmupgrade and portmanager -s will automatically
-+ retry pmstatus one time after a cache reset.
-
- from 0.1.3 to 0.1.4
-
-@@ -219,10 +228,10 @@
-
- April 20, 2004
-
-- 1 Added portmanager the executable which serves to run pmUpgrade
-- and pmStatus.
-+ 1 Added portmanager the executable which serves to run pmupgrade
-+ and pmstatus.
-
-- 2 Renamed port from portManager to portmanager because the cap
-+ 2 Renamed port from portmanager to portmanager because the cap
- in the middle may be annoying to remember for users running it
- from the command line.
-
-diff -ruN ../../0.2.9_3/portmanager/libPMGR/src/PMGRrAddDependencies.c ./libPMGR/src/PMGRrAddDependencies.c
---- ../../0.2.9_3/portmanager/libPMGR/src/PMGRrAddDependencies.c Wed Apr 6 19:50:14 2005
-+++ ./libPMGR/src/PMGRrAddDependencies.c Fri Apr 22 12:30:40 2005
-@@ -102,11 +102,20 @@
- while( ( portDependency = strnstr( buffPtr, "@pkgdep ", bufferSize - (buffPtr - buffer) ) ) )
- {
- portDependency += strlen( "@pkgdep " );
-+
-+/*
- stringSize = strstr( portDependency, "\n" ) - portDependency;
- if(stringSize < 1)
- {
- break;
- }
-+*/
-+ stringSize = 0;
-+ while( portDependency[stringSize] != LINEFEED && stringSize < 256 )
-+ {
-+ stringSize++;
-+ }
-+
- portDependency[stringSize] = 0;
-
- buffPtr = portDependency + stringSize + 1;
-@@ -173,4 +182,5 @@
- }
- return(0);
- }
-+
-
-diff -ruN ../../0.2.9_3/portmanager/libPMGR/src/PMGRrVerifyContentsFile.c ./libPMGR/src/PMGRrVerifyContentsFile.c
---- ../../0.2.9_3/portmanager/libPMGR/src/PMGRrVerifyContentsFile.c Wed Apr 6 19:50:14 2005
-+++ ./libPMGR/src/PMGRrVerifyContentsFile.c Fri Apr 22 12:09:41 2005
-@@ -34,6 +34,7 @@
- int stringSize = 0;
- signed int fopenIdx = 0;
- signed int mallocIdx = 0;
-+ pid_t pid;
-
- stringSize = strlen(PKGDBDIR)
- + strlen("/")
-@@ -72,7 +73,15 @@
- {
- fprintf( stderr, "%s %s error: could not open %s\n", id, VERSION, contentsFileName );
- perror( "system message" );
-- assert(0);
-+ pid = fork();
-+ if( !pid )
-+ {
-+ execl( "/usr/sbin/pkg_info", "pkg_info", portName, 0 );
-+ }
-+ wait( pid );
-+ fprintf( stderr, "%s %s error: portmanager cannot continue, recommend you manually reinstall %s\n", id, VERSION, portName );
-+ free( contentsFileName );
-+ exit( 1 );
- }
-
- bufferSize = MGrFileSize( contentsFileName );
-diff -ruN ../../0.2.9_3/portmanager/patch-0.2.9_4 ./patch-0.2.9_4
---- ../../0.2.9_3/portmanager/patch-0.2.9_4 Wed Dec 31 16:00:00 1969
-+++ ./patch-0.2.9_4 Fri Apr 22 12:32:26 2005
-@@ -0,0 +1,333 @@
-+diff -ruN ../../0.2.9_3/portmanager/ChangeLog ./ChangeLog
-+--- ../../0.2.9_3/portmanager/ChangeLog Wed Apr 6 19:50:14 2005
-++++ ./ChangeLog Fri Apr 22 12:32:22 2005
-+@@ -1,6 +1,32 @@
-+ change log
-+
-+-NOTE to self: Monitor from 0.2.1 to 0.2.2 item 3.
-++from 0.2.9_3 to 0.2.9_4 (April 2005)
-++
-++1) Improved warning message if a +CONTENTS file is missing in PMGRrVerifyContentsFile.c
-++
-++2) PMGRrAddDependencies.c changed way stringSize is calculated for portDependency variable
-++to eliminate a potential buffer over run. While I have never duplicated a buffer overrun
-++the portmanager.core file received from "TJ Varghese" <tjv@wynet.com.my> from a FreeBSD
-++4.11 system proves it is possible.
-++
-++
-++from 0.2.9_2 to 0.2.9_3 (March 2005)
-++
-++1) Added check for really old ports in PMGRrAddDependencies that
-++aborts portmanager and provides suggestion on how to update manually.
-++This is to fix a seg fault when @comment DEPORIGIN: is missing in
-++a port's +CONTENTS file
-++
-++2) Incorporated Alistair Sutton's <alistair.sutton@gmail.com>
-++code that adds interactive update option "portmanager -ui".
-++
-++3) Slowly switching license from GNU to BSD.
-++
-++from 0.2.9 to 0.2.9_2 (March 2005)
-++
-++from 0.2.9 to 0.2.9_1 (March 2005)
-++
-++ 1) Added warnings if portmanager is not run as root
-+
-+ from 0.2.8 to 0.2.9 (February 2005)
-+
-+@@ -23,7 +49,7 @@
-+
-+ 2) Added conflict handling when upgrading ports
-+
-+- 3) If running in xter, now indicates %done in title bar.
-++ 3) If running in xterm, now indicates %done in title bar.
-+
-+ from 0.2.6 to 0.2.7 (February 2005)
-+
-+@@ -33,7 +59,7 @@
-+
-+ from 0.2.5 to 0.2.6 (February 2005)
-+
-+- Added -sl and -slid options to help users safely remove uneeded
-++ Added -sl and -slid options to help users safely remove unneeded
-+ ports ports from their system.
-+
-+ from 0.2.4 to 0.2.5 (February 2005)
-+@@ -51,7 +77,7 @@
-+
-+ from 0.2.2 to 0.2.3 (January 2005)
-+
-+- Major rewrite of libMG routines. Now most datbase related code is
-++ Major rewrite of libMG routines. Now most database related code is
-+ object oriented, this will simplify adding user requested features
-+ in future releases.
-+
-+@@ -63,7 +89,7 @@
-+ for an index to the others. Be warned, many still need to be written,
-+ I'll try to add a few with each new version of portmanager.
-+
-+- One final thing, found a major openfile leak while running pmstatus
-++ One final thing, found a major open file leak while running pmstatus
-+ which is run once with portmanager -s or several times with
-+ portmanager -u. In this version (0.2.3) pmstatus and pmupgrade were
-+ merged into portmanager and the open files grew to:
-+@@ -73,7 +99,7 @@
-+ After tracking down the problem and fixing it individual ports seem
-+ to build faster. It is likely that previous versions of portmanager
-+ caused a few ports to fail to build because it was hogging too many
-+- open file handles, if so I appologize and promise to tighly monitor
-++ open file handles, if so I apologize and promise to tightly monitor
-+ memory leaks and open files in future versions. BTW, this version under
-+ extensive monitoring with top and fstat -p shows no leakage at all in my
-+ initial tests.
-+@@ -97,10 +123,10 @@
-+
-+ 5) pmupgrade.c fixed hard coded paths
-+
-+- 6) pmupgrade.c Major cleanup of code, seperated upgrade routine into
-++ 6) pmupgrade.c Major cleanup of code, separated upgrade routine into
-+ upgrade, checkForOldDepencies, and doUpgrade routines.
-+
-+- 7) fixed portmanager seg faulting when it selfupdates. (thanks to
-++ 7) fixed portmanager seg faulting when it self updates. (thanks to
-+ "Noah" <admin2@enabled.com> for reporting
-+
-+ from 0.2.0 to 0.2.1 (December 2004)
-+@@ -110,7 +136,7 @@
-+
-+ 2) Replaced html docs with a portmanager.1 man page.
-+
-+- 3) Eleminated several useless header files
-++ 3) Eliminated several useless header files
-+
-+ 4) Added better error checking or /var/db/{portname}/+CONTENTS
-+ files
-+@@ -120,13 +146,13 @@
-+ from 0.1.9 to 0.2.0
-+
-+ added patches (with some mods) provided by Gudin Francis to
-+- pmupgrade.c (add error checking durring make) and
-++ pmupgrade.c (add error checking during make) and
-+ PMGRrMakeDescribe (modify's how make describe is called by
-+ placing options before target)
-+
-+ reworked config file, now renamed to pm-020.conf
-+
-+- added -pkgadd switch though this may not be a permament change
-++ added -pkgadd switch though this may not be a permanent change
-+ yet.
-+
-+ from 0.1.8 to 0.1.9
-+@@ -155,9 +181,9 @@
-+
-+ from 0.1.4 to 0.1.5
-+
-+- if pmStatus receives a segfault it will reset the cache
-+- automatically. pmUpgrade and portmanager -s will automatically
-+- retry pmStatus one time after a cache reset.
-++ if pmstatus receives a seg fault it will reset the cache
-++ automatically. pmupgrade and portmanager -s will automatically
-++ retry pmstatus one time after a cache reset.
-+
-+ from 0.1.3 to 0.1.4
-+
-+@@ -202,10 +228,10 @@
-+
-+ April 20, 2004
-+
-+- 1 Added portmanager the executable which serves to run pmUpgrade
-+- and pmStatus.
-++ 1 Added portmanager the executable which serves to run pmupgrade
-++ and pmstatus.
-+
-+- 2 Renamed port from portManager to portmanager because the cap
-++ 2 Renamed port from portmanager to portmanager because the cap
-+ in the middle may be annoying to remember for users running it
-+ from the command line.
-+
-+diff -ruN ../../0.2.9_3/portmanager/NEWS ./NEWS
-+--- ../../0.2.9_3/portmanager/NEWS Wed Apr 6 19:50:14 2005
-++++ ./NEWS Fri Apr 22 12:31:39 2005
-+@@ -1,5 +1,14 @@
-+ change log
-+
-++from 0.2.9_3 to 0.2.9_4 (April 2005)
-++
-++1) Improved warning message if a +CONTENTS file is missing in PMGRrVerifyContentsFile.c
-++
-++2) PMGRrAddDependencies.c changed way stringSize is calculated for portDependency variable
-++to eliminate a potential buffer over run. While I have never duplicated a buffer overrun
-++the portmanager.core file received from "TJ Varghese" <tjv@wynet.com.my> from a FreeBSD
-++4.11 system proves it is possible.
-++
-+
-+ from 0.2.9_2 to 0.2.9_3 (March 2005)
-+
-+@@ -40,7 +49,7 @@
-+
-+ 2) Added conflict handling when upgrading ports
-+
-+- 3) If running in xter, now indicates %done in title bar.
-++ 3) If running in xterm, now indicates %done in title bar.
-+
-+ from 0.2.6 to 0.2.7 (February 2005)
-+
-+@@ -50,7 +59,7 @@
-+
-+ from 0.2.5 to 0.2.6 (February 2005)
-+
-+- Added -sl and -slid options to help users safely remove uneeded
-++ Added -sl and -slid options to help users safely remove unneeded
-+ ports ports from their system.
-+
-+ from 0.2.4 to 0.2.5 (February 2005)
-+@@ -68,7 +77,7 @@
-+
-+ from 0.2.2 to 0.2.3 (January 2005)
-+
-+- Major rewrite of libMG routines. Now most datbase related code is
-++ Major rewrite of libMG routines. Now most database related code is
-+ object oriented, this will simplify adding user requested features
-+ in future releases.
-+
-+@@ -80,7 +89,7 @@
-+ for an index to the others. Be warned, many still need to be written,
-+ I'll try to add a few with each new version of portmanager.
-+
-+- One final thing, found a major openfile leak while running pmstatus
-++ One final thing, found a major open file leak while running pmstatus
-+ which is run once with portmanager -s or several times with
-+ portmanager -u. In this version (0.2.3) pmstatus and pmupgrade were
-+ merged into portmanager and the open files grew to:
-+@@ -90,7 +99,7 @@
-+ After tracking down the problem and fixing it individual ports seem
-+ to build faster. It is likely that previous versions of portmanager
-+ caused a few ports to fail to build because it was hogging too many
-+- open file handles, if so I appologize and promise to tighly monitor
-++ open file handles, if so I apologize and promise to tightly monitor
-+ memory leaks and open files in future versions. BTW, this version under
-+ extensive monitoring with top and fstat -p shows no leakage at all in my
-+ initial tests.
-+@@ -114,10 +123,10 @@
-+
-+ 5) pmupgrade.c fixed hard coded paths
-+
-+- 6) pmupgrade.c Major cleanup of code, seperated upgrade routine into
-++ 6) pmupgrade.c Major cleanup of code, separated upgrade routine into
-+ upgrade, checkForOldDepencies, and doUpgrade routines.
-+
-+- 7) fixed portmanager seg faulting when it selfupdates. (thanks to
-++ 7) fixed portmanager seg faulting when it self updates. (thanks to
-+ "Noah" <admin2@enabled.com> for reporting
-+
-+ from 0.2.0 to 0.2.1 (December 2004)
-+@@ -127,7 +136,7 @@
-+
-+ 2) Replaced html docs with a portmanager.1 man page.
-+
-+- 3) Eleminated several useless header files
-++ 3) Eliminated several useless header files
-+
-+ 4) Added better error checking or /var/db/{portname}/+CONTENTS
-+ files
-+@@ -137,13 +146,13 @@
-+ from 0.1.9 to 0.2.0
-+
-+ added patches (with some mods) provided by Gudin Francis to
-+- pmupgrade.c (add error checking durring make) and
-++ pmupgrade.c (add error checking during make) and
-+ PMGRrMakeDescribe (modify's how make describe is called by
-+ placing options before target)
-+
-+ reworked config file, now renamed to pm-020.conf
-+
-+- added -pkgadd switch though this may not be a permament change
-++ added -pkgadd switch though this may not be a permanent change
-+ yet.
-+
-+ from 0.1.8 to 0.1.9
-+@@ -172,9 +181,9 @@
-+
-+ from 0.1.4 to 0.1.5
-+
-+- if pmStatus receives a segfault it will reset the cache
-+- automatically. pmUpgrade and portmanager -s will automatically
-+- retry pmStatus one time after a cache reset.
-++ if pmstatus receives a seg fault it will reset the cache
-++ automatically. pmupgrade and portmanager -s will automatically
-++ retry pmstatus one time after a cache reset.
-+
-+ from 0.1.3 to 0.1.4
-+
-+@@ -219,10 +228,10 @@
-+
-+ April 20, 2004
-+
-+- 1 Added portmanager the executable which serves to run pmUpgrade
-+- and pmStatus.
-++ 1 Added portmanager the executable which serves to run pmupgrade
-++ and pmstatus.
-+
-+- 2 Renamed port from portManager to portmanager because the cap
-++ 2 Renamed port from portmanager to portmanager because the cap
-+ in the middle may be annoying to remember for users running it
-+ from the command line.
-+
-+diff -ruN ../../0.2.9_3/portmanager/libPMGR/src/PMGRrAddDependencies.c ./libPMGR/src/PMGRrAddDependencies.c
-+--- ../../0.2.9_3/portmanager/libPMGR/src/PMGRrAddDependencies.c Wed Apr 6 19:50:14 2005
-++++ ./libPMGR/src/PMGRrAddDependencies.c Fri Apr 22 12:30:40 2005
-+@@ -102,11 +102,20 @@
-+ while( ( portDependency = strnstr( buffPtr, "@pkgdep ", bufferSize - (buffPtr - buffer) ) ) )
-+ {
-+ portDependency += strlen( "@pkgdep " );
-++
-++/*
-+ stringSize = strstr( portDependency, "\n" ) - portDependency;
-+ if(stringSize < 1)
-+ {
-+ break;
-+ }
-++*/
-++ stringSize = 0;
-++ while( portDependency[stringSize] != LINEFEED && stringSize < 256 )
-++ {
-++ stringSize++;
-++ }
-++
-+ portDependency[stringSize] = 0;
-+
-+ buffPtr = portDependency + stringSize + 1;
-+@@ -173,4 +182,5 @@
-+ }
-+ return(0);
-+ }
-++
-+
-+diff -ruN ../../0.2.9_3/portmanager/libPMGR/src/PMGRrVerifyContentsFile.c ./libPMGR/src/PMGRrVerifyContentsFile.c
-+--- ../../0.2.9_3/portmanager/libPMGR/src/PMGRrVerifyContentsFile.c Wed Apr 6 19:50:14 2005
-++++ ./libPMGR/src/PMGRrVerifyContentsFile.c Fri Apr 22 12:09:41 2005
-+@@ -34,6 +34,7 @@
-+ int stringSize = 0;
-+ signed int fopenIdx = 0;
-+ signed int mallocIdx = 0;
-++ pid_t pid;
-+
-+ stringSize = strlen(PKGDBDIR)
-+ + strlen("/")
-+@@ -72,7 +73,15 @@
-+ {
-+ fprintf( stderr, "%s %s error: could not open %s\n", id, VERSION, contentsFileName );
-+ perror( "system message" );
-+- assert(0);
-++ pid = fork();
-++ if( !pid )
-++ {
-++ execl( "/usr/sbin/pkg_info", "pkg_info", portName, 0 );
-++ }
-++ wait( pid );
-++ fprintf( stderr, "%s %s error: portmanager cannot continue, recommend you manually reinstall %s\n", id, VERSION, portName );
-++ free( contentsFileName );
-++ exit( 1 );
-+ }
-+
-+ bufferSize = MGrFileSize( contentsFileName );
-diff -ruN ../../0.2.9_3/portmanager/rePackage.sh ./rePackage.sh
---- ../../0.2.9_3/portmanager/rePackage.sh Wed Apr 6 19:50:14 2005
-+++ ./rePackage.sh Mon Apr 18 12:15:09 2005
-@@ -1,31 +1,35 @@
- #!/bin/sh
-
--echo /usr/local/bin/autoheader259
-+echo "sh cleanUp.sh"
-+ sh cleanUp.sh
-+
-+echo "touch NEWS README AUTHORS ChangeLog THANKS"
-+ touch NEWS README AUTHORS ChangeLog THANKS
-+
-+echo "/usr/local/bin/autoheader259"
- /usr/local/bin/autoheader259
-
--echo /usr/local/bin/aclocal19
-- /usr/local/bin/aclocal19
-+echo "/usr/local/bin/aclocal15"
-+ /usr/local/bin/aclocal15
-+
-+echo "cat /usr/local/share/aclocal/libtool15.m4 >> acinclude.m4"
-+ cat /usr/local/share/aclocal/libtool15.m4 >> acinclude.m4
-
- echo "cat acinclude.m4 >> aclocal.m4"
- cat acinclude.m4 >> aclocal.m4
-
--echo /usr/local/bin/libtoolize15 --force --copy
-+echo "/usr/local/bin/libtoolize15 --force --copy"
- /usr/local/bin/libtoolize15 --force --copy
-
--echo /usr/local/bin/automake19 --add-missing --copy
-- /usr/local/bin/automake19 --add-missing --copy
-+echo "/usr/local/bin/automake15 --add-missing --copy"
-+ /usr/local/bin/automake15 --add-missing --copy
-
--echo /usr/local/bin/autoconf259
-+echo "/usr/local/bin/autoconf259"
- /usr/local/bin/autoconf259
-
--#echo ./configure
--# ./configure
-+echo "./configure --with-debug"
-+ ./configure --with-debug
-
--#echo make
--# make
-+echo "make"
-+ make
-
--#echo make dist
--# make dist
--
--#echo make clean
--# make clean
diff --git a/ports-mgmt/portmanager/files/patch-0.2.9_5 b/ports-mgmt/portmanager/files/patch-0.2.9_5
deleted file mode 100644
index b7569600938b..000000000000
--- a/ports-mgmt/portmanager/files/patch-0.2.9_5
+++ /dev/null
@@ -1,11 +0,0 @@
---- portmanager/portmanager.c.orig Fri Jul 29 00:26:53 2005
-+++ portmanager/portmanager.c Fri Jul 29 00:27:47 2005
-@@ -134,7 +134,7 @@
- /*
- * set xterm title
- */
-- if( !strncmp( getenv("TERM"), "xterm", 5 ) )
-+ if( getenv("TERM") && !strncmp( getenv("TERM"), "xterm", 5 ) )
- {
- stringSize = strlen( id )
- + 1
diff --git a/ports-mgmt/portmanager/pkg-descr b/ports-mgmt/portmanager/pkg-descr
deleted file mode 100644
index e87a5c79dba8..000000000000
--- a/ports-mgmt/portmanager/pkg-descr
+++ /dev/null
@@ -1,21 +0,0 @@
-FreeBSD port collection management. Update your ports easily. Great
-for users of KDE or GNOME who need to be concerned about how
-dependency ports are built.
-
-**New options**
-
-1) Leaf port report: Shows ports with no other ports depending on
-them, these are ports that may be safely de-installed.
-
-2) Remove leaf ports safely: Interactively delete leaf ports.
-
-portmanager-questions archive may be found at:
-http://www.mail-archive.com/portmanager-questions%40sunsite.dk/
-
-to subscribe just send an empty message to:
-portmanager-questions-subscribe@sunsite.dk
-
-WWW: http://portmanager.sunsite.dk/
-
-Michael C. Shultz
-ringworm01@gmail.com
diff --git a/ports-mgmt/portmanager/pkg-message b/ports-mgmt/portmanager/pkg-message
deleted file mode 100644
index 83fc490fb60b..000000000000
--- a/ports-mgmt/portmanager/pkg-message
+++ /dev/null
@@ -1,18 +0,0 @@
-*
-* portmanager
-*
-* upgrade ports example:
-*
-* portmanager -u -ip editors/nedit editors/openoffice
-*
-* upgrades everything except nedit,open office and their dependencies
-*
-* portmanager -sl will show you leaf ports, these are safe to remove
-*
-* portmanager -slid will let you safely remove leaf ports
-*
-* see man portmanager(1) or http://portmanager.sunsite.dk
-*
-* all feedback is welcome, send to:
-* Michael C. Shultz ringworm01@gmail.com
-*
diff --git a/ports-mgmt/portmanager/pkg-plist b/ports-mgmt/portmanager/pkg-plist
deleted file mode 100644
index 24dc40979d33..000000000000
--- a/ports-mgmt/portmanager/pkg-plist
+++ /dev/null
@@ -1,20 +0,0 @@
-@unexec rm -f %D/share/portmanager/3strikes.db 2>/dev/null || true
-@unexec rm -f %D/share/portmanager/commandLine.db 2>/dev/null || true
-@unexec rm -f %D/share/portmanager/configure.db 2>/dev/null || true
-@unexec rm -f %D/share/portmanager/configure.db.temp 2>/dev/null || true
-@unexec rm -f %D/share/portmanager/ignore.db 2>/dev/null || true
-@unexec rm -f %D/share/portmanager/portCache.tmp 2>/dev/null || true
-@unexec rm -f %D/share/portmanager/port_dependencies.db 2>/dev/null || true
-@unexec rm -f %D/share/portmanager/ports_cache.db 2>/dev/null || true
-@unexec rm -f %D/share/portmanager/ports_installed.db 2>/dev/null || true
-@unexec rm -f %D/share/portmanager/ports_old.db 2>/dev/null || true
-%%DATADIR%%/help.txt
-bin/portmanager
-etc/portmanager/pm-020.conf.SAMPLE
-include/libMG.h
-lib/libMG
-lib/libMG.1
-lib/libPMGR
-lib/libPMGR.1
-@unexec rmdir %D/etc/portmanager 2>/dev/null || true
-@unexec rmdir %D/share/portmanager 2>/dev/null || true
diff --git a/ports-mgmt/portmk/Makefile b/ports-mgmt/portmk/Makefile
deleted file mode 100644
index 1adef89e2ee9..000000000000
--- a/ports-mgmt/portmk/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
-# New ports collection makefile for: portmk
-# Date created: 05 Jul 2004
-# Whom: Oliver Eikemeier
-#
-# $FreeBSD$
-#
-
-PORTNAME= portmk
-PORTVERSION= 0.1.1
-CATEGORIES= devel
-DISTFILES=
-
-MAINTAINER= clement@FreeBSD.org
-COMMENT= Development version of bsd.port.mk
-
-PKGMESSAGE= ${WRKDIR}/pkg-message
-
-NO_BUILD= yes
-PLIST_FILES= bin/omake
-
-PORTDOCS= ReadMe ChangeLog Features KnownIssues
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 500000
-PORTMK_PATCH= ${FILESDIR}/portmk4.patch
-.else
-PORTMK_PATCH= ${FILESDIR}/portmk5.patch
-.endif
-
-post-patch:
-.for text in pkg-message
- @${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
- -e 's,%%PORTSDIR%%,${PORTSDIR},g' \
- -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
- ${PKGDIR}/${text} >${WRKDIR}/${text}
-.endfor
-
-do-install:
- @${INSTALL_SCRIPT} ${FILESDIR}/omake.sh ${PREFIX}/bin/omake
-
-post-install:
- @${MKDIR} ${DOCSDIR}
-.for doc in ${PORTDOCS}
- @${INSTALL_DATA} ${FILESDIR}/${doc} ${DOCSDIR}
-.endfor
- @${CAT} ${PKGMESSAGE}
-
-activate:
- @if [ "`${ECHO_CMD} FreeBSD | ${TR} -s .`" != "FreeBSD" ]; then \
- ${ECHO_MSG} "tr(1) is broken."; \
- ${FALSE}; \
- fi
- @${GREP} -qs PORTMK /usr/share/mk/bsd.port.mk || \
- ${PATCH} -s -N -d /usr/share/mk -i ${PORTMK_PATCH} && \
- ${ECHO_MSG} ">> Configured bsd.port.mk."
- @${GREP} -qs PORTMK /etc/make.conf || \
- ${CAT} ${FILESDIR}/make.conf >> /etc/make.conf && \
- ${ECHO_MSG} ">> Configured make.conf(5)."
-
-.include <bsd.port.post.mk>
diff --git a/ports-mgmt/portmk/Mk/bsd.port.mk b/ports-mgmt/portmk/Mk/bsd.port.mk
deleted file mode 100644
index c85a131c6c1f..000000000000
--- a/ports-mgmt/portmk/Mk/bsd.port.mk
+++ /dev/null
@@ -1,808 +0,0 @@
-#-*- mode: makefile; tab-width: 4; -*-
-# ex:ts=4
-#
-# $FreeBSD$
-#
-# bsd.port.mk - 940820 Jordan K. Hubbard.
-# This file is in the public domain.
-#
-# Please view me with 4 column tabs!
-
-# This is the master file for the most common elements to all port
-# Makefile in the ports system. For a more general overview of its
-# use and importance, see the Porter's Handbook.
-
-# There are two different types of "maintainers" in the ports framework.
-# The maintainer alias of the bsd.port.mk file is listed below in the
-# FreeBSD_MAINTAINER entry. You should consult them if you have any
-# questions/suggestions regarding this file.
-
-FreeBSD_MAINTAINER= eik@FreeBSD.org
-
-# For each port, the MAINTAINER variable is what you should consult for
-# contact information on the person(s) to contact if you have questions/
-# suggestions about that specific port. By default (if no MAINTAINER
-# is listed), a port is maintained by the subscribers of the ports@FreeBSD.org
-# mailing list, and any correspondence should be directed there.
-#
-# MAINTAINER - The e-mail address of the contact person for this port
-# (default: ports@FreeBSD.org).
-#
-# These are meta-variables that are automatically set to the system
-# you are running on. These are provided in case you need to take
-# different actions for different values.
-#
-# ARCH - The architecture, as returned by "uname -p".
-# OPSYS - Portability clause. This is the operating system the
-# makefile is being used on. Automatically set to
-# "FreeBSD," "NetBSD," or "OpenBSD" as appropriate.
-# OSREL - The release version (numeric) of the operating system.
-# OSVERSION - The value of __FreeBSD_version.
-# PORTOBJFORMAT - The object format ("aout" or "elf").
-#
-# This is the beginning of the list of all variables that need to be
-# defined in a port, listed in order that they should be included
-# to fit in with existing conventions. (Exception: MAINTAINER actually
-# should appear after EXTRACT_ONLY and before MASTER_SITE_BACKUP).
-#
-# These variables are used to identify your port.
-#
-# PORTNAME - Name of software. Mandatory.
-# PORTVERSION - Version of software. Mandatory.
-# PORTREVISION - Version of port. Optional. Commonly used to indicate
-# that an update has happened that affects the port
-# framework itself, but not the distributed software
-# (e.g., local patches or Makefile changes).
-# PORTEPOCH - Optional. In certain odd cases, the PORTREVISION logic
-# can be fooled by ports that appear to go backwards
-# numerically (e.g. if port-0.3 is newer than port-1998).
-# In this case, incrementing PORTEPOCH forces the revision.
-# Default: 0 (no effect).
-# PKGNAME - Always defined as
-# ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}.
-# Do not define this in your Makefile.
-# PKGNAMEPREFIX - Prefix to specify that port is language-specific, etc.
-# Optional.
-# PKGNAMESUFFIX - Suffix to specify compilation options. Optional.
-# UNIQUENAME - A name for your port that is globally unique. By default,
-# this is set to ${LATEST_LINK} when LATEST_LINK is set,
-# and to ${PKGNAMEPREFIX}${PORTNAME} otherwise.
-# DISTNAME - Name of port or distribution used in generating
-# WRKSRC and DISTFILES below (default:
-# ${PORTNAME}-${PORTVERSION}).
-# CATEGORIES - A list of descriptive categories into which this port falls.
-# Mandatory.
-#
-# These variable describe how to fetch files required for building the port.
-#
-# DISTFILES - Name(s) of archive file(s) containing distribution
-# (default: ${DISTNAME}${EXTRACT_SUFX}). Set this to
-# an empty string if the port doesn't require it.
-# EXTRACT_SUFX - Suffix for archive names (default: .tar.bz2 if USE_BZIP2
-# is set, .zip if USE_ZIP is set, .tar.gz otherwise).
-# You never have to set both DISTFILES and EXTRACT_SUFX.
-# MASTER_SITES - Primary location(s) for distribution files if not found
-# locally. See bsd.sites.mk for common choices for
-# MASTER_SITES.
-# MASTER_SITE_SUBDIR - Subdirectory of MASTER_SITES (default: empty).
-# Will sometimes need to be set to ${PORTNAME} for (e.g.)
-# MASTER_SITE_SOURCEFORGE. Only guaranteed to work for
-# choices of ${MASTER_SITES} defined in bsd.sites.mk.
-# PATCHFILES - Name(s) of additional files that contain distribution
-# patches (default: none). make will look for them at
-# PATCH_SITES (see below). They will automatically be
-# uncompressed before patching if the names end with
-# ".gz", ".bz2" or ".Z".
-# PATCH_SITES - Primary location(s) for distribution patch files
-# if not found locally.
-# DIST_SUBDIR - Suffix to ${DISTDIR} (default: none). If set, all
-# ${DISTFILES} and ${PATCHFILES} will be put in this
-# subdirectory of ${DISTDIR} (see below). Also they will
-# be fetched in this subdirectory from FreeBSD mirror sites.
-# ALLFILES - All of ${DISTFILES} and ${PATCHFILES}.
-# IGNOREFILES - If some of the ${ALLFILES} are not checksum-able, set
-# this variable to their names (default: empty).
-# EXTRACT_ONLY - If defined, a subset of ${DISTFILES} you want to
-# actually extract (default: none).
-#
-# (NOTE: by convention, the MAINTAINER entry (see above) should go here.)
-#
-# These variables are typically set in /etc/make.conf to indicate
-# the user's preferred location to fetch files from. You should
-# rarely need to set these.
-#
-# MASTER_SITE_BACKUP - Backup location(s) for distribution files and patch
-# files if not found locally and ${MASTER_SITES}/${PATCH_SITES}
-# (default:
-# ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/)
-# MASTER_SITE_OVERRIDE - If set, override the MASTER_SITES setting with this
-# value.
-# MASTER_SITE_FREEBSD - If set, only use ${MASTER_SITE_BACKUP} for
-# MASTER_SITES.
-# CD_MOUNTPTS - List of CDROM mountpoints to look for distfiles under.
-# This variable supercedes CD_MOUNTPT, which is
-# obsolete.
-#
-# Set these if your port should not be built under certain circumstances.
-# These are string variables; you should set them to the reason why
-# they are necessary.
-#
-# RESTRICTED - Prevent the distribution of distfiles and packages to
-# the FTP sites or on CDROM (e.g. forbidden by license
-# considerations).
-# NO_CDROM - Packages and distfiles may not go on CDROM (e.g. must
-# not be re-sold) but can go on FTP sites.
-# NO_PACKAGE - Port should not be packaged for ftp sites or CDROMs,
-# but distfiles can be put on ftp sites and CDROMs.
-# FORBIDDEN - Package build should not be attempted because of
-# security vulnerabilities.
-# IGNORE - Package build should be skipped entirely (e.g.
-# because of serious unfixable problems in the build,
-# because it cannot be manually fetched, etc). Error
-# logs will not appear on bento, so this should be
-# used sparingly.
-# BROKEN - Port is believed to be broken. Package builds will
-# still be attempted on the bento package cluster to
-# test this assumption.
-#
-# In addition to RESTRICTED or NO_CDROM, if only a subset of distfiles
-# or patchfiles have redistribution restrictions, set the following
-# to the list of such files.
-#
-# RESTRICTED_FILES - List of files that cannot be redistributed
-# (default: "${DISTFILES} ${PATCHFILES}" if RESTRICTED
-# or NO_CDROM is set, empty otherwise).
-#
-# These variables are booleans, so you don't need to set them to the reason.
-#
-# IS_INTERACTIVE - Set this if your port needs to interact with the user
-# during any step in a package build. User can then decide
-# to skip this port by setting ${BATCH}, or compiling only
-# the interactive ports by setting ${INTERACTIVE}.
-# (Default: not set.)
-# USE_SUBMAKE - Set this if you want that each of the port's main 6 targets
-# (extract, patch, configure, build, install and package) to be
-# executed in a separate make(1) process. Useful when one of
-# the stages needs to influence make(1) variables of the later
-# stages using ${WRKDIR}/Makefile.inc generated on the fly.
-# (Default: not set.)
-#
-# Set these if your port only makes sense to certain architectures.
-# They are lists containing names for them (e.g., "alpha i386").
-# (Defaults: not set.)
-#
-# ONLY_FOR_ARCHS - Only build ports if ${ARCH} matches one of these.
-# NOT_FOR_ARCHS - Only build ports if ${ARCH} doesn't match one of these.
-#
-# These variables control options about how a port gets built and/or
-# are shorthand notations for common sets of dependencies.
-# Use these if your port uses some of the common software packages. By
-# convention these should be set to 'yes', although they only need to be
-# defined. (Defaults: not set, unless explicitly indicated below.)
-#
-# Note: the distinction between the USE_* and WANT_* variables, and the
-# WITH_* and WITHOUT_* variables, are that the former are restricted to
-# usage inside the ports framework, and the latter are reserved for user-
-# settable options. (Setting USE_* in /etc/make.conf is always wrong).
-#
-# USE_BZIP2 - Says that the port tarballs use bzip2, not gzip, for
-# compression.
-# USE_ZIP - Says that the port distfile uses zip, not tar w/[bg]zip
-# for compression.
-# USE_GCC - Says that the port requires this version of gcc, either in
-# the system or installed from a port.
-# USE_GMAKE - Says that the port uses gmake.
-# GMAKE - Set to path of GNU make if not in $PATH (default: gmake).
-##
-# USE_GETOPT_LONG - Says that the port uses getopt_long. If OSVERSION
-# less than 500041, automatically adds devel/libgnugeopt
-# to LIB_DEPENDS, and pass adjusted values of
-# CPPFLAGS and LDFLAGS in CONFIGURE_ENV.
-# Default: not set.
-##
-# USE_ICONV - Says that the port uses libiconv.
-# USE_GETTEXT - Says that the port uses GNU gettext (libintl).
-##
-# USE_PERL5 - Says that the port uses perl5 in one or more of the extract,
-# patch, build, install or run phases.
-# USE_PERL5_BUILD - Says that the port uses perl5 in one or more of the extract,
-# patch, build or install phases.
-# USE_PERL5_RUN - Says that the port uses perl5 for running.
-# PERL5 - Set to full path of perl5, either in the system or
-# installed from a port.
-# PERL - Set to full path of perl5, either in the system or
-# installed from a port, but without the version number.
-# Use this if you need to replace "#!" lines in scripts.
-# PERL_VERSION - Full version of perl5 (see below for current value).
-# PERL_VER - Short version of perl5 (see below for current value).
-# PERL_LEVEL - Perl version as an integer of the form MNNNPP, where
-# M is major version, N is minor version, and P is
-# the patch level. E.g., PERL_VERSION=5.6.1 would give
-# a PERL_LEVEL of 500601. This can be used in comparisons
-# to determine if the version of perl is high enough,
-# whether a particular dependency is needed, etc.
-# PERL_ARCH - Directory name of architecture dependent libraries
-# (value: ${ARCH}-freebsd).
-# PERL_PORT - Name of the perl port that is installed
-# (value: perl5)
-# SITE_PERL - Directory name where site specific perl packages go.
-# This value is added to PLIST_SUB.
-# PERL_MODBUILD - Use Module::Build to configure, build and install
-# port.
-#
-# USE_GHOSTSCRIPT - Says that the port needs ghostscript to both
-# build and run. Default: not set.
-# USE_GHOSTSCRIPT_BUILD - Says that the port needs ghostscript to build.
-# Default: not set.
-# USE_GHOSTSCRIPT_RUN - Says that the port needs ghostscript to run.
-# Default: not set.
-# GHOSTSCRIPT_PORT - The port that provides postscript functionality.
-# Some installations may wish to override the default
-# to specify a version without X11 and/or localized
-# versions for their nationality.
-# WITH_GHOSTSCRIPT_AFPL - If set to Yes, says to use the AFPL
-# version of the ghostscript software instead
-# of the GNU version, which is used otherwise.
-##
-# USE_BISON - Says that the port uses bison for building.
-##
-# USE_IMAKE - Says that the port uses imake. Implies USE_X_PREFIX.
-# XMKMF - Set to path of `xmkmf' if not in $PATH (default: xmkmf -a ).
-# USE_X_PREFIX - Says that the port installs in ${X11BASE}. Implies USE_XLIB.
-# USE_XLIB - Says that the port uses the X libraries.
-#
-# USE_FREETYPE - Says that the port uses the freetype print libraries.
-# USE_GL - Says that the port uses libGL (not needed with XFree86 4.x
-# which already includes this functionality).
-# USE_MESA - Says that the port uses libGL/libglut (deprecated).
-# USE_MOTIF - Says that the port uses a Motif toolkit. Implies USE_XPM.
-# NO_OPENMOTIF - Says that the port uses a custom Motif toolkit
-# instead of Openmotif.
-# Used only when USE_MOTIF is set.
-# WANT_LESSTIF - Says that the port uses Lesstif as Motif toolkit.
-# Used only when USE_MOTIF is set. Implies
-# NO_OPENMOTIF.
-# USE_SDL - Says that the port uses the sdl libraries.
-# See bsd.sdl.mk for more information.
-# USE_XPM - Says that the port uses the xpm graphics libraries.
-##
-# USE_OPENSSL - Says that the port relies on the OpenSSL package.
-# Default: not set.
-##
-#
-# USE_OPENLDAP - Says that the port uses the OpenLDAP libraries
-# Implies: WANT_OPENLDAP_VER?=21
-# WANT_OPENLDAP_VER - Legal values are: 21, 22
-# If set to an unkown value, the port is marked BROKEN.
-# WANT_OPENLDAP_SASL - Says that the system should use OpenLDAP libraries
-# with SASL support.
-#
-##
-# USE_AUTOTOOLS - Says that the port uses various GNU autotools
-# (libtool, autoconf, autoheader, automake et al.)
-# See bsd.autotools.mk for more details.
-# XXX: not currently in active use - this is a placeholder.
-##
-# USE_JAVA - Says that the port relies on the Java language.
-# Implies inclusion of bsd.java.mk. (Also see
-# that file for more information on USE_JAVA_*).
-# Default: not set.
-# USE_PYTHON - Says that the port relies on the Python language.
-# Implies inclusion of bsd.python.mk. (Also see
-# that file for more information on USE_PYTHON_*
-# and USE_PYDISTUTILS).
-# Default: not set.
-# USE_RUBY - Says that the port relies on the Ruby language.
-# Implies inclusion of bsd.ruby.mk. (Also see
-# that file for more information on USE_RUBY_*).
-# Default: not set.
-# USE_GNUSTEP - Says that the port relies on the GNUstep system.
-# Implies the inclusion of bsd.gnustep.mk.
-# (Also see that file for more information on
-# USE_GNUSTEP_*).
-# Default: not set.
-##
-# USE_GNOME - A list of the Gnome dependencies the port has (e.g.,
-# glib12, gtk12). Implies that the port needs Gnome.
-# Implies inclusion of bsd.gnome.mk. See bsd.gnome.mk
-# or http://www.FreeBSD.org/gnome/docs/porting.html
-# for more details.
-# Default: not set.
-#
-# USE_KDEBASE_VER - Set to 3 to use the KDE windowing system.
-# Implies inclusion
-# of bsd.kde.mk. Default: not set.
-# USE_KDELIBS_VER - Set to 3 to use the KDE libraries.
-# Implies inclusion
-# of bsd.kde.mk. Default: not set.
-# USE_QT_VER - Set to either 2 or 3 to use the QT libraries.
-# (Only 3 is currently supported). Implies inclusion
-# of bsd.kde.mk. Default: not set.
-#
-# USE_LINUX - Set to yes to say the port needs emulators/linux_base.
-# Default: not set.
-# USE_LINUX_PREFIX - controls the action of PREFIX (see above).
-#
-#
-# USE_MYSQL - Add MySQL client dependency.
-# If no version is given (by the maintainer via the port or
-# by the user via defined variable), try to find the
-# currently installed version. Fall back to default if
-# necessary (MySQL4.0 = 40).
-#
-# DEFAULT_MYSQL_VER - MySQL default version. Can be overriden within a port.
-# Default: 40.
-#
-# WANT_MYSQL_VER - Maintainer can set an arbitrary version of MySQL by
-# using it.
-#
-# BROKEN_WITH_MYSQL - This variable can be defined if the ports doesn't support
-# one or more version of MySQL.
-#
-# MYSQL_VER - Internal variable for MySQL version.
-#
-# WITH_MYSQL_VER - User defined variable to set MySQL version.
-#
-# USE_RC_SUBR - Says the ports startup/shutdown script uses the common
-# routines found in etc/rc.subr and may need to
-# depend on the sysutils/rc_subr port.
-#
-# RC_SUBR - Set to path of rc.subr, defaults to ${LOCALBASE}/etc/rc.subr.
-#
-# USE_APACHE - Says that the port relies on an apache webserver.
-# APACHE_PORT - CATEGORY and portname of the prefered port for apache.
-# Default: www/apache13
-# If WITH_APACHE2 is defined defaults to www/apache2
-# APXS - Full path to the prefered apxs binary to configure
-# apache modules. Default: ${LOCALBASE}/sbin/apxs
-#
-#
-#
-# Dependency checking. Use these if your port requires another port
-# not in the list above. (Default: empty.)
-#
-# EXTRACT_DEPENDS - A list of "path:dir[:target]" tuples of other ports this
-# package depends on in the "extract" stage. "path" is
-# the name of a file if it starts with a slash (/), an
-# executable otherwise. make will test for the existence
-# (if it is a full pathname) or search for it in your
-# $PATH (if it is an executable) and go into "dir" to do
-# a "make all install" if it's not found. If the third
-# field ("target") exists, it will be used instead of
-# ${DEPENDS_TARGET}.
-# PATCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this
-# package depends on in the "patch" stage. "path" is the
-# name of a file if it starts with a slash (/), an
-# executable otherwise. make will test for the existence
-# (if it is a full pathname) or search for it in your
-# $PATH (if it is an executable) and go into "dir" to do
-# a "make all install" if it's not found. If the third
-# field ("target") exists, it will be used instead of
-# ${DEPENDS_TARGET}.
-# FETCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this
-# package depends in the "fetch" stage. "path" is the
-# name of a file if it starts with a slash (/), an
-# executable otherwise. make will test for the
-# existence (if it is a full pathname) or search for
-# it in your $PATH (if it is an executable) and go
-# into "dir" to do a "make all install" if it's not
-# found. If the third field ("target") exists, it will
-# be used instead of ${DEPENDS_TARGET}.
-# BUILD_DEPENDS - A list of "path:dir[:target]" tuples of other ports this
-# package depends to build (between the "extract" and
-# "build" stages, inclusive). The test done to
-# determine the existence of the dependency is the
-# same as FETCH_DEPENDS. If the third field ("target")
-# exists, it will be used instead of ${DEPENDS_TARGET}.
-# RUN_DEPENDS - A list of "path:dir[:target]" tuples of other ports this
-# package depends to run. The test done to determine
-# the existence of the dependency is the same as
-# FETCH_DEPENDS. This will be checked during the
-# "install" stage and the name of the dependency will
-# be put into the package as well. If the third field
-# ("target") exists, it will be used instead of
-# ${DEPENDS_TARGET}.
-# LIB_DEPENDS - A list of "lib:dir[:target]" tuples of other ports this
-# package depends on. "lib" is the name of a shared library.
-# make will use "ldconfig -r" to search for the library.
-# lib can contain extended regular expressions.
-# DEPENDS - A list of "dir[:target]" tuples of other ports this
-# package depends on being made first. Use this only for
-# things that don't fall into the above four categories.
-# If the second field ("target") exists, it will be used
-# instead of ${DEPENDS_TARGET}.
-# DEPENDS_TARGET - The default target to execute when a port is calling a
-# dependency (default: "install").
-#
-# Conflict checking. Use if your port cannot be installed at the same time as
-# another package.
-#
-# CONFLICTS - A list of package name patterns that the port conflicts with.
-# It's possible to use any shell meta-characters for pattern
-# matching.
-# E.g. apache*-1.2* apache*-1.3.[012345] apache-*+ssl_*
-#
-#
-# Various directory definitions and variables to control them.
-# You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR.
-#
-# X11BASE - Where X11 ports install things (default: /usr/X11R6).
-# LOCALBASE - Where non-X11 ports install things (default: /usr/local).
-# LINUXBASE - Where Linux ports install things (default: /compat/linux).
-# PREFIX - Where *this* port installs its files (default: ${X11BASE}
-# if USE_X_PREFIX is set, ${LINUXBASE} if USE_LINUX_PREFIX
-# is set, otherwise ${LOCALBASE}).
-# MASTERDIR - Where the port finds patches, package files, etc. Define
-# this is you have two or more ports that share most of the
-# files (default: ${.CURDIR}).
-# PORTSDIR - The root of the ports tree. (default: /usr/ports)
-# DISTDIR - Where to search for and store copies of original sources
-# (default: ${PORTSDIR}/distfiles).
-# PACKAGES - A top level directory where all packages go (rather than
-# going locally to each port). (default: ${PORTSDIR}/packages).
-# WRKDIRPREFIX - The place to root the temporary working directory
-# hierarchy (default: none).
-# WRKDIR - A temporary working directory that gets *clobbered* on clean
-# (default: ${WRKDIRPREFIX}${.CURDIR}/work).
-# WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually
-# unpacks to. (Default: ${WRKDIR}/${DISTNAME} unless
-# NO_WRKSUBDIR is set, in which case simply ${WRKDIR}).
-# NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}.
-# PATCHDIR - A directory containing any additional patches you made
-# to port this software to FreeBSD (default:
-# ${MASTERDIR}/files)
-# SCRIPTDIR - A directory containing any auxiliary scripts
-# (default: ${MASTERDIR}/scripts)
-# FILESDIR - A directory containing any miscellaneous additional files.
-# (default: ${MASTERDIR}/files)
-# PKGDIR - A directory containing any package creation files.
-# (default: ${MASTERDIR})
-#
-# Variables that serve as convenient "aliases" for your *-install targets.
-# Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin".
-#
-# INSTALL_PROGRAM - A command to install binary executables. (By
-# default, also strips them, unless ${STRIP} is
-# overridden to be the empty string).
-# INSTALL_SCRIPT - A command to install executable scripts.
-# INSTALL_DATA - A command to install sharable data.
-# INSTALL_MAN - A command to install manpages. May or not compress,
-# depending on the value of MANCOMPRESSED (see below).
-#
-# Boolean to control whether manpages are installed.
-#
-# NO_INSTALL_MANPAGES - Says that the port doesn't want to install any
-# manpages (default: not set, i.e. manpages
-# are installed by default).
-#
-# Set the following to specify all manpages that your port installs.
-# These manpages will be automatically listed in ${PLIST}. Depending
-# on the setting of NOMANCOMPRESS, the make rules will compress the
-# manpages for you.
-#
-# MAN<sect> - A list of manpages, categorized by section. For
-# example, if your port has "man/man1/foo.1" and
-# "man/mann/bar.n", set "MAN1=foo.1" and "MANN=bar.n".
-# The available sections chars are "123456789LN".
-# MLINKS - A list of <source, target> tuples for creating links
-# for manpages. For example, "MLINKS= a.1 b.1 c.3 d.3"
-# will do an "ln -sf a.1 b.1" and "ln -sf c.3 d.3" in
-# appropriate directories. (Use this even if the port
-# installs its own manpage links so they will show up
-# correctly in ${PLIST}.)
-# MANPREFIX - The directory prefix for ${MAN<sect>} and ${MLINKS}
-# (default: ${PREFIX}).
-# MAN<sect>PREFIX - If manual pages of some sections install in different
-# locations than others, use these (default: ${MANPREFIX}).
-# MANCOMPRESSED - This variable can take values "yes", "no" or
-# "maybe". "yes" means manpages are installed
-# compressed; "no" means they are not; "maybe" means
-# it changes depending on the value of
-# NOMANCOMPRESS. The default is "yes" if USE_IMAKE
-# is set and NO_INSTALL_MANPAGES is not set, and
-# "no" otherwise.
-#
-# Set the following to specify all .info files your port installs.
-#
-# INFO - A list of .info files (omitting the trailing ".info");
-# only one entry per document!
-# INFO_PATH - Path, where all .info files will be installed by your
-# port, relative to ${PREFIX} (default: "share/info" if
-# ${PREFIX} is equal to /usr and "info" otherwise).
-#
-# Set the following to specify all documentation your port installs into
-# ${DOCSDIR}
-#
-# PORTDOCS - A list of files and directories relative to DOCSDIR.
-# Shell glob patterns can be used, directories include
-# the entire subtree of contained files and directories.
-# Should not be set when no documentation files are
-# installed (for example because NOPORTDOCS is defined).
-# Useful for dynamically generated documentation.
-#
-# Default targets and their behaviors:
-#
-# fetch - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined)
-# into ${DISTDIR} as necessary.
-# fetch-list - Show list of files that would be retrieved by fetch.
-# fetch-recursive - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined),
-# for port and dependencies into ${DISTDIR} as necessary.
-# fetch-recursive-list - Show list of files that would be retrieved by
-# fetch-recursive.
-# fetch-required-list - Show list of files that would be retrieved by
-# fetch-required.
-# fetch-required - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined),
-# for port and dependencies that are not already installed
-# into ${DISTDIR}.
-# all-depends-list - Show all directories which are dependencies
-# for this port.
-# build-depends-list - Show all directories which are build-dependencies
-# for this port.
-# package-depends-list - Show all directories which are
-# package-dependencies for this port.
-# run-depends-list - Show all directories which are run-dependencies
-# for this port.
-#
-# extract - Unpacks ${DISTFILES} into ${WRKDIR}.
-# patch - Apply any provided patches to the source.
-# configure - Runs either GNU configure, one or more local configure
-# scripts or nothing, depending on what's available.
-# build - Actually compile the sources.
-# install - Install the results of a build.
-# reinstall - Install the results of a build, ignoring "already installed"
-# flag.
-# deinstall - Remove the installation.
-# deinstall-all - Remove all installations with the same PKGORIGIN.
-# package - Create a package from an _installed_ port.
-# package-recursive - Create a package for a port and _all_ of its dependancies.
-# describe - Try to generate a one-line description for each port for
-# use in INDEX files and the like.
-# checkpatch - Do a "patch -C" instead of a "patch". Note that it may
-# give incorrect results if multiple patches deal with
-# the same file.
-# checksum - Use distinfo to ensure that your distfiles are valid.
-# checksum-recursive - Run checksum in this port and all dependencies.
-# makesum - Generate distinfo (only do this for your own ports!).
-# clean - Remove ${WRKDIR} and other temporary files used for building.
-# clean-depends - Do a "make clean" for all dependencies.
-# config - Configure options for this port (using ${DIALOG}).
-# Automatically run prior to extract, patch, configure, build,
-# install, and package.
-# showconfig - Display options config for this port
-# rmconfig - Remove the options config for this port
-#
-# Default sequence for "all" is:
-#
-# check-sanity fetch checksum extract patch configure build
-#
-# Please read the comments in the targets section below; you
-# should be able to use the pre-* or post-* targets/scripts
-# (which are available for every stage except checksum) or
-# override the do-* targets to do pretty much anything you want.
-#
-# NEVER override the "regular" targets unless you want to open
-# a major can of worms.
-#
-# Set these variables if your port doesn't need some of the steps.
-# Note that there are no NO_PATCH or NO_CONFIGURE variables because
-# those steps are empty by default. NO_EXTRACT is not allowed anymore
-# since we need to at least create ${WRKDIR}. Also, NO_CHECKSUM is a user
-# variable and is not to be set in a port's Makefile. See above for NO_PACKAGE.
-#
-# NO_BUILD - Use a dummy (do-nothing) build target.
-# NO_INSTALL - Use a dummy (do-nothing) install target.
-#
-# Here are some variables used in various stages.
-#
-# For options:
-# OPTIONS - List of what WITH_<option> options this port accept. The
-# format is <option> "<description>" [on|off]
-# Example:
-# FLEXRESP "Flexible response to events" off
-# which tell that an option WITH_FLEXRESP exists for this port,
-# that by default it is not defined, and that the description to
-# show to a user in the config dialog is "Flexible response to
-# events". If you have more than one option, just chain them
-# into a single variable. NOTE: To make options work, you need
-# to include bsd.port.pre.mk before you start testing the
-# WITH_xyz variables.
-#
-# For fetch:
-#
-# FETCH_CMD - Full path to ftp/http fetch command if not in $PATH
-# (default: "/usr/bin/fetch -ARr").
-# FETCH_BEFORE_ARGS -
-# Arguments to ${FETCH_CMD} before filename (default: none).
-# FETCH_AFTER_ARGS -
-# Arguments to ${FETCH_CMD} following filename (default: none).
-# FETCH_ENV - Environment to pass to ${FETCH_CMD} (default: none).
-# FETCH_REGET - Times to retry fetching of files on checksum errors (default: 1).
-#
-# For extract:
-#
-# EXTRACT_CMD - Command for extracting archive (default: "bzip2" if
-# USE_BZIP2 is set, "unzip" if USE_ZIP is set, "gzip"
-# otherwise).
-# EXTRACT_BEFORE_ARGS -
-# Arguments to ${EXTRACT_CMD} before filename
-# (default: "-dc").
-# EXTRACT_AFTER_ARGS -
-# Arguments to ${EXTRACT_CMD} following filename
-# (default: "| tar -xf -").
-# EXTRACT_PRESERVE_OWNERSHIP -
-# Normally, when run as "root", the extract stage will
-# change the owner and group of all files under ${WRKDIR}
-# to 0:0. Set this variable if you want to turn off this
-# feature.
-#
-# For makesum:
-#
-# NO_SIZE - Don't record size data in distinfo, needed
-# when the master site does not report file
-# sizes, or when multiple valid versions of
-# a distfile, having different sizes, exist.
-#
-# For patch:
-#
-# EXTRA_PATCHES - Define this variable if you have patches not in
-# ${PATCHDIR}. This usually happens when you need to
-# do some pre-processing before some distribution
-# patches can be applied. In that case, fetch them as
-# extra distfiles, put the processed results in
-# ${WRKDIR}, then point EXTRA_PATCHES to them.
-#
-# The patches specified by this variable will be
-# applied after the normal distribution patches but
-# before those in ${PATCHDIR}.
-# PATCH_WRKSRC - Directory to apply patches in (default: ${WRKSRC}).
-#
-# For configure:
-#
-# HAS_CONFIGURE - Says that the port has its own configure script. The
-# configure stage will not do anything if this is not set.
-# GNU_CONFIGURE - Set if you are using GNU configure (optional). Implies
-# HAS_CONFIGURE.
-# PERL_CONFIGURE - Configure using Perl's MakeMaker. Implies USE_PERL5.
-# CONFIGURE_WRKSRC - Directory to run configure in (default: ${WRKSRC}).
-# CONFIGURE_SCRIPT - Name of configure script, relative to ${CONFIGURE_WRKSRC}
-# (default: "Makefile.PL" if PERL_CONFIGURE is set,
-# "configure" otherwise).
-# CONFIGURE_TARGET - The name of target to call when GNU_CONFIGURE is
-# defined (default: ${MACHINE_ARCH}-portbld-freebsd${OSREL}).
-# CONFIGURE_ARGS - Pass these args to configure if ${HAS_CONFIGURE} is set
-# (default: "--prefix=${PREFIX} ${CONFIGURE_TARGET}" if
-# GNU_CONFIGURE is set, "CC=${CC} CCFLAGS=${CFLAGS}
-# PREFIX=${PREFIX} INSTALLPRIVLIB=${PREFIX}/lib
-# INSTALLARCHLIB=${PREFIX}/lib" if PERL_CONFIGURE is set,
-# empty otherwise).
-# CONFIGURE_ENV - Pass these env (shell-like) to configure if
-# ${HAS_CONFIGURE} is set.
-# CONFIGURE_LOG - The name of configure log file (default: config.log).
-# It will be printed to the screen if configure fails.
-# CONFIGURE_FAIL_MESSAGE - A message displayed to users when configure
-# fails (note: this assumes the do-configure
-# target has not been overwritten). This message
-# will be passed through /usr/bin/fmt before
-# being shown to the user.
-#
-# For build and install:
-#
-# MAKEFILE - Name of the makefile (default: Makefile).
-# ALL_TARGET - Default target for sub-make in build stage (default: all).
-# BUILD_WRKSRC - Directory to do build in (default: ${WRKSRC}).
-# MAKE_ENV - Additional environment vars passed to sub-make in build
-# and install stages (default: see below).
-# MAKE_ARGS - Any extra arguments to sub-make in build and install
-# stages (default: none).
-#
-# For install:
-#
-# INSTALL_TARGET - Default target for sub-make in install stage
-# (default: install).
-# INSTALL_WRKSRC - Directory to install from (default: ${WRKSRC}).
-# NO_MTREE - If set, will not invoke mtree from bsd.port.mk from
-# the "install" target.
-# MTREE_FILE - The name of the mtree file (default: /etc/mtree/BSD.x11.dist
-# if USE_X_PREFIX is set, /etc/mtree/BSD.local.dist
-# otherwise.)
-# PLIST_DIRS - Directories to be added to packing list
-# PLIST_FILES - Files and symbolic links to be added to packing list
-#
-# PLIST - Name of the `packing list' file (default: ${PKGDIR}/pkg-plist).
-# Change this to ${WRKDIR}/PLIST or something if you
-# need to write to it. (It is not a good idea for a port
-# to write to any file outside ${WRKDIR} during a normal
-# build.)
-# TMPPLIST - Name of the `packing list' file after processing
-# (default: ${WRKDIR}/.PLIST.mktmp).
-# PLIST_SUB - List of "variable=value" pair for substitution in ${PLIST}
-# (default: see below).
-# INSTALLS_SHLIB - If set, bsd.port.mk will automatically run ldconfig commands
-# from post-install and also add appropriate @exec/@unexec
-# directives to directories listed in LDCONFIG_DIRS.
-# LDCONFIG_DIRS - List of directories to run ldconfig if
-# INSTALLS_SHLIB is set (default: %%PREFIX%%/lib).
-# Note that this is passed through sed just like the
-# rest of PLIST, so ${PLIST_SUB} substitutions also
-# apply here. It is recommended that you use
-# %%PREFIX%% for ${PREFIX}, %%LOCALBASE%% for
-# ${LOCALBASE} and %%X11BASE%% for ${X11BASE}.
-# DOCSDIR - Name of the directory to install the packages docs in
-# (default: ${PREFIX}/share/doc/${PORTNAME}).
-# EXAMPLESDIR - Name of the directory to install the packages examples in
-# (default: ${PREFIX}/share/examples/${PORTNAME}).
-# DATADIR - Name of the directory to install the packages shared data
-# in (default: ${PREFIX}/share/${PORTNAME}).
-#
-# Note that the install target will automatically add manpages (see
-# above) and also substitute special sequences of characters (delimited
-# by "%%") as defined in PLIST_SUB to generate ${TMPPLIST}. For
-# instance, "OSREL=${OSREL}" in PLIST_SUB causes all occurrences of
-# "%%OSREL%%" in ${PLIST} to be substituted by the value of OSREL.
-# ${TMPPLIST} is generated before the do-install stage. If you are
-# generating the packing list on-the-fly, make sure it's generated before
-# do-install is called!
-#
-# For package:
-#
-# NO_LATEST_LINK - Do not install the "Latest" link for package. Define this
-# if this port is a beta version of another stable port
-# which is also in the tree.
-# LATEST_LINK - Install the "Latest" link for the package as ___. Define
-# this if the "Latest" link name will be incorrectly determined.
-#
-# This is used in all stages:
-#
-# SCRIPTS_ENV - Additional environment vars passed to scripts in
-# ${SCRIPTDIR} executed by bsd.port.mk (default: see below).
-#
-# Finally, variables to change if you want a special behavior. These
-# are for debugging purposes. Don't set them in your Makefile.
-#
-# ECHO_MSG - Used to print all the '===>' style prompts - override this
-# to turn them off (default: ${ECHO_CMD}).
-# PATCH_DEBUG - If set, print out more information about the patches as
-# it attempts to apply them.
-# PKG_DBDIR - Where package installation is recorded; this directory
-# must not contain anything else (default: /var/db/pkg).
-# PORT_DBDIR - Where port configuration options are recorded
-# (default: /var/db/ports)
-# NO_PKG_REGISTER - Don't register a port installation as a package.
-# FORCE_PKG_REGISTER - If set, it will overwrite any existing package
-# registration information in ${PKG_DBDIR}/${PKGNAME}.
-# NO_DEPENDS - Don't verify build of dependencies.
-# NO_CHECKSUM - Don't verify the checksum. Typically used when
-# when you noticed the distfile you just fetched has
-# a different checksum and you intend to verify if
-# the port still works with it.
-# USE_PACKAGE_DEPENDS - Install dependencies from existing packages instead
-# of building the port from scratch.
-# INSTALL_AS_USER - Define this to install as the current user, intended
-# for systems where you have no root access.
-# DISABLE_SIZE - Do not check the size of a distfile even if the SIZE field
-# has been specified in distinfo. This is useful
-# when using an alternate FETCH_CMD.
-#
-# End of the list of all variables that need to be defined in a port.
-# Most port authors should not need to understand anything after this point.
-#
-
-.if !defined(OLD_PORTMK)
-
-# Start of pre-makefile section.
-.if !defined(AFTERPORTMK)
-.include "${PORTSDIR}/devel/portmk/Mk/bsd.port.pre.mk"
-.endif
-# End of pre-makefile section.
-
-# Start of post-makefile section.
-.if !defined(BEFOREPORTMK)
-.include "${PORTSDIR}/devel/portmk/Mk/bsd.port.post.mk"
-.endif
-# End of post-makefile section.
-
-.else
-
-.include "${PORTSDIR}/Mk/bsd.port.mk"
-
-.endif
diff --git a/ports-mgmt/portmk/Mk/bsd.port.post.mk b/ports-mgmt/portmk/Mk/bsd.port.post.mk
deleted file mode 100644
index 508902dc1586..000000000000
--- a/ports-mgmt/portmk/Mk/bsd.port.post.mk
+++ /dev/null
@@ -1,3579 +0,0 @@
-#-*- mode: makefile; tab-width: 4; -*-
-# ex:ts=4
-#
-# $FreeBSD$
-#
-
-.if defined(_POSTMKINCLUDED)
-check-makefile::
- @${ECHO_CMD} "${PKGNAME}: Makefile error: you cannot include bsd.port[.post].mk twice"
- @${FALSE}
-.endif
-
-_POSTMKINCLUDED= yes
-
-OPTIONS_DBDIR?= /var/db/options
-OPTIONS_FILE?= ${OPTIONS_DBDIR}/${UNIQUENAME}
-
-.if defined(_OPTIONSNG_READ) && exists(${OPTIONS_FILE})
-.if ${_OPTIONSNG_READ} == default
-_ONG_REEXEC= yes
-check-makefile::
- @${ECHO_MSG} "===> Configuration error, \`make rmconfig' to remove custom options."
- @${FALSE}
-.else
-.undef _ONG_REEXEC
-.endif
-_ONG_MAKEFLAGS= -f '${OPTIONS_FILE}' -f Makefile
-.else
-.undef _ONG_REEXEC
-_ONG_MAKEFLAGS= -f Makefile
-.endif
-
-WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work
-.if defined(NO_WRKSUBDIR)
-WRKSRC?= ${WRKDIR}
-.else
-WRKSRC?= ${WRKDIR}/${DISTNAME}
-.endif
-
-PATCH_WRKSRC?= ${WRKSRC}
-CONFIGURE_WRKSRC?= ${WRKSRC}
-BUILD_WRKSRC?= ${WRKSRC}
-INSTALL_WRKSRC?=${WRKSRC}
-
-WRKINST?= ${WRKDIR}/.inst
-
-.if defined(DESTDIR)
-check-makefile::
- @${ECHO_CMD} "${PKGNAME}: DESTDIR is not a user settable variable"
- @${FALSE}
-.endif
-
-.if defined(CLEANROOM_INSTALL)
-DESTDIR= ${WRKINST}
-.endif
-
-PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}
-SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \
- DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR}
-
-
-.if defined(WITHOUT_CPU_CFLAGS)
-.if defined(_CPUCFLAGS)
-.if !empty(_CPUCFLAGS)
-CFLAGS:= ${CFLAGS:C/${_CPUCFLAGS}//}
-.endif
-.endif
-.endif
-
-.if defined(NOPORTDOCS)
-PLIST_SUB+= PORTDOCS="@comment "
-.else
-PLIST_SUB+= PORTDOCS=""
-.endif
-
-CONFIGURE_SHELL?= ${SH}
-MAKE_SHELL?= ${SH}
-
-CONFIGURE_ENV+= SHELL=${SH} CONFIG_SHELL=${SH} PORTOBJFORMAT=${PORTOBJFORMAT}
-SCRIPTS_ENV+= PORTOBJFORMAT=${PORTOBJFORMAT}
-MAKE_ENV+= SHELL=${SH} PORTOBJFORMAT=${PORTOBJFORMAT}
-PLIST_SUB+= PORTOBJFORMAT=${PORTOBJFORMAT}
-
-.if defined(MANCOMPRESSED)
-.if ${MANCOMPRESSED} != yes && ${MANCOMPRESSED} != no && \
- ${MANCOMPRESSED} != maybe
-check-makevars::
- @${ECHO_CMD} "${PKGNAME}: Makefile error: value of MANCOMPRESSED (is \"${MANCOMPRESSED}\") can only be \"yes\", \"no\" or \"maybe\"".
- @${FALSE}
-.endif
-.endif
-
-.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES)
-MANCOMPRESSED?= yes
-.else
-MANCOMPRESSED?= no
-.endif
-
-.if defined(PATCHFILES)
-.if ${PATCHFILES:M*.bz2}x != x && defined(BZIP2DEPENDS)
-PATCH_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2
-.endif
-.if ${PATCHFILES:M*.zip}x != x && defined(ZIPDEPENDS)
-PATCH_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip
-.endif
-.endif
-
-.if defined(USE_BZIP2) && defined(BZIP2DEPENDS)
-EXTRACT_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2
-.endif
-.if defined(USE_ZIP) && defined(ZIPDEPENDS)
-EXTRACT_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip
-.endif
-.if defined(USE_GMAKE)
-BUILD_DEPENDS+= gmake:${PORTSDIR}/devel/gmake
-CONFIGURE_ENV+= MAKE=${GMAKE}
-.endif
-
-.if defined(USE_GCC)
-.if ${OSVERSION} < 400012
-GCCVERSION= 020702
-.endif
-.if ${OSVERSION} >= 400012 && ${OSVERSION} < 500035
-GCCVERSION= 029500
-.endif
-.if ${OSVERSION} >= 500035 && ${OSVERSION} < 500039
-GCCVERSION= 030100
-.endif
-.if ${OSVERSION} >= 500039 && ${OSVERSION} < 501103
-GCCVERSION= 030200
-.endif
-.if ${OSVERSION} >= 501103 && ${OSVERSION} < 502126
-GCCVERSION= 030301
-.endif
-.if ${OSVERSION} >= 502126
-GCCVERSION= 030402
-.endif
-.endif
-
-.if defined(USE_GCC)
-.if ${USE_GCC} == 2.95 && ( ${OSVERSION} < 400012 || ${OSVERSION} > 500034 )
-CC= gcc295
-CXX= g++295
-BUILD_DEPENDS+= gcc295:${PORTSDIR}/lang/gcc295
-GCCVERSION= 029500
-.endif
-.if ${USE_GCC} == 3.1 && ( ${OSVERSION} < 500035 || ${OSVERSION} > 500038 )
-CC= gcc31
-CXX= g++31
-F77= g77-31
-BUILD_DEPENDS+= gcc31:${PORTSDIR}/lang/gcc31
-GCCVERSION= 030100
-.endif
-.if ${USE_GCC} == 3.2 && ( ${OSVERSION} < 500039 || ${OSVERSION} > 501102 )
-CC= gcc32
-CXX= g++32
-F77= g77-32
-BUILD_DEPENDS+= gcc32:${PORTSDIR}/lang/gcc32
-GCCVERSION= 030200
-.endif
-.if ${USE_GCC} == 3.3 && ( ${OSVERSION} < 501103 || ${OSVERSION} > 502125 )
-CC= gcc33
-CXX= g++33
-F77= g77-33
-BUILD_DEPENDS+= gcc33:${PORTSDIR}/lang/gcc33
-GCCVERSION= 030301
-.endif
-.if ${USE_GCC} == 3.4 && ${OSVERSION} < 502126
-CC= gcc34
-CXX= g++34
-F77= g77-34
-BUILD_DEPENDS+= gcc34:${PORTSDIR}/lang/gcc34
-GCCVERSION= 030402
-.endif
-MAKE_ENV+= CC="${CC}" CXX="${CXX}"
-.endif
-
-.if defined(USE_OPENLDAP_VER)
-USE_OPENLDAP?= yes
-WANT_OPENLDAP_VER= ${USE_OPENLDAP_VER}
-.endif
-
-.if defined(USE_OPENLDAP)
-.if defined(WANT_OPENLDAP_SASL)
-_OPENLDAP_FLAVOUR= -sasl
-.else
-_OPENLDAP_FLAVOUR=
-.endif
-.if ${WANT_OPENLDAP_VER} == 23
-LIB_DEPENDS+= ldap-2.3.0:${PORTSDIR}/net/openldap23${_OPENLDAP_FLAVOUR}-client
-.elif ${WANT_OPENLDAP_VER} == 22
-LIB_DEPENDS+= ldap-2.2.7:${PORTSDIR}/net/openldap22${_OPENLDAP_FLAVOUR}-client
-.elif ${WANT_OPENLDAP_VER} == 21
-LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap21${_OPENLDAP_FLAVOUR}-client
-.else
-BROKEN= "unknown OpenLDAP version: ${WANT_OPENLDAP_VER}"
-.endif
-.endif
-
-.if defined(USE_GETOPT_LONG)
-.if ${OSVERSION} < 500041
-LIB_DEPENDS+= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -lgnugetopt
-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
-.endif
-.endif
-
-.if defined(USE_RC_SUBR)
-.if ${OSVERSION} < 500037
-RUN_DEPENDS+= ${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr
-RC_SUBR= ${LOCALBASE}/etc/rc.subr
-.else
-RC_SUBR= /etc/rc.subr
-.endif
-.endif
-
-.if defined(USE_ICONV)
-LIB_DEPENDS+= iconv.3:${PORTSDIR}/converters/libiconv
-.endif
-
-.if defined(USE_GETTEXT)
-. if ${USE_GETTEXT:L} == yes
-LIB_DEPENDS+= intl:${PORTSDIR}/devel/gettext
-. else
-LIB_DEPENDS+= intl.${USE_GETTEXT}:${PORTSDIR}/devel/gettext
-. endif
-.endif
-
-.if defined(USE_LINUX)
-. if exists(${PORTSDIR}/emulators/linux_base-${USE_LINUX})
-RUN_DEPENDS+= ${LINUXBASE}/bin/sh:${PORTSDIR}/emulators/linux_base-${USE_LINUX}
-. else
-. if ${USE_LINUX} == 7
-RUN_DEPENDS+= ${LINUXBASE}/etc/redhat-release:${PORTSDIR}/emulators/linux_base
-. else
-RUN_DEPENDS+= ${LINUXBASE}/etc/redhat-release:${PORTSDIR}/emulators/linux_base-8
-. endif
-. endif
-.endif
-
-.if defined(USE_MOTIF)
-USE_XPM= yes
-.if defined(WANT_LESSTIF)
-LIB_DEPENDS+= Xm:${PORTSDIR}/x11-toolkits/lesstif
-NO_OPENMOTIF= yes
-.endif
-.if !defined(NO_OPENMOTIF)
-LIB_DEPENDS+= Xm.3:${PORTSDIR}/x11-toolkits/open-motif
-.endif
-.endif
-
-.if defined(USE_FREETYPE)
-LIB_DEPENDS+= ttf.4:${PORTSDIR}/print/freetype
-.endif
-
-.if defined(X_WINDOW_SYSTEM) && ${X_WINDOW_SYSTEM:L} == xorg
-X_IMAKE_PORT= ${PORTSDIR}/devel/imake-6
-X_LIBRARIES_PORT= ${PORTSDIR}/x11/xorg-libraries
-X_CLIENTS_PORT= ${PORTSDIR}/x11/xorg-clients
-X_SERVER_PORT= ${PORTSDIR}/x11-servers/xorg-server
-X_FONTSERVER_PORT= ${PORTSDIR}/x11-servers/xorg-fontserver
-X_PRINTSERVER_PORT= ${PORTSDIR}/x11-servers/xorg-printserver
-X_VFBSERVER_PORT= ${PORTSDIR}/x11-servers/xorg-vfbserver
-X_NESTSERVER_PORT= ${PORTSDIR}/x11-servers/xorg-nestserver
-X_FONTS_ENCODINGS_PORT= ${PORTSDIR}/x11-fonts/xorg-fonts-encodings
-X_FONTS_MISC_PORT= ${PORTSDIR}/x11-fonts/xorg-fonts-miscbitmaps
-X_FONTS_100DPI_PORT= ${PORTSDIR}/x11-fonts/xorg-fonts-100dpi
-X_FONTS_75DPI_PORT= ${PORTSDIR}/x11-fonts/xorg-fonts-75dpi
-X_FONTS_CYRILLIC_PORT= ${PORTSDIR}/x11-fonts/xorg-fonts-cyrillic
-X_FONTS_TTF_PORT= ${PORTSDIR}/x11-fonts/xorg-fonts-truetype
-X_FONTS_TYPE1_PORT= ${PORTSDIR}/x11-fonts/xorg-fonts-type1
-X_MANUALS_PORT= ${PORTSDIR}/x11/xorg-manpages
-.elif defined(X_WINDOW_SYSTEM) && ${X_WINDOW_SYSTEM:L} == xfree86-4
-X_IMAKE_PORT= ${PORTSDIR}/devel/imake-4
-X_LIBRARIES_PORT= ${PORTSDIR}/x11/XFree86-4-libraries
-X_CLIENTS_PORT= ${PORTSDIR}/x11/XFree86-4-clients
-X_SERVER_PORT= ${PORTSDIR}/x11-servers/XFree86-4-Server
-X_FONTSERVER_PORT= ${PORTSDIR}/x11-servers/XFree86-4-FontServer
-X_PRINTSERVER_PORT= ${PORTSDIR}/x11-servers/XFree86-4-PrintServer
-X_VFBSERVER_PORT= ${PORTSDIR}/x11-servers/XFree86-4-VirtualFramebufferServer
-X_NESTSERVER_PORT= ${PORTSDIR}/x11-servers/XFree86-4-NestServer
-X_FONTS_ENCODINGS_PORT= ${PORTSDIR}/x11-fonts/XFree86-4-fontEncodings
-X_FONTS_MISC_PORT= ${PORTSDIR}/x11-fonts/XFree86-4-fontDefaultBitmaps
-X_FONTS_100DPI_PORT= ${PORTSDIR}/x11-fonts/XFree86-4-font100dpi
-X_FONTS_75DPI_PORT= ${PORTSDIR}/x11-fonts/XFree86-4-font75dpi
-X_FONTS_CYRILLIC_PORT= ${PORTSDIR}/x11-fonts/XFree86-4-fontCyrillic
-X_FONTS_TTF_PORT= ${PORTSDIR}/x11-fonts/XFree86-4-fontScalable
-X_FONTS_TYPE1_PORT= ${PORTSDIR}/x11-fonts/XFree86-4-fontScalable
-X_MANUALS_PORT= ${PORTSDIR}/x11/XFree86-4-manuals
-.elif defined(X_WINDOW_SYSTEM) && ${X_WINDOW_SYSTEM:L} == xfree86-3
-X_IMAKE_PORT= ${PORTSDIR}/x11/XFree86
-X_LIBRARIES_PORT= ${PORTSDIR}/x11/XFree86
-X_CLIENTS_PORT= ${PORTSDIR}/x11/XFree86
-X_SERVER_PORT= ${PORTSDIR}/x11/XFree86
-X_FONTSERVER_PORT= ${PORTSDIR}/x11/XFree86
-X_PRINTSERVER_PORT= ${PORTSDIR}/x11/XFree86
-X_VFBSERVER_PORT= ${PORTSDIR}/x11/XFree86
-X_NESTSERVER_PORT= ${PORTSDIR}/x11/XFree86
-X_FONTS_ENCODINGS_PORT= ${PORTSDIR}/x11/XFree86
-X_FONTS_MISC_PORT= ${PORTSDIR}/x11/XFree86
-X_FONTS_100DPI_PORT= ${PORTSDIR}/x11/XFree86
-X_FONTS_75DPI_PORT= ${PORTSDIR}/x11/XFree86
-X_FONTS_CYRILLIC_PORT= ${PORTSDIR}/x11/XFree86
-X_FONTS_TTF_PORT= ${PORTSDIR}/x11/XFree86
-X_FONTS_TYPE1_PORT= ${PORTSDIR}/x11/XFree86
-X_MANUALS_PORT= ${PORTSDIR}/x11/XFree86
-.else
-.error Bad X_WINDOW_SYSTEM setting
-.endif
-
-.if defined(USE_IMAKE)
-BUILD_DEPENDS+= imake:${X_IMAKE_PORT}
-.endif
-
-.if ${X_WINDOW_SYSTEM:L} == xfree86-3
-
-.if defined(USE_XPM)
-LIB_DEPENDS+= Xpm.4:${PORTSDIR}/graphics/xpm
-.endif
-.if defined(USE_GL)
-LIB_DEPENDS+= GL.14:${PORTSDIR}/graphics/mesagl
-.endif
-
-XAWVER= 6
-PKG_IGNORE_DEPENDS?= '^XFree86-3\.'
-
-.else
-
-.if defined(USE_XPM) || defined(USE_GL)
-USE_XLIB= yes
-.endif
-
-.if ${X_WINDOW_SYSTEM:L} == xorg
-XAWVER= 8
-.else
-XAWVER= 7
-.endif
-PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist'
-
-.endif
-
-PLIST_SUB+= XAWVER=${XAWVER}
-
-.if defined(USE_MESA)
-LIB_DEPENDS+= glut.3:${PORTSDIR}/graphics/libglut
-.endif
-
-.if defined(USE_BISON)
-.if ${OSVERSION} >= 400014
-BUILD_DEPENDS+= bison:${PORTSDIR}/devel/bison
-.endif
-.endif
-
-PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \
- PERL_VER=${PERL_VER} \
- PERL_ARCH=${PERL_ARCH} \
- SITE_PERL=${SITE_PERL_REL}
-
-.if defined(PERL_MODBUILD)
-PERL_CONFIGURE= yes
-CONFIGURE_SCRIPT?= Build.PL
-.if ${PORTNAME} != Module-Build
-BUILD_DEPENDS+= ${SITE_PERL}/Module/Build.pm:${PORTSDIR}/devel/p5-Module-Build
-.endif
-ALL_TARGET?=
-PL_BUILD?= Build
-CONFIGURE_ARGS+= \
- install_path=lib="${PREFIX}/${SITE_PERL_REL}" \
- install_path=arch="${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}" \
- install_path=script="${PREFIX}/bin" \
- install_path=bin="${PREFIX}/bin" \
- install_path=libdoc="${MAN3PREFIX}/man/man3" \
- install_path=bindoc="${MAN1PREFIX}/man/man1"
-.endif
-
-.if defined(PERL_CONFIGURE)
-USE_PERL5= yes
-USE_REINPLACE=yes
-.endif
-
-.if ${PERL_LEVEL} >= 500600
-.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
-EXTRACT_DEPENDS+=${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
-PATCH_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
-BUILD_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
-.endif
-.if defined(USE_PERL5) || defined(USE_PERL5_RUN)
-RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
-.endif
-.endif
-
-.if defined(USE_MYSQL)
-DEFAULT_MYSQL_VER?= 40
-# MySQL client version currently supported.
-MYSQL323_LIBVER= 10
-MYSQL40_LIBVER= 12
-MYSQL41_LIBVER= 14
-MYSQL50_LIBVER= 14
-
-# Setting/finding MySQL version we want.
-.if exists(${LOCALBASE}/bin/mysql)
-_MYSQL_VER!= ${LOCALBASE}/bin/mysql --version | ${SED} -e 's/.*Distrib \([0-9]\)\.\([0-9]*\).*/\1\2/'
-.endif
-
-.if defined(WANT_MYSQL_VER)
-.if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER} != ${WANT_MYSQL_VER}
-BROKEN= The port wants mysql${WANT_MYSQL_VER}-client and you try to install mysql${WITH_MYSQL_VER}-client.
-.endif
-MYSQL_VER= ${WANT_MYSQL_VER}
-.elif defined(WITH_MYSQL_VER)
-MYSQL_VER= ${WITH_MYSQL_VER}
-.else
-.if defined(_MYSQL_VER)
-MYSQL_VER= ${_MYSQL_VER}
-.else
-MYSQL_VER= ${DEFAULT_MYSQL_VER}
-.endif
-.endif # WANT_MYSQL_VER
-
-.if defined(_MYSQL_VER)
-.if ${_MYSQL_VER} != ${MYSQL_VER}
-BROKEN= MySQL versions mismatch: mysql${_MYSQL_VER}-client is installed and wanted version is mysql${MYSQL_VER}-client
-.endif
-.endif
-
-# And now we are checking if we can use it
-.if exists(${PORTSDIR}/databases/mysql${MYSQL_VER}-client)
-.if defined(BROKEN_WITH_MYSQL)
-. for VER in ${BROKEN_WITH_MYSQL}
-. if (${MYSQL_VER} == ${VER})
-IGNORE= Doesn't work with MySQL version : ${MYSQL_VER} (Doesn't support MySQL ${BROKEN_WITH_MYSQL})
-. endif
-. endfor
-.endif # BROKEN_WITH_MYSQL
-LIB_DEPENDS+= mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/databases/mysql${MYSQL_VER}-client
-.else
-BROKEN= "unknown MySQL version: ${MYSQL_VER}"
-.endif # Check for correct libs
-.endif # USE_MYSQL
-
-.if defined(USE_PGSQL)
-DEFAULT_PGSQL_VER?= 74
-
-# Setting/finding PostgreSQL version we want.
-.if defined(WANT_PGSQL_VER)
-PGSQL_VER= ${WANT_PGSQL_VER}
-.elif exists(${LOCALBASE}/bin/pg_config)
-PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
-.else
-PGSQL_VER= ${DEFAULT_PGSQL_VER}
-.endif # WANT_PGSQL_VER
-
-# And now we are checking if we can use it
-.if exists(${PORTSDIR}/databases/postgresql${PGSQL_VER}-client)
-.if defined(BROKEN_WITH_PGSQL)
-. for VER in ${BROKEN_WITH_PGSQL}
-. if (${PGSQL_VER} == ${VER})
-BROKEN= "Doesn't work with PostgreSQL version : ${PGSQL_VER} (Doesn't support PostgresSQL ${BROKEN_WITH_PGSQL})"
-. endif
-. endfor
-.endif # BROKEN_WITH_PGSQL
-LIB_DEPENDS+= pq:${PORTSDIR}/databases/postgresql${PGSQL_VER}-client
-.else
-BROKEN= "unknown PostgreSQL version: ${PGSQL_VER}"
-.endif # Check for correct version
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
-.endif # USE_PGSQL
-
-.if defined(USE_XLIB)
-LIB_DEPENDS+= X11.6:${X_LIBRARIES_PORT}
-# Add explicit X options to avoid problems with false positives in configure
-.if defined(GNU_CONFIGURE)
-CONFIGURE_ARGS+=--x-libraries=${X11BASE}/lib --x-includes=${X11BASE}/include
-.endif
-.endif
-
-# XXX: (not yet): .if defined(USE_AUTOTOOLS)
-.include "${PORTSDIR}/Mk/bsd.autotools.mk"
-# XXX: (not yet): .endif
-
-.if defined(WANT_GNOME) || defined(USE_GNOME) || defined(USE_GTK)
-.include "${PORTSDIR}/Mk/bsd.gnome.mk"
-.endif
-
-.if defined(USE_SDL) || defined(WANT_SDL)
-.include "${PORTSDIR}/Mk/bsd.sdl.mk"
-.endif
-
-.if defined(USE_PYTHON)
-.include "${PORTSDIR}/Mk/bsd.python.mk"
-.endif
-
-.if exists(${PORTSDIR}/../Makefile.inc)
-.include "${PORTSDIR}/../Makefile.inc"
-USE_SUBMAKE= yes
-.endif
-
-.if defined(USE_XLIB)
-LIB_DEPENDS+= X11.6:${X_LIBRARIES_PORT}
-# Add explicit X options to avoid problems with false positives in configure
-.if defined(GNU_CONFIGURE)
-CONFIGURE_ARGS+=--x-libraries=${X11BASE}/lib --x-includes=${X11BASE}/include
-.endif
-.endif
-
-# Set the default for the installation of Postscript(TM)-
-# compatible functionality.
-.if !defined(WITHOUT_X11)
-.if defined(WITH_GHOSTSCRIPT_AFPL)
-.if ${WITH_GHOSTSCRIPT_AFPL:L} == yes
-GHOSTSCRIPT_PORT?= print/ghostscript-afpl
-.else
-GHOSTSCRIPT_PORT?= print/ghostscript-gnu
-.endif
-.else
-GHOSTSCRIPT_PORT?= print/ghostscript-gnu
-.endif
-.else
-.if defined(WITH_GHOSTSCRIPT_AFPL)
-.if ${WITH_GHOSTSCRIPT_AFPL:L} == yes
-GHOSTSCRIPT_PORT?= print/ghostscript-afpl-nox11
-.else
-GHOSTSCRIPT_PORT?= print/ghostscript-gnu-nox11
-.endif
-.else
-GHOSTSCRIPT_PORT?= print/ghostscript-gnu-nox11
-.endif
-.endif
-
-# Set up the ghostscript dependencies.
-.if defined(USE_GHOSTSCRIPT) || defined(USE_GHOSTSCRIPT_BUILD)
-BUILD_DEPENDS+= gs:${PORTSDIR}/${GHOSTSCRIPT_PORT}
-.endif
-.if defined(USE_GHOSTSCRIPT) || defined(USE_GHOSTSCRIPT_RUN)
-RUN_DEPENDS+= gs:${PORTSDIR}/${GHOSTSCRIPT_PORT}
-.endif
-
-# Special macro for doing in-place file editing using regexps
-.if defined(USE_REINPLACE)
-REINPLACE_ARGS?= -i.bak
-.if ${OSVERSION} < 460101 || ( ${OSVERSION} >= 500000 && ${OSVERSION} < 500036 )
-PATCH_DEPENDS+= ${LOCALBASE}/bin/sed_inplace:${PORTSDIR}/textproc/sed_inplace
-REINPLACE_CMD?= ${LOCALBASE}/bin/sed_inplace ${REINPLACE_ARGS}
-.else
-REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS}
-.endif
-.endif
-
-# Names of cookies used to skip already completed stages
-.for target in extract patch configure build install package
-${target:U}_COOKIE?=${WRKDIR}/.${target}_done.${PKGNAME}.${PREFIX:S/\//_/g}
-.endfor
-
-# How to do nothing. Override if you, for some strange reason, would rather
-# do something.
-DO_NADA?= ${TRUE}
-
-# Use this as the first operand to always build dependency.
-NONEXISTENT?= /nonexistent
-
-# Miscellaneous overridable commands:
-GMAKE?= gmake
-XMKMF?= xmkmf -a
-.if exists(/sbin/md5)
-MD5?= /sbin/md5
-.elif exists(/bin/md5)
-MD5?= /bin/md5
-.elif exists(/usr/bin/md5)
-MD5?= /usr/bin/md5
-.else
-MD5?= md5
-.endif
-MD5_FILE?= ${MASTERDIR}/distinfo
-
-MAKE_FLAGS?= -f
-MAKEFILE?= Makefile
-MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} DESTDIR=${DESTDIR} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" MANPREFIX="${MANPREFIX}"
-
-.if ${OSVERSION} < 500016
-PTHREAD_CFLAGS?= -D_THREAD_SAFE
-PTHREAD_LIBS?= -pthread
-.elif ${OSVERSION} < 502102
-PTHREAD_CFLAGS?= -D_THREAD_SAFE
-PTHREAD_LIBS?= -lc_r
-.else
-PTHREAD_CFLAGS?=
-PTHREAD_LIBS?= -pthread
-.endif
-
-.if defined(FETCH_USE_CURL) && exists(${LOCALBASE}/bin/curl)
-FETCH_CMD?= ${LOCALBASE}/bin/curl --create-dirs -L --max-redirs 1 -C -
-.elif defined(FETCH_USE_WGET) && exists(${LOCALBASE}/bin/wget)
-FETCH_CMD?= ${LOCALBASE}/bin/wget -c -t 1
-.else
-FETCH_CMD?= /usr/bin/fetch -ARr
-.endif
-
-TOUCH?= /usr/bin/touch
-TOUCH_FLAGS?= -f
-
-DISTORIG?= .bak.orig
-PATCH?= /usr/bin/patch
-PATCH_STRIP?= -p0
-PATCH_DIST_STRIP?= -p0
-.if defined(PATCH_DEBUG)
-PATCH_DEBUG_TMP= yes
-PATCH_ARGS?= -d ${PATCH_WRKSRC} -E ${PATCH_STRIP}
-PATCH_DIST_ARGS?= --suffix ${DISTORIG} -d ${PATCH_WRKSRC} -E ${PATCH_DIST_STRIP}
-.else
-PATCH_DEBUG_TMP= no
-PATCH_ARGS?= -d ${PATCH_WRKSRC} --forward --quiet -E ${PATCH_STRIP}
-PATCH_DIST_ARGS?= --suffix ${DISTORIG} -d ${PATCH_WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP}
-.endif
-.if defined(BATCH)
-PATCH_ARGS+= --batch
-PATCH_DIST_ARGS+= --batch
-.endif
-
-# Prevent breakage with VERSION_CONTROL=numbered
-PATCH_ARGS+= -V simple
-
-.if defined(PATCH_CHECK_ONLY)
-PATCH_ARGS+= -C
-PATCH_DIST_ARGS+= -C
-.endif
-
-.if ${PATCH} == /usr/bin/patch
-PATCH_ARGS+= --suffix .orig
-PATCH_DIST_ARGS+= --suffix .orig
-.endif
-
-.if exists(/bin/tar)
-TAR?= /bin/tar
-.else
-TAR?= /usr/bin/tar
-.endif
-
-# EXTRACT_SUFX is defined in .pre.mk section
-.if defined(USE_ZIP)
-EXTRACT_CMD?= ${UNZIP_CMD}
-EXTRACT_BEFORE_ARGS?= -qo
-EXTRACT_AFTER_ARGS?= -d ${WRKDIR}
-.else
-EXTRACT_BEFORE_ARGS?= -dc
-EXTRACT_AFTER_ARGS?= | ${TAR} -xf -
-.if defined(USE_BZIP2)
-EXTRACT_CMD?= ${BZIP2_CMD}
-.else
-EXTRACT_CMD?= ${GZIP_CMD}
-.endif
-.endif
-
-# Figure out where the local mtree file is
-.if !defined(MTREE_FILE) && !defined(NO_MTREE)
-.if ${PREFIX} == ${X11BASE} || defined(USE_X_PREFIX)
-# User may have specified non-standard PREFIX for installing a port that
-# uses X
-.if ${X_WINDOW_SYSTEM:L} == xfree86-3
-MTREE_FILE= /etc/mtree/BSD.x11.dist
-.else
-MTREE_FILE= /etc/mtree/BSD.x11-4.dist
-.endif
-.elif ${PREFIX} == /usr
-MTREE_FILE= /etc/mtree/BSD.usr.dist
-.else
-MTREE_FILE= /etc/mtree/BSD.local.dist
-.endif
-.endif
-MTREE_CMD?= /usr/sbin/mtree
-MTREE_ARGS?= -U ${MTREE_FOLLOWS_SYMLINKS} -f ${MTREE_FILE} -d -e -p
-
-# Determine whether or not we can use rootly owner/group functions.
-.if !defined(UID)
-UID!= ${ID} -u
-.endif
-.if ${UID} == 0
-_BINOWNGRP= -o ${BINOWN} -g ${BINGRP}
-_SHROWNGRP= -o ${SHAREOWN} -g ${SHAREGRP}
-_MANOWNGRP= -o ${MANOWN} -g ${MANGRP}
-.else
-_BINOWNGRP=
-_SHROWNGRP=
-_MANOWNGRP=
-.endif
-
-# A few aliases for *-install targets
-INSTALL_PROGRAM= \
- ${INSTALL} ${COPY} ${STRIP} ${_BINOWNGRP} -m ${BINMODE}
-INSTALL_SCRIPT= \
- ${INSTALL} ${COPY} ${_BINOWNGRP} -m ${BINMODE}
-INSTALL_DATA= \
- ${INSTALL} ${COPY} ${_SHROWNGRP} -m ${SHAREMODE}
-INSTALL_MAN= \
- ${INSTALL} ${COPY} ${_MANOWNGRP} -m ${MANMODE}
-
-INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
- BSD_INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
- BSD_INSTALL_DATA="${INSTALL_DATA}" \
- BSD_INSTALL_MAN="${INSTALL_MAN}"
-MAKE_ENV+= ${INSTALL_MACROS}
-SCRIPTS_ENV+= ${INSTALL_MACROS}
-
-# The user can override the NO_PACKAGE by specifying this from
-# the make command line
-.if defined(FORCE_PACKAGE)
-.undef NO_PACKAGE
-.endif
-
-COMMENTFILE?= ${PKGDIR}/pkg-comment
-DESCR?= ${PKGDIR}/pkg-descr
-PLIST?= ${PKGDIR}/pkg-plist
-PKGINSTALL?= ${PKGDIR}/pkg-install
-PKGDEINSTALL?= ${PKGDIR}/pkg-deinstall
-PKGREQ?= ${PKGDIR}/pkg-req
-PKGMESSAGE?= ${PKGDIR}/pkg-message
-
-TMPPLIST?= ${WRKDIR}/.PLIST.mktmp
-
-.if ${OSVERSION} >= 400000
-.for _CATEGORY in ${CATEGORIES}
-PKGCATEGORY?= ${_CATEGORY}
-.endfor
-_PORTDIRNAME= ${.CURDIR:T}
-PORTDIRNAME?= ${_PORTDIRNAME}
-PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME}
-.endif
-
-.if exists(${LOCALBASE}/sbin/pkg_info)
-PKG_CMD?= ${LOCALBASE}/sbin/pkg_create
-PKG_ADD?= ${LOCALBASE}/sbin/pkg_add
-PKG_DELETE?= ${LOCALBASE}/sbin/pkg_delete
-PKG_INFO?= ${LOCALBASE}/sbin/pkg_info
-PKG_VERSION?= ${LOCALBASE}/sbin/pkg_version
-.elif ${OSVERSION} < 460102 && ${PKGORIGIN} != "sysutils/pkg_install"
-BUILD_DEPENDS+= ${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install
-PKG_CMD?= ${LOCALBASE}/sbin/pkg_create
-PKG_ADD?= ${LOCALBASE}/sbin/pkg_add
-PKG_DELETE?= ${LOCALBASE}/sbin/pkg_delete
-PKG_INFO?= ${LOCALBASE}/sbin/pkg_info
-PKG_VERSION?= ${LOCALBASE}/sbin/pkg_version
-.else
-PKG_CMD?= /usr/sbin/pkg_create
-PKG_ADD?= /usr/sbin/pkg_add
-PKG_DELETE?= /usr/sbin/pkg_delete
-PKG_INFO?= /usr/sbin/pkg_info
-PKG_VERSION?= /usr/sbin/pkg_version
-.endif
-
-# Does the pkg_create tool support conflict checking?
-# XXX Slow?
-.if !defined(PKGINSTALLVER)
-PKGINSTALLVER!= ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //'
-.endif
-.if ${PKGINSTALLVER} < 20030417
-DISABLE_CONFLICTS= YES
-.endif
-.if !defined(PKG_ARGS)
-PKG_ARGS= -v -c -${COMMENT:Q} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | ${SORT} -u`" ${EXTRA_PKG_ARGS} $${_LATE_PKG_ARGS}
-.if !defined(NO_MTREE)
-PKG_ARGS+= -m ${MTREE_FILE}
-.endif
-.if defined(PKGORIGIN)
-PKG_ARGS+= -o ${PKGORIGIN}
-.endif
-.if defined(CONFLICTS) && !defined(DISABLE_CONFLICTS)
-PKG_ARGS+= -C "${CONFLICTS}"
-.endif
-.if defined(DESTDIR)
-PKG_ARGS+= -S "${DESTDIR}"
-.endif
-.endif
-.if defined(PKG_NOCOMPRESS)
-PKG_SUFX?= .tar
-.else
-.if ${OSVERSION} >= 500039
-PKG_SUFX?= .tbz
-.else
-PKG_SUFX?= .tgz
-.endif
-.endif
-# where pkg_add records its dirty deeds.
-PKG_DBDIR?= /var/db/pkg
-_PKG_DBDIR?= ${DESTDIR}${PKG_DBDIR}
-
-MOTIFLIB?= -L${X11BASE}/lib -lXm -lXp
-
-ALL_TARGET?= all
-INSTALL_TARGET?= install
-
-# This is a mid-term solution patch while pkg-comment files are
-# phased out.
-# The final simpler patch will come afterwards
-.if !defined(COMMENT)
-check-makevars::
- @${ECHO_CMD} 'Makefile error: there is no COMMENT variable defined'
- @${ECHO_CMD} 'for this port. Please, rectify this.'
- @${FALSE}
-.else
-.if exists(${COMMENTFILE})
-check-makevars::
- @${ECHO_CMD} 'Makefile error: There is a COMMENTFILE in this port.'
- @${ECHO_CMD} 'COMMENTFILEs have been deprecated in'
- @${ECHO_CMD} 'favor of COMMENT variables.'
- @${ECHO_CMD} 'Please, rectify this.'
- @${FALSE}
-.endif
-.endif
-
-# Popular master sites
-.include "${PORTSDIR}/Mk/bsd.sites.mk"
-
-# The primary backup site.
-MASTER_SITE_BACKUP?= \
- ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/
-MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP:S^\${DIST_SUBDIR}/^^}
-
-# If the user has MASTER_SITE_FREEBSD set, go to the FreeBSD repository
-# for everything, but don't search it twice by appending it to the end.
-.if defined(MASTER_SITE_FREEBSD)
-_MASTER_SITE_OVERRIDE:= ${MASTER_SITE_BACKUP}
-_MASTER_SITE_BACKUP:= # empty
-.else
-_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE}
-_MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP}
-.endif
-
-# Search CDROM first if mounted
-.for MOUNTPT in ${CD_MOUNTPTS}
-.if exists(${MOUNTPT}/ports/distfiles)
-_MASTER_SITE_OVERRIDE:= file:${MOUNTPT}/ports/distfiles/${DIST_SUBDIR}/ ${_MASTER_SITE_OVERRIDE}
-.endif
-.endfor
-
-DISTFILES?= ${DISTNAME}${EXTRACT_SUFX}
-
-.if !defined(DISTFILES_KEEP_QUOTING)
-_DISTFILES= ${DISTFILES:C/:[^:]+$//:C/\\\\(.)/\1/g}
-_PATCHFILES= ${PATCHFILES:C/:[^:]+$//:C/\\\\(.)/\1/g}
-.else
-_DISTFILES= ${DISTFILES:C/:[^:]+$//}
-_PATCHFILES= ${PATCHFILES:C/:[^:]+$//}
-.endif
-
-#
-# Sort the master site list according to the patterns in MASTER_SORT
-#
-MASTER_SORT?=
-MASTER_SORT_REGEX?=
-MASTER_SORT_REGEX+= ${MASTER_SORT:S|.|\\.|g:S|^|://[^/]*|:S|$|/|}
-
-MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX:S|\\|\\\\|g}"; }
-.for srt in ${MASTER_SORT_REGEX}
-MASTER_SORT_AWK+= /${srt:S|/|\\/|g}/ { good["${srt:S|\\|\\\\|g}"] = good["${srt:S|\\|\\\\|g}"] " " $$0 ; next; }
-.endfor
-MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; }
-
-.if defined(MASTER_SORT_FPING) && exists(${PERL5}) && exists(${LOCALBASE}/sbin/fping)
-MASTER_SORT_CMD?= ${PERL5} -w ${PORTSDIR}/devel/portmk/scripts/ranksites-fping.pl
-.elif defined(MASTER_SORT_GEOIP) && defined(CC_HOME) && exists(${PERL5}) && exists(${SITE_PERL}/${PERL_ARCH}/Geo/IP.pm)
-MASTER_SORT_CMD?= ${PERL5} -w ${PORTSDIR}/devel/portmk/scripts/ranksites-geoip.pl
-MASTER_SORT_ENV+= CC_HOME=${CC_HOME}
-.endif
-
-# This is what is actually going to be extracted, and is overridable
-# by user.
-EXTRACT_ONLY?= ${_DISTFILES}
-
-# Documentation
-.EXEC: maintainer
-.if !target(maintainer)
-maintainer:
- @${ECHO_CMD} "${MAINTAINER}"
-.endif
-
-.EXEC: check-makefile
-.if !target(check-makefile)
-check-makefile::
- @${DO_NADA}
-.endif
-
-.EXEC: check-categories
-.if !defined(CATEGORIES)
-check-categories:
- @${ECHO_CMD} "${PKGNAME}: Makefile error: CATEGORIES is mandatory."
- @${FALSE}
-.else
-
-VALID_CATEGORIES+= accessibility afterstep arabic archivers astro audio \
- benchmarks biology cad chinese comms converters databases \
- deskutils devel dns editors elisp emulators finance french ftp \
- games german gnome graphics haskell hebrew hungarian \
- ipv6 irc japanese java kde korean lang linux lisp \
- mail math mbone misc multimedia net net-mgmt news \
- offix palm parallel pear perl5 picobsd plan9 polish portuguese print \
- python ruby russian \
- scheme science security shells sysutils \
- tcl80 tcl81 tcl82 tcl83 tcl84 textproc \
- tk80 tk82 tk83 tk84 tkstep80 \
- ukrainian vietnamese windowmaker www \
- x11 x11-clocks x11-fm x11-fonts x11-servers x11-themes x11-toolkits \
- x11-wm xfce zope
-
-check-categories:
-.for cat in ${CATEGORIES}
- @if ${ECHO_CMD} ${VALID_CATEGORIES} | ${GREP} -wq ${cat}; then \
- ${TRUE}; \
- else \
- ${ECHO_CMD} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \
- ${FALSE}; \
- fi
-.endfor
-.endif
-
-.EXEC: check-makevars
-.if !target(check-makevars)
-check-makevars::
- @${DO_NADA}
-.endif
-
-.EXEC: check-depends
-.if !target(check-depends)
-check-depends:
- @${DO_NADA}
-.endif
-
-PKGREPOSITORYSUBDIR?= All
-PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR}
-.if exists(${PACKAGES})
-PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
-.else
-PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX}
-.endif
-
-# The "latest version" link -- ${PKGNAME} minus everthing after the last '-'
-PKGLATESTREPOSITORY?= ${PACKAGES}/Latest
-PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
-LATEST_LINK?= ${PKGBASE}
-PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX}
-
-.if defined(PERL_CONFIGURE)
-CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \
- INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib"
-CONFIGURE_SCRIPT?= Makefile.PL
-MAN3PREFIX?= ${PREFIX}/lib/perl5/${PERL_VERSION}
-.undef HAS_CONFIGURE
-.endif
-
-CONFIGURE_SCRIPT?= configure
-CONFIGURE_TARGET?= ${MACHINE_ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_LOG?= config.log
-
-# A default message to print if do-configure fails.
-CONFIGURE_FAIL_MESSAGE?= "Please report the problem to ${MAINTAINER} [maintainer] and attach the \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. an \`ls ${PKG_DBDIR}\`)."
-
-.if defined(GNU_CONFIGURE)
-# Maximum command line length
-.if !defined(CONFIGURE_MAX_CMD_LEN)
-.if exists(/sbin/sysctl)
-CONFIGURE_MAX_CMD_LEN!= /sbin/sysctl -n kern.argmax
-.else
-CONFIGURE_MAX_CMD_LEN!= /usr/sbin/sysctl -n kern.argmax
-.endif
-.endif
-CONFIGURE_ARGS+= --prefix=${PREFIX} ${CONFIGURE_TARGET}
-CONFIGURE_ENV+= lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN}
-HAS_CONFIGURE= yes
-.endif
-
-# Passed to most of script invocations
-SCRIPTS_ENV+= CURDIR=${MASTERDIR} DISTDIR=${DISTDIR} \
- WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \
- SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \
- PORTSDIR=${PORTSDIR} DEPENDS="${DEPENDS}" \
- PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} \
- DESTDIR=${DESTDIR}
-
-.if defined(BATCH)
-SCRIPTS_ENV+= BATCH=yes
-.endif
-
-.if ${PREFIX} == /usr
-MANPREFIX?= /usr/share
-.else
-MANPREFIX?= ${PREFIX}
-.endif
-
-.for sect in 1 2 3 4 5 6 7 8 9
-MAN${sect}PREFIX?= ${MANPREFIX}
-.endfor
-MANLPREFIX?= ${MANPREFIX}
-MANNPREFIX?= ${MANPREFIX}
-
-MANLANG?= "" # english only by default
-
-.if !defined(NOMANCOMPRESS)
-MANEXT= .gz
-.endif
-
-.if (defined(MLINKS) || defined(_MLINKS_PREPEND)) && !defined(_MLINKS)
-__pmlinks!= ${ECHO_CMD} '${MLINKS:S/ / /}' | ${AWK} \
- '{ if (NF % 2 != 0) { print "broken"; exit; } \
- for (i=1; i<=NF; i++) { \
- if ($$i ~ /^-$$/ && i != 1 && i % 2 != 0) \
- { $$i = $$(i-2); printf " " $$i " "; } \
- else if ($$i ~ /^[^ ]+\.[1-9ln][^. ]*$$/ || $$i ~ /^\//) \
- printf " " $$i " "; \
- else \
- { print "broken"; exit; } \
- } \
- }' | ${SED} -e 's \([^/ ][^ ]*\.\(.\)[^. ]*\) $${MAN\2PREFIX}/$$$$$$$${__lang}/man\2/\1${MANEXT}g' -e 's/ //g' -e 's/MANlPREFIX/MANLPREFIX/g' -e 's/MANnPREFIX/MANNPREFIX/g'
-.if ${__pmlinks:Mbroken} == broken
-check-makevars::
- @${ECHO_CMD} "${PKGNAME}: Makefile error: unable to parse MLINKS."
- @${FALSE}
-.endif
-_MLINKS= ${_MLINKS_PREPEND}
-# XXX 20040119 This next line should read:
-# .for lang in ${MANLANG:S%^%man/%:S%^man/""$%man%}
-# but there is currently a bug in make(1) that prevents the double-quote
-# substitution from working correctly. Once that problem is addressed,
-# and has had a enough time to mature, this hack should be removed.
-.for lang in ${MANLANG:S%^%man/%:S%^man/""$%man%:S%^man/"$%man%}
-.for ___pmlinks in ${__pmlinks}
-.for __lang in ${lang}
-_MLINKS+= ${___pmlinks:S// /g}
-.endfor
-.endfor
-.endfor
-.endif
-_COUNT=0
-.for ___tpmlinks in ${_MLINKS}
-.if ${_COUNT} == 1
-_TMLINKS+= ${___tpmlinks}
-_COUNT=0
-.else
-_COUNT=1
-.endif
-.endfor
-
-# XXX 20040119 This next line should read:
-# .for manlang in ${MANLANG:S%^%man/%:S%^man/""$%man%}
-# but there is currently a bug in make(1) that prevents the double-quote
-# substitution from working correctly. Once that problem is addressed,
-# and has had a enough time to mature, this hack should be removed.
-.for manlang in ${MANLANG:S%^%man/%:S%^man/""$%man%:S%^man/"$%man%}
-
-.for sect in 1 2 3 4 5 6 7 8 9 L N
-.if defined(MAN${sect})
-_MANPAGES+= ${MAN${sect}:S%^%${MAN${sect}PREFIX}/${manlang}/man${sect:L}/%}
-.endif
-.endfor
-
-.endfor
-
-.if !defined(_TMLINKS)
-_TMLINKS=
-.endif
-
-.if defined(_MANPAGES)
-
-.if defined(NOMANCOMPRESS)
-__MANPAGES:= ${_MANPAGES:S%^${PREFIX}/%%}
-.else
-__MANPAGES:= ${_MANPAGES:S%^${PREFIX}/%%:S%$%.gz%}
-.endif
-
-.if ${MANCOMPRESSED:L} == yes
-_MANPAGES:= ${_MANPAGES:S%$%.gz%}
-.endif
-
-.endif
-
-.if ${PREFIX} == /usr
-INFO_PATH?= share/info
-.else
-INFO_PATH?= info
-.endif
-
-DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME}
-EXAMPLESDIR?= ${PREFIX}/share/examples/${PORTNAME}
-DATADIR?= ${PREFIX}/share/${PORTNAME}
-
-PLIST_SUB+= DOCSDIR="${DOCSDIR:S,^${PREFIX}/,,}" \
- EXAMPLESDIR="${EXAMPLESDIR:S,^${PREFIX}/,,}" \
- DATADIR="${DATADIR:S,^${PREFIX}/,,}"
-
-# Put this as far down as possible so it will catch all PLIST_SUB definitions.
-
-.if defined(INSTALLS_SHLIB)
-LDCONFIG_DIRS?= %%PREFIX%%/lib
-LDCONFIG_PLIST!= ${ECHO_CMD} ${LDCONFIG_DIRS} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/}
-LDCONFIG_RUNLIST!= ${ECHO_CMD} ${LDCONFIG_PLIST} | ${SED} -e "s!%D!${PREFIX}!g"
-.endif
-
-.MAIN: all
-
-################################################################
-# Many ways to disable a port.
-#
-# If we're in BATCH mode and the port is interactive, or we're
-# in interactive mode and the port is non-interactive, skip all
-# the important targets. The reason we have two modes is that
-# one might want to leave a build in BATCH mode running
-# overnight, then come back in the morning and do _only_ the
-# interactive ones that required your intervention.
-#
-# Ignore ports that can't be resold if building for a CDROM.
-#
-# Don't build a port if it's restricted and we don't want to get
-# into that.
-#
-# Don't build a port on an ELF machine if it's broken for ELF.
-#
-# Don't build a port if it's broken, unless we're running a parallel
-# build (in case it's fixed).
-#
-# Don't build a port if it's forbidden for whatever reason.
-#
-# Don't build a port if the system is too old.
-################################################################
-
-.if ${OSVERSION} < 420000
-# You need an upgrade kit or make world newer than this
-IGNORE= ": Your system is too old to use this bsd.port.mk. You need a fresh make world or an upgrade kit. Please go to http://www.FreeBSD.org/ports/ or a mirror site and follow the instructions"
-.endif
-
-.if defined(ONLY_FOR_ARCHS)
-.for __ARCH in ${ONLY_FOR_ARCHS}
-.if ${MACHINE_ARCH:M${__ARCH}} != ""
-__ARCH_OK?= 1
-.endif
-.endfor
-.else
-__ARCH_OK?= 1
-.endif
-
-.if defined(NOT_FOR_ARCHS)
-.for __NARCH in ${NOT_FOR_ARCHS}
-.if ${MACHINE_ARCH:M${__NARCH}} != ""
-.undef __ARCH_OK
-.endif
-.endfor
-.endif
-
-.if !defined(__ARCH_OK)
-.if defined(ONLY_FOR_ARCHS)
-IGNORE= "is only for ${ONLY_FOR_ARCHS},"
-.else # defined(NOT_FOR_ARCHS)
-IGNORE= "does not run on ${NOT_FOR_ARCHS},"
-.endif
-IGNORE+= "and you are running ${ARCH}"
-.endif
-
-.if !defined(NO_IGNORE)
-.if (defined(IS_INTERACTIVE) && defined(BATCH))
-IGNORE= "is an interactive port"
-.elif (!defined(IS_INTERACTIVE) && defined(INTERACTIVE))
-IGNORE= "is not an interactive port"
-.elif (defined(NO_CDROM) && defined(FOR_CDROM))
-IGNORE= "may not be placed on a CDROM: ${NO_CDROM}"
-.elif (defined(RESTRICTED) && defined(NO_RESTRICTED))
-IGNORE= "is restricted: ${RESTRICTED}"
-.elif defined(BROKEN)
-.if !defined(TRYBROKEN)
-IGNORE= "is marked as broken: ${BROKEN}"
-.endif
-.elif defined(FORBIDDEN)
-IGNORE= "is forbidden: ${FORBIDDEN}"
-.endif
-
-.if (defined(MANUAL_PACKAGE_BUILD) && defined(PACKAGE_BUILDING) && !defined(PARALLEL_PACKAGE_BUILD))
-IGNORE= "has to be built manually: ${MANUAL_PACKAGE_BUILD}"
-clean:
- @${IGNORECMD}
-.endif
-
-.if defined(IGNORE)
-.if defined(IGNORE_SILENT)
-IGNORECMD= ${DO_NADA}
-.else
-IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}."
-.endif
-
-.for target in check-sanity fetch checksum extract patch configure all build install reinstall package
-${target}:
- @${IGNORECMD}
-.if defined(INSTALLS_DEPENDS)
- @${FALSE}
-.endif
-.endfor
-
-.endif
-
-.endif
-
-.if defined(IGNORE) || defined(NO_PACKAGE)
-ignorelist: package-name
-.else
-ignorelist:
- @${DO_NADA}
-.endif
-
-################################################################
-# Clean directories for ftp or CDROM.
-################################################################
-
-.if defined(RESTRICTED)
-clean-restricted: delete-distfiles delete-package
-clean-restricted-list: delete-distfiles-list delete-package-list
-RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES}
-.else
-clean-restricted:
-clean-restricted-list:
-.endif
-
-.if defined(NO_CDROM)
-clean-for-cdrom: delete-distfiles delete-package
-clean-for-cdrom-list: delete-distfiles-list delete-package-list
-RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES}
-.else
-clean-for-cdrom:
-clean-for-cdrom-list:
-.endif
-
-.if defined(ALL_HOOK)
-all:
- @cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \
- DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \
- PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \
- FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \
- DESTDIR=${DESTDIR} \
- DEPENDS="${DEPENDS}" BUILD_DEPENDS="${BUILD_DEPENDS}" \
- RUN_DEPENDS="${RUN_DEPENDS}" X11BASE=${X11BASE} \
- CONFLICTS="${CONFLICTS}" \
- ${ALL_HOOK}
-.endif
-
-.if !target(all)
-all: build
-.endif
-
-.if !defined(DEPENDS_TARGET)
-.if make(reinstall)
-DEPENDS_TARGET= reinstall
-.else
-DEPENDS_TARGET= install
-.endif
-.if defined(DEPENDS_CLEAN)
-DEPENDS_TARGET+= clean
-DEPENDS_ARGS+= NOCLEANDEPENDS=yes
-.endif
-.else
-DEPENDS_ARGS+= FORCE_PKG_REGISTER=yes
-.endif
-.if defined(DEPENDS)
-# pretty much guarantees overwrite of existing installation
-.MAKEFLAGS: FORCE_PKG_REGISTER=yes
-.endif
-
-################################################################
-#
-# Do preliminary work to detect if we need to run the config
-# target or not.
-#
-################################################################
-.if (defined(_OPTIONSNG_READ) || !defined(OPTIONS) || defined(CONFIG_DONE) || \
- defined(PACKAGE_BUILDING) || defined(BATCH) || \
- exists(${_OPTIONSFILE}) || exists(${_OPTIONSFILE}.local))
-_OPTIONS_OK=yes
-.endif
-
-################################################################
-# The following are used to create easy dummy targets for
-# disabling some bit of default target behavior you don't want.
-# They still check to see if the target exists, and if so don't
-# do anything, since you might want to set this globally for a
-# group of ports in a Makefile.inc, but still be able to
-# override from an individual Makefile.
-################################################################
-
-# Disable checksum
-.if defined(NO_CHECKSUM) && !target(checksum) && defined(_OPTIONS_OK)
-checksum: fetch
- @${DO_NADA}
-.endif
-
-# Disable build
-.if defined(NO_BUILD) && !target(build) && defined(_OPTIONS_OK)
-build: configure
- @${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE}
-.endif
-
-# Disable install
-.if defined(NO_INSTALL) && !target(install) && defined(_OPTIONS_OK)
-install: build
- @${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE}
-.endif
-
-# Disable package
-.if defined(NO_PACKAGE) && !target(package) && defined(_OPTIONS_OK)
-package:
-.if defined(IGNORE_SILENT)
- @${DO_NADA}
-.else
- @${ECHO_MSG} "===> ${PKGNAME} may not be packaged: ${NO_PACKAGE}."
-.endif
-.endif
-
-# Disable describe
-.if defined(NO_DESCRIBE) && !target(describe)
-describe:
- @${DO_NADA}
-.endif
-
-################################################################
-# More standard targets start here.
-#
-# These are the body of the build/install framework. If you are
-# not happy with the default actions, and you can't solve it by
-# adding pre-* or post-* targets/scripts, override these.
-################################################################
-
-# Pre-everything
-
-# XXX MCL suggests deprecating this in favor of something
-# less likely to be abused by overloading
-pre-everything::
- @${DO_NADA}
-
-buildanyway-message:
-.if defined(TRYBROKEN)
- @${ECHO_MSG} "Trying build of ${PKGNAME} even though it is marked BROKEN."
-.else
- @${DO_NADA}
-.endif
-
-options-message:
-.if defined(GNOME_OPTION_MSG) && (!defined(PACKAGE_BUILDING) || !defined(BATCH))
- @for m in ${GNOME_OPTION_MSG}; do \
- ${ECHO_MSG} $$m; \
- done
-.else
- @${DO_NADA}
-.endif
-.if defined(_OPTIONSNG_READ)
-.if ${_OPTIONSNG_READ} == default
- @${ECHO_MSG} "===> Building with default configuration, \`make config' to customize."
-.else
- @${ECHO_MSG} "===> Building with saved configuration for ${_OPTIONSNG_READ}, \`make config' to change."
-.endif
-.elif defined(_OPTIONS_READ)
- @${ECHO_MSG} "===> Found saved configuration for ${_OPTIONS_READ}"
-.if ${OPTIONSFILE} != ${_OPTIONSFILE}
- @${ECHO_MSG} "===> *** CAUTION *** Using wrong configuration file ${_OPTIONSFILE}"
-.endif
-.endif
-
-
-# Warn user about deprecated packages. Advisory only.
-
-.if !target(check-deprecated)
-check-deprecated:
-.if defined(DEPRECATED)
- @${ECHO_MSG} "===> NOTICE:"
- @${ECHO_MSG}
- @${ECHO_MSG} "This port is deprecated; you may wish to reconsider installing it:"
- @${ECHO_MSG}
- @${ECHO_MSG} "${DEPRECATED}."
- @${ECHO_MSG}
-.if defined(EXPIRATION_DATE)
- @${ECHO_MSG} "It is scheduled to be removed on or after ${EXPIRATION_DATE}."
- @${ECHO_MSG}
-.endif
-.endif
-.endif
-
-# Check if the port is listed in the vulnerability database
-
-.if ${PKGINSTALLVER} < 20040623 || ${OSVERSION} < 420001 || ${OSVERSION} >= 500000 && ${OSVERSION} < 500014
-DISABLE_VULNERABILITIES= yes
-.endif
-
-AUDITFILE?= /var/db/portaudit/auditfile.tbz
-AUDITURL?= http://www.FreeBSD.org/ports
-AUDITEXPIRY?= 14
-_EXTRACT_AUDITFILE= ${TAR} -jxOf "${AUDITFILE}" auditfile
-
-.EXEC: update-auditfile
-update-auditfile:
-.if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING)
- @audit_expired=${TRUE}; \
- if [ -f "${AUDITFILE}" ]; then \
- audit_created=`${_EXTRACT_AUDITFILE} | \
- ${SED} -nEe "1s/^#CREATED: *([0-9]{4})-?([0-9]{2})-?([0-9]{2}).*$$/\1\2\3/p"`; \
- audit_expiry=`${DATE} -u -v-${AUDITEXPIRY}d "+%Y%m%d"`; \
- if [ "$$audit_created" -lt "$$audit_expiry" ]; then \
- ${ECHO_MSG} ">> Vulnerability database out of date."; \
- else \
- audit_expired=${FALSE}; \
- fi; \
- fi; \
- if $$audit_expired; then \
- if [ ! -w "${AUDITFILE:H}" -a `${ID} -u` != 0 ]; then \
- if [ -z "${INSTALL_AS_USER}" ]; then \
- ${ECHO_MSG} "===> Switching to root credentials to fetch the vulnerability database."; \
- ${SU_CMD} "cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${.TARGET}"; \
- ${ECHO_MSG} "===> Returning to user credentials"; \
- else \
- ${ECHO_MSG} "===> Can't fetch the vulnerability database."; \
- fi; \
- else \
- ${ECHO_MSG} ">> Fetching vulnerability database from ${AUDITURL}."; \
- if [ -f "${AUDITFILE}" ]; then \
- ${MV} -f "${AUDITFILE}" "${AUDITFILE}.old"; \
- else \
- ${MKDIR} "${AUDITFILE:H}"; \
- fi; \
- if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} -o "${AUDITFILE}" "${AUDITURL}/${AUDITFILE:T}"; then \
- ${CHMOD} a+r "${AUDITFILE}"; \
- if [ -f "${AUDITFILE}.old" ]; then \
- ${RM} -f "${AUDITFILE}.old"; \
- fi; \
- else \
- if [ -f "${AUDITFILE}.old" ]; then \
- ${ECHO_MSG} ">> Failed, using old database."; \
- ${MV} -f "${AUDITFILE}.old" "${AUDITFILE}"; \
- fi; \
- fi; \
- fi; \
- fi
-.else
- @${DO_NADA}
-.endif
-
-.EXEC: check-vulnerable
-check-vulnerable: update-auditfile
-.if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING)
- @if [ -r "${AUDITFILE}" ]; then \
- if vlist=`${_EXTRACT_AUDITFILE} | ${GREP} -v '^#' | ${PKG_VERSION} -T '${PKGNAME}' -`; then \
- ${ECHO_MSG} "===> ${PKGNAME} has known vulnerabilities:"; \
- ${ECHO_MSG} "$$vlist" | ${AWK} -F\| '{ \
- print ">> " $$3 "."; \
- split($$2, ref, / /); \
- for(r in ref) \
- print " Reference: <" ref[r] ">" \
- }'; \
- ${ECHO_MSG} ">> Please update your ports tree and try again."; \
- exit 1; \
- fi; \
- else \
- ${ECHO_MSG} "===> Vulnerability check disabled, database not found."; \
- fi
-.else
- @${ECHO_MSG} "===> Vulnerability check disabled."
-.endif
-
-
-# Next generation options handling
-
-.if exists(${PERL5})
-OPTIONS_CMD?= ${PERL} -w ${PORTSDIR}/devel/portmk/scripts/options.pl
-.else
-OPTIONS_CMD?= eval ${ECHO_CMD} ">> ${PKGNAME}: ${PERL5} requried, please install ${PERL_PORT}."; exit 1
-.endif
-
-OPTIONS_SH?= ${PORTSDIR}/devel/portmk/scripts/options.sh
-
-_OPTIONS_ENV= \
- CURDIR='${.CURDIR}' \
- OBJDIR='${.OBJDIR}' \
- MASTERDIR='${MASTERDIR}' \
- PKGNAME='${PKGNAME}' \
- PKGNAMESUFFIX='${PKGNAMESUFFIX}' \
- OPTIONS_MASTER='${OPTIONS_MASTER}' \
- OPTIONS_OVERRIDE='${OPTIONS_OVERRIDE}' \
- OPTIONS_FILE='${OPTIONS_FILE}' \
- OPTIONS_CMD='${OPTIONS_CMD}'
-
-.EXEC: config
-.EXEC: showconfig
-.EXEC: rmconfig
-.EXEC: menuconfig
-
-.if defined(_OPTIONSNG_READ)
-
-.if !target(config)
-config:
- @${_OPTIONS_ENV}; \
- set -- -e; \
- . '${OPTIONS_SH}'
-.endif
-
-.if !target(menuconfig)
-menuconfig:
- @${ECHO_MSG} "===> ${PKGNAME}: menuconfig is a reserved target."
- @${FALSE}
- @${_OPTIONS_ENV}; \
- set -- -g; \
- . '${OPTIONS_SH}'
-.endif
-
-.if !target(rmconfig)
-rmconfig:
- @${ECHO_MSG} "===> ${PKGNAME}: Reverting to default configuration."
- @${_OPTIONS_ENV}; \
- set -- -d; \
- . '${OPTIONS_SH}'
-.endif
-
-.if !target(showconfig)
-showconfig:
- @${ECHO_MSG} "===> ${PKGNAME}: menuconfig is a reserved target."
- @${FALSE}
- @${_OPTIONS_ENV}; \
- set -- -l; \
- . '${OPTIONS_SH}'
-.endif
-
-.elif !defined(OPTIONS)
-
-.if !target(config)
-config:
- @${ECHO_MSG} "===> ${PKGNAME} has no configurable options."
-.endif
-
-.if !target(menuconfig)
-menuconfig:
- @${ECHO_MSG} "===> ${PKGNAME} has no configurable options."
-.endif
-
-.if !target(rmconfig)
-rmconfig:
- @${ECHO_MSG} "===> ${PKGNAME} has no configurable options."
-.endif
-
-.if !target(showconfig)
-showconfig:
- @${ECHO_MSG} "===> ${PKGNAME} has no configurable options."
-.endif
-
-.else
-
-menuconfig: config
- @${DO_NADA}
-
-.endif
-
-.EXEC: makeconfig
-.if !target(makeconfig)
-makeconfig:
- @${_OPTIONS_ENV}; \
- set -- -c; \
- . '${OPTIONS_SH}'
-.endif
-
-.EXEC: config-recursive
-.if !target(config-recursive)
-config-recursive:
- @${ECHO_MSG} "===> ${PKGNAME}: config-recursive is a reserved target."
- @${FALSE}
-.endif
-
-# New style distfile handling
-
-DISTFILES_SH?= ${PORTSDIR}/devel/portmk/scripts/distfiles.sh
-
-DISTINFO_ALGORITHMS?= MD5
-VALID_ALGORITHMS= MD5 SHA1 RMD160
-
-MK_FILE?= ${MASTERDIR}/Makefile
-
-.if !defined(DISTFILES_KEEP_QUOTING)
-_FETCHDISTFILES_ENV= \
- DISTFILES=${DISTFILES:C/\\\\(.)/\1/g:Q}; \
- PATCHFILES=${PATCHFILES:C/\\\\(.)/\1/g:Q}
-.else
-_FETCHDISTFILES_ENV= \
- DISTFILES=${DISTFILES:Q}; \
- PATCHFILES=${PATCHFILES:Q}
-.endif
-.for env in \
- MASTER_SITES MASTER_SITE_SUBDIR PATCH_SITES PATCH_SITE_SUBDIR \
- _MASTER_SITE_BACKUP _MASTER_SITE_OVERRIDE \
- DISABLE_SIZE DISTDIR DISTINFO_ALGORITHMS DISTINFO_LABEL \
- DIST_SUBDIR ECHO_MSG FETCH_AFTER_ARGS FETCH_BEFORE_ARGS \
- FETCH_CMD FETCH_SYMLINK_DISTFILES IGNOREFILES LOCALBASE \
- MASTER_SORT_AWK MASTER_SORT_CMD MASTER_SORT_ENV MD5_FILE \
- MK_FILE NO_CHECKSUM NO_SIZE OSVERSION PERL5 VALID_ALGORITHMS
-_FETCHDISTFILES_ENV+= ; ${env}='${${env}}'
-.endfor
-.if ${OSVERSION} >= 460000 # XXX This does not work with older make(1)s
-.for env in ${VALID_ALGORITHMS} SIZE
-_FETCHDISTFILES_ENV+= ; DISTINFO_${env}='${DISTINFO${DISTINFO_LABEL:C/^./_&/}_${env}}'
-.endfor
-.endif
-
-.EXEC: do-fetch
-.if !target(do-fetch)
-do-fetch:
- @${_FETCHDISTFILES_ENV}; \
- set -- -f; \
- . '${DISTFILES_SH}'
-.endif
-
-.EXEC: checksum
-.if !target(checksum)
-checksum: fetch
- @${DO_NADA}
-.endif
-
-.EXEC: makesum
-.if !target(makesum)
-makesum:
-.if !defined(FETCH_ALL)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} FETCH_ALL=yes ${__softMAKEFLAGS} ${.TARGET}
-.else
- @${_FETCHDISTFILES_ENV}; \
- set -- -m; \
- . '${DISTFILES_SH}'
-.endif
-.endif
-
-.EXEC: master-sites-all
-.if !target(master-sites-all)
-master-sites-all:
- @${_FETCHDISTFILES_ENV}; \
- set -- -t ''; \
- . '${DISTFILES_SH}'
-.endif
-
-.EXEC: master-sites
-.if !target(master-sites)
-master-sites:
- @${_FETCHDISTFILES_ENV}; \
- set -- -t 'DEFAULT'; \
- . '${DISTFILES_SH}'
-.endif
-
-.EXEC: patch-sites-all
-.if !target(patch-sites-all)
-patch-sites-all:
- @${_FETCHDISTFILES_ENV}; \
- set -- -T ''; \
- . '${DISTFILES_SH}'
-.endif
-
-.EXEC: patch-sites
-.if !target(patch-sites)
-patch-sites:
- @${_FETCHDISTFILES_ENV}; \
- set -- -T 'DEFAULT'; \
- . '${DISTFILES_SH}'
-.endif
-
-.EXEC: migratesum
-.if !target(migratesum)
-migratesum:
- @${_FETCHDISTFILES_ENV}; \
- set -- -M; \
- . '${DISTFILES_SH}'
-.endif
-
-.EXEC: migratesum2
-.if !target(migratesum2)
-migratesum2:
- @${_FETCHDISTFILES_ENV}; \
- set -- -N; \
- . '${DISTFILES_SH}'
-.endif
-
-.EXEC: checkdistsites
-.if !target(checkdistsites)
-checkdistsites:
-.if !defined(FETCH_ALL)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} FETCH_ALL=yes ${__softMAKEFLAGS} ${.TARGET}
-.else
- @${_FETCHDISTFILES_ENV}; \
- set -- -F; \
- . '${DISTFILES_SH}'
-.endif
-.endif
-
-.EXEC: checkdistfiles-recursive
-.if !target(checkdistfiles-recursive)
-checkdistfiles-recursive:
-.if defined(_ONG_REEXEC)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.else
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} ${__softMAKEFLAGS} checkdistfiles); \
- done
-.endif
-.endif
-
-# Prints out the total size of files missing in ${DISTDIR}
-
-_MISSING_SIZE_SUMMARY= \
- ${AWK} ' \
- BEGIN {t=0; f=0; u=0} \
- {if ($$1 > 0) {t+=$$1; f+=1} else {u+=1}} \
- END { \
- if (t >= 10^9) \
- s=sprintf("%.2f GBytes", t/10^9); \
- else if (t >= 10^6) \
- s=sprintf("%.2f MBytes", t/10^6); \
- else if (t >= 10^3) \
- s=sprintf("%.2f KBytes", t/10^3); \
- else \
- s=t " Bytes"; \
- msg=ENVIRON["MISSING_MSG"] \
- f " file(s) with a total size of " s; \
- if (u) msg=msg " and " u " file(s) with unknown size."; \
- print msg \
- } \
- '
-
-.EXEC: missing-size
-.if !target(missing-size)
-missing-size:
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} print-missing-files \
- | ${SETENV} MISSING_MSG="To install ${PKGNAME}, you have to fetch " ${_MISSING_SIZE_SUMMARY}
-.endif
-
-.EXEC: missing-recursive-size
-.if !target(missing-recursive-size)
-missing-recursive-size:
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} print-missing-recursive-files \
- | ${SETENV} MISSING_MSG="To install ${PKGNAME} and its dependencies, you have to fetch " ${_MISSING_SIZE_SUMMARY}
-.endif
-
-.EXEC: print-missing-recursive-files
-.if !target(print-missing-recursive-files)
-print-missing-recursive-files:
-.if defined(_ONG_REEXEC)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.else
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} print-missing-files); \
- done | ${SORT} -u +1;
-.endif
-.endif
-
-.EXEC: print-missing-files
-.if !target(print-missing-files)
-print-missing-files:
- @${_FETCHDISTFILES_ENV}; \
- set -- -S; \
- . '${DISTFILES_SH}'
-.endif
-
-.EXEC: fetch-list
-.if !target(fetch-list)
-fetch-list:
- @${_FETCHDISTFILES_ENV}; \
- set -- -L; \
- . '${DISTFILES_SH}'
-.endif
-
-# Extract
-
-.EXEC: do-extract
-.if !target(do-extract)
-do-extract:
- @${RM} -rf ${WRKDIR}
- @${MKDIR} ${WRKDIR}
-.for file in ${EXTRACT_ONLY}
- @cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} "${_DISTDIR}/${file}" ${EXTRACT_AFTER_ARGS}
-.endfor
-.if !defined(EXTRACT_PRESERVE_OWNERSHIP)
- @if [ `${ID} -u` = 0 ]; then \
- ${CHMOD} -R ug-s ${WRKDIR}; \
- ${CHOWN} -R 0:0 ${WRKDIR}; \
- fi
-.endif
-.endif
-
-# Patch
-
-.if !target(do-patch)
-do-patch:
-.if defined(PATCHFILES)
- @${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}"
- @(cd ${_DISTDIR}; \
- for i in ${_PATCHFILES}; do \
- if [ ${PATCH_DEBUG_TMP} = yes ]; then \
- ${ECHO_MSG} "===> Applying distribution patch $$i" ; \
- fi; \
- case $$i in \
- *.Z|*.gz) \
- ${GZCAT} "$$i" | ${PATCH} ${PATCH_DIST_ARGS}; \
- ;; \
- *.bz2) \
- ${BZCAT} "$$i" | ${PATCH} ${PATCH_DIST_ARGS}; \
- ;; \
- *) \
- ${PATCH} ${PATCH_DIST_ARGS} < "$$i"; \
- ;; \
- esac; \
- done)
-.endif
-.if defined(EXTRA_PATCHES)
- @for i in ${EXTRA_PATCHES}; do \
- ${ECHO_MSG} "===> Applying extra patch $$i"; \
- ${PATCH} ${PATCH_ARGS} < "$$i"; \
- done
-.endif
- @if [ -d ${PATCHDIR} ]; then \
- if [ "`${ECHO_CMD} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*" ]; then \
- ${ECHO_MSG} "===> Applying ${OPSYS} patches for ${PKGNAME}" ; \
- PATCHES_APPLIED="" ; \
- for i in ${PATCHDIR}/patch-*; do \
- case $$i in \
- *.orig|*.rej|*~|*,v) \
- ${ECHO_MSG} "===> Ignoring patchfile $$i" ; \
- ;; \
- *) \
- if [ ${PATCH_DEBUG_TMP} = yes ]; then \
- ${ECHO_MSG} "===> Applying ${OPSYS} patch $$i" ; \
- fi; \
- if ${PATCH} ${PATCH_ARGS} < "$$i" ; then \
- PATCHES_APPLIED="$$PATCHES_APPLIED $$i" ; \
- else \
- ${ECHO_MSG} `${ECHO_CMD} ">> Patch $$i failed to apply cleanly." | ${SED} "s|${PATCHDIR}/||"` ; \
- if [ x"$$PATCHES_APPLIED" != x"" ]; then \
- ${ECHO_MSG} `${ECHO_CMD} ">> Patch(es) $$PATCHES_APPLIED applied cleanly." | ${SED} "s|${PATCHDIR}/||g"` ; \
- fi; \
- ${FALSE} ; \
- fi; \
- ;; \
- esac; \
- done; \
- fi; \
- fi
-.endif
-
-# Configure
-
-.if !target(do-configure)
-do-configure:
- @if [ -f ${SCRIPTDIR}/configure ]; then \
- cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \
- ${SCRIPTDIR}/configure; \
- fi
-.if defined(GNU_CONFIGURE)
- @CONFIG_GUESS_DIRS=$$(${FIND} ${WRKDIR} -name config.guess -o -name config.sub \
- | ${XARGS} -n 1 ${DIRNAME}); \
- for _D in $${CONFIG_GUESS_DIRS}; do \
- ${CP} -f ${TEMPLATES}/config.guess $${_D}/config.guess; \
- ${CHMOD} a+rx $${_D}/config.guess; \
- ${CP} -f ${TEMPLATES}/config.sub $${_D}/config.sub; \
- ${CHMOD} a+rx $${_D}/config.sub; \
- done
-.endif
-.if defined(HAS_CONFIGURE)
- @(cd ${CONFIGURE_WRKSRC} && \
- if ! ${SETENV} CC="${CC}" CXX="${CXX}" \
- CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
- INSTALL="/usr/bin/install -c ${_BINOWNGRP}" \
- INSTALL_DATA="${INSTALL_DATA}" \
- INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
- INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
- ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}; then \
- ${ECHO_CMD} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \
- (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
- ${FALSE}; \
- fi)
-.endif
-.if defined(PERL_CONFIGURE)
- @cd ${CONFIGURE_WRKSRC} && \
- ${SETENV} ${CONFIGURE_ENV} \
- ${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
-.if !defined(PERL_MODBUILD)
- @cd ${CONFIGURE_WRKSRC} && \
- ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile
-.if ${PERL_LEVEL} <= 500503
- @cd ${CONFIGURE_WRKSRC} && \
- ${PERL5} -pi -e 's/^(INSTALLSITELIB|INSTALLSITEARCH|SITELIBEXP|SITEARCHEXP|INSTALLMAN1DIR|INSTALLMAN3DIR) = \/usr\/local/$$1 = \$$(PREFIX)/' Makefile
-.endif
-.endif
-.endif
-.if defined(USE_IMAKE)
- @(cd ${CONFIGURE_WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF})
-.endif
-.endif
-
-# Build
-
-.EXEC: do-build
-.if !target(do-build)
-do-build:
-.if defined(USE_GMAKE)
- @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
-.else
-.if defined(PERL_MODBUILD)
- @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${MAKE_ARGS} ${ALL_TARGET})
-.else
- @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
-.endif
-.endif
-.endif
-
-# Check conflicts
-
-.EXEC: check-conflicts
-.if !target(check-conflicts)
-check-conflicts:
-.if defined(CONFLICTS) && !defined(DISABLE_CONFLICTS)
- @found=`${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_INFO} -I ${CONFLICTS:C/.+/'&'/} 2>/dev/null | ${AWK} '{print $$1}'`; \
- conflicts_with=; \
- for entry in $${found}; do \
- prfx=`${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \
- orgn=`${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \
- if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
- conflicts_with="$${conflicts_with} $${entry}"; \
- fi; \
- done; \
- if [ -n "$${conflicts_with}" ]; then \
- ${ECHO_MSG}; \
- ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
- for entry in $${conflicts_with}; do \
- ${ECHO_MSG} " $${entry}"; \
- done; \
- ${ECHO_MSG}; \
- ${ECHO_MSG} " They install files into the same place."; \
- ${ECHO_MSG} " Please remove them first with pkg_delete(1)."; \
- exit 1; \
- fi
-.endif # CONFLICTS
-.endif
-
-# Install
-
-.EXEC: do-install
-.if !target(do-install)
-do-install:
-.if defined(USE_GMAKE)
- @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
-.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES)
- @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install.man)
-.endif
-.else # !defined(USE_GMAKE)
-.if defined(PERL_MODBUILD)
- @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${MAKE_ARGS} ${INSTALL_TARGET})
-.else
- @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
-.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES)
- @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install.man)
-.endif
-.endif
-.endif
-.endif
-
-# Package
-
-.if defined(DESTDIR) && ${PKGINSTALLVER} < 20040426
-check-makefile::
- @${ECHO_CMD} "${PKGNAME}: Makefile error: please upgrade pkg_install to use DESTDIR"
- @${FALSE}
-.endif
-
-.EXEC: do-package
-.if !target(do-package)
-do-package: ${TMPPLIST}
- @if [ -d ${PACKAGES} ]; then \
- if [ ! -d ${PKGREPOSITORY} ]; then \
- if ! ${MKDIR} ${PKGREPOSITORY}; then \
- ${ECHO_MSG} "=> Can't create directory ${PKGREPOSITORY}."; \
- exit 1; \
- fi; \
- fi; \
- fi
- @__softMAKEFLAGS='${__softMAKEFLAGS:S/'/'\''/g}'; \
- _LATE_PKG_ARGS=""; \
- if [ -f ${PKGINSTALL} ]; then \
- _LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -i ${PKGINSTALL}"; \
- fi; \
- if [ -f ${PKGDEINSTALL} ]; then \
- _LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -k ${PKGDEINSTALL}"; \
- fi; \
- if [ -f ${PKGREQ} ]; then \
- _LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -r ${PKGREQ}"; \
- fi; \
- if [ -f ${PKGMESSAGE} ]; then \
- _LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -D ${PKGMESSAGE}"; \
- fi; \
- if ${PKG_CMD} ${PKG_ARGS} ${PKGFILE}; then \
- if [ -d ${PACKAGES} ]; then \
- cd ${.CURDIR} && eval ${MAKE} ${_ONG_MAKEFLAGS} $${__softMAKEFLAGS} package-links; \
- fi; \
- else \
- cd ${.CURDIR} && eval ${MAKE} ${_ONG_MAKEFLAGS} $${__softMAKEFLAGS} delete-package; \
- exit 1; \
- fi
-.endif
-
-# Some support rules for do-package
-
-.EXEC: package-links
-.if !target(package-links)
-package-links: delete-package-links
- @for cat in ${CATEGORIES}; do \
- if [ ! -d ${PACKAGES}/$$cat ]; then \
- if ! ${MKDIR} ${PACKAGES}/$$cat; then \
- ${ECHO_MSG} "=> Can't create directory ${PACKAGES}/$$cat."; \
- exit 1; \
- fi; \
- fi; \
- ${LN} -sf `${ECHO_CMD} $$cat | ${SED} -e 'sa[^/]*a..ag'`/${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \
- done
-.if !defined(NO_LATEST_LINK)
- @if [ ! -d ${PKGLATESTREPOSITORY} ]; then \
- if ! ${MKDIR} ${PKGLATESTREPOSITORY}; then \
- ${ECHO_MSG} "=> Can't create directory ${PKGLATESTREPOSITORY}."; \
- exit 1; \
- fi; \
- fi
- @${LN} -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE}
-.endif
-.endif
-
-.EXEC: delete-package-links
-.if !target(delete-package-links)
-delete-package-links:
- @for cat in ${CATEGORIES}; do \
- ${RM} -f ${PACKAGES}/$$cat/${PKGNAME}${PKG_SUFX}; \
- done
-.if !defined(NO_LATEST_LINK)
- @${RM} -f ${PKGLATESTFILE}
-.endif
-.endif
-
-.EXEC: delete-package
-.if !target(delete-package)
-delete-package: delete-package-links
- @${RM} -f ${PKGFILE}
-.endif
-
-.EXEC: delete-package-links-list
-.if !target(delete-package-links-list)
-delete-package-links-list:
- @for cat in ${CATEGORIES}; do \
- ${ECHO_CMD} ${RM} -f ${PACKAGES}/$$cat/${PKGNAME}${PKG_SUFX}; \
- done
-.if !defined(NO_LATEST_LINK)
- @${ECHO_CMD} ${RM} -f ${PKGLATESTFILE}
-.endif
-.endif
-
-.EXEC: delete-package-list
-.if !target(delete-package-list)
-delete-package-list: delete-package-links-list
- @${ECHO_CMD} "[ -f ${PKGFILE} ] && (${ECHO_CMD} deleting ${PKGFILE}; ${RM} -f ${PKGFILE})"
-.endif
-
-# Utility targets follow
-
-.EXEC: check-already-installed
-.if !target(check-already-installed)
-check-already-installed:
-.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
- @${ECHO_MSG} "===> Checking if ${PKGORIGIN} already installed"
- @${MKDIR} ${_PKG_DBDIR}
- @already_installed=`${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_INFO} -q -O ${PKGORIGIN}`; \
- if [ -n "$${already_installed}" ]; then \
- for p in $${already_installed}; do \
- prfx=`${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
- if [ "x${PREFIX}" = "x$${prfx}" ]; then \
- found_package=$${p}; \
- break; \
- fi; \
- done; \
- fi; \
- if [ -n "$${found_package}" ]; then \
- if [ "${PKGNAME}" = "$${found_package}" ]; then \
- ${ECHO_CMD} "===> ${PKGNAME} is already installed"; \
- else \
- ${ECHO_CMD} "===> An older version of ${PKGORIGIN} is already installed ($${found_package})"; \
- fi; \
- ${ECHO_CMD} " You may wish to \`\`make deinstall'' and install this port again"; \
- ${ECHO_CMD} " by \`\`make reinstall'' to upgrade it properly."; \
- ${ECHO_CMD} " If you really wish to overwrite the old port of ${PKGORIGIN}"; \
- ${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
-
-.EXEC: check-umask
-.if !target(check-umask)
-check-umask:
- @if [ `${SH} -c umask` != 0022 ]; then \
- ${ECHO_MSG} "===> Warning: your umask is \"`${SH} -c umask`"\".; \
- ${ECHO_MSG} " If this is not desired, set it to an appropriate value"; \
- ${ECHO_MSG} " and install this port again by \`\`make reinstall''."; \
- fi
-.endif
-
-.EXEC: install-mtree
-.if !target(install-mtree)
-install-mtree:
- @${MKDIR} ${DESTDIR}${PREFIX}
- @if [ `${ID} -u` != 0 ]; then \
- if [ -w ${DESTDIR}${PREFIX}/ ]; then \
- ${ECHO_MSG} "Warning: not superuser, you may get some errors during installation."; \
- else \
- ${ECHO_MSG} "Error: ${DESTDIR}${PREFIX}/ not writable."; \
- ${FALSE}; \
- fi; \
- fi
-.if !defined(NO_MTREE)
- @if [ `${ID} -u` = 0 ]; then \
- if [ ! -f ${MTREE_FILE} ]; then \
- ${ECHO_CMD} "Error: mtree file \"${MTREE_FILE}\" is missing."; \
- ${ECHO_CMD} "Copy it from a suitable location (e.g., /usr/src/etc/mtree) and try again."; \
- exit 1; \
- else \
- ${MTREE_CMD} ${MTREE_ARGS} ${DESTDIR}${PREFIX}/ >/dev/null; \
- if [ ${MTREE_FILE} = "/etc/mtree/BSD.local.dist" ]; then \
- cd ${DESTDIR}${PREFIX}/share/nls; \
- ${LN} -shf C POSIX; \
- ${LN} -shf C en_US.US-ASCII; \
- fi; \
- fi; \
- else \
- ${ECHO_MSG} "Warning: not superuser, can't run mtree."; \
- ${ECHO_MSG} "You may want to become root and try again to ensure correct permissions."; \
- fi
-.endif
-.endif
-
-.EXEC: run-ldconfig
-.if !target(run-ldconfig)
-run-ldconfig:
-.if defined(INSTALLS_SHLIB)
-.if !defined(INSTALL_AS_USER)
- @${ECHO_MSG} "===> Running ldconfig"
- ${LDCONFIG} -m ${LDCONFIG_RUNLIST}
-.else
- @${ECHO_MSG} "===> Running ldconfig (errors are ignored)"
- -${LDCONFIG} -m ${LDCONFIG_RUNLIST}
-.endif
-.else
- @${DO_NADA}
-.endif
-.endif
-
-.EXEC: security-check
-.if !target(security-check)
-security-check:
-# Scan PLIST for:
-# 1. setugid files
-# 2. accept()/recvfrom() which indicates network listening capability
-# 3. insecure functions (gets/mktemp/tempnam/[XXX])
-# 4. startup scripts, in conjunction with 2.
-# 5. world-writable files/dirs
-#
- -@${RM} -f ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable ${WRKDIR}/.PLIST.objdump; \
- ${AWK} -v prefix='${PREFIX}' ' \
- match($$0, /^@cwd /) { prefix = substr($$0, RSTART + RLENGTH); next; } \
- /^@/ { next; } \
- /^\// { print; next; } \
- { print prefix "/" $$0; } \
- ' ${TMPPLIST} > ${WRKDIR}/.PLIST.flattened; \
- ${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \
- | ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f \( -perm -4000 -o -perm -2000 \) \( -perm -0010 -o -perm -0001 \) 2> /dev/null > ${WRKDIR}/.PLIST.setuid; \
- ${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \
- | ${XARGS} -0 -J % ${FIND} % -prune -perm -0002 \! -type l 2> /dev/null > ${WRKDIR}/.PLIST.writable; \
- ${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \
- | ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f -print0 2> /dev/null \
- | ${XARGS} -0 -n 1 ${OBJDUMP} -R 2> /dev/null > ${WRKDIR}/.PLIST.objdump; \
- if \
- ! ${AWK} -v audit="$${PORTS_AUDIT}" -f ${PORTSDIR}/Tools/scripts/security-check.awk \
- ${WRKDIR}/.PLIST.flattened ${WRKDIR}/.PLIST.objdump ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable; \
- then \
- www_site=$$(cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} www-site); \
- if [ ! -z "$${www_site}" ]; then \
- ${ECHO_MSG}; \
- ${ECHO_MSG} " For more information, and contact details about the security"; \
- ${ECHO_MSG} " status of this software, see the following webpage: "; \
- ${ECHO_MSG} "$${www_site}"; \
- fi; \
- fi
-.endif
-
-################################################################
-# Skeleton targets start here
-#
-# You shouldn't have to change these. Either add the pre-* or
-# post-* targets/scripts or redefine the do-* targets. These
-# targets don't do anything other than checking for cookies and
-# call the necessary targets/scripts.
-################################################################
-
-# Please note that the order of the following targets is important, and
-# should not be modified.
-
-_BOOTSTRAP_SEQ= bootstrap-depends
-_SANITY_DEP= bootstrap
-_SANITY_SEQ= pre-everything check-makefile check-categories \
- check-makevars check-depends check-deprecated \
- check-vulnerable buildanyway-message options-message
-_FETCH_DEP= check-sanity
-_FETCH_SEQ= fetch-depends pre-fetch pre-fetch-script \
- do-fetch post-fetch post-fetch-script
-_EXTRACT_DEP= fetch
-_EXTRACT_SEQ= extract-message extract-depends pre-extract \
- pre-extract-script do-extract \
- post-extract post-extract-script
-_PATCH_DEP= extract
-_PATCH_SEQ= patch-message patch-depends pre-patch pre-patch-script \
- do-patch post-patch post-patch-script
-_CONFIGURE_DEP= patch
-_CONFIGURE_SEQ= build-depends lib-depends misc-depends configure-message \
- pre-configure pre-configure-script patch-autotools \
- run-autotools do-configure post-configure post-configure-script
-_BUILD_DEP= configure
-_BUILD_SEQ= build-message pre-build pre-build-script do-build \
- post-build post-build-script
-_INSTALL_DEP= build
-_INSTALL_SEQ= install-message check-conflicts \
- run-depends lib-depends pre-install pre-install-script \
- generate-plist check-already-installed
-_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
- pre-su-install-script do-install post-install \
- post-install-script add-plist-info add-plist-docs \
- compress-man run-ldconfig fake-pkg security-check
-_PACKAGE_DEP= install
-_PACKAGE_SEQ= package-message pre-package pre-package-script \
- do-package post-package post-package-script
-
-.EXEC: bootstrap
-.if !target(bootstrap)
-bootstrap: ${_BOOTSTRAP_SEQ}
-.endif
-
-.EXEC: check-sanity
-.if !target(check-sanity) && defined(_ONG_REEXEC)
-check-sanity:
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.elif !target(check-sanity)
-check-sanity: ${_SANITY_DEP} ${_SANITY_SEQ}
-.endif
-
-# XXX MCL might need to move in loop below?
-.EXEC: fetch
-.if !target(fetch) && defined(_ONG_REEXEC)
-fetch:
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.elif !target(${target})
-fetch: ${_FETCH_DEP} ${_FETCH_SEQ}
-.endif
-
-# Main logic. The loop generates 6 main targets and using cookies
-# ensures that those already completed are skipped.
-
-.for target in extract patch configure build install package
-
-.EXEC: ${target}
-.if !target(${target}) && defined(_ONG_REEXEC)
-${target}:
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.elif !target(${target}) && defined(_OPTIONS_OK)
-${target}: ${${target:U}_COOKIE}
-.elif !target(${target})
-${target}: config
- @cd ${.CURDIR} && ${MAKE} CONFIG_DONE=1 ${__softMAKEFLAGS} ${${target:U}_COOKIE}
-.endif
-
-.if !exists(${${target:U}_COOKIE})
-
-.if ${UID} != 0 && defined(_${target:U}_SUSEQ) && !defined(INSTALL_AS_USER)
-.if defined(USE_SUBMAKE) || defined(_ONG_REEXEC)
-${${target:U}_COOKIE}: ${_${target:U}_DEP}
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${_${target:U}_SEQ}
-.else
-${${target:U}_COOKIE}: ${_${target:U}_DEP} ${_${target:U}_SEQ}
-.endif
- @${ECHO_MSG} "===> Switching to root credentials for '${target}' target"
- @cd ${.CURDIR} && \
- ${SU_CMD} "${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${_${target:U}_SUSEQ}"
- @${ECHO_MSG} "===> Returning to user credentials"
- @${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
-.elif defined(USE_SUBMAKE) || defined(_ONG_REEXEC)
-${${target:U}_COOKIE}: ${_${target:U}_DEP}
- @cd ${.CURDIR} && \
- ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${_${target:U}_SEQ} ${_${target:U}_SUSEQ}
- @${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
-.else
-${${target:U}_COOKIE}: ${_${target:U}_DEP} ${_${target:U}_SEQ} ${_${target:U}_SUSEQ}
- @${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
-.endif
-
-.else
-${${target:U}_COOKIE}::
- @if [ -e ${.TARGET} ]; then \
- ${DO_NADA}; \
- else \
- cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}; \
- fi
-.endif
-
-.endfor
-
-# Enforce order for -jN builds
-
-.ORDER: ${_BOOTSTRAP_SEQ}
-.ORDER: ${_SANITY_DEP} ${_SANITY_SEQ}
-.ORDER: ${_FETCH_DEP} ${_FETCH_SEQ}
-.ORDER: ${_EXTRACT_DEP} ${_EXTRACT_SEQ}
-.ORDER: ${_PATCH_DEP} ${_PATCH_SEQ}
-.ORDER: ${_CONFIGURE_DEP} ${_CONFIGURE_SEQ}
-.ORDER: ${_BUILD_DEP} ${_BUILD_SEQ}
-.ORDER: ${_INSTALL_DEP} ${_INSTALL_SEQ}
-.ORDER: ${_PACKAGE_DEP} ${_PACKAGE_SEQ}
-
-.EXEC: extract-message patch-message configure-message build-message install-message package-message
-extract-message:
- @${ECHO_MSG} "===> Extracting for ${PKGNAME}"
-patch-message:
- @${ECHO_MSG} "===> Patching for ${PKGNAME}"
-configure-message:
- @${ECHO_MSG} "===> Configuring for ${PKGNAME}"
-build-message:
- @${ECHO_MSG} "===> Building for ${PKGNAME}"
-install-message:
- @${ECHO_MSG} "===> Installing for ${PKGNAME}"
-package-message:
- @${ECHO_MSG} "===> Building package for ${PKGNAME}"
-
-# Empty pre-* and post-* targets
-
-.for stage in pre post
-.for name in fetch extract patch configure build install package
-
-.EXEC: ${stage}-${name} ${stage}-${name}-script
-
-.if !target(${stage}-${name})
-${stage}-${name}:
- @${DO_NADA}
-.endif
-
-.if !target(${stage}-${name}-script)
-${stage}-${name}-script:
- @if [ -f ${SCRIPTDIR}/${.TARGET:S/-script$//} ]; then \
- cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \
- ${SCRIPTDIR}/${.TARGET:S/-script$//}; \
- fi
-.endif
-
-.endfor
-.endfor
-
-# Special cases for su
-.EXEC: pre-su-install pre-su-install-script
-
-.if !target(pre-su-install)
-pre-su-install:
- @${DO_NADA}
-.endif
-
-.if !target(pre-su-install-script)
-pre-su-install-script:
- @${DO_NADA}
-.endif
-
-
-.EXEC: pretty-print-www-site
-.if !target(pretty-print-www-site)
-pretty-print-www-site:
- @www_site=$$(cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} www-site); \
- if [ -n "$${www_site}" ]; then \
- ${ECHO_CMD} -n " and/or visit the "; \
- ${ECHO_CMD} -n "<a href=\"$${www_site}\">web site</a>"; \
- ${ECHO_CMD} " for futher informations"; \
- fi
-.endif
-
-################################################################
-# Some more targets supplied for users' convenience
-################################################################
-
-# Checkpatch
-#
-# Special target to verify patches
-
-.EXEC: checkpatch
-.if !target(checkpatch)
-checkpatch:
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} PATCH_CHECK_ONLY=yes ${_PATCH_DEP} ${_PATCH_SEQ}
-.endif
-
-# Reinstall
-#
-# Special target to re-run install
-
-.EXEC: reinstall
-.if !target(reinstall)
-reinstall:
- @${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
- @cd ${.CURDIR} && DEPENDS_TARGET="${DEPENDS_TARGET}" ${MAKE} ${_ONG_MAKEFLAGS} install
-.endif
-
-# Deinstall
-#
-# Special target to remove installation
-
-.EXEC: deinstall
-.if !target(deinstall)
-deinstall:
- @if [ -n "${DESTDIR}" ]; then \
- ${ECHO_MSG} "===> Can't deinstall from DESTDIR: ${DESTDIR}"; \
- ${FALSE}; \
- fi
-.if ${UID} != 0 && !defined(INSTALL_AS_USER)
- @${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target"
- @cd ${.CURDIR} && \
- ${SU_CMD} "${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}"
- @${ECHO_MSG} "===> Returning to user credentials"
-.else
- @${ECHO_MSG} "===> Deinstalling for ${PKGORIGIN}"
- @found_names=`${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_INFO} -q -O ${PKGORIGIN}`; \
- for p in $${found_names}; do \
- check_name=`${ECHO_CMD} $${p} | ${SED} -e 's/-[^-]*$$//'`; \
- if [ "$${check_name}" = "${PKGBASE}" ]; then \
- prfx=`${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
- if [ "x${PREFIX}" = "x$${prfx}" ]; then \
- ${ECHO_MSG} "===> Deinstalling $${p}"; \
- ${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_DELETE} -f $${p}; \
- else \
- ${ECHO_MSG} "===> $${p} has a different PREFIX: $${prfx}, skipping"; \
- fi; \
- fi; \
- done; \
- if [ -z "$${found_names}" ]; then \
- ${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \
- fi
- @${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
-.endif
-.endif
-
-# Deinstall-all
-#
-# Special target to remove installation of all ports of the same origin
-
-.EXEC: deinstall-all
-.if !target(deinstall-all)
-deinstall-all:
- @if [ -n "${DESTDIR}" ]; then \
- ${ECHO_MSG} "===> Can't deinstall from DESTDIR: ${DESTDIR}"; \
- ${FALSE}; \
- fi
-.if ${UID} != 0 && !defined(INSTALL_AS_USER)
- @${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target"
- @cd ${.CURDIR} && \
- ${SU_CMD} "${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}"
- @${ECHO_MSG} "===> Returning to user credentials"
-.else
- @${ECHO_MSG} "===> Deinstalling for ${PKGORIGIN}"
- @deinstall_names=`${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_INFO} -q -O ${PKGORIGIN}`; \
- if [ -n "$${deinstall_names}" ]; then \
- for d in $${deinstall_names}; do \
- ${ECHO_MSG} "===> Deinstalling $${d}"; \
- ${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_DELETE} -f $${d}; \
- done; \
- else \
- ${ECHO_MSG} "===> ${PKGORIGIN} not installed, skipping"; \
- fi
- @${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
-.endif
-.endif
-
-# Cleaning up
-
-.EXEC: do-clean
-.if !target(do-clean)
-do-clean:
- @if [ -d ${WRKDIR} ]; then \
- if [ -w ${WRKDIR} ]; then \
- ${RM} -rf ${WRKDIR}; \
- else \
- ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \
- fi; \
- fi
-.endif
-
-.EXEC: clean
-.if !target(clean)
-clean:
-.if !defined(NOCLEANDEPENDS)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} clean-depends
-.endif
- @${ECHO_MSG} "===> Cleaning for ${PKGNAME}"
-.if target(pre-clean)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} pre-clean
-.endif
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} do-clean
-.if target(post-clean)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} post-clean
-.endif
-.endif
-
-.EXEC: pre-distclean
-.if !target(pre-distclean)
-pre-distclean:
- @${DO_NADA}
-.endif
-
-.EXEC: distclean
-.if !target(distclean)
-distclean: pre-distclean clean
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} delete-distfiles RESTRICTED_FILES='$${_DISTFILES} $${_PATCHFILES}'
-.endif
-
-.EXEC: delete-distfiles
-.if !target(delete-distfiles)
-delete-distfiles:
- @${ECHO_MSG} "===> Deleting distfiles for ${PKGNAME}"
-.if defined(RESTRICTED_FILES)
- @if [ -d "${_DISTDIR}" ]; then ( \
- cd "${_DISTDIR}"; \
- RESTRICTED_FILES="${RESTRICTED_FILES}"; \
- for file in $${RESTRICTED_FILES}; do \
- ${RM} -f "$${file}"; \
- dir="$${file%/*}"; \
- if [ "$${dir}" != "$${file}" ]; then \
- ${RMDIR} -p "$${dir}" >/dev/null 2>&1 || ${TRUE}; \
- fi; \
- done \
- ); fi
-.endif
-.if defined(DIST_SUBDIR)
- @${RMDIR} "${_DISTDIR}" >/dev/null 2>&1 || ${TRUE}
-.endif
-.endif
-
-.EXEC: delete-distfiles-list
-.if !target(delete-distfiles-list)
-delete-distfiles-list:
- @${ECHO_CMD} "# ${PKGNAME}"
- @if [ "X${RESTRICTED_FILES}" != "X" ]; then \
- for file in ${RESTRICTED_FILES}; do \
- ${ECHO_CMD} "[ -f ${_DISTDIR}/$$file ] && (${ECHO_CMD} deleting ${_DISTDIR}/$$file; ${RM} -f ${_DISTDIR}/$$file)"; \
- dir=$${file%/*}; \
- if [ "$${dir}" != "$${file}" ]; then \
- ${ECHO_CMD} "(cd ${_DISTDIR} && ${RMDIR} -p $${dir} 2>/dev/null)"; \
- fi; \
- done; \
- fi
-.if defined(DIST_SUBDIR)
- @${ECHO_CMD} "${RMDIR} ${_DISTDIR} 2>/dev/null || ${TRUE}"
-.endif
-.endif
-
-# Generates patches.
-
-.EXEC: update-patches
-.if !target(update-patches)
-update-patches:
- @toedit=`PATCH_WRKSRC=${PATCH_WRKSRC} \
- PATCHDIR=${PATCHDIR} \
- PATCH_LIST=${PATCHDIR}/patch-* \
- DIFF_ARGS=${DIFF_ARGS} \
- DISTORIG=${DISTORIG} \
- ${SH} ${PORTSDIR}/Tools/scripts/update-patches`; \
- case $$toedit in "");; \
- *) ${ECHO_CMD} -n 'edit patches: '; read i; \
- cd ${PATCHDIR} && $${VISUAL:-$${EDIT:-/usr/bin/vi}} $$toedit;; esac
-.endif
-
-################################################################
-# The special package-building targets
-# You probably won't need to touch these
-################################################################
-
-# Nobody should want to override this unless PKGNAME is simply bogus.
-
-.EXEC: package-name
-.if !target(package-name)
-package-name:
- @${ECHO_CMD} ${PKGNAME}
-.endif
-
-# Build a package but don't check the package cookie
-
-.EXEC: repackage
-.if !target(repackage)
-.EXEC: repackage pre-repackage
-.ORDER: pre-repackage package
-repackage: pre-repackage package
-
-pre-repackage:
- @${RM} -f ${PACKAGE_COOKIE}
-.endif
-
-# Build a package but don't check the cookie for installation, also don't
-# install package cookie
-
-.EXEC: package-noinstall
-.if !target(package-noinstall)
-package-noinstall:
- @${MKDIR} ${WRKDIR}
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} pre-package \
- pre-package-script do-package post-package post-package-script
- @${RM} -f ${TMPPLIST}
- -@${RMDIR} ${WRKDIR}
-.endif
-
-################################################################
-# Dependency checking
-################################################################
-
-.EXEC: depends
-.if !target(depends)
-depends: extract-depends patch-depends lib-depends misc-depends fetch-depends build-depends run-depends
-
-.if defined(ALWAYS_BUILD_DEPENDS)
-_DEPEND_ALWAYS= 1
-.else
-_DEPEND_ALWAYS= 0
-.endif
-
-.if defined(INSTALLS_DEPENDS) && defined(INSTALLS_BOOTSTRAP)
-bootstrap-depends:
- @${DO_NADA}
-.endif
-
-.for deptype in BOOTSTRAP FETCH EXTRACT PATCH BUILD RUN
-.EXEC: ${deptype:L}-depends
-.if !target(${deptype:L}-depends)
-${deptype:L}-depends:
-.if defined(${deptype}_DEPENDS)
-.if !defined(NO_DEPENDS)
- @if [ -n "INSTALLS_BOOTSTRAP" -o "${deptype:L}" = "bootstrap" ]; then \
- submake_args="-DINSTALLS_BOOTSTRAP -DINSTALLS_DEPENDS"; \
- else \
- submake_args="-DINSTALLS_DEPENDS"; \
- fi; \
- for i in ${${deptype}_DEPENDS}; do \
- prog=`${ECHO_CMD} $$i | ${SED} -e 's/:.*//'`; \
- dir=`${ECHO_CMD} $$i | ${SED} -e 's/[^:]*://'`; \
- if ${EXPR} "$$dir" : '.*:' > /dev/null; then \
- target=`${ECHO_CMD} $$dir | ${SED} -e 's/.*://'`; \
- dir=`${ECHO_CMD} $$dir | ${SED} -e 's/:.*//'`; \
- else \
- target="${DEPENDS_TARGET}"; \
- depends_args="${DEPENDS_ARGS}"; \
- fi; \
- if ${EXPR} "$$prog" : \\/ >/dev/null; then \
- if [ -e "$$prog" ]; then \
- if [ "$$prog" = "${NONEXISTENT}" ]; then \
- ${ECHO_MSG} "Error: ${NONEXISTENT} exists. Please remove it, and restart the build."; \
- ${FALSE}; \
- else \
- ${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog - found"; \
- if [ ${_DEPEND_ALWAYS} = 1 ]; then \
- ${ECHO_MSG} " (but building it anyway)"; \
- notfound=1; \
- else \
- notfound=0; \
- fi; \
- fi; \
- else \
- ${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog - not found"; \
- notfound=1; \
- fi; \
- else \
- if ${WHICH} "$$prog" > /dev/null 2>&1 ; then \
- ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - found"; \
- if [ ${_DEPEND_ALWAYS} = 1 ]; then \
- ${ECHO_MSG} " (but building it anyway)"; \
- notfound=1; \
- else \
- notfound=0; \
- fi; \
- else \
- ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - not found"; \
- notfound=1; \
- fi; \
- fi; \
- if [ $$notfound != 0 ]; then \
- ${ECHO_MSG} "===> Verifying $$target for $$prog in $$dir"; \
- if [ ! -d "$$dir" ]; then \
- ${ECHO_MSG} " >> No directory for $$prog. Skipping.."; \
- else \
- if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \
- subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \
- if [ -r "$${subpkgfile}" -a "$$target" = "${DEPENDS_TARGET}" ]; then \
- ${ECHO_MSG} "===> Installing existing package $${subpkgfile}"; \
- ${PKG_ADD} $${subpkgfile}; \
- else \
- (cd $$dir; ${MAKE} $$submake_args $$target $$depends_args) ; \
- fi; \
- else \
- (cd $$dir; ${MAKE} $$submake_args $$target $$depends_args) ; \
- fi ; \
- ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \
- fi; \
- fi; \
- done
-.endif
-.else
- @${DO_NADA}
-.endif
-.endif
-.endfor
-
-.EXEC: lib-depends
-.if !target(lib-depends)
-lib-depends:
-.if defined(LIB_DEPENDS) && !defined(NO_DEPENDS)
- @for i in ${LIB_DEPENDS}; do \
- lib=$${i%%:*}; \
- case $$lib in \
- *.*.*) pattern="`${ECHO_CMD} $$lib | ${SED} -e 's/\./\\\\./g'`" ;;\
- *.*) pattern="$${lib%%.*}\.$${lib#*.}" ;;\
- *) pattern="$$lib" ;;\
- esac; \
- dir=$${i#*:}; \
- target=$${i##*:}; \
- if ${TEST} $$dir = $$target; then \
- target="${DEPENDS_TARGET}"; \
- depends_args="${DEPENDS_ARGS}"; \
- else \
- dir=$${dir%%:*}; \
- fi; \
- ${ECHO_MSG} -n "===> ${PKGNAME} depends on shared library: $$lib"; \
- if ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \
- ${ECHO_MSG} " - found"; \
- if [ ${_DEPEND_ALWAYS} = 1 ]; then \
- ${ECHO_MSG} " (but building it anyway)"; \
- notfound=1; \
- else \
- notfound=0; \
- fi; \
- else \
- ${ECHO_MSG} " - not found"; \
- notfound=1; \
- fi; \
- if [ $$notfound != 0 ]; then \
- ${ECHO_MSG} "===> Verifying $$target for $$lib in $$dir"; \
- if [ ! -d "$$dir" ]; then \
- ${ECHO_MSG} " >> No directory for $$lib. Skipping.."; \
- else \
- if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \
- subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \
- if [ -r "$${subpkgfile}" -a "$$target" = "${DEPENDS_TARGET}" ]; then \
- ${ECHO_MSG} "===> Installing existing package $${subpkgfile}"; \
- ${PKG_ADD} $${subpkgfile}; \
- else \
- (cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
- fi; \
- else \
- (cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
- fi ; \
- ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \
- if ! ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \
- ${ECHO_MSG} "Error: shared library \"$$lib\" does not exist"; \
- ${FALSE}; \
- fi; \
- fi; \
- fi; \
- done
-.endif
-.endif
-
-.EXEC: misc-depends
-.if !target(misc-depends)
-misc-depends:
-.if defined(DEPENDS)
-.if !defined(NO_DEPENDS)
- @for dir in ${DEPENDS}; do \
- if ${EXPR} "$$dir" : '.*:' > /dev/null; then \
- target=`${ECHO_CMD} $$dir | ${SED} -e 's/.*://'`; \
- dir=`${ECHO_CMD} $$dir | ${SED} -e 's/:.*//'`; \
- else \
- target="${DEPENDS_TARGET}"; \
- depends_args="${DEPENDS_ARGS}"; \
- fi; \
- ${ECHO_MSG} "===> ${PKGNAME} depends on: $$dir"; \
- ${ECHO_MSG} "===> Verifying $$target for $$dir"; \
- if [ ! -d $$dir ]; then \
- ${ECHO_MSG} " >> No directory for $$dir. Skipping.."; \
- else \
- (cd $$dir; ${MAKE} $$target $$depends_args) ; \
- fi \
- done
- @${ECHO_MSG} "===> Returning to build of ${PKGNAME}"
-.endif
-.else
- @${DO_NADA}
-.endif
-.endif
-
-.endif
-
-# Dependency lists: both build and runtime, recursive. Print out directory names.
-
-.EXEC: all-depends-list
-all-depends-list:
-.if defined(_ONG_REEXEC)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.elif defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) || defined(DEPENDS)
- @${ALL-DEPENDS-LIST}
-.else
- @${DO_NADA}
-.endif
-
-.if defined(_ONG_REEXEC)
-ALL-DEPENDS-LIST= \
- ${ECHO_MSG} "${PKGNAME}: configuration error." >&2; ${FALSE}
-.else
-ALL-DEPENDS-LIST= \
- checked="${PARENT_CHECKED}"; \
- for dir in $$(${ECHO_CMD} "${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS}" | ${SED} -e 'y/ /\n/' | ${CUT} -f 2 -d ':') $$(${ECHO_CMD} ${DEPENDS} | ${SED} -e 'y/ /\n/' | ${CUT} -f 1 -d ':'); do \
- if [ -d $$dir ]; then \
- if (${ECHO_CMD} $$checked | ${GREP} -qwv "$$dir"); then \
- child=$$(cd $$dir; ${MAKE} PARENT_CHECKED="$$checked" all-depends-list); \
- for d in $$child; do ${ECHO_CMD} $$d; done; \
- ${ECHO_CMD} $$dir; \
- checked="$$dir $$child $$checked"; \
- fi; \
- else \
- ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \
- fi; \
- done | ${SORT} -u
-.endif
-
-.EXEC: clean-depends
-.if !target(clean-depends)
-clean-depends:
-.if defined(_ONG_REEXEC)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.else
- @for dir in $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \
- done
-.endif
-.endif
-
-.EXEC: deinstall-depends
-.if !target(deinstall-depends)
-deinstall-depends:
-.if defined(_ONG_REEXEC)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.else
- @for dir in $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} deinstall); \
- done
-.endif
-.endif
-
-.EXEC: fetch-recursive
-.if !target(fetch-recursive)
-fetch-recursive:
-.if defined(_ONG_REEXEC)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.else
- @${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies"
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} fetch); \
- done
-.endif
-.endif
-
-.EXEC: fetch-recursive-list
-.if !target(fetch-recursive-list)
-fetch-recursive-list:
-.if defined(_ONG_REEXEC)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.else
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} fetch-list); \
- done
-.endif
-.endif
-
-.EXEC: fetch-required
-.if !target(fetch-required)
-fetch-required: fetch
- @${ECHO_MSG} "===> Fetching all required distfiles for ${PKGNAME} and dependencies"
-.for deptype in EXTRACT PATCH FETCH BUILD RUN
-.if defined(${deptype}_DEPENDS)
-.if !defined(NO_DEPENDS)
- @for i in ${${deptype}_DEPENDS}; do \
- prog=`${ECHO_CMD} $$i | ${CUT} -f 1 -d ':'`; \
- dir=`${ECHO_CMD} $$i | ${CUT} -f 2-999 -d ':'`; \
- if ${EXPR} "$$dir" : '.*:' > /dev/null; then \
- dir=`${ECHO_CMD} $$dir | ${CUT} -f 1 -d ':'`; \
- if ${EXPR} "$$prog" : \\/ >/dev/null; then \
- if [ ! -e "$$prog" ]; then \
- (cd $$dir; ${MAKE} fetch); \
- fi; \
- fi; \
- else \
- (cd $$dir; \
- if ! ${PKG_INFO} -e `${MAKE} -V PKGNAME`; then \
- ${MAKE} fetch; \
- fi ); \
- fi; \
- done
-.endif
-.endif
-.endfor
-.endif
-
-.EXEC: fetch-required-list
-.if !target(fetch-required-list)
-fetch-required-list: fetch-list
-.for deptype in EXTRACT PATCH FETCH BUILD RUN
-.if defined(${deptype}_DEPENDS)
-.if !defined(NO_DEPENDS)
- @for i in ${${deptype}_DEPENDS}; do \
- prog=`${ECHO_CMD} $$i | ${CUT} -f 1 -d ':'`; \
- dir=`${ECHO_CMD} $$i | ${CUT} -f 2-999 -d ':'`; \
- if ${EXPR} "$$dir" : '.*:' > /dev/null; then \
- dir=`${ECHO_CMD} $$dir | ${CUT} -f 1 -d ':'`; \
- if ${EXPR} "$$prog" : \\/ >/dev/null; then \
- if [ ! -e "$$prog" ]; then \
- (cd $$dir; ${MAKE} fetch-list); \
- fi; \
- fi; \
- else \
- (cd $$dir; \
- if ! ${PKG_INFO} -e `${MAKE} -V PKGNAME`; then \
- ${MAKE} fetch-list; \
- fi ); \
- fi; \
- done
-.endif
-.endif
-.endfor
-.endif
-
-.EXEC: checksum-recursive
-.if !target(checksum-recursive)
-checksum-recursive:
-.if defined(_ONG_REEXEC)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.else
- @${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies"
- @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} checksum); \
- done
-.endif
-.endif
-
-# Dependency lists: build and runtime. Print out directory names.
-
-.EXEC: build-depends-list
-build-depends-list:
-.if defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) || defined(DEPENDS)
- @${BUILD-DEPENDS-LIST}
-.endif
-
-BUILD-DEPENDS-LIST= \
- for dir in $$(${ECHO_CMD} "${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' | ${SORT} -u) $$(${ECHO_CMD} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//' | ${SORT} -u); do \
- if [ -d $$dir ]; then \
- ${ECHO_CMD} $$dir; \
- else \
- ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \
- fi; \
- done | ${SORT} -u
-
-.EXEC: run-depends-list
-run-depends-list:
-.if defined(LIB_DEPENDS) || defined(RUN_DEPENDS) || defined(DEPENDS)
- @${RUN-DEPENDS-LIST}
-.endif
-
-RUN-DEPENDS-LIST= \
- for dir in $$(${ECHO_CMD} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${SED} -e 'y/ /\n/' | ${CUT} -f 2 -d ':' | ${SORT} -u) $$(${ECHO_CMD} ${DEPENDS} | ${SED} -e 'y/ /\n/' | ${CUT} -f 1 -d ':' | ${SORT} -u); do \
- if [ -d $$dir ]; then \
- ${ECHO_CMD} $$dir; \
- else \
- ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \
- fi; \
- done | ${SORT} -u
-
-# Package (recursive runtime) dependency list. Print out both directory names
-# and package names.
-
-.EXEC: package-depends-list
-package-depends-list:
-.if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) || defined(DEPENDS)
- @${PACKAGE-DEPENDS-LIST}
-.endif
-
-PACKAGE-DEPENDS-LIST?= \
- if [ "${CHILD_DEPENDS}" ]; then \
- installed=$$(${PKG_INFO} -qO ${PKGORIGIN} 2>/dev/null || \
- ${TRUE}); \
- if [ "$$installed" ]; then \
- break; \
- fi; \
- if [ -z "$$installed" ]; then \
- installed="${PKGNAME}"; \
- fi; \
- for pkgname in $$installed; do \
- ${ECHO_CMD} "$$pkgname ${.CURDIR} ${PKGORIGIN}"; \
- done; \
- fi; \
- checked="${PARENT_CHECKED}"; \
- for dir in $$(${ECHO_CMD} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${SED} -e 'y/ /\n/' | ${CUT} -f 2 -d ':') $$(${ECHO_CMD} ${DEPENDS} | ${SED} -e 'y/ /\n/' | ${CUT} -f 1 -d ':'); do \
- dir=$$(${REALPATH} $$dir); \
- if [ -d $$dir ]; then \
- if (${ECHO_CMD} $$checked | ${GREP} -qwv "$$dir"); then \
- childout=$$(cd $$dir; ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list); \
- set -- $$childout; \
- childdir=""; \
- while [ $$\# != 0 ]; do \
- childdir="$$childdir $$2"; \
- ${ECHO_CMD} "$$1 $$2 $$3"; \
- shift 3; \
- done; \
- checked="$$dir $$childdir $$checked"; \
- fi; \
- else \
- ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \
- fi; \
- done
-
-# Print out package names.
-
-.EXEC: package-depends
-package-depends:
-.if ${OSVERSION} >= 460102 || exists(${LOCALBASE}/sbin/pkg_info)
- @${PACKAGE-DEPENDS-LIST} | ${AWK} '{print $$1":"$$3}'
-.else
- @${PACKAGE-DEPENDS-LIST} | ${AWK} '{print $$1}'
-.endif
-
-# Build packages for port and dependencies
-
-.EXEC: package-recursive
-package-recursive: package
-.if defined(_ONG_REEXEC)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.TARGET}
-.else
- @for dir in $$(${ALL-DEPENDS-LIST}); do \
- (cd $$dir; ${MAKE} package-noinstall); \
- done
-.endif
-
-################################################################
-# Everything after here are internal targets and really
-# shouldn't be touched by anybody but the release engineers.
-################################################################
-
-# This target generates an index entry suitable for aggregation into
-# a large index. Format is:
-#
-# distribution-name|port-path|installation-prefix|comment| \
-# description-file|maintainer|categories|extract-depends| \
-# patch-depends|fetch-depends|build-depends|run-depends|www site
-
-.EXEC: describe
-.if !target(describe)
-describe:
-.if defined(_ONG_REEXEC)
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${.TARGET}
-.else
- @${ECHO_CMD} -n "${PKGNAME}|${.CURDIR}|${PREFIX}|"
-.if defined(COMMENT)
- @${ECHO_CMD} -n ${COMMENT:Q}
-.else
- @${ECHO_CMD} -n '** No Description'
-.endif
- @perl -e ' \
- if ( -f q{${DESCR}} ) { \
- print q{|${DESCR}}; \
- } else { \
- print q{|/dev/null}; \
- } \
- print q{|${MAINTAINER}|${CATEGORIES}|}; \
- @edirs = map((split /:/)[1], split(q{ }, q{${EXTRACT_DEPENDS}})); \
- @pdirs = map((split /:/)[1], split(q{ }, q{${PATCH_DEPENDS}})); \
- @fdirs = map((split /:/)[1], split(q{ }, q{${FETCH_DEPENDS}})); \
- @bdirs = map((split /:/)[1], split(q{ }, q{${BUILD_DEPENDS}})); \
- @rdirs = map((split /:/)[1], split(q{ }, q{${RUN_DEPENDS}})); \
- @ddirs = map((split /:/)[0], split(q{ }, q{${DEPENDS}})); \
- @ldirs = map((split /:/)[1], split(q{ }, q{${LIB_DEPENDS}})); \
- for my $$i (\@edirs, \@pdirs, \@fdirs, \@bdirs, \@rdirs, \@ddirs, \@ldirs) { \
- my @dirs = @$$i; \
- @$$i = (); \
- for (@dirs) { \
- if (-d $$_) { \
- push @$$i, $$_; \
- } else { \
- print STDERR qq{${PKGNAME}: \"$$_\" non-existent -- dependency list incomplete\n}; \
- exit(1); \
- } \
- } \
- } \
- for (@edirs, @ddirs) { \
- $$xe{$$_} = 1; \
- } \
- print join(q{ }, sort keys %xe), q{|}; \
- for (@pdirs, @ddirs) { \
- $$xp{$$_} = 1; \
- } \
- print join(q{ }, sort keys %xp), q{|}; \
- for (@fdirs, @ddirs) { \
- $$xf{$$_} = 1; \
- } \
- print join(q{ }, sort keys %xf), q{|}; \
- for (@bdirs, @ddirs, @ldirs) { \
- $$xb{$$_} = 1; \
- } \
- print join(q{ }, sort keys %xb), q{|}; \
- for (@rdirs, @ddirs, @ldirs) { \
- $$xr{$$_} = 1; \
- } \
- print join(q{ }, sort keys %xr), q{|}; \
- if (open(DESCR, q{${DESCR}})) { \
- while (<DESCR>) { \
- if (/^WWW:\s+(\S+)/) { \
- print $$1; \
- last; \
- } \
- } \
- } \
- print qq{\n};'
-.endif
-.endif
-
-.EXEC: www-site
-.if !target(www-site)
-www-site:
-.if exists(${DESCR})
- @${GREP} '^WWW:[ ]' ${DESCR} | ${AWK} '{print $$2}' | ${HEAD} -1
-.else
- @${ECHO_CMD}
-.endif
-.endif
-
-.EXEC: readmes
-.if !target(readmes)
-readmes: readme
-.endif
-
-.EXEC: readme
-.if !target(readme)
-readme:
- @${RM} -f ${.CURDIR}/README.html
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} ${.CURDIR}/README.html
-.endif
-
-${.CURDIR}/README.html:
- @${ECHO_MSG} "===> Creating README.html for ${PKGNAME}"
- @__softMAKEFLAGS='${__softMAKEFLAGS:S/'/'\''/g}'; \
- ${SED} -e 's|%%PORT%%|'$$(${ECHO_CMD} ${.CURDIR} | \
- ${SED} -e 's|.*/\([^/]*/[^/]*\)$$|\1|')'|g' \
- -e 's|%%PKG%%|${PKGNAME}|g' \
- -e 's|%%COMMENT%%|'"$$(${ECHO_CMD} ${COMMENT:Q})"'|' \
- -e '/%%COMMENT%%/d' \
- -e 's|%%DESCR%%|'"$$(${ECHO_CMD} ${DESCR} | \
- ${SED} -e 's|${.CURDIR}/||')"'|' \
- -e 's|%%EMAIL%%|'"$$(${ECHO_CMD} "${MAINTAINER}" | \
- ${SED} -e 's/([^)]*)//;s/.*<//;s/>.*//')"'|g' \
- -e 's|%%MAINTAINER%%|${MAINTAINER}|g' \
- -e 's|%%WEBSITE%%|'"$$(cd ${.CURDIR} && eval ${MAKE} ${_ONG_MAKEFLAGS} \
- $${__softMAKEFLAGS} pretty-print-www-site)"'|' \
- -e 's|%%BUILD_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} ${_ONG_MAKEFLAGS} \
- $${__softMAKEFLAGS} pretty-print-build-depends-list)"'|' \
- -e 's|%%RUN_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} ${_ONG_MAKEFLAGS} \
- $${__softMAKEFLAGS} pretty-print-run-depends-list)"'|' \
- -e 's|%%TOP%%|'"$$(${ECHO_CMD} ${CATEGORIES} | \
- ${SED} -e 's| .*||' -e 's|[^/]*|..|g')"'/..|' \
- ${TEMPLATES}/README.port >> $@
-
-# The following two targets require an up-to-date INDEX in ${PORTSDIR}
-
-.EXEC: pretty-print-build-depends-list
-.if !target(pretty-print-build-depends-list)
-pretty-print-build-depends-list:
-.if defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || \
- defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || \
- defined(LIB_DEPENDS) || defined(DEPENDS)
- @${ECHO_CMD} -n 'This port requires package(s) "'
- @${ECHO_CMD} -n `${GREP} '^${PKGNAME}|' ${PORTSDIR}/${INDEXFILE} | ${AWK} -F\| '{print $$8;}'`
- @${ECHO_CMD} '" to build.'
-.endif
-.endif
-
-.EXEC: pretty-print-run-depends-list
-.if !target(pretty-print-run-depends-list)
-pretty-print-run-depends-list:
-.if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) || defined(DEPENDS)
- @${ECHO_CMD} -n 'This port requires package(s) "'
- @${ECHO_CMD} -n `${GREP} '^${PKGNAME}|' ${PORTSDIR}/${INDEXFILE} | ${AWK} -F\| '{print $$9;}'`
- @${ECHO_CMD} '" to run.'
-.endif
-.endif
-
-.EXEC: apply-slist
-.if !target(apply-slist)
-_SUB_LIST_TEMP= ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/}
-apply-slist:
-.if defined(SUB_FILES)
-.for file in ${SUB_FILES}
-.if !exists(${FILESDIR}/${file}.in)
- @${ECHO_CMD} "** Missing ${FILESDIR}/${file}.in for ${PKGNAME}."; exit 1
-.else
- @${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${FILESDIR}/${file}.in > ${WRKDIR}/${file}
-.endif
-.endfor
-.for i in pkg-message pkg-install pkg-deinstall pkg-req
-.if ${SUB_FILES:M${i}*}!=""
-${i:S/-//:U}= ${WRKDIR}/${SUB_FILES:M${i}*}
-.endif
-.endfor
-.endif
-.endif
-
-# Generate packing list. Also tests to make sure all required package
-# files exist.
-
-.EXEC: generate-plist
-.if !target(generate-plist)
-generate-plist:
- @${ECHO_MSG} "===> Generating temporary packing list"
- @${MKDIR} `${DIRNAME} ${TMPPLIST}`
- @if [ ! -f ${DESCR} ]; then ${ECHO_CMD} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi
- @>${TMPPLIST}
- @for file in ${PLIST_FILES}; do \
- ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \
- done
- @for man in ${__MANPAGES}; do \
- ${ECHO_CMD} $${man} >> ${TMPPLIST}; \
- done
-.for _PREFIX in ${PREFIX}
-.if ${_TMLINKS:M${_PREFIX}*}x != x
- @for i in ${_TMLINKS:M${_PREFIX}*:S|^${_PREFIX}/||}; do \
- ${ECHO_CMD} "$$i" >> ${TMPPLIST}; \
- done
-.endif
-.if ${_TMLINKS:N${_PREFIX}*}x != x
- @${ECHO_CMD} @cwd / >> ${TMPPLIST}
- @for i in ${_TMLINKS:N${_PREFIX}*:S|^/||}; do \
- ${ECHO_CMD} "$$i" >> ${TMPPLIST}; \
- done
- @${ECHO_CMD} '@cwd ${PREFIX}' >> ${TMPPLIST}
-.endif
- @for i in $$(${ECHO_CMD} ${__MANPAGES} ${_TMLINKS:M${_PREFIX}*:S|^${_PREFIX}/||} ' ' | ${SED} -E -e 's|man([1-9ln])/([^/ ]+) |cat\1/\2 |g'); do \
- ${ECHO_CMD} "@unexec rm -f %D/$${i%.gz} %D/$${i%.gz}.gz" >> ${TMPPLIST}; \
- done
-.endfor
- @if [ -f ${PLIST} ]; then \
- ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${PLIST} >> ${TMPPLIST}; \
- fi
-.for dir in ${PLIST_DIRS}
- @${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} | ${SED} -e 's,^,@dirrm ,' >> ${TMPPLIST}
-.endfor
-.if defined(INSTALLS_SHLIB) && !defined(INSTALL_AS_USER)
- @${ECHO_CMD} "@exec ${LDCONFIG} -m ${LDCONFIG_PLIST}" >> ${TMPPLIST}
- @${ECHO_CMD} "@unexec ${LDCONFIG} -R" >> ${TMPPLIST}
-.elif defined(INSTALLS_SHLIB)
- @${ECHO_CMD} "@exec ${LDCONFIG} -m ${LDCONFIG_PLIST} || ${TRUE}" >> ${TMPPLIST}
- @${ECHO_CMD} "@unexec ${LDCONFIG} -R || ${TRUE}" >> ${TMPPLIST}
-.endif
-.if !defined(NO_FILTER_SHLIBS)
-.if (${PORTOBJFORMAT} == aout)
- @${SED} -e 's,\(/lib.*\.so\.[0-9]*\)$$,\1.0,' ${TMPPLIST} > ${TMPPLIST}.tmp
-.else
- @${SED} -e 's,\(/lib.*\.so\.[0-9]*\)\.[0-9]*$$,\1,' ${TMPPLIST} > ${TMPPLIST}.tmp
-.endif
- @${MV} -f ${TMPPLIST}.tmp ${TMPPLIST}
-.endif
-.endif
-
-${TMPPLIST}:
- @cd ${.CURDIR} && ${MAKE} ${_ONG_MAKEFLAGS} ${__softMAKEFLAGS} generate-plist
-
-.EXEC: add-plist-docs
-.if !target(add-plist-docs)
-add-plist-docs:
-.if defined(PORTDOCS)
- @if ${EGREP} -qe '^@cw?d' ${TMPPLIST} && \
- [ "`${SED} -En -e '/^@cw?d[ ]*/s,,,p' ${TMPPLIST} | ${TAIL} -n 1`" != "${PREFIX}" ]; then \
- ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \
- fi
- @${FIND} -P ${PORTDOCS:S/^/${DESTDIR}${DOCSDIR}\//} ! -type d 2>/dev/null | \
- ${SED} -ne 's,^${DESTDIR}${PREFIX}/,,p' >> ${TMPPLIST}
- @${FIND} -P -d ${PORTDOCS:S/^/${DESTDIR}${DOCSDIR}\//} -type d 2>/dev/null | \
- ${SED} -ne 's,^${DESTDIR}${PREFIX}/,@dirrm ,p' >> ${TMPPLIST}
- @if [ -d "${DESTDIR}${DOCSDIR}" ]; then \
- ${ECHO_CMD} "@unexec rmdir %D/${DOCSDIR:S,^${PREFIX}/,,} 2>/dev/null || true" >> ${TMPPLIST}; \
- fi
-.else
- @${DO_NADA}
-.endif
-.endif
-
-.EXEC: add-plist-info
-.if !target(add-plist-info)
-add-plist-info:
-# Process GNU INFO files at package install/deinstall time
-.for i in ${INFO}
- @${ECHO_CMD} "@unexec install-info --delete %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
- >> ${TMPPLIST}
- @${LS} ${DESTDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${DESTDIR}${PREFIX}/::g >> ${TMPPLIST}
- @${ECHO_CMD} "@exec install-info %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
- >> ${TMPPLIST}
-.endfor
-.if !defined(NO_MTREE) && defined(INFO)
-.if ${PREFIX} != /usr
- @${ECHO_CMD} "@unexec if [ -f %D/${INFO_PATH}/dir ]; then if sed -e '1,/Menu:/d' %D/${INFO_PATH}/dir | grep -q '^[*] '; then true; else rm %D/${INFO_PATH}/dir; fi; fi" >> ${TMPPLIST}
-.if ${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${X11BASE} && ${PREFIX} != ${LINUXBASE}
- @${ECHO_CMD} "@unexec rmdir %D/info 2> /dev/null || true" >> ${TMPPLIST}
-.endif
-.endif
-.endif
-.endif
-
-# If we're installing into a non-standard PREFIX, we need to remove that directory at
-# deinstall-time
-.EXEC: add-plist-post
-.if !target(add-plist-post)
-add-plist-post:
-.if ${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${X11BASE} && ${PREFIX} != ${LINUXBASE} && ${PREFIX} != /usr
- @${ECHO_CMD} "@unexec rmdir %D 2> /dev/null || true" >> ${TMPPLIST}
-.else
- @${DO_NADA}
-.endif
-.endif
-
-# Compress (or uncompress) and symlink manpages.
-.EXEC: compress-man
-.if !target(compress-man)
-compress-man:
-.if defined(_MANPAGES) || defined(_MLINKS)
-.if ${MANCOMPRESSED:L} == yes && defined(NOMANCOMPRESS)
- @${ECHO_MSG} "===> Uncompressing manual pages for ${PKGNAME}"
- @_manpages='${_MANPAGES:S/^/${DESTDIR}/:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GUNZIP_CMD} $${_manpages} ) || ${TRUE}
-.elif ${MANCOMPRESSED:L} == no && !defined(NOMANCOMPRESS)
- @${ECHO_MSG} "===> Compressing manual pages for ${PKGNAME}"
- @_manpages='${_MANPAGES:S/^/${DESTDIR}/:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GZIP_CMD} $${_manpages} ) || ${TRUE}
-.endif
-.if defined(_MLINKS)
- @set ${_MLINKS}; \
- while :; do \
- [ $$# -eq 0 ] && break || ${TRUE}; \
- ${RM} -f ${DESTDIR}$${2%.gz}; ${RM} -f ${DESTDIR}$$2.gz; \
- ${LN} -fs `${ECHO_CMD} $$1 $$2 | ${AWK} '{ \
- z=split($$1, a, /\//); x=split($$2, b, /\//); \
- while (a[i] == b[i]) i++; \
- for (q=i; q<x; q++) printf "../"; \
- for (; i<z; i++) printf a[i] "/"; printf a[z]; }'` ${DESTDIR}$$2; \
- shift; shift; \
- done
-.endif
-.else
- @${DO_NADA}
-.endif
-.endif
-
-# Fake installation of package so that user can pkg_delete it later.
-# Also, make sure that an installed port is recognized correctly in
-# accordance to the @pkgdep directive in the packing lists
-
-.EXEC: fake-pkg
-.if !target(fake-pkg)
-fake-pkg:
-.if !defined(NO_PKG_REGISTER)
- @if [ ! -d ${_PKG_DBDIR} ]; then ${RM} -f ${_PKG_DBDIR}; ${MKDIR} ${_PKG_DBDIR}; fi
- @${RM} -f /tmp/${PKGNAME}-required-by
-.if defined(FORCE_PKG_REGISTER)
- @if [ -e ${_PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY ]; then \
- ${CP} ${_PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY /tmp/${PKGNAME}-required-by; \
- fi
- @${RM} -rf ${_PKG_DBDIR}/${PKGNAME}
-.endif
- @if [ ! -d ${_PKG_DBDIR}/${PKGNAME} ]; then \
- ${ECHO_MSG} "===> Registering installation for ${PKGNAME}"; \
- ${MKDIR} ${_PKG_DBDIR}/${PKGNAME}; \
- ${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${_PKG_DBDIR}/${PKGNAME}/+CONTENTS; \
- ${CP} ${DESCR} ${_PKG_DBDIR}/${PKGNAME}/+DESC; \
- ${ECHO_CMD} ${COMMENT:Q} > ${_PKG_DBDIR}/${PKGNAME}/+COMMENT; \
- if [ -f ${PKGINSTALL} ]; then \
- ${CP} ${PKGINSTALL} ${_PKG_DBDIR}/${PKGNAME}/+INSTALL; \
- fi; \
- if [ -f ${PKGDEINSTALL} ]; then \
- ${CP} ${PKGDEINSTALL} ${_PKG_DBDIR}/${PKGNAME}/+DEINSTALL; \
- fi; \
- if [ -f ${PKGREQ} ]; then \
- ${CP} ${PKGREQ} ${_PKG_DBDIR}/${PKGNAME}/+REQUIRE; \
- fi; \
- if [ -f ${PKGMESSAGE} ]; then \
- ${CP} ${PKGMESSAGE} ${_PKG_DBDIR}/${PKGNAME}/+DISPLAY; \
- fi; \
- for dep in `${SETENV} PKG_DBDIR=${_PKG_DBDIR} ${PKG_INFO} -qf ${PKGNAME} | ${GREP} -w ^@pkgdep | ${AWK} '{print $$2}' | ${SORT} -u`; do \
- if [ -d ${_PKG_DBDIR}/$$dep -a -z `${ECHO_CMD} $$dep | ${GREP} -E ${PKG_IGNORE_DEPENDS}` ]; then \
- if ! ${GREP} ^${PKGNAME}$$ ${_PKG_DBDIR}/$$dep/+REQUIRED_BY \
- >/dev/null 2>&1; then \
- ${ECHO_CMD} ${PKGNAME} >> ${_PKG_DBDIR}/$$dep/+REQUIRED_BY; \
- fi; \
- fi; \
- done; \
- fi
-.if !defined(NO_MTREE)
- @if [ -f ${MTREE_FILE} ]; then \
- ${CP} ${MTREE_FILE} ${_PKG_DBDIR}/${PKGNAME}/+MTREE_DIRS; \
- fi
-.endif
- @if [ -e /tmp/${PKGNAME}-required-by ]; then \
- ${CAT} /tmp/${PKGNAME}-required-by >> ${_PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY; \
- ${RM} -f /tmp/${PKGNAME}-required-by; \
- fi
-.else
- @${DO_NADA}
-.endif
-.endif
-
-# Depend is generally meaningless for arbitrary ports, but if someone wants
-# one they can override this. This is just to catch people who've gotten into
-# the habit of typing `make depend all install' as a matter of course.
-#
-.if !target(depend)
-depend:
-.endif
-
-# Same goes for tags
-.if !target(tags)
-tags:
-.endif
-
-.if !defined(NOPRECIOUSSOFTMAKEVARS)
-.for softvar in CKSUMFILES _MLINKS
-.if defined(${softvar})
-__softMAKEFLAGS+= '${softvar}+=${${softvar}:S/'/'\''/g}'
-.endif
-.endfor
-.endif
-
-.if !defined(NOPRECIOUSMAKEVARS)
-# These won't change, so we can pass them through the environment
-.MAKEFLAGS: \
- ARCH="${ARCH:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \
- OPSYS="${OPSYS:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \
- OSREL="${OSREL:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \
- OSVERSION="${OSVERSION:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \
- PORTOBJFORMAT="${PORTOBJFORMAT:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \
- SYSTEMVERSION="${SYSTEMVERSION:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}"
-.endif
-
-.if !target(config)
-config:
-.if !defined(OPTIONS)
- @${ECHO_MSG} "===> No options to configure"
-.else
-.if ${OPTIONSFILE} != ${_OPTIONSFILE}
- @${ECHO_MSG} "===> Using wrong configuration file ${_OPTIONSFILE}"
- @exit 1
-.endif
-.if ${UID} != 0 && !defined(INSTALL_AS_USER)
- @${ECHO_MSG} "===> Switching to root credentials to create `${DIRNAME} ${_OPTIONSFILE}`"
- @(${SU_CMD} "${SH} -c \"${MKDIR} `${DIRNAME} ${_OPTIONSFILE}` 2> /dev/null\"") || \
- (${ECHO_MSG} "===> Cannot create `${DIRNAME} ${_OPTIONSFILE}`, check permissions"; exit 1)
- @${ECHO_MSG} "===> Returning to user credentials"
-.else
- @(${MKDIR} `${DIRNAME} ${_OPTIONSFILE}` 2> /dev/null) || \
- (${ECHO_MSG} "===> Cannot create `${DIRNAME} ${_OPTIONSFILE}`, check permissions"; exit 1)
-.endif
- -@if [ -e ${_OPTIONSFILE} ]; then \
- . ${_OPTIONSFILE}; \
- fi; \
- set ${OPTIONS} XXX; \
- while [ $$# -gt 3 ]; do \
- OPTIONSLIST="$${OPTIONSLIST} $$1"; \
- defaultval=$$3; \
- withvar=WITH_$$1; \
- withoutvar=WITHOUT_$$1; \
- withval=$$(eval ${ECHO_CMD} $$\{$${withvar}\}); \
- withoutval=$$(eval ${ECHO_CMD} $$\{$${withoutvar}\}); \
- if [ ! -z "$${withval}" ]; then \
- val=on; \
- elif [ ! -z "$${withoutval}" ]; then \
- val=off; \
- else \
- val=$$3; \
- fi; \
- DEFOPTIONS="$${DEFOPTIONS} $$1 \"$$2\" $${val}"; \
- shift 3; \
- done; \
- TMPOPTIONSFILE=$$(${MKTEMP} -t portoptions); \
- trap "${RM} -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \
- ${SH} -c "${DIALOG} --checklist \"Options for ${PKGNAME:C/-([^-]+)$/ \1/}\" 21 70 15 $${DEFOPTIONS} 2> $${TMPOPTIONSFILE}"; \
- status=$$?; \
- if [ $${status} -ne 0 ] ; then \
- ${RM} -f $${TMPOPTIONSFILE}; \
- ${ECHO_MSG} "===> Options unchanged"; \
- exit 0; \
- fi; \
- if [ ! -e ${TMPOPTIONSFILE} ]; then \
- ${ECHO_MSG} "===> No user-specified options to save for ${PKGNAME}"; \
- exit 0; \
- fi; \
- SELOPTIONS=$$(${CAT} $${TMPOPTIONSFILE}); \
- ${RM} -f $${TMPOPTIONSFILE}; \
- TMPOPTIONSFILE=$$(${MKTEMP} -t portoptions); \
- trap "${RM} -f $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \
- ${ECHO_CMD} "# This file is auto-generated by 'make config'." > $${TMPOPTIONSFILE}; \
- ${ECHO_CMD} "# No user-servicable parts inside!" >> $${TMPOPTIONSFILE}; \
- ${ECHO_CMD} "# Options for ${PKGNAME}" >> $${TMPOPTIONSFILE}; \
- ${ECHO_CMD} "_OPTIONS_READ=${PKGNAME}" >> $${TMPOPTIONSFILE}; \
- for i in $${OPTIONSLIST}; do \
- ${ECHO_CMD} $${SELOPTIONS} | ${GREP} -qw $${i}; \
- if [ $$? -eq 0 ]; then \
- ${ECHO_CMD} WITH_$${i}=true >> $${TMPOPTIONSFILE}; \
- else \
- ${ECHO_CMD} WITHOUT_$${i}=true >> $${TMPOPTIONSFILE}; \
- fi; \
- done; \
- if [ `${ID} -u` != 0 -a "x${INSTALL_AS_USER}" = "x" ]; then \
- ${ECHO_MSG} "===> Switching to root credentials to write ${_OPTIONSFILE}"; \
- ${SU_CMD} "${CAT} $${TMPOPTIONSFILE} > ${_OPTIONSFILE}"; \
- ${ECHO_MSG} "===> Returning to user credentials"; \
- else \
- ${CAT} $${TMPOPTIONSFILE} > ${_OPTIONSFILE}; \
- fi; \
- ${RM} -f $${TMPOPTIONSFILE}
-.endif
-.endif
-
-.if !target(showconfig)
-showconfig:
-.if defined(OPTIONS) && exists(${_OPTIONSFILE})
- @${ECHO_MSG} "===> The following configuration options are set for ${PKGNAME}:"
- -@if [ -e ${_OPTIONSFILE} ]; then \
- . ${_OPTIONSFILE}; \
- fi; \
- set ${OPTIONS} XXX; \
- while [ $$# -gt 3 ]; do \
- defaultval=$$3; \
- withvar=WITH_$$1; \
- withoutvar=WITHOUT_$$1; \
- withval=$$(eval ${ECHO_CMD} $$\{$${withvar}\}); \
- withoutval=$$(eval ${ECHO_CMD} $$\{$${withoutvar}\}); \
- if [ ! -z "$${withval}" ]; then \
- val=on; \
- elif [ ! -z "$${withoutval}" ]; then \
- val=off; \
- else \
- val="$$3 (default)"; \
- fi; \
- ${ECHO_MSG} " $$1=$${val} \"$$2\""; \
- shift 3; \
- done
-.else
- @${ECHO_MSG} "===> No configuration options are set for this port"
-.if defined(OPTIONS)
- @${ECHO_MSG} " Use 'make config' to set default values"
-.endif
-.endif
-.endif
-
-.if !target(rmconfig)
-rmconfig:
-.if defined(OPTIONS) && exists(${_OPTIONSFILE})
- -@${ECHO_MSG} "===> Removing user-configured options for ${PKGNAME}"; \
- if [ `${ID} -u` != 0 -a "x${INSTALL_AS_USER}" = "x" ]; then \
- ${ECHO_MSG} "===> Switching to root credentials to remove ${_OPTIONSFILE} and `${DIRNAME} ${_OPTIONSFILE}`"; \
- ${SU_CMD} "${RM} -f ${_OPTIONSFILE} ; \
- ${RMDIR} `${DIRNAME} ${_OPTIONSFILE}`"; \
- ${ECHO_MSG} "===> Returning to user credentials"; \
- else \
- ${RM} -f ${_OPTIONSFILE}; \
- ${RMDIR} `${DIRNAME} ${_OPTIONSFILE}`; \
- fi
-.else
- @${ECHO_MSG} "===> No user-specified options configured for ${PKGNAME}"
-.endif
-.endif
diff --git a/ports-mgmt/portmk/Mk/bsd.port.pre.mk b/ports-mgmt/portmk/Mk/bsd.port.pre.mk
deleted file mode 100644
index ca8804168d21..000000000000
--- a/ports-mgmt/portmk/Mk/bsd.port.pre.mk
+++ /dev/null
@@ -1,419 +0,0 @@
-#-*- mode: makefile; tab-width: 4; -*-
-# ex:ts=4
-#
-# $FreeBSD$
-#
-
-PORTMK_VERSION= 20050202
-
-.if defined(_PREMKINCLUDED)
-check-makefile::
- @${ECHO_CMD} "${PKGNAME}: Makefile error: you cannot include bsd.port[.pre].mk twice"
- @${FALSE}
-.endif
-
-_PREMKINCLUDED= yes
-
-.if defined(MAKE_VERSION)
-.if ${MAKE_VERSION} >= 5200408030 || ${MAKE_VERSION} >= 4200408030 && ${MAKE_VERSION} < 5000000000
-NOPRECIOUSSOFTMAKEVARS= yes
-.endif
-.endif
-
-AWK?= /usr/bin/awk
-BASENAME?= /usr/bin/basename
-BRANDELF?= /usr/bin/brandelf
-.if exists(/usr/bin/bzip2)
-BZCAT?= /usr/bin/bzcat
-BZIP2_CMD?= /usr/bin/bzip2
-.else
-BZCAT?= ${LOCALBASE}/bin/bzcat
-BZIP2_CMD?= ${LOCALBASE}/bin/bzip2
-BZIP2DEPENDS= yes
-.endif
-CAT?= /bin/cat
-CHGRP?= /usr/bin/chgrp
-CHMOD?= /bin/chmod
-CHOWN?= /usr/sbin/chown
-CHROOT?= /usr/sbin/chroot
-COMM?= /usr/bin/comm
-CP?= /bin/cp
-CPIO?= /usr/bin/cpio
-CUT?= /usr/bin/cut
-DATE?= /bin/date
-DC?= /usr/bin/dc
-DIALOG?= /usr/bin/dialog
-DIRNAME?= /usr/bin/dirname
-EGREP?= /usr/bin/egrep
-EXPR?= /bin/expr
-FALSE?= false # Shell builtin
-FILE?= /usr/bin/file
-FIND?= /usr/bin/find
-FMT?= /usr/bin/fmt
-GREP?= /usr/bin/grep
-GUNZIP_CMD?= /usr/bin/gunzip -f
-GZCAT?= /usr/bin/gzcat
-GZIP?= -9
-GZIP_CMD?= /usr/bin/gzip -nf ${GZIP}
-HEAD?= /usr/bin/head
-ID?= /usr/bin/id
-IDENT?= /usr/bin/ident
-LDCONFIG?= /sbin/ldconfig
-LN?= /bin/ln
-LS?= /bin/ls
-MKDIR?= /bin/mkdir -p
-MKTEMP?= /usr/bin/mktemp
-MV?= /bin/mv
-OBJCOPY?= /usr/bin/objcopy
-OBJDUMP?= /usr/bin/objdump
-PASTE?= /usr/bin/paste
-PAX?= /bin/pax
-PRINTF?= /usr/bin/printf
-REALPATH?= /bin/realpath
-RM?= /bin/rm
-RMDIR?= /bin/rmdir
-SED?= /usr/bin/sed
-SETENV?= /usr/bin/env
-SH?= /bin/sh
-SORT?= /usr/bin/sort
-STRIP_CMD?= /usr/bin/strip
-SU_CMD?= /usr/bin/su root -c
-TAIL?= /usr/bin/tail
-TEST?= test # Shell builtin
-TR?= /usr/bin/tr
-TRUE?= true # Shell builtin
-UNAME?= /usr/bin/uname
-.if exists(/usr/bin/unzip)
-UNZIP_CMD?= /usr/bin/unzip
-.else
-UNZIP_CMD?= ${LOCALBASE}/bin/unzip
-ZIPDEPENDS= yes
-.endif
-WHICH?= /usr/bin/which
-XARGS?= /usr/bin/xargs
-YACC?= /usr/bin/yacc
-
-# ECHO is defined in /usr/share/mk/sys.mk, which can either be "echo",
-# or "true" if the make flag -s is given. Use ECHO_CMD where you mean
-# the echo command.
-ECHO_CMD?= echo # Shell builtin
-
-# Used to print all the '===>' style prompts - override this to turn them off.
-ECHO_MSG?= ${ECHO_CMD}
-
-# Get the default maintainer
-MAINTAINER?= ports@FreeBSD.org
-
-# Get the architecture
-.if !defined(ARCH)
-ARCH!= ${UNAME} -p
-.endif
-
-# Kludge for pre-3.0 systems
-MACHINE_ARCH?= i386
-
-# Get the operating system type
-.if !defined(OPSYS)
-OPSYS!= ${UNAME} -s
-.endif
-
-# Get the operating system revision
-.if !defined(OSREL)
-OSREL!= ${UNAME} -r | ${SED} -e 's/[-(].*//'
-.endif
-
-# Get __FreeBSD_version
-.if !defined(OSVERSION)
-.if exists(/sbin/sysctl)
-OSVERSION!= /sbin/sysctl -n kern.osreldate
-.else
-OSVERSION!= /usr/sbin/sysctl -n kern.osreldate
-.endif
-.endif
-
-# Get the object format.
-.if !defined(PORTOBJFORMAT)
-PORTOBJFORMAT!= ${TEST} -x /usr/bin/objformat && /usr/bin/objformat || ${ECHO_CMD} aout
-.endif
-
-MASTERDIR?= ${.CURDIR}
-
-PORTMK_CONF?= /etc/portmk.conf
-
-.if exists(${PORTMK_CONF})
-.include "${PORTMK_CONF}"
-.endif
-
-# If they exist, include Makefile.inc, then architecture/operating
-# system specific Makefiles, then local Makefile.local.
-
-.if ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/../Makefile.inc)
-.include "${.CURDIR}/../Makefile.inc"
-USE_SUBMAKE= yes
-.endif
-
-.if exists(${MASTERDIR}/../Makefile.inc)
-.include "${MASTERDIR}/../Makefile.inc"
-USE_SUBMAKE= yes
-.endif
-
-.if exists(${MASTERDIR}/Makefile.${ARCH}-${OPSYS})
-.include "${MASTERDIR}/Makefile.${ARCH}-${OPSYS}"
-USE_SUBMAKE= yes
-.elif exists(${MASTERDIR}/Makefile.${OPSYS})
-.include "${MASTERDIR}/Makefile.${OPSYS}"
-USE_SUBMAKE= yes
-.elif exists(${MASTERDIR}/Makefile.${ARCH})
-.include "${MASTERDIR}/Makefile.${ARCH}"
-USE_SUBMAKE= yes
-.endif
-
-.if exists(${MASTERDIR}/Makefile.local)
-.include "${MASTERDIR}/Makefile.local"
-USE_SUBMAKE= yes
-.endif
-
-# where 'make config' records user configuration options
-PORT_DBDIR?= /var/db/ports
-
-.if defined(LATEST_LINK)
-UNIQUENAME?= ${LATEST_LINK}
-.else
-UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME}
-.endif
-OPTIONSFILE?= ${PORT_DBDIR}/${UNIQUENAME}/options
-_OPTIONSFILE!= ${ECHO_CMD} "${OPTIONSFILE}"
-.if defined(OPTIONS) && !defined(_OPTIONSNG_READ)
-.if exists(${_OPTIONSFILE}) && !make(rmconfig)
-.include "${_OPTIONSFILE}"
-.endif
-.if exists(${_OPTIONSFILE}.local)
-.include "${_OPTIONSFILE}.local"
-.endif
-.endif
-
-# check for old, crufty, makefile types, part 1:
-.if !defined(PORTNAME) || !( defined(PORTVERSION) || defined (DISTVERSION) ) || defined(PKGNAME)
-check-makefile::
- @${ECHO_CMD} "Makefile error: you need to define PORTNAME and PORTVERSION instead of PKGNAME."
- @${ECHO_CMD} "(This port is too old for your bsd.port.mk, please update it to match"
- @${ECHO_CMD} " your bsd.port.mk.)"
- @${FALSE}
-.endif
-
-.if defined(PORTVERSION)
-.if ${PORTVERSION:M*[-_,]*}x != x
-BROKEN= "PORTVERSION ${PORTVERSION} may not contain '-' '_' or ','"
-.endif
-DISTVERSION?= ${PORTVERSION:S/:/::/g}
-.elif defined(DISTVERSION)
-PORTVERSION= ${DISTVERSION:L:C/([a-z])[a-z]+/\1/g:C/([0-9])([a-z])/\1.\2/g:C/:(.)/\1/g:C/[^a-z0-9+]+/./g}
-.endif
-
-PORTREVISION?= 0
-.if ${PORTREVISION} != 0
-_SUF1= _${PORTREVISION}
-.endif
-
-PORTEPOCH?= 0
-.if ${PORTEPOCH} != 0
-_SUF2= ,${PORTEPOCH}
-.endif
-
-# check for old, crufty, makefile types, part 2. The "else" case
-# should have been handled in part 1, above.
-.if !defined(PKGNAME)
-PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
-.endif
-DISTNAME?= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
-
-# These need to be absolute since we don't know how deep in the ports
-# tree we are and thus can't go relative. They can, of course, be overridden
-# by individual Makefiles or local system make configuration.
-PORTSDIR?= /usr/ports
-LOCALBASE?= /usr/local
-X11BASE?= /usr/X11R6
-LINUXBASE?= /compat/linux
-DISTDIR?= ${PORTSDIR}/distfiles
-_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR}
-.if ${OSVERSION} >= 600000
-INDEXFILE?= INDEX-6
-.elif ${OSVERSION} >= 500036
-INDEXFILE?= INDEX-5
-.else
-INDEXFILE?= INDEX
-.endif
-.if defined(USE_BZIP2)
-EXTRACT_SUFX?= .tar.bz2
-.elif defined(USE_ZIP)
-EXTRACT_SUFX?= .zip
-.else
-EXTRACT_SUFX?= .tar.gz
-.endif
-PACKAGES?= ${PORTSDIR}/packages
-TEMPLATES?= ${PORTSDIR}/Templates
-
-.if (!defined(PKGDIR) && exists(${MASTERDIR}/pkg/DESCR)) || \
- (!defined(MD5_FILE) && exists(${MASTERDIR}/files/md5))
-check-makefile::
- @${ECHO_CMD} "Makefile error: your port uses an old layout. Please update it to match this bsd.port.mk. If you have updated your ports collection via cvsup and are still getting this error, see Q12 and Q13 in the cvsup FAQ on http://www.polstra.com for further information."
- @${FALSE}
-.endif
-PATCHDIR?= ${MASTERDIR}/files
-FILESDIR?= ${MASTERDIR}/files
-SCRIPTDIR?= ${MASTERDIR}/scripts
-PKGDIR?= ${MASTERDIR}
-
-.if defined(USE_IMAKE) && !defined(USE_X_PREFIX)
-USE_X_PREFIX= yes
-.endif
-.if defined(USE_X_PREFIX) && ${USE_X_PREFIX} == "no"
-.undef USE_X_PREFIX
-.endif
-.if defined(USE_X_PREFIX)
-USE_XLIB= yes
-.endif
-.if defined(USE_X_PREFIX)
-PREFIX?= ${X11BASE}
-.elif defined(USE_LINUX_PREFIX)
-PREFIX?= ${LINUXBASE}
-NO_MTREE= yes
-.else
-PREFIX?= ${LOCALBASE}
-.endif
-
-PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg
-
-.if defined(WITH_APACHE2)
-APACHE_PORT?= www/apache2
-.else
-APACHE_PORT?= www/apache13
-.endif
-APXS?= ${LOCALBASE}/sbin/apxs
-.if defined(USE_APACHE)
-BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT}
-RUN_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT}
-.endif
-
-.if ${OSVERSION} >= 500036
-PERL_VERSION?= 5.8.6
-PERL_VER?= 5.8.6
-.else
-.if ${OSVERSION} >= 500032
-PERL_VERSION?= 5.6.1
-PERL_VER?= 5.6.1
-.else
-.if ${OSVERSION} >= 500007
-PERL_VERSION?= 5.6.0
-PERL_VER?= 5.6.0
-.else
-.if ${OSVERSION} >= 300000
-PERL_VERSION?= 5.00503
-.else
-PERL_VERSION?= 5.00502
-.endif
-PERL_VER?= 5.005
-.endif
-.endif
-.endif
-
-.if !defined(PERL_LEVEL) && defined(PERL_VERSION)
-perl_major= ${PERL_VERSION:C|^([1-9]+).*|\1|}
-_perl_minor= 00${PERL_VERSION:C|^([1-9]+)\.([0-9]+).*|\2|}
-perl_minor= ${_perl_minor:C|^.*(...)|\1|}
-.if ${perl_minor} >= 100
-perl_minor= ${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|}
-perl_patch= ${PERL_VERSION:C|^.*(..)|\1|}
-.else # ${perl_minor} < 100
-_perl_patch= 0${PERL_VERSION:C|^([1-9]+)\.([0-9]+)\.*|0|}
-perl_patch= ${_perl_patch:C|^.*(..)|\1|}
-.endif # ${perl_minor} < 100
-PERL_LEVEL= ${perl_major}${perl_minor}${perl_patch}
-.else
-PERL_LEVEL=0
-.endif # !defined(PERL_LEVEL) && defined(PERL_VERSION)
-
-.if ${PERL_LEVEL} >= 500600
-PERL_ARCH?= mach
-.else
-PERL_ARCH?= ${ARCH}-freebsd
-.endif
-
-.if ${PERL_LEVEL} >= 500800
-PERL_PORT?= perl5.8
-.else
-PERL_PORT?= perl5
-.endif
-
-SITE_PERL_REL?= lib/perl5/site_perl/${PERL_VER}
-SITE_PERL?= ${LOCALBASE}/${SITE_PERL_REL}
-
-.if ${PERL_LEVEL} < 500600
-PERL5= /usr/bin/perl${PERL_VERSION}
-PERL= /usr/bin/perl
-.else
-PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION}
-PERL= ${LOCALBASE}/bin/perl
-.endif
-
-# XXX: (not yet): .if defined(USE_AUTOTOOLS)
-# .include "${PORTSDIR}/Mk/bsd.autotools.mk"
-# XXX: (not yet): .endif
-
-.if defined(USE_OPENSSL)
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
-.endif
-
-.if defined(EMACS_PORT_NAME)
-.include "${PORTSDIR}/Mk/bsd.emacs.mk"
-.endif
-
-.if defined(USE_GNUSTEP)
-.include "${PORTSDIR}/Mk/bsd.gnustep.mk"
-.endif
-
-.if defined(USE_PHP)
-.include "${PORTSDIR}/Mk/bsd.php.mk"
-.endif
-
-.if defined(USE_PYTHON)
-.include "${PORTSDIR}/Mk/bsd.python.mk"
-.endif
-
-.if defined(USE_JAVA)
-.include "${PORTSDIR}/Mk/bsd.java.mk"
-.endif
-
-.if defined(USE_RUBY) || defined(USE_LIBRUBY)
-.include "${PORTSDIR}/Mk/bsd.ruby.mk"
-.endif
-
-.if defined(USE_QT_VER) || defined(USE_KDELIBS_VER) || defined(USE_KDEBASE_VER)
-.include "${PORTSDIR}/Mk/bsd.kde.mk"
-.endif
-
-.if defined(WANT_GNOME) || defined(USE_GNOME) || defined(USE_GTK)
-.include "${PORTSDIR}/Mk/bsd.gnome.mk"
-.endif
-
-.if defined(USE_SDL) || defined(WANT_SDL)
-.include "${PORTSDIR}/Mk/bsd.sdl.mk"
-.endif
-
-.if ${OSVERSION} >= 502123
-X_WINDOW_SYSTEM ?= xorg
-.elif (${OSVERSION} >= 450005 && !defined(XFREE86_VERSION)) || \
- (defined(XFREE86_VERSION) && ${XFREE86_VERSION} == 4)
-X_WINDOW_SYSTEM ?= xfree86-4
-.else
-X_WINDOW_SYSTEM ?= xfree86-3
-.endif
-
-# Location of mounted CDROM(s) to search for files
-CD_MOUNTPTS?= /cdrom ${CD_MOUNTPT}
-
-WANT_OPENLDAP_VER?= 22
-
-# Owner and group of the WWW user
-WWWOWN?= www
-WWWGRP?= www
diff --git a/ports-mgmt/portmk/Mk/bsd.port.subdir.mk b/ports-mgmt/portmk/Mk/bsd.port.subdir.mk
deleted file mode 100644
index 48f50e13453f..000000000000
--- a/ports-mgmt/portmk/Mk/bsd.port.subdir.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# $FreeBSD$
-
-.include "${PORTSDIR}/Mk/bsd.port.subdir.mk"
diff --git a/ports-mgmt/portmk/files/ChangeLog b/ports-mgmt/portmk/files/ChangeLog
deleted file mode 100644
index 8a21f166e0ef..000000000000
--- a/ports-mgmt/portmk/files/ChangeLog
+++ /dev/null
@@ -1,3 +0,0 @@
-- 2004-07-05: Initial release
-
-Rewrite of the distfile fetching code, minor makefile cleanup.
diff --git a/ports-mgmt/portmk/files/Features b/ports-mgmt/portmk/files/Features
deleted file mode 100644
index af2d2689dbac..000000000000
--- a/ports-mgmt/portmk/files/Features
+++ /dev/null
@@ -1,80 +0,0 @@
-In case you need to fall back to the old routines, just build the port with `omake'.
-
-
-* completely rewritten do-fetch/checksum/makesum/fetch-list targets:
-
-- sort MASTER_SITES by distance or latency
-
-To fetch from the nearest mirrors first, install port net/p5-Geo-IP and put
-
-MASTER_SORT_GEOIP=yes
-CC_HOME=eu
-
-in /etc/portmk.conf. The first time fetching may stall for about ten seconds, since all sites must be looked up first. Subsequent fetches should be *much* faster.
-
-
-To fetch from the side with the smallest measured latency, install perl and port net/fping and add
-
-MASTER_SORT_FPING=yes
-
-to /etc/portmk.conf
-
-- refetch from multiple mirrors in case of a checksum mismatch (up to FETCH_REGET times)
-
-Instead of trying the same mirror (which might have a corrupt distfile) twice.
-
-- randomize MASTER_SITES by default (disable with KEEP_MASTER_SITE_ORDER)
-
-- new targets `missing-size' and `missing-recursive-size': calculate size of missing distribution files
-
-
-Type
- make missing-recursive-size
-to check how many files you have to fetch to build the current port. To check how many files a port with subports needs overall, including files already on your local disk, do
-
- make DISTDIR=/nonexistent missing-recursive-size
-
-- new target checkdistsites, a brute-force distfile survery for home use,
- use with NO_CHECKSUM to just verify the sizes without downloading the files
-
-NO_CHECKSUM currently works only with fetch, not wget or curl. Try
-
- make NO_CHECKSUM=yes checkdistsites
-
-to verify whether your distfiles are fetchable from every site.
-
-- support for integrating distinfo into the ports Makefile via `migratesum' (experimental,
- multiple integrated distinfo files could be distinguised by DISTINFO_LABEL)
-
-
-- support for SHA1 and RMD160 checksums
-
-- support for MASTER_SITES that don't end with a slash
-
-- support to substitute %FILE% in MASTER_SITES with the distfiles name
-
-
-Useful for sites that have ...?file=xxx&download=true or cvsweb style download sites
-
-- fetch with curl or wget with FETCH_USE_CURL and FETCH_USE_WGET (requires installed curl or wget)
-
-
-For people behind firewalls that need the extended capabilities. Be aware that some extra features (like size checking) are currently not availible with those download clients.
-
-* next generation options handling (work in progress)
-
-- only prototype functionality is available
-
-- saved configuration affects clean, describe etc.
-
-- the port is build with the correct default options when not configured
-
-- honours options given on the command line, so that portupgrade et al still work
-
-- custom configurations are available before bsd.port.pre.mk is included
-
-- completely unintrusive, a port doesn't need to be configured when the defaults are acceptable
-
-* ability to build packages without the need to install a port (work in progress)
-
-- not available yet
diff --git a/ports-mgmt/portmk/files/KnownIssues b/ports-mgmt/portmk/files/KnownIssues
deleted file mode 100644
index 17b50bf38bc7..000000000000
--- a/ports-mgmt/portmk/files/KnownIssues
+++ /dev/null
@@ -1,2 +0,0 @@
-* List of ports that fail to fetch/build with portmk, but build with a `stock' bsd.port.mk:
-
diff --git a/ports-mgmt/portmk/files/ReadMe b/ports-mgmt/portmk/files/ReadMe
deleted file mode 100644
index f9ae28a81b61..000000000000
--- a/ports-mgmt/portmk/files/ReadMe
+++ /dev/null
@@ -1,45 +0,0 @@
-This is port devel/portmk, an alternate bsd.port.mk.
-
-Targets of this project are:
-
-- Modularization on bsd.port.mk, to make refactoring possible.
-
-- Better awareness of upcoming features for ports developers,
- including giving them the ability to review changes and give
- feedback early.
-
-- Faster turnaround times for development patches.
-
-- Widespread testing of new features.
-
-- Faster adoption of advanced features without endangering the
- stability of the ports tree.
-
-This has been created as a follow-up to a proposal I sent to
-portmgr@ May 13th.
-
-Although it is desired that the whole ports tree builds with
-portmk, it is inevitable to break some ports. This may be due
-to bugs in portmk, where not every change is bento-tested before
-committed, or ports depending on undocumented features they
-shouldn't rely upon.
-
-How can you help?
-
-- Build your ports with portmk, falling back to omake only when
- necessary. Submit entries to KnownIssues in case of problems.
-
-- Run a tinderbox with portmk
-
-- Submit patches improving the code
-
-- Give feedback whether you like the new features, and what do
- you think could be improved.
-
-Other available documentation:
-
-- Features: a list of features in portmk that are not in bsd.port.mk
-
-- ChangeLog: History of mayor feature additions / removals
-
-- KnownIssues: ports known to malfunction with portmk
diff --git a/ports-mgmt/portmk/files/make.conf b/ports-mgmt/portmk/files/make.conf
deleted file mode 100644
index 6e336784c0cd..000000000000
--- a/ports-mgmt/portmk/files/make.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-
-BSDPORTMK?= ${PORTSDIR}/devel/portmk/Mk/bsd.port.mk
-BSDPORTSUBDIRMK?= ${PORTSDIR}/devel/portmk/Mk/bsd.port.subdir.mk
diff --git a/ports-mgmt/portmk/files/omake.sh b/ports-mgmt/portmk/files/omake.sh
deleted file mode 100644
index 237b40985e62..000000000000
--- a/ports-mgmt/portmk/files/omake.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh -ef
-export OLD_PORTMK=true
-/usr/bin/make "$@"
diff --git a/ports-mgmt/portmk/files/portmk4.patch b/ports-mgmt/portmk/files/portmk4.patch
deleted file mode 100644
index 1da7dbaf7276..000000000000
--- a/ports-mgmt/portmk/files/portmk4.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Prereq: 1.303.2.2
-Index: bsd.port.mk
---- bsd.port.mk 19 Apr 2002 07:43:50 -0000
-+++ bsd.port.mk 2 Jul 2004 20:47:18 -0000
-@@ -2,5 +2,6 @@
-
- PORTSDIR?= /usr/ports
-+BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk
-
- .include <bsd.own.mk>
--.include "${PORTSDIR}/Mk/bsd.port.mk"
-+.include "${BSDPORTMK}"
-Prereq: 1.28.2.2
-Index: bsd.port.subdir.mk
---- bsd.port.subdir.mk 19 Apr 2002 07:43:50 -0000
-+++ bsd.port.subdir.mk 2 Jul 2004 20:47:18 -0000
-@@ -2,4 +2,5 @@
-
- PORTSDIR?= /usr/ports
-+BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk
-
--.include "${PORTSDIR}/Mk/bsd.port.subdir.mk"
-+.include "${BSDPORTSUBDIRMK}"
diff --git a/ports-mgmt/portmk/files/portmk5.patch b/ports-mgmt/portmk/files/portmk5.patch
deleted file mode 100644
index 33c8655a2091..000000000000
--- a/ports-mgmt/portmk/files/portmk5.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Prereq: 1.306
-Index: bsd.port.mk
---- bsd.port.mk 19 Apr 2002 07:43:50 -0000
-+++ bsd.port.mk 2 Jul 2004 20:47:18 -0000
-@@ -2,5 +2,6 @@
-
- PORTSDIR?= /usr/ports
-+BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk
-
- .include <bsd.own.mk>
--.include "${PORTSDIR}/Mk/bsd.port.mk"
-+.include "${BSDPORTMK}"
-Prereq: 1.30
-Index: bsd.port.subdir.mk
---- bsd.port.subdir.mk 19 Apr 2002 07:43:50 -0000
-+++ bsd.port.subdir.mk 2 Jul 2004 20:47:18 -0000
-@@ -2,4 +2,5 @@
-
- PORTSDIR?= /usr/ports
-+BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk
-
--.include "${PORTSDIR}/Mk/bsd.port.subdir.mk"
-+.include "${BSDPORTSUBDIRMK}"
diff --git a/ports-mgmt/portmk/pkg-descr b/ports-mgmt/portmk/pkg-descr
deleted file mode 100644
index 4f4fc5ec09ab..000000000000
--- a/ports-mgmt/portmk/pkg-descr
+++ /dev/null
@@ -1,19 +0,0 @@
-This is port devel/portmk, an alternate bsd.port.mk.
-
-Targets of this project are:
-
-- Modularization on bsd.port.mk, to make refactoring possible.
-
-- Better awareness of upcoming features for ports developers,
- including giving them the ability to review changes and give
- feedback early.
-
-- Faster turnaround times for development patches.
-
-- Widespread testing of new features.
-
-- Faster adoption of advanced features without endangering the
- stability of the ports tree.
-
-This has been created as a follow-up to a proposal I sent to
-portmgr@ May 13th.
diff --git a/ports-mgmt/portmk/pkg-message b/ports-mgmt/portmk/pkg-message
deleted file mode 100644
index 1bbd55d630b7..000000000000
--- a/ports-mgmt/portmk/pkg-message
+++ /dev/null
@@ -1,14 +0,0 @@
-Port devel/portmk has been successfully installed.
-
-To activate the alternate bsd.port.mk version, do
-
- cd %%PORTSDIR%%/devel/portmk; make activate
-
-To build a port with the classic bsd.port.mk version, do
-
- omake <... other args ...>
-
-Documentation is available at
-
- %%DOCSDIR%%/ReadMe
-
diff --git a/ports-mgmt/portmk/scripts/distfiles.sh b/ports-mgmt/portmk/scripts/distfiles.sh
deleted file mode 100644
index fff6b2ff4836..000000000000
--- a/ports-mgmt/portmk/scripts/distfiles.sh
+++ /dev/null
@@ -1,1103 +0,0 @@
-#!/bin/sh -e
-#
-# Copyright (c) 2004 Oliver Eikemeier. 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.
-#
-# 3. Neither the name of the author nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED "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
-# COPYRIGHT OWNER 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$
-#
-# MAINTAINER= eik@FreeBSD.org
-#
-# These variables are referenced and must be exported from the Makefile:
-#
-# DISABLE_SIZE
-# DISTFILES
-# DISTINFO_ALGORITHMS
-# DISTINFO_LABEL
-# DIST_SUBDIR
-# ECHO_MSG
-# FETCH_AFTER_ARGS
-# FETCH_BEFORE_ARGS
-# FETCH_CMD
-# FETCH_ENV
-# FETCH_SYMLINK_DISTFILES
-# IGNOREFILES
-# LOCALBASE
-# MASTER_SITES
-# MASTER_SITE_BACKUP
-# MASTER_SITE_OVERRIDE
-# MASTER_SORT_AWK
-# MASTER_SORT_CMD
-# MASTER_SORT_ENV
-# MK_FILE
-# NO_SIZE
-# PATCHFILES
-# PATCH_SITES
-# PERL5
-# VALID_ALGORITHMS
-#
-# These variables are user settable:
-#
-# DISABLE_SIZE
-# NO_CHECKSUM
-# FETCH_REGET
-#
-
-# utilities
-
-LOCALBASE="${LOCALBASE:-/usr/local}"
-
-AWK=/usr/bin/awk
-CAT=/bin/cat
-CUT=/usr/bin/cut
-EXPR=/bin/expr
-FETCH=/usr/bin/fetch
-GREP=/usr/bin/grep
-LS=/bin/ls
-MD5=/sbin/md5
-MKDIR='/bin/mkdir -p'
-MKTEMP=/usr/bin/mktemp
-PERL5="${PERL5:-/usr/bin/perl}"
-RM=/bin/rm
-[ -x /sbin/rmd160 ] && RMD160=/sbin/rmd160
-SED=/usr/bin/sed
-SETENV=/usr/bin/env
-[ -x /sbin/sha1 ] && SHA1=/sbin/sha1
-SORT=/usr/bin/sort
-TR=/usr/bin/tr
-WC=/usr/bin/wc
-
-if [ -x /usr/bin/openssl ]; then
- OPENSSL=/usr/bin/openssl
-elif -x "$LOCALBASE/bin/openssl" ];then
- OPENSSL="$LOCALBASE/bin/openssl"
-fi
-
-# global constants
-
-MK_FILE_ENDMARKER='^\.include[ ]*(<bsd\.port(\.post)?\.mk>|"\${MASTERDIR}\/Makefile")$'
-
-FETCH_REGET="${FETCH_REGET:-1}"
-
-### utility functions ###
-
-###
-# do_hash is a wrapper for md5/openssl/digest to calculate MD5/SHA1/RMD160 hashes
-###
-
-do_hash()
-{
- local alg
- alg="$1"
- shift
-
- case "$alg" in
- [Mm][Dd]5)
- if [ $# -eq 0 ]; then
- $MD5
- else
- $MD5 -- "$@"
- fi;;
- [Ss][Hh][Aa]1)
- if [ -n "$SHA1" ]; then
- echo $SHA1
- if [ $# -eq 0 ]; then
- $SHA1
- else
- $SHA1 -- "$@"
- fi
- else
- if [ $# -eq 0 ]; then
- "${OPENSSL:-true}" sha1
- else
- "${OPENSSL:-true}" sha1 ./"$@" |
- $SED -En -e 's/^[[:alnum:]]+ *\((\.\/)?(.*)\) *= *([[:xdigit:]]+)$/SHA1 (\2) = \3/p'
- fi
- fi;;
- [Rr][Mm][Dd]160)
- if [ -n "$RMD160" ]; then
- if [ $# -eq 0 ]; then
- $RMD160
- else
- $RMD160 -- "$@"
- fi
- else
- if [ $# -eq 0 ]; then
- "${OPENSSL:-true}" rmd160
- else
- "${OPENSSL:-true}" rmd160 ./"$@" |
- $SED -En -e 's/^[[:alnum:]]+ *\((\.\/)?(.*)\) *= *([[:xdigit:]]+)$/RMD160 (\2) = \3/p'
- fi
- fi;;
- [Ss][Ii][Zz][Ee])
- if [ $# -eq 0 ]; then
- $WC -c
- else
- while [ $# -gt 0 ]; do
- # avoid hassle with CLICOLOR_FORCE
- $LS -ALdfln -- "$1" | $AWK '{ print "SIZE ('"$1"') = " $5 }'
- shift
- done
- fi;;
- *)
- return 1;;
- esac
-}
-
-###
-# extract_sum extracts all checksums for a file in distinfo
-###
-
-extract_sum()
-{
- local algorithms pattern
- algorithms=`echo -n "$1" | $TR -s ' \t\n' '|'`
- pattern=`echo "$2$3" | $SED -e 's;[/.[\(*+?{|^$];\\\\&;g'`
- # distfiles match [a-zA-Z0-9.,_/@&%?=+-]+
-
- [ $# -eq 3 ] || return 1
-
- if [ -f "$MD5_FILE" ]; then
- $SED -En -e '/^('"$algorithms"') *\('"$pattern"'\) *= */s//\1=/p' "$MD5_FILE"
- elif $GREP -qs "^#:distinfo${DISTINFO_LABEL:+\.$DISTINFO_LABEL}$" "$MK_FILE"; then
- $SED -En -e '
- 1,/'"$MK_FILE_ENDMARKER"'/d
- /^#/!q
- /^#:distinfo'"${DISTINFO_LABEL:+.$DISTINFO_LABEL}"'$/,/^#:/ {
- s/^#('"$algorithms"') *\('"$pattern"'\) *= */\1=/
- t match
- b nomatch
- :match
- H
- :nomatch
- }
- $ {
- g
- p
- }
- ' "$MK_FILE"
- else
- for alg in $1; do
- for sum in `eval echo \\$DISTINFO_$alg`; do
- if [ "${sum%:*}" = "$3" ]; then
- echo "$alg=${sum##*:}"
- fi
- done
- done
- fi
-}
-
-###
-# chksumfiles calculates CKSUMFILES = DISTFILES + PATCHFILES - IGNOREFILES
-###
-
-chksumfiles()
-{
- echo "$IGNOREFILES" '<>' "$DISTFILES" "$PATCHFILES" |
- $TR -s ' \t' '\n' | $AWK '
- BEGIN { isignore=1 }
- /^$/ { next }
- /^<>$/ { isignore=0; next }
- {
- sub(/:[^:]+$/, "")
- if (isignore !=0)
- ignore[$0]=1
- else if (!($0 in ignore))
- print
- }
- '
-}
-
-### fetching distfiles ###
-
-###
-# fetch_xxx are wrappers for fetch
-###
-
-setup_fetch_cmd()
-{
- [ -z "$fetch_cmd" ] || return 0
-
- case "${FETCH_CMD%% *}" in
- */curl)
- fetch_cmd=fetch_curl;;
- */wget)
- fetch_cmd=fetch_wget;;
- *)
- fetch_cmd=fetch_fetch;;
- esac
-}
-
-fetch_curl()
-{
- local cksize
-
- cksize=
- if [ -n "$3" ]; then
- cksize=" --max-filesize $3"
- fi
-
- $SETENV $FETCH_ENV $FETCH_CMD $FETCH_BEFORE_ARGS$cksize \
- -o "$2" "$1" $FETCH_AFTER_ARGS
-}
-
-fetch_fetch()
-{
- local cksize
-
- case "$2" in
- */*)
- [ -d "${file%/*}" ] || $MKDIR "${file%/*}";;
- esac
-
- symlink=
- if [ -n "$FETCH_SYMLINK_DISTFILES" ]; then
- symlink=" -l"
- fi
-
- cksize=
- if [ -n "$3" -a "$OSVERSION" -ge 480000 ]; then
- cksize=" -S $3"
- fi
-
- $SETENV $FETCH_ENV $FETCH_CMD $FETCH_BEFORE_ARGS$symlink$cksize \
- -o "$2" "$1" $FETCH_AFTER_ARGS
-}
-
-fetch_wget()
-{
- case "$1" in
- file:*)
- fetch_fetch "$@" || return 1
- return 0;;
- esac
-
- case "$2" in
- */*)
- [ -d "${file%/*}" ] || $MKDIR "${file%/*}";;
- esac
-
- $SETENV $FETCH_ENV $FETCH_CMD $FETCH_BEFORE_ARGS \
- -O "$2" "$1" $FETCH_AFTER_ARGS
-}
-
-###
-# get_master_sites returns a list of $1_SITES for groups $2
-###
-
-get_master_sites()
-{
- [ $# -eq 2 ] || return 1
-
- # fun with awk
- for group in $2; do
- eval echo "\"\${$1_SITE_SUBDIR}\"" "'<>'" "\"\${$1_SITES}\"" |
- $TR -s ' \t' '\n' |
- $AWK '
- BEGIN {
- issubdir=1
- subdirs=0
- }
- /^$/ { next }
- /^<>$/ {
- issubdir=0
- if (subdirs == 0)
- subdir[subdirs++]=""
- next
- }
- {
- if ($0 ~ /\/:[^\/:]+$/) {
- if ($0 !~ /\/:([^\/:]*,)*'"$group"'(,[^\/:]*)*$/)
- next
- sub(/\/:[^\/:]+$/, issubdir != 0 ? "" : "/")
- } else if ("'"$group"'" != "DEFAULT") {
- next
- }
- }
- {
- if (issubdir != 0)
- subdir[subdirs++]=($0 == "." ? "" : $0 "/")
- else
- for (i in subdir) {
- site=$0
- gsub(/%SUBDIR%\//, subdir[i], site)
- print site
- }
- }
- ';
- done |
- $AWK '{ if ($0 in done) next; done[$0]=1 } { print }'
-}
-
-###
-# get_master_sites_sorted returns a sorted list of $1_SITES for groups $2
-###
-
-get_master_sites_sorted()
-{
- get_master_sites "$@" |
- if [ -n "$MASTER_SORT_CMD" ]; then
- $SETENV $MASTER_SORT_ENV $MASTER_SORT_CMD | $TR -s '\n' ' '
- elif [ -z "$KEEP_MASTER_SITE_ORDER" ]; then
- $AWK 'BEGIN { srand() } { print rand() "\t" $0 }' |
- $SORT -n | $CUT -f 2 | $TR -s '\n' ' ' |
- $AWK "$MASTER_SORT_AWK"
- else
- $TR -s '\n' ' ' |
- $AWK "$MASTER_SORT_AWK"
- fi
-}
-
-###
-# fetch_file tries to fetch one file from {MASTER,PATCH}_SITES
-###
-
-fetch_file()
-{
- [ $# -eq 5 ] || return 1
-
- SORTED_MASTER_SITES_TMP=`get_master_sites_sorted "$1" "$2"`
- reget=false
- [ -f "$file" ] && reget=true
- while true; do
- fetch_reget="${FETCH_REGET}"
- for site in $_MASTER_SITE_OVERRIDE \
- $SORTED_MASTER_SITES_TMP $_MASTER_SITE_BACKUP; do
- $ECHO_MSG ">> Attempting to fetch from $site${4:+ (${4#*=} bytes)}."
- case "$site" in
- *%FILE%*)
- # this expression uses ctrl-A as delimiters
- url=`echo "$site" | $SED -E -e 's/$; s%FILE%'"$file"'g'`;;
- *)
- url="$site$file";;
- esac
- if $fetch_cmd "$url" "$3" "$4"; then
- reget=false
- [ -f "$file" ] || continue
- [ -z "$5" ] && return 0
- for cksum2 in $5; do
- case "${cksum2#*=}" in
- IGNORE)
- return 0;;
- *)
- CKSUM=`do_hash "${cksum2%%=*}" < "$file"`
- if [ "${cksum2#*=}" = "$CKSUM" ]; then
- $ECHO_MSG ">> Checksum OK (${cksum2%%=*}) for $file."
- return 0
- fi;;
- esac
- done
- $ECHO_MSG ">> Checksum mismatch for $_file."
- if [ "$fetch_reget" -gt 0 ]; then
- $ECHO_MSG "===> Refetch for $fetch_reget more times."
- $RM -f "$file"
- fetch_reget=$(($fetch_reget-1))
- else
- $ECHO_MSG ">> To get this file from more mirrors," \
- "type \"make FETCH_REGET=99 [other args]\"."
- $ECHO_MSG "===> Giving up on fetching $_file."
- return 1
- fi
- fi
- done
- $reget || break
- $ECHO_MSG "===> Distfile rerolled? Trying to refetch from start."
- $RM -f "$file"
- reget=false
- done
- $ECHO_MSG ">> Couldn't fetch it - please try to retrieve this"
- $ECHO_MSG ">> file manually into $_DISTDIR and try again."
- return 1
-}
-
-###
-# do_fetch tries to fetch DISTFILES and PATCHFILES
-###
-
-do_fetch()
-{
- local _DISTDIR
- local DIR
- local file
- local select
-
- setup_fetch_cmd
-
- _DISTDIR="$DISTDIR${DIST_SUBDIR:+/$DIST_SUBDIR}"
- DIR="${DIST_SUBDIR:+$DIST_SUBDIR/}"
-
- for fileset in MASTER PATCH; do
- case "$fileset" in
- MASTER)
- files="$DISTFILES";;
- PATCH)
- files="$PATCHFILES";;
- *)
- return 1;;
- esac
- for _file in $files; do
-
- file=`echo "$_file" | $SED -E -e 's/:[^:]+$//'`
- select=`echo "$_file" | $SED -En -e 'y/,/ /; s/.*:([^:]+)$/\1/p'`
- [ -n "$select" ] || select="DEFAULT"
-
- if [ -z "$NO_CHECKSUM" ]; then
- CKSUM2=`extract_sum "$VALID_ALGORITHMS" "$DIR" "$file"`
- if [ -z "$CKSUM2" ]; then
- $ECHO_MSG ">> No checksum entry for $DIR$file."
- $ECHO_MSG ">> Make sure the Makefile and distinfo file ($MD5_FILE) are"
- $ECHO_MSG ">> up to date. If you are absolutely sure you want to override"
- $ECHO_MSG ">> this check, type \"make NO_CHECKSUM=yes [other args]\"."
- return 1
- fi
- chkfile=true
- for ignore in $IGNOREFILES; do
- if [ "$file" = "$ignore" ]; then
- chkfile=false
- fi
- done
- else
- CKSUM2=
- chkfile=false
- fi
-
- if [ -f "$_DISTDIR/$file" ]; then
- fileexists=true
- else
- fileexists=false
- if [ -L "$_DISTDIR/$file" ]; then
- $ECHO_MSG ">> $_DISTDIR/$file is a broken symlink."
- $ECHO_MSG ">> Perhaps a filesystem (most likely a CD) isn't mounted?"
- $ECHO_MSG ">> Please correct this problem and try again."
- return 1
- fi
- fi
-
- fetchfile=true
- if $fileexists; then
- if [ -n "$CKSUM2" ]; then
- for cksum2 in $CKSUM2; do
- case "${cksum2#*=}" in
- IGNORE)
- if $chkfile; then
- $ECHO_MSG ">> Checksum for $file is set to IGNORE in distinfo file"
- $ECHO_MSG " even though the file is not in the "'$'"{IGNOREFILES} list."
- return 1
- fi
- fetchfile=false
- break;;
- *)
- if ! $chkfile; then
- $ECHO_MSG ">> Checksum for $file is not set to IGNORE in distinfo file"
- $ECHO_MSG " even though the file is in the "'$'"{IGNOREFILES} list."
- return 1
- fi
- CKSUM=`do_hash "${cksum2%%=*}" < "$_DISTDIR/$file"`
- if [ "${cksum2#*=}" = "$CKSUM" ]; then
- $ECHO_MSG ">> Checksum OK (${cksum2%%=*}) for $file."
- fetchfile=false
- break
- fi;;
- esac
- done
- if $fetchfile; then
- $ECHO_MSG ">> Checksum mismatch for $file."
- fi
- else
- fetchfile=false
- fi
- else
- if [ -n "$CKSUM2" ]; then
- for cksum2 in $CKSUM2; do
- case "${cksum2#*=}" in
- IGNORE)
- if $chkfile; then
- $ECHO_MSG ">> Checksum for $file is set to IGNORE in distinfo file"
- $ECHO_MSG " even though the file is not in the "'$'"{IGNOREFILES} list."
- return 1
- fi
- break;;
- *)
- if ! $chkfile; then
- $ECHO_MSG ">> Checksum for $file is not set to IGNORE in distinfo file"
- $ECHO_MSG " even though the file is in the "'$'"{IGNOREFILES} list."
- return 1
- fi;;
- esac
- done
- fi
- $ECHO_MSG ">> $file doesn't seem to exist in $_DISTDIR."
- fi
-
- if $fetchfile; then
- if ! { [ -d "$_DISTDIR" ] || $MKDIR "$_DISTDIR"; }; then
- $ECHO_MSG ">> Cannot create $_DISTDIR."
- return 1
- fi
- if [ ! -w "$_DISTDIR" ]; then
- $ECHO_MSG ">> $_DISTDIR is not writable by you; cannot fetch."
- return 1
- fi
- if [ -z "$NO_CHECKSUM" -a -z "$DISABLE_SIZE" ]; then
- CKSIZE=`extract_sum 'SIZE' "$DIR" "$file"`
- else
- CKSIZE=
- fi
- cd "$_DISTDIR"
- if ! fetch_file "$fileset" "$select" "$file" "${CKSIZE#*=}" "$CKSUM2"; then
- return 1
- fi
- fi
- done
- done
-}
-
-###
-# do_list_sites lists {MASTER,PATCH}_SITES
-###
-
-do_list_sites()
-{
- [ $# -eq 2 ] || return 1
-
- local select
-
- case "$1" in
- MASTER)
- files="$DISTFILES";;
- PATCH)
- files="$PATCHFILES";;
- *)
- return 1;;
- esac
-
- if [ -n "$2" ]; then
- select="$2"
- else
- select=`echo "$files" | $TR -s ' \t' '\n' | $AWK '
- /.+:/ {
- sub(/.+:/, "")
- g=split($0, a, /,/)
- for (i in a)
- group[a[i]]=1
- next
- }
- { group["DEFAULT"]=1 }
- END {
- for (g in group)
- print g
- }'`
- fi
-
- SORTED_MASTER_SITES_TMP=`get_master_sites_sorted "$1" "$select"`
- echo $_MASTER_SITE_OVERRIDE \
- $SORTED_MASTER_SITES_TMP $_MASTER_SITE_BACKUP
-}
-
-### missing size ###
-
-###
-# print_missing_size prints a list of all files that are not in DISTDIR
-###
-
-print_missing_size()
-{
- local _DISTDIR
- local DIR
- local file
- local select
-
- CKSUMFILES="${CKSUMFILES:-`chksumfiles`}"
-
- DIR="${DIST_SUBDIR:+$DIST_SUBDIR/}"
-
- for _file in $CKSUMFILES; do
- file="$DIR$_file"
- [ -f "$DISTDIR/$file" ] && continue
- CKSIZE=`extract_sum 'SIZE' "$DIR" "$_file"`
- if [ -n "${CKSIZE#*=}" ]; then
- echo "${CKSIZE#*=} $file"
- else
- echo "0 $file"
- fi
- done
-
- for _file in $IGNOREFILES; do
- file="$DIR$_file"
- [ -f "$DISTDIR/$file" ] && continue
- echo "0 $file"
- done
-}
-
-### fetch all ##
-
-###
-# do_fetch_all tries to fetch all files from *every* site
-###
-
-do_fetch_all()
-{
- local DIR
- local file
- local select
-
- setup_fetch_cmd
-
- _FAILED_SITES=
- DIR="${DIST_SUBDIR:+$DIST_SUBDIR/}"
-
- for fileset in MASTER PATCH; do
- case "$fileset" in
- MASTER)
- files="$DISTFILES";;
- PATCH)
- files="$PATCHFILES";;
- *)
- return 1;;
- esac
-
- for _file in $files; do
- file=`echo "$_file" | $SED -E -e 's/:[^:]+$//'`
- select=`echo "$_file" | $SED -En -e 'y/,/ /; s/.*:([^:]+)$/\1/p'`
- [ -n "$select" ] || select="DEFAULT"
-
- CKSUM2=`extract_sum "$VALID_ALGORITHMS" "$DIR" "$file"`
- if [ -z "$CKSUM2" ]; then
- $ECHO_MSG ">> No checksum recorded for $DIR$file."
- return 1
- fi
- CKSIZE=
- if [ -z "$DISABLE_SIZE" ]; then
- CKSIZE=`extract_sum 'SIZE' "$DIR" "$file"`
- fi
-
- $ECHO_MSG ">> Verifying availability of file $file."
- MASTER_SITES_TMP=`get_master_sites "$fileset" "$select"`
- for site in $MASTER_SITES_TMP; do
- $ECHO_MSG ">> Attempting to fetch from $site${CKSIZE:+ (${CKSIZE#*=} bytes)}."
- case "$site" in
- *%FILE%*)
- # this expression uses ctrl-A as delimiters
- url=`echo "$site" | $SED -E -e 's/$; s%FILE%'"$file"'g'`;;
- *)
- url="$site$file";;
- esac
- if [ -z "$NO_CHECKSUM" ]; then
- for cksum2 in $CKSUM2; do
- _FETCH_RESULT=`{ if ! $fetch_cmd "$url" "-" "${CKSIZE#*=}"; then \
- echo "FAILED: $$?" >&3; fi | do_hash "${cksum2%%=*}"; } 3>&1`;
- case "$_FETCH_RESULT" in
- FAILED:*)
- $ECHO_MSG ">> Fetch from $site failed."
- _FAILED_SITES="${_FAILED_SITES:+$_FAILED_SITES }$url";;
- *)
- case "${cksum2#*=}" in
- IGNORE)
- $ECHO_MSG ">> Checksum IGNORED for $file.";;
- "$_FETCH_RESULT")
- $ECHO_MSG ">> Checksum OK (${cksum2%%=*}) for $file.";;
- *)
- $ECHO_MSG ">> Checksum mismatch (${cksum2%%=*}) for $file."
- _FAILED_SITES="${_FAILED_SITES:+$_FAILED_SITES }$url";;
- esac;;
- esac
- break
- done
- else
- if _FETCH_RESULT=`$SETENV $FETCH_ENV $FETCH -s "$url"`; then
- if [ -n "${CKSIZE}" ]; then
- if [ "${CKSIZE#*=}" = "$_FETCH_RESULT" ]; then
- $ECHO_MSG ">> Size OK (${CKSIZE#*=}) for $file."
- else
- $ECHO_MSG ">> Size mismatch ($_FETCH_RESULT) for $file."
- _FAILED_SITES="${_FAILED_SITES:+$_FAILED_SITES }$url"
- fi
- else
- $ECHO_MSG ">> Found $file."
- fi
- else
- echo ">> Fetch from $site failed."
- _FAILED_SITES="${_FAILED_SITES:+$_FAILED_SITES }$url"
- fi
- fi
- done
- done
- done
- if [ -z "$_FAILED_SITES" ]; then
- echo ">> All files are fetchable."
- else
- echo ">> The following files did not fetch correctly:"
- echo "$_FAILED_SITES" | ${TR} ' ' '\n' | ${SED} -e 's/^/ - /'
- fi
-}
-
-###
-# do_fetch_list generates a list of files to fetch
-###
-
-do_fetch_list()
-{
- local _DISTDIR
- local DIR
- local file
- local select
-
- _DISTDIR="$DISTDIR${DIST_SUBDIR:+/$DIST_SUBDIR}"
- DIR="${DIST_SUBDIR:+$DIST_SUBDIR/}"
-
- for fileset in MASTER PATCH; do
- case "$fileset" in
- MASTER)
- files="$DISTFILES";;
- PATCH)
- files="$PATCHFILES";;
- *)
- return 1;;
- esac
-
- for _file in $files; do
-
- file=`echo "$_file" | $SED -E -e 's/:[^:]+$//'`
- select=`echo "$_file" | $SED -En -e 'y/,/ /; s/.*:([^:]+)$/\1/p'`
- [ -n "$select" ] || select="DEFAULT"
-
- if [ ! -f "$_DISTDIR/$file" ]; then
- SORTED_MASTER_SITES_TMP=`get_master_sites_sorted "$fileset" "$select"`
- for site in $_MASTER_SITE_OVERRIDE \
- $SORTED_MASTER_SITES_TMP $_MASTER_SITE_BACKUP; do
- case "$site" in
- *%FILE%*)
- # this expression uses ctrl-A as delimiters
- url=`echo "$site" | $SED -E -e 's/$; s%FILE%'"$file"'g'`;;
- *)
- url="$site$file";;
- esac
- if [ -n "$FETCH_ENV" ]; then
- echo -n "$SETENV $FETCH_ENV "
- fi
- echo -n "$FETCH_CMD $FETCH_BEFORE_ARGS" \
- "-o '$file' '$url' $FETCH_AFTER_ARGS || "
- done
- echo "echo '$file not fetched'"
- fi
- done
-
- done
-}
-
-### distinfo ###
-
-###
-# make_tmpsum generates a temporary distinfo file
-###
-
-make_tmpsum()
-{
- local NO_CHECKSUM DISABLE_SIZE
-
- NO_CHECKSUM=true
- DISABLE_SIZE=true
-
- do_fetch || return 1
-
- CKSUMFILES="${CKSUMFILES:-`chksumfiles`}"
-
- if ! TMPMD5_FILE=`$MKTEMP -q "$MD5_FILE.XXXXXX"`; then
- echo ">> makesum: Can't create temporary checksum file"
- return 1
- fi
-
- cd "$DISTDIR"
- DIR="${DIST_SUBDIR:+$DIST_SUBDIR/}"
-
- MY_ALGS="$DISTINFO_ALGORITHMS";
- [ -z "$NO_SIZE" ] && MY_ALGS="$MY_ALGS SIZE"
-
- # faster, but not the same sort order as the `classic' distinfo
- #for alg in $MY_ALGS; do
- # do_hash "$alg" `echo "$CKSUMFILES" | $SED -e "s^$DIR"` >> "$TMPMD5_FILE"
- #done
-
- for _file in $CKSUMFILES; do
- file="$DIR$_file"
- if [ -r "$file" ]; then
- for alg in $MY_ALGS; do
- do_hash "$alg" "$file" >> "$TMPMD5_FILE"
- done
- else
- $ECHO_MSG ">> $file is not in $DISTDIR"
- $RM "$TMPMD5_FILE"
- return 1
- fi
- done
- for _file in $IGNOREFILES; do
- file="$DIR$_file"
- echo "MD5 ($file) = IGNORE" >> "$TMPMD5_FILE"
- done
-}
-
-###
-# replace_distinfo adds or replaces a distinfo entry in MK_FILE
-###
-
-replace_distinfo()
-{
- [ $# -eq 1 -a -f "$1" ] || return 1
-
- if ! TMPMK_FILE=`$MKTEMP -q "$MK_FILE.XXXXXX"`; then
- $ECHO_MSG ">> makesum: Can't create temporary Makefile"
- return 1
- fi
- if ! $AWK -v MD5_FILE="$1" '
- BEGIN { seen=0; ignore=0; first=1 }
- /'"$MK_FILE_ENDMARKER"'/ { seen=NR }
- NR == 1, seen != 0 { print; next }
- !/^#/ { exit 1 }
- /^#:/ { ignore=0 }
- /^#:distinfo'"${DISTINFO_LABEL:+\.$DISTINFO_LABEL}"'$/ {
- if (first)
- while ((getline md5_line < MD5_FILE) > 0) {
- if (first) {
- print "#:distinfo'"${DISTINFO_LABEL:+\.$DISTINFO_LABEL}"'"
- first=0
- }
- print "#" md5_line
- }
- ignore=1
- }
- ignore == 0 { print }
- END {
- if (seen == 0)
- exit 1
- if (first)
- while ((getline md5_line < MD5_FILE) > 0) {
- if (first) {
- print "#:distinfo'"${DISTINFO_LABEL:+\.$DISTINFO_LABEL}"'"
- first=0
- }
- print "#" md5_line
- }
- }
- ' "$MK_FILE" > "$TMPMK_FILE"; then
- $ECHO_MSG ">> Parse error: $MK_FILE, end of file not found"
- $RM "$TMPMK_FILE"
- return 1
- fi
- $CAT "$TMPMK_FILE" > "$MK_FILE"
- $RM "$TMPMK_FILE"
-}
-
-###
-# replace_distinfo2 adds or replaces a distinfo entry in MK_FILE
-###
-
-replace_distinfo2()
-{
- [ $# -eq 1 -a -f "$1" ] || return 1
-
- if [ ! -x "$PERL5" ]; then
- $ECHO_MSG ">> makesum: perl 5 required, please install lang/perl"
- return 1
- fi
-
- #XXX TODO: honor status of $ECHO_MSG in `die'
- if ! $PERL5 -w -e '
- use strict;
- srand();
- my $marker="##-MARKER_".rand()."-##";
- my $valid_algs=join "|", "SIZE", split " ", $ARGV[3];
- my $distsubdir=$ARGV[1] ? "$ARGV[1]/" : "";
- my $distlabel=$ARGV[2] ? "$ARGV[2]_" : "";
- my %distinfo;
-
- open DISTINFO, "<$ARGV[0]"
- or die ">> migratesum2: error reading $ARGV[0]\n";
- while(<DISTINFO>) {
- push @{$distinfo{$1}{$2}}, $3
- if /^(\w+) *\($distsubdir(.*)\) *= *([\da-f]+)$/o
- }
- close DISTINFO;
- my $makefile;
- open MAKEFILE, "<$ARGV[4]"
- or die ">> migratesum2: error reading $ARGV[4]\n";
- {
- local $/;
- $makefile = <MAKEFILE>;
- }
- close MAKEFILE;
- my $newinfo;
- foreach my $key (split " ", $ARGV[3]) {
- next
- if !$distinfo{$key};
- my @chksum = ();
- foreach my $file (sort keys %{$distinfo{$key}}) {
- push @chksum, map "$file:$_", @{$distinfo{$key}{$file}};
- }
- $newinfo .= "DISTINFO_$distlabel$key+=\t";
- $newinfo .= join " \\\n\t\t", "", @chksum;
- $newinfo .= "\n";
- }
- $makefile =~ s/^DISTINFO_$distlabel(?:$valid_algs)[+:!?]?=.*(?:\\\n.*)*[^\\\n]\n/$marker\n/mg ||
- $makefile =~ s/^(COMMENT[+:!?]?=.*(?:\\\n.*)*[^\\\n])\n+/$1\n\n$marker\n\n/m ||
- die ">> migratesum2: error parsing $ARGV[4]\n";
-
- $makefile =~ s/^$marker\n/$newinfo/m;
- $makefile =~ s/^$marker\n//mg;
-
- open MAKEFILE, ">$ARGV[5]"
- or die ">> migratesum2: error writing $ARGV[4]\n";
- print MAKEFILE $makefile;
- close MAKEFILE;
- ' "$1" "$DIST_SUBDIR" "$DISTINFO_LABEL" "$VALID_ALGORITHMS SIZE" "$MK_FILE" "$MK_FILE"; then
- return 1
- fi
-}
-
-
-###
-# do_makesum (re-)calculates distinfo
-###
-
-do_makesum()
-{
- local algorithms
- algorithms=`echo -n "$VALID_ALGORITHMS SIZE" | $TR -s ' \t\n' '|'`
-
- make_tmpsum || return 1
-
- if [ -f "$MD5_FILE" ]; then
- $CAT "$TMPMD5_FILE" > "$MD5_FILE"
- elif $GREP -qs "^#:distinfo${DISTINFO_LABEL:+\.$DISTINFO_LABEL}$" "$MK_FILE"; then
- replace_distinfo "$TMPMD5_FILE"
- elif $GREP -Eqs "^DISTINFO${DISTINFO_LABEL:+_$DISTINFO_LABEL}_($algorithms)[+:!?]?=" "$MK_FILE"; then
- replace_distinfo2 "$TMPMD5_FILE"
- elif [ -s "$TMPMD5_FILE" ]; then
- $CAT "$TMPMD5_FILE" > "$MD5_FILE"
- fi
-
- $RM "$TMPMD5_FILE"
-}
-
-###
-# do_migratemakesum integrates distinfo into the port's Makefile
-###
-
-do_migratesum()
-{
- if [ ! -f "$MD5_FILE" ]; then
- $ECHO_MSG ">> migratesum: no $MD5_FILE"
- return 1
- fi
-
- if replace_distinfo "$MD5_FILE"; then
- $RM "$MD5_FILE"
- echo ">> Done."
- else
- return 1
- fi
-}
-
-###
-# do_migratemakesum2 integrates distinfo into the port's Makefile
-###
-
-do_migratesum2()
-{
- if [ ! -f "$MD5_FILE" ]; then
- $ECHO_MSG ">> migratesum2: no $MD5_FILE"
- return 1
- fi
-
- if replace_distinfo2 "$MD5_FILE"; then
- $RM "$MD5_FILE"
- echo ">> Done."
- else
- return 1
- fi
-}
-
-###
-# main
-###
-
-opt_list_master=false
-opt_list_patch=false
-opt_fetch_list=false
-opt_makesum=false
-opt_migratesum=false
-opt_migratesum2=false
-opt_fetch=false
-opt_fetch_all=false
-opt_missing_size=false
-
-while getopts "LmMNfFSt:T:" opt; do
- case "$opt" in
- t) list_master="${OPTARG}";
- opt_list_master=true;;
- T) list_patch="${OPTARG}";
- opt_list_patch=true;;
- L) opt_fetch_list=true;;
- m) opt_makesum=true;;
- M) opt_migratesum=true;;
- N) opt_migratesum2=true;;
- f) opt_fetch=true;;
- F) opt_fetch_all=true;;
- S) opt_missing_size=true;;
- ?) echo "Usage: $0 -LmMfFS"; exit 1;;
- esac
-done
-
-shift $(($OPTIND-1))
-
-$opt_list_master &&
- { do_list_sites "MASTER" "$list_master" || exit 1; }
-
-$opt_list_patch &&
- { do_list_sites "PATCH" "$list_patch" || exit 1; }
-
-$opt_fetch_list &&
- { do_fetch_list || exit 1; }
-
-$opt_fetch &&
- { do_fetch || exit 1; }
-
-$opt_makesum &&
- { do_makesum || exit 1; }
-
-$opt_migratesum &&
- { do_migratesum || exit 1; }
-
-$opt_migratesum2 &&
- { do_migratesum2 || exit 1; }
-
-$opt_fetch_all &&
- { do_fetch_all || exit 1; }
-
-$opt_missing_size &&
- { print_missing_size || exit 1; }
-
-exit 0
diff --git a/ports-mgmt/portmk/scripts/options.pl b/ports-mgmt/portmk/scripts/options.pl
deleted file mode 100644
index a96c72d54612..000000000000
--- a/ports-mgmt/portmk/scripts/options.pl
+++ /dev/null
@@ -1,373 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Copyright (c) 2004 Oliver Eikemeier. 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.
-#
-# 3. Neither the name of the author nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED "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
-# COPYRIGHT OWNER 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$
-#
-# MAINTAINER= eik@FreeBSD.org
-#
-
-require 5.005;
-use strict;
-use Getopt::Std;
-
-my $pkgname;
-
-my %description;
-my %values;
-my @order;
-my @section;
-my %haswithout;
-my %hasoverride;
-my %default;
-my %value;
-my $isoverride;
-my $isedit;
-
-sub parsemaster {
- my $currdesc;
- my ($master) = @_;
-
- -r $master
- or return 1;
-
- open MASTER, "<$master"
- or die "Can't read $master: $!\n";
-
- push @section, "Configurable options for $pkgname";
- push @order, $#section;
- $description{0} = [];
-
- while(<MASTER>) {
- chomp;
- last if /^##/;
- next if /^#?\s*$/;
- if (/^#!\s*(.*)$/) {
- if ($1 =~ /MAIN/i) {
- $currdesc = \@{$description{0}};
- }
- else {
- push @section, $1;
- $currdesc = \@{$description{$#section}};
- push @order, $#section;
- }
- }
- elsif(/^#WITH(OUT)?_([A-Z][A-Z0-9_]*)(?:=\s*(.*))?$/) {
- my ($without, $name, $val) = ($1, $2, $3);
- if (defined $values{$name}) {
- print STDERR ">> $pkgname: Duplicate parameter $name at $master line $.: $_.\n";
- next;
- }
- if (defined $val) {
- my @v;
- foreach my $r (split /,\s*/, $val) {
- $r =~ s/\s+$//;
- if (length $r > 0) {
- push @v, $r;
- $haswithout{$name} = 1
- if $r =~ /^(?:no|none|off|false)$/i;
- }
- }
- if ($#v == -1 || $#v == 0 && $v[0] =~ /^auto$/i) {
- push @v, qw(yes no);
- $haswithout{$name} = 1;
- }
- $values{$name} = \@v;
- $default{$name} = defined $without && $haswithout{$name} ? 'no' : $values{$name}->[0];
- }
- else {
- @{$values{$name}} = qw(yes no);
- $haswithout{$name} = 1;
- $default{$name} = defined $without ? 'no' : 'yes';
- }
- $currdesc = \@{$description{$name}};
- push @order, $name;
- }
- elsif (/^# (.*)$/) {
- push @{$currdesc}, $1
- if defined $currdesc;
- }
- elsif (/^##$/) {
- last;
- }
- else {
- print STDERR ">> $pkgname: Parse error at $master line $.: $_.\n"
- }
- }
- close MASTER;
-}
-
-sub parseoverride {
- my $currdesc;
- my ($override) = @_;
-
- -r $override
- or return 1;
-
- open OVERRIDE, "<$override"
- or die "Can't read $override: $!\n";
-
- while(<OVERRIDE>) {
- chomp;
- last if /^##/;
- next if /^#?\s*$/;
- next if /^#\s*\$FreeBSD/;
- if (/^#!/) {
- undef $currdesc;
- }
- elsif(/^#WITH(OUT)?_([A-Z][A-Z0-9_]*)(?:=\s*(.*))?$/) {
- my ($without, $name, $val) = ($1, $2, $3);
- if (!defined $values{$name}) {
- print STDERR ">> $pkgname: Override parameter $name not in master file.\n";
- next;
- }
- if (defined $val) {
- my @v;
- foreach my $r (split /,\s*/, $val) {
- $r =~ s/\s+$//;
- if (length $r > 0) {
- push @v, $r;
- $haswithout{$name} = 1
- if $r =~ /^(?:no|none|off|false)$/i;
- }
- }
- if ($#v == -1 || $#v == 0 && $v[0] =~ /^auto$/i) {
- push @v, qw(yes no);
- $haswithout{$name} = 1;
- }
- $values{$name} = \@v;
- $default{$name} = defined $without && $haswithout{$name} ? 'no' : $values{$name}->[0];
- }
- else {
- @{$values{$name}} = qw(yes no);
- $haswithout{$name} = 1;
- $default{$name} = defined $without ? 'no' : 'yes';
- }
- delete $description{$name};
- $currdesc = \@{$description{$name}};
- $hasoverride{$name} = 1;
- }
- elsif (/^# (.*)$/) {
- push @{$currdesc}, $1
- if defined $currdesc;
- }
- elsif (/^##$/) {
- last;
- }
- else {
- print STDERR ">> $pkgname: Parse error at $override line $.: $_.\n"
- }
- }
- close OVERRIDE;
-
- $isoverride = 1;
-}
-
-sub parseoptions {
- my ($options) = @_;
- -r $options
- or return 1;
- open OPTIONS, "<$options"
- or die "Can't open $options: $!\n";
- while (<OPTIONS>) {
- chomp;
- next if /^(:?#|\s*$)/;
- next if /^_OPTIONS/;
- next if /^\./;
- if (/^WITH(OUT)?_([A-Z][A-Z0-9_]*)\??=(.*)$/) {
- my ($without, $name, $val) = ($1, $2, $3);
- next if !defined $values{$name};
- next if defined $value{$name};
- if (defined $without) {
- $value{$name} = 'no';
- }
- else {
- $value{$name} = $val;
- }
- }
- else {
- print STDERR ">> $pkgname: Parse error at $options line $.: $_\n";
- }
- }
-}
-
-sub parseeditoptions {
- my ($options) = @_;
- -r $options
- or return 1;
- open OPTIONS, "<$options"
- or die "Can't open $options: $!\n";
- while (<OPTIONS>) {
- chomp;
- s/\s*#.*$//;
- next if /^$/;
- if (/^([A-Z][A-Z0-9_]*)\s*=\s*(.*)$/) {
- my ($name, $val) = ($1, $2);
- next if !defined $values{$name};
- next if $#{$values{$name}} == 0 && $values{$name}->[0] =~ /^ignore$/i;
- next if $isoverride && $#{$values{$name}} == 0;
- my $candidate;
- foreach my $c (@{$values{$name}}) {
- if ($c eq '*' || $c eq $val) {
- $candidate = $val;
- last;
- }
- elsif (lc $c eq lc $val) {
- $candidate = $c;
- }
- elsif ($c eq 'yes' && $val =~ /^(?:y|yes|on|t|true)$/i) {
- $candidate = $c;
- }
- elsif ($c eq 'no' && $val =~ /^(?:n|no|off|f|false)$/i) {
- $candidate = $c;
- }
- }
- $value{$name} = $candidate
- if defined $candidate;
- }
- else {
- print STDERR ">> $pkgname: Parse error at $options line $.: $_\n";
- }
- }
- $isedit = 1;
-}
-
-sub print_editoptions {
- foreach my $name (@order) {
- if ($name =~ /^\d/) {
- my $headline;
- foreach (1..length $section[$name]) {
- $headline .= "#";
- }
- print "##$headline##\n";
- print "# $section[$name] #\n";
- print "##$headline##\n";
- print @{$description{$name}} ? "#\n" : "\n";
- }
- else {
- my $val = $default{$name};
- next if $#{$values{$name}} == 0 && $values{$name}->[0] =~ /^ignore$/i;
- if (defined $value{$name} && !($isoverride && $#{$values{$name}} == 0)) {
- $val = $value{$name};
- }
- print "$name=", $val,
- " # valid values: ", join(", ", @{$values{$name}}), "\n";
- }
- if (@{$description{$name}}) {
- foreach (@{$description{$name}}) {
- if ($_ eq '.') {
- print "#\n";
- }
- elsif ($_ =~ /^#/) {
- print "#$_\n";
- }
- else {
- print "# $_\n";
- }
- }
- print "\n";
- }
- }
-}
-
-sub print_dialogoptions {
- foreach my $name (@order) {
- next if $name =~ /^\d/;
- next if !$isedit && $isoverride && !$hasoverride{$name};
- next if !$isedit && $#{$values{$name}} == 0 && $values{$name}->[0] =~ /^ignore$/i;
- my $val = defined $value{$name} ? $value{$name} : $default{$name};
- next if $val ne 'yes' && $val ne 'no';
- $val = $val eq 'yes' ? 'On' : 'Off';
- my $desc = join ' ', @{$description{$name}};
- $desc = "$name support"
- if !$desc;
- $desc =~ s/\. .*//;
- $desc = substr($desc, 0, 38) . '...'
- if length $desc > 41;
- $desc =~ s/["\$]/\\&/g;
- print ' ', $name, ' "', $desc, '" ', $val;
- }
- print "\n";
-}
-
-sub print_options {
- print "_OPTIONSNG_READ?=$pkgname\n";
- foreach my $name (@order) {
- next if $name =~ /^\d/;
- next if !$isedit && $isoverride && !$hasoverride{$name};
- next if !$isedit && $#{$values{$name}} == 0 && $values{$name}->[0] =~ /^ignore$/i;
- my $val = defined $value{$name} ? $value{$name} : $default{$name};
- if ($haswithout{$name}) {
- if ($val =~ /^(no|none|off|false)$/i) {
- print ".undef WITH_$name\n"
- if (!$isedit && $isoverride && $#{$values{$name}} == 0);
- print ".ifndef WITH_$name\n";
- print "WITHOUT_$name?=yes\n";
- print ".endif\n";
- }
- else {
- print ".undef WITHOUT_$name\n"
- if (!$isedit && $isoverride && $#{$values{$name}} == 0);
- print ".ifndef WITHOUT_$name\n";
- print "WITH_$name?=$val\n";
- print ".endif\n";
- }
- }
- else {
- print "WITH_$name?=$val\n";
- }
- }
-}
-
-my %opts;
-
-getopts('p:M:O:g:t:edo', \%opts);
-
-$pkgname = defined $opts{p} ? $opts{p} : "anonyous";
-
-parsemaster $opts{M}
- if defined $opts{M};
-
-parseoverride $opts{O}
- if defined $opts{O};
-
-parseoptions $opts{g}
- if defined $opts{g};
-
-parseeditoptions $opts{t}
- if defined $opts{t};
-
-print_editoptions
- if $opts{e};
-
-print_dialogoptions
- if $opts{d};
-
-print_options
- if $opts{o};
diff --git a/ports-mgmt/portmk/scripts/options.sh b/ports-mgmt/portmk/scripts/options.sh
deleted file mode 100644
index ce3115e5d72a..000000000000
--- a/ports-mgmt/portmk/scripts/options.sh
+++ /dev/null
@@ -1,299 +0,0 @@
-#!/bin/sh -e
-#
-# Copyright (c) 2004 Oliver Eikemeier. 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.
-#
-# 3. Neither the name of the author nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED "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
-# COPYRIGHT OWNER 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$
-#
-# MAINTAINER= eik@FreeBSD.org
-#
-# These variables are referenced and must be exported from the Makefile:
-#
-# CURDIR
-# OBJDIR
-# MASTERDIR
-# OPTIONS_MASTER
-# OPTIONS_OVERRIDE
-# OPTIONS_FILE
-# OPTIONS_CMD
-# PKGNAME
-#
-
-# utilities
-
-LOCALBASE="${LOCALBASE:-/usr/local}"
-
-AWK=/usr/bin/awk
-CAT=/bin/cat
-CHMOD=/bin/chmod
-CP=/bin/cp
-CUT=/usr/bin/cut
-DIALOG=/usr/bin/dialog
-EXPR=/bin/expr
-FETCH=/usr/bin/fetch
-GREP=/usr/bin/grep
-LS=/bin/ls
-MKDIR='/bin/mkdir -p'
-MKTEMP=/usr/bin/mktemp
-MV=/bin/mv
-REALPATH=/bin/realpath
-RM=/bin/rm
-SED=/usr/bin/sed
-SETENV=/usr/bin/env
-SORT=/usr/bin/sort
-TR=/usr/bin/tr
-WC=/usr/bin/wc
-
-# global constants
-
-### utility functions ###
-
-###
-# do_create generates default options for a master (or override) options files
-###
-
-do_create()
-{
- local rc
-
- if [ -n "$OPTIONS_OVERRIDE" ]; then
- OVERRIDEFILE="$OPTIONS_DEFAULT"
- elif [ "$CURDIR" != `$REALPATH "$MASTERDIR"` ]; then
- if [ -f "$CURDIR/options" ]; then
- OVERRIDEFILE="$CURDIR/options"
- elif [ -n "$PKGNAMESUFFIX" -a -f "$MASTERDIR/options.${PKGNAMESUFFIX#-}" ]; then
- OVERRIDEFILE="$MASTERDIR/options.${PKGNAMESUFFIX#-}"
- else
- OVERRIDEFILE=
- fi
- else
- OVERRIDEFILE=
- fi
-
- if [ -n "$OPTIONS_MASTER" ]; then
- MASTERFILE="$OPTIONS_MASTER"
- elif [ -f "$MASTERDIR/options" ]; then
- MASTERFILE="$MASTERDIR/options"
- else
- echo ">> makeconfig: Can't find $MASTERDIR/options" >&2
- return 1
- fi
-
- if [ -n "$OVERRIDEFILE" ]; then
- SRCFILE="$OVERRIDEFILE"
- else
- SRCFILE="$MASTERFILE"
- fi
-
- if ! TMP_OPTIONS=`$MKTEMP -q "$SRCFILE.XXXXXX"`; then
- echo ">> makeconfig: Can't create temporary options file"
- return 1
- fi
-
- $SED -e '/^##/,$d' "$SRCFILE" > "$TMP_OPTIONS"
-
- echo "## AUTOMATICALLY GENERATED FILE - DO NOT CHANGE ANYTHING BELOW THIS LINE ##" >> "$TMP_OPTIONS"
- echo "# use \`make config' to edit the local configuration" >> "$TMP_OPTIONS"
- echo "# use \`make makeconfig' to edit the defaults (MAINTAINER only)" >> "$TMP_OPTIONS"
- echo >> "$TMP_OPTIONS"
-
- if $OPTIONS_CMD -p "default" -M "$MASTERFILE" -O "$OVERRIDEFILE" -o >> "$TMP_OPTIONS"; then
- $MV -f "$TMP_OPTIONS" "$SRCFILE"
- $CHMOD a+r "$SRCFILE"
- else
- $RM -f "$TMP_OPTIONS"
- fi
-
- return $rc
-}
-
-###
-# do_delete removes a saved configuration
-###
-
-do_delete()
-{
- local rc
-
- $RM -f "$OPTIONS_FILE"
-
- return $rc
-}
-
-###
-# do_edit edits a custom configuration
-###
-
-do_edit()
-{
- local rc
-
- OPTIONS_DIR="${OPTIONS_FILE%/*}"
- if [ ! -d "$OPTIONS_DIR" ] && ! $MKDIR "$OPTIONS_DIR"; then
- echo ">> config: Can't create $OPTIONS_DIR." 2>&1
- return 1
- fi
-
- if [ -n "$OPTIONS_OVERRIDE" ]; then
- OVERRIDE="$OPTIONS_DEFAULT"
- elif [ "$CURDIR" != `$REALPATH "$MASTERDIR"` ]; then
- if [ -f "$CURDIR/options" ]; then
- OVERRIDE="$CURDIR/options"
- elif [ -n "$PKGNAMESUFFIX" -a -f "$MASTERDIR/options.${PKGNAMESUFFIX#-}" ]; then
- OVERRIDE="$MASTERDIR/options.${PKGNAMESUFFIX#-}"
- else
- OVERRIDE=
- fi
- else
- OVERRIDE=
- fi
-
- if [ -n "$OPTIONS_MASTER" ]; then
- MASTER="$OPTIONS_MASTER"
- elif [ -f "$MASTERDIR/options" ]; then
- MASTER="$MASTERDIR/options"
- else
- echo ">> makeconfig: Can't find $MASTERDIR/options" >&2
- return 1
- fi
-
- TMP_OPTIONS=`$MKTEMP -t options`
-
- $OPTIONS_CMD -p "$PKGNAME" -M "$MASTER" -O "$OVERRIDE" -g "$OPTIONS_FILE" -e > "$TMP_OPTIONS"
-
- ${EDITOR:-/usr/bin/vi} "$TMP_OPTIONS"
-
- TMP_OPTIONS_FILE=`$MKTEMP -q "$OPTIONS_FILE.XXXXXX"`
- echo "## AUTOMATICALLY GENERATED FILE - DO NOT EDIT ##" > "$TMP_OPTIONS_FILE"
- $OPTIONS_CMD -p "$PKGNAME" -M "$MASTER" -O "$OVERRIDE" -g "$OPTIONS_FILE" -t "$TMP_OPTIONS" -o >> "$TMP_OPTIONS_FILE"
- $RM -f "$TMP_OPTIONS"
-
- $MV -f "$TMP_OPTIONS_FILE" "$OPTIONS_FILE"
- $CHMOD a+r "$OPTIONS_FILE"
-
- return $rc
-}
-
-###
-# do_graphical displays a menu to generate a custom configuration
-###
-
-do_graphical()
-{
- local rc
-
- if [ -n "$OPTIONS_OVERRIDE" ]; then
- OVERRIDE="$OPTIONS_DEFAULT"
- elif [ "$CURDIR" != `$REALPATH "$MASTERDIR"` ]; then
- if [ -f "$CURDIR/options" ]; then
- OVERRIDE="$CURDIR/options"
- elif [ -n "$PKGNAMESUFFIX" -a -f "$MASTERDIR/options.${PKGNAMESUFFIX#-}" ]; then
- OVERRIDE="$MASTERDIR/options.${PKGNAMESUFFIX#-}"
- else
- OVERRIDE=
- fi
- else
- OVERRIDE=
- fi
-
- if [ -n "$OPTIONS_MASTER" ]; then
- MASTER="$OPTIONS_MASTER"
- elif [ -f "$MASTERDIR/options" ]; then
- MASTER="$MASTERDIR/options"
- else
- echo ">> makeconfig: Can't find $MASTERDIR/options" >&2
- return 1
- fi
-
- TMP_OPTIONS=`$MKTEMP -t options`
-
- DIALOGRC=`$OPTIONS_CMD -p "$PKGNAME" -M "$MASTER" -O "$OVERRIDE" -g "$OPTIONS_FILE" -d`
-
- /bin/sh -c "$DIALOG --checklist \"Options for $PKGNAME\" 21 70 15 $DIALOGRC 2>\"$TMP_OPTIONS\""
-
- #TMP_OPTIONS_FILE=`$MKTEMP -q "$OPTIONS_FILE.XXXXXX"`
- #echo "## AUTOMATICALLY GENERATED FILE - DO NOT EDIT ##" > "$TMP_OPTIONS_FILE"
- #$OPTIONS_CMD -p "$PKGNAME" -M "$MASTER" -O "$OVERRIDE" -g "$OPTIONS_FILE" -t "$TMP_OPTIONS" -o >> "$TMP_OPTIONS_FILE"
- $CAT "$TMP_OPTIONS"
-
- $RM -f "$TMP_OPTIONS"
- #$MV -f "$TMP_OPTIONS_FILE" "$OPTIONS_FILE"
-
- return $rc
-}
-
-###
-# do_list lists the current configuration
-###
-
-do_list()
-{
- local rc
-
- return $rc
-}
-
-###
-# main
-###
-
-opt_create=false
-opt_delete=false
-opt_edit=false
-opt_graphical=false
-opt_list=false
-
-while getopts "cdegl" opt; do
- case "$opt" in
- c) opt_create=true;;
- d) opt_delete=true;;
- e) opt_edit=true;;
- g) opt_graphical=true;;
- l) opt_list=true;;
- ?) echo "Usage: $0 -cdegl"; exit 1;;
- esac
-done
-
-shift $(($OPTIND-1))
-
-$opt_create &&
- { do_create || exit 1; }
-
-$opt_delete &&
- { do_delete || exit 1; }
-
-$opt_edit &&
- { do_edit || exit 1; }
-
-$opt_graphical &&
- { do_graphical || exit 1; }
-
-$opt_list &&
- { do_list || exit 1; }
-
-exit 0
diff --git a/ports-mgmt/portmk/scripts/ranksites-fping.pl b/ports-mgmt/portmk/scripts/ranksites-fping.pl
deleted file mode 100644
index db399548b22c..000000000000
--- a/ports-mgmt/portmk/scripts/ranksites-fping.pl
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Copyright (c) 2004 Oliver Eikemeier. 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.
-#
-# 3. Neither the name of the author nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED "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
-# COPYRIGHT OWNER 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$
-#
-# MAINTAINER= eik@FreeBSD.org
-#
-
-require 5.005;
-use strict;
-
-my $dbdir = $ENV{RANKDIR} ? $ENV{RANKDIR} : '/var/db/distrank';
-
-my $fping = $ENV{FPING} ? $ENV{FPING} : '/usr/local/sbin/fping';
-
--x $fping
- or die "fping required\n";
-
--d $dbdir || mkdir $dbdir, 0777
- or die "Can't create $dbdir\n";
-
-my $rankfile = "$dbdir/ranks-fping";
-
-my $now = time;
-
-my %distance;
-
-if (-r $rankfile) {
- open RANKS, "<$rankfile";
- while (<RANKS>) {
- chomp;
- my ($host, $d, $e) = split;
- $distance{$host} = [$d, $e]
- if defined $e && $e >= $now;
- }
- close RANKS;
-}
-
-my %mastersites;
-my %newdistance;
-
-my $distgood = 0;
-my $distdefault = 5000;
-my $distbad = 10000;
-
-my $expgood = $now + 14 * 86400;
-my $expdefault = $now + 7 * 86400;
-
-my $hostcount = 0;
-
-while (<>) {
- chomp;
- next
- if exists $mastersites{$_};
- if (m'^(?:ftp|https?)://(?:[^/]*@)?([^/:]+\.[^/:]+)(?::\d+)?(?:/|$)'i) {
- my $host = lc $1;
- $mastersites{$_} = $host;
- if (!defined $distance{$host}) {
- $distance{$host} = [$distdefault, $expdefault];
- $newdistance{$host} = undef
- }
- $hostcount++;
- } elsif (m'^file:'i) {
- $mastersites{$_} = 'FILE';
- } else {
- $mastersites{$_} = 'UNKNOWN';
- }
-}
-
-if (%newdistance && $hostcount > 1) {
- if (!open FPING, '-|') {
- if (!open FPINGIN, '|-') {
- open STDERR, '>&STDOUT';
- exec $fping, '-q', '-C', '3';
- die
- }
- foreach (keys %newdistance) {
- print FPINGIN $_, "\n";
- }
- close FPINGIN;
- exit;
- }
-
- while(<FPING>) {
- /([^\s:]+)\s*:\s*([\s\d.-]*)/ or next;
- my $sum = 0.0;
- my $num = 0;
- foreach my $val (split ' ', $2) {
- $val ne '-' || next;
- $sum += $val;
- $num++;
- }
- if ($num > 0) {
- $distance{$1} = [$sum/$num, $expgood];
- }
- }
- close FPING;
-
- open RANKS, ">$rankfile";
- while (my ($host, $val) = each %distance) {
- printf RANKS "%s\t%.2f\t%d\n", $host, $val->[0], $val->[1]
- if defined $val;
- }
- close RANKS;
-}
-
-$distance{FILE} = [$distgood, 0];
-$distance{UNKNOWN} = [$distbad, 0];
-
-foreach (sort {$distance{$mastersites{$a}}->[0] <=> $distance{$mastersites{$b}}->[0]} keys %mastersites) {
- print $_, "\n";
-}
diff --git a/ports-mgmt/portmk/scripts/ranksites-geoip.pl b/ports-mgmt/portmk/scripts/ranksites-geoip.pl
deleted file mode 100644
index 0777c744982f..000000000000
--- a/ports-mgmt/portmk/scripts/ranksites-geoip.pl
+++ /dev/null
@@ -1,393 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Copyright (c) 2004 Oliver Eikemeier. 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.
-#
-# 3. Neither the name of the author nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED "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
-# COPYRIGHT OWNER 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$
-#
-# MAINTAINER= eik@FreeBSD.org
-#
-
-require 5.005;
-use strict;
-use Geo::IP;
-use constant PI => 3.14159265358979323846;
-
-my $home = $ENV{CC_HOME} ? lc $ENV{CC_HOME} : 'eu';
-
-my $dbdir = $ENV{RANKDIR} ? $ENV{RANKDIR} : '/var/db/distrank';
-
--d $dbdir || mkdir $dbdir, 0777 or die "Can't create $dbdir\n";
-
-my $rankfile = "$dbdir/ranks-geoip";
-
-my $now = time;
-
-my %distance;
-
-if (-r $rankfile) {
- open RANKS, "<$rankfile";
- while (<RANKS>) {
- chomp;
- my ($host, $d, $e) = split;
- $distance{$host} = [$d, $e]
- if defined $e && $e >= $now;
- }
- close RANKS;
-}
-
-my %mastersites;
-my %newdistance;
-
-my $distgood = -1;
-my $distdefault = PI/2;
-my $distbad = 2;
-
-my $expgood = $now + 14 * 86400;
-my $expdefault = $now + 7 * 86400;
-
-my $hostcount = 0;
-
-while (<>) {
- chomp;
- next
- if exists $mastersites{$_};
- if (m'^(?:ftp|https?)://(?:[^/]*@)?([^/:]+\.[^/:]+)(?::\d+)?(?:/|$)'i) {
- my $host = lc $1;
- $mastersites{$_} = $host;
- if (!defined $distance{$host}) {
- $distance{$host} = [$distdefault, $expdefault];
- $newdistance{$host} = undef
- }
- $hostcount++;
- } elsif (m'^file:'i) {
- $mastersites{$_} = 'FILE';
- } else {
- $mastersites{$_} = 'UNKNOWN';
- }
-}
-
-# calculate_distance and the associated table is from Geo::Mirror, and therefore
-# Copyright (c) 2002, T.J. Mather, tjmather@tjmather.com, New York, NY, USA
-
-my (%lat, %lon);
-
-sub getlatlon {
- my ($cc) = @_;
- my ($lat_cc, $lon_cc) = ($lat{$cc}, $lon{$cc});
-
- # Convert all the degrees to radians
- $lat_cc *= PI/180
- if defined $lat_cc;
- $lon_cc *= PI/180
- if defined $lon_cc;
- return ($lat_cc, $lon_cc);
-}
-
-if (%newdistance && $hostcount > 1) {
- while (<main::DATA>) {
- my ($country, $lat, $lon) = split(':');
-
- $lat{$country} = $lat;
- $lon{$country} = $lon;
- }
- close main::DATA;
-
- my $gi = Geo::IP->new(GEOIP_MEMORY_CACHE);
-
- my ($lat_home, $lon_home) = getlatlon($home);
-
- foreach (keys %newdistance) {
- my $dist;
- my $cc = lc $gi->country_code_by_name($_);
-
- if ($cc) {
- my ($lat_cc, $lon_cc) = getlatlon($cc)
- if defined $cc;
-
- # Find the deltas
- my $delta_lat = $lat_cc - $lat_home;
- my $delta_lon = $lon_cc - $lon_home;
-
- # Find the Great Circle distance
- my $temp = sin($delta_lat/2.0)**2 + cos($lat_home) * cos($lat_cc) * sin($delta_lon/2.0)**2;
- $dist = atan2(sqrt($temp),sqrt(1-$temp));
-
- $distance{$_} = [$dist, $expgood]
- if defined $dist;
- }
- }
-
- open RANKS, ">$rankfile";
- while (my ($host, $val) = each %distance) {
- printf RANKS "%s\t%.4f\t%d\n", $host, $val->[0], $val->[1]
- if defined $val;
- }
- close RANKS;
-}
-
-$distance{FILE} = [$distgood, 0];
-$distance{UNKNOWN} = [$distbad, 0];
-
-foreach (sort {$distance{$mastersites{$a}}->[0] <=> $distance{$mastersites{$b}}->[0]} keys %mastersites) {
- print $_, "\n";
-}
-
-__END__
-af:33:65
-al:41:20
-dz:28:3
-as:-14:-170
-ad:42:1
-ao:-12:18
-ai:18:-63
-aq:-90:0
-ag:17:-61
-ar:-34:-64
-am:40:45
-aw:12:-69
-au:-27:133
-at:47:13
-az:40:47
-bs:24:-76
-bh:26:50
-bd:24:90
-bb:13:-59
-by:53:28
-be:50:4
-bz:17:-88
-bj:9:2
-bm:32:-64
-bt:27:90
-bo:-17:-65
-ba:44:18
-bw:-22:24
-bv:-54:3
-br:-10:-55
-io:-6:71
-vg:18:-64
-bg:43:25
-bf:13:-2
-bi:-3:30
-kh:13:105
-cm:6:12
-ca:60:-95
-cv:16:-24
-ky:19:-80
-cf:7:21
-td:15:19
-cl:-30:-71
-cn:35:105
-cx:-10:105
-cc:-12:96
-co:4:-72
-km:-12:44
-cd:0:25
-cg:-1:15
-ck:-21:-159
-cr:10:-84
-ci:8:-5
-hr:45:15
-cu:21:-80
-cy:35:33
-cz:49:15
-dk:56:10
-dj:11:43
-dm:15:-61
-do:19:-70
-ec:-2:-77
-eg:27:30
-sv:13:-88
-gq:2:10
-er:15:39
-ee:59:26
-et:8:38
-fk:-51:-59
-fo:62:-7
-fj:-18:175
-fi:64:26
-fr:46:2
-gf:4:-53
-pf:-15:-140
-ga:-1:11
-gm:13:-16
-ge:42:43
-de:51:9
-eu:48:10
-gh:8:-2
-gi:36:-5
-gr:39:22
-gl:72:-40
-gd:12:-61
-gp:16:-61
-gu:13:144
-gt:15:-90
-gn:11:-10
-gw:12:-15
-gy:5:-59
-ht:19:-72
-hm:-53:72
-va:41:12
-hn:15:-86
-hk:22:114
-hu:47:20
-is:65:-18
-in:20:77
-id:-5:120
-ir:32:53
-iq:33:44
-ie:53:-8
-il:31:34
-it:42:12
-jm:18:-77
-sj:71:-8
-jp:36:138
-jo:31:36
-ke:1:38
-ki:1:173
-kp:40:127
-kr:37:127
-kw:29:45
-kg:41:75
-lv:57:25
-lb:33:35
-ls:-29:28
-lr:6:-9
-ly:25:17
-li:47:9
-lt:56:24
-lu:49:6
-mo:22:113
-mk:41:22
-mg:-20:47
-mw:-13:34
-my:2:112
-mv:3:73
-ml:17:-4
-mt:35:14
-mh:9:168
-mq:14:-61
-mr:20:-12
-mu:-20:57
-yt:-12:45
-mx:23:-102
-fm:6:158
-mc:43:7
-mn:46:105
-ms:16:-62
-ma:32:-5
-mz:-18:35
-na:-22:17
-nr:-0:166
-np:28:84
-nl:52:5
-an:12:-68
-nc:-21:165
-nz:-41:174
-ni:13:-85
-ne:16:8
-ng:10:8
-nu:-19:-169
-nf:-29:167
-mp:15:145
-no:62:10
-om:21:57
-pk:30:70
-pw:7:134
-pa:9:-80
-pg:-6:147
-py:-23:-58
-pe:-10:-76
-ph:13:122
-pn:-25:-130
-pl:52:20
-pt:39:-8
-pr:18:-66
-qa:25:51
-re:-21:55
-ro:46:25
-ru:60:100
-rw:-2:30
-sh:-15:-5
-kn:17:-62
-lc:13:-60
-pm:46:-56
-vc:13:-61
-ws:-13:-172
-sm:43:12
-st:1:7
-sa:25:45
-sn:14:-14
-sc:-4:55
-sl:8:-11
-sg:1:103
-sk:48:19
-si:46:15
-sb:-8:159
-so:10:49
-za:-29:24
-gs:-54:-37
-es:40:-4
-lk:7:81
-sd:15:30
-sr:4:-56
-sj:78:20
-sz:-26:31
-se:62:15
-ch:47:8
-sy:35:38
-tj:39:71
-tz:-6:35
-th:15:100
-tg:8:1
-tk:-9:-172
-to:-20:-175
-tt:11:-61
-tn:34:9
-tr:39:35
-tm:40:60
-tc:21:-71
-tv:-8:178
-ug:1:32
-ua:49:32
-ae:24:54
-gb:54:-2
-us:38:-97
-uy:-33:-56
-uz:41:64
-vu:-16:167
-ve:8:-66
-vn:16:106
-vi:18:-64
-wf:-13:-176
-eh:24:-13
-ye:15:48
-yu:44:21
-zm:-15:30
-zw:-20:30
-tw:23:121
diff --git a/ports-mgmt/portsman/Makefile b/ports-mgmt/portsman/Makefile
deleted file mode 100644
index 6bf9863f38c5..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= 2
-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 0891b02d9724..000000000000
--- a/ports-mgmt/portsman/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (portsman-0.2-rc2.tar.gz) = 624c5ad75088afc802e52008a017dbdd
-SIZE (portsman-0.2-rc2.tar.gz) = 79954
diff --git a/ports-mgmt/portsman/files/patch-freebsd5 b/ports-mgmt/portsman/files/patch-freebsd5
deleted file mode 100644
index 8a2e35e33ffc..000000000000
--- a/ports-mgmt/portsman/files/patch-freebsd5
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/consts.h.orig Wed Jan 29 19:03:44 2003
-+++ src/consts.h Tue Jun 22 12:46:55 2004
-@@ -26,12 +26,17 @@
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-+#include <osreldate.h>
- #define _VERSION "portsman 0.2"
- #define MAX_PATH 256
- #define MAX_TOKEN 256
- #define MAX_COLS 80
- #define INSTALLED_PKG_DIR "/var/db/pkg"
-+#if __FreeBSD_version > 500000
-+#define INDEX_FILE "/usr/ports/INDEX-5"
-+#else
- #define INDEX_FILE "/usr/ports/INDEX"
-+#endif
- #define PORTS_DIR "/usr/ports"
- #define CONFIG_FILE ".portsmanrc"
- #define MK_FILE "Makefile"
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/portsnap/Makefile b/ports-mgmt/portsnap/Makefile
deleted file mode 100644
index b271dabb2bec..000000000000
--- a/ports-mgmt/portsnap/Makefile
+++ /dev/null
@@ -1,54 +0,0 @@
-# New ports collection makefile for: Ports tree snapshot utility
-# Date created: 29 October 2004
-# Whom: cperciva@daemonology.net
-#
-# $FreeBSD$
-#
-
-PORTNAME= portsnap
-PORTVERSION= 0.9.4
-CATEGORIES= sysutils net
-MASTER_SITES= http://www.daemonology.net/portsnap/
-
-MAINTAINER= cperciva@daemonology.net
-COMMENT= Provides secure snapshots of the ports directory
-
-RUN_DEPENDS= bspatch:${PORTSDIR}/misc/bsdiff
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 600021 && ( ${OSVERSION} < 504102 || ${OSVERSION} > 599999 )
-RUN_DEPENDS+= sha256:${PORTSDIR}/sysutils/freebsd-sha256
-.endif
-
-MAN5= portsnap.conf.5
-MAN8= portsnap.8
-PLIST_FILES= etc/portsnap.conf.sample sbin/portsnap \
- libexec/phttpget \
- libexec/make_index portsnap/.package.this.directory
-PLIST_DIRS= portsnap
-
-PKGMESSAGE= ${WRKDIR}/pkg-message
-
-post-extract:
- ${SED} -e "s#PREFIX=/usr/local#PREFIX=${PREFIX}#g" \
- ${WRKSRC}/portsnap > ${WRKSRC}/portsnap.new
- ${MV} ${WRKSRC}/portsnap.new ${WRKSRC}/portsnap
- @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${PKGDIR}/pkg-message \
- > ${PKGMESSAGE}
-
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/portsnap ${PREFIX}/sbin
- ${INSTALL_PROGRAM} ${WRKSRC}/make_index ${PREFIX}/libexec
- ${INSTALL_PROGRAM} ${WRKSRC}/phttpget ${PREFIX}/libexec
- ${INSTALL_MAN} ${WRKSRC}/portsnap.conf.5 ${PREFIX}/man/man5/
- ${INSTALL_MAN} ${WRKSRC}/portsnap.8 ${PREFIX}/man/man8/
- ${INSTALL_DATA} ${WRKSRC}/portsnap.conf \
- ${PREFIX}/etc/portsnap.conf.sample
- ${MKDIR} ${PREFIX}/portsnap
- ${TOUCH} ${PREFIX}/portsnap/.package.this.directory
-
-post-install:
- @${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.post.mk>
diff --git a/ports-mgmt/portsnap/distinfo b/ports-mgmt/portsnap/distinfo
deleted file mode 100644
index 6f1ee87a5b17..000000000000
--- a/ports-mgmt/portsnap/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (portsnap-0.9.4.tar.gz) = b51f3f40181a7c958448bf025dacedac
-SIZE (portsnap-0.9.4.tar.gz) = 16743
diff --git a/ports-mgmt/portsnap/pkg-descr b/ports-mgmt/portsnap/pkg-descr
deleted file mode 100644
index a33c0a7dda3a..000000000000
--- a/ports-mgmt/portsnap/pkg-descr
+++ /dev/null
@@ -1,15 +0,0 @@
-Portsnap is a system for securely updating the ports tree by
-distributing signed compressed snapshots. This is the client
-half of that system; it downloads compressed snapshots into
-/usr/local/portsnap ("portsnap fetch") and uses those to extract
-a ports tree into /usr/ports ("portsnap extract") or update an
-existing tree ("portsnap update").
-
-In addition to operating entirely over HTTP, portsnap can use under
-a tenth of the bandwidth required by CVSup if a copy of the ports
-tree is being updated every few days.
-
-WWW: http://www.daemonology.net/portsnap/
-
-- Colin Percival
-cperciva@daemonology.net
diff --git a/ports-mgmt/portsnap/pkg-message b/ports-mgmt/portsnap/pkg-message
deleted file mode 100644
index 519591ac4336..000000000000
--- a/ports-mgmt/portsnap/pkg-message
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Before you can use portsnap, you will have to create an update configuration
-file specifying the server from which to fetch snapshots and the sha256 hash
-of the openssl public key which is trusted to sign the snapshots.
-
-A sample configuration file has been installed in
-
- %%PREFIX%%/etc/portsnap.conf.sample
-
-which will fetch snapshots built and signed by the author. If you want to
-use these updates, copy that file to
-
- %%PREFIX%%/etc/portsnap.conf
-
-otherwise, create that file as appropriate.
-
-NOTE TO USERS UPGRADING FROM PORTSNAP 0.3.1 OR EARLIER: The structure
-of the portsnap configuration file has changed; you will have to replace
-your existing portsnap.conf with a new version.
-
diff --git a/ports-mgmt/porttools/Makefile b/ports-mgmt/porttools/Makefile
deleted file mode 100644
index 56e5285654bb..000000000000
--- a/ports-mgmt/porttools/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-# New ports collection makefile for: porttools
-# Date created: 2003-06-18
-# Whom: Sergei Kolobov <sergei@kolobov.com>
-#
-# $FreeBSD$
-#
-
-PORTNAME= porttools
-PORTVERSION= 0.63
-PORTREVISION= 3
-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 \
- cdiff:${PORTSDIR}/textproc/cdiff \
- sudo:${PORTSDIR}/security/sudo
-
-.include <bsd.port.pre.mk>
-
-.if defined(WITH_NEWFILE) || exists(${LOCALBASE}/bin/newfile)
-RUN_DEPENDS+= ${LOCALBASE}/bin/newfile:${PORTSDIR}/devel/newfile
-.endif
-
-.if !defined(NOPORTDOCS)
-INSTALL_TARGET= install install-docs
-.endif
-
-MAKE_ENV= DATADIR="${DATADIR}" DOCSDIR="${DOCSDIR}"
-MAN1= port.1
-MAN5= porttools.5
-
-.include <bsd.port.post.mk>
diff --git a/ports-mgmt/porttools/distinfo b/ports-mgmt/porttools/distinfo
deleted file mode 100644
index bcba25edacbe..000000000000
--- a/ports-mgmt/porttools/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (porttools-0.63.tar.gz) = 3f9d7841a542d098f1791e7d9efaa74d
-SIZE (porttools-0.63.tar.gz) = 17351
diff --git a/ports-mgmt/porttools/files/patch-cmd_test.in b/ports-mgmt/porttools/files/patch-cmd_test.in
deleted file mode 100644
index c73b616f58bc..000000000000
--- a/ports-mgmt/porttools/files/patch-cmd_test.in
+++ /dev/null
@@ -1,30 +0,0 @@
---- cmd_test.in.orig Sat Aug 7 06:10:14 2004
-+++ cmd_test.in Tue Sep 7 01:25:08 2004
-@@ -178,7 +178,7 @@
- done
-
- # Check for extra files left
--echo "===> Extra files check"
-+echo "===> Extra files and directories check"
- if [ -d ${PREFIX} -a "${USE_X_PREFIX}" != "yes" ]
- then
- # Remove PREFIX from the extra files list
-@@ -186,6 +186,9 @@
- find ${PREFIX} ! -type d | \
- egrep -v "${PREFIX}/share/nls/(POSIX|en_US.US-ASCII)" | \
- sed -e "s,^${PREFIX}/,,"
-+ sudo find ${LOCALBASE}/ -type d | sed "s,^${LOCALBASE}/,," | sort > ${PREFIX}.PLIST_DIRS.before
-+ sudo find ${PREFIX}/ -type d | sed "s,^${PREFIX}/,," | sort > ${PREFIX}.PLIST_DIRS.after
-+ comm -13 ${PREFIX}.PLIST_DIRS.before ${PREFIX}.PLIST_DIRS.after | sort -r | awk '{print "@unexec rmdir %D/"$1" 2>/dev/null || true"}'
- fi
-
- # Finish with a clean workspace
-@@ -196,7 +199,7 @@
- if [ "${USE_X_PREFIX}" != "yes" -a -d ${PREFIX} ]
- then
- echo "===> Removing existing ${PREFIX} dir"
-- [ "${PREFIX}" != "${LOCALBASE}" ] && sudo rm -rf ${PREFIX}
-+ [ "${PREFIX}" != "${LOCALBASE}" ] && sudo rm -rf ${PREFIX} ${PREFIX}.PLIST_DIRS.before ${PREFIX}.PLIST_DIRS.after
- fi
- sudo rm -rf ${PKG_DBDIR}
- fi
diff --git a/ports-mgmt/porttools/files/patch-util_diff.in b/ports-mgmt/porttools/files/patch-util_diff.in
deleted file mode 100644
index bfa8d3650480..000000000000
--- a/ports-mgmt/porttools/files/patch-util_diff.in
+++ /dev/null
@@ -1,18 +0,0 @@
---- util_diff.in.orig Sat Aug 7 06:10:14 2004
-+++ util_diff.in Sun Aug 8 16:26:26 2004
-@@ -70,10 +70,12 @@
- # -d <dir> have been specified
- # it should be Ports tree location
- CATEGORY="`make -V CATEGORIES | sed -E 's/^([^ ]+).*$/\1/'`"
-- PKGNAMEPREFIX="`make -V PKGNAMEPREFIX`"
-+ PYTHON_SUFFIX="`make -V PYTHON_SUFFIX`"
-+ RUBY_SUFFIX="`make -V RUBY_SUFFIX`"
-+ PKGNAMEPREFIX="`make -V PKGNAMEPREFIX | sed -E "s,py${PYTHON_SUFFIX}-,py-," | sed -E "s,ruby${RUBY_SUFFIX}-,ruby-,"`"
- PKGNAMESUFFIX="`make -V PKGNAMESUFFIX`"
-- PORTNAME="`make -V PORTNAME`"
-- ORIG_DIR="${DIFF_MODE}/${CATEGORY}/${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}"
-+ PORTNAME="${PKGNAMEPREFIX}`make -V PORTNAME`${PKGNAMESUFFIX}"
-+ ORIG_DIR="${DIFF_MODE}/${CATEGORY}/${PORTNAME}"
- else
- # -d <pattern> have been specified
- # <pattern> is used to determine original port location
diff --git a/ports-mgmt/porttools/pkg-descr b/ports-mgmt/porttools/pkg-descr
deleted file mode 100644
index 1b9daf320343..000000000000
--- a/ports-mgmt/porttools/pkg-descr
+++ /dev/null
@@ -1,9 +0,0 @@
-FreeBSD Port Tools includes the following commands:
-- port create: create a new port from a template
-- port diff: generate a diff against a previous version of the port
-- port fetch: fetch distfile(s) of a new version of the port
-- port help: display usage summary for port(1) commands
-- port submit: submit a PR with new port, or port change/update
-- port test: automate testing a new port or a port update
-
-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 cf0a51d28f6e..000000000000
--- a/ports-mgmt/porttools/pkg-plist
+++ /dev/null
@@ -1,16 +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%%
-@dirrm %%DATADIR%%
diff --git a/ports-mgmt/portupgrade-devel/Makefile b/ports-mgmt/portupgrade-devel/Makefile
deleted file mode 100644
index d872013ac335..000000000000
--- a/ports-mgmt/portupgrade-devel/Makefile
+++ /dev/null
@@ -1,81 +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= 20041226
-PORTREVISION= 7
-CATEGORIES= sysutils
-MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \
- ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= knu
-DISTNAME= pkgtools-${DISTVERSION}
-
-MAINTAINER= koma2@lovepeers.org
-COMMENT= FreeBSD ports/packages administration and management tool suite
-
-DISTVERSION= 20041224
-
-.if ${DISTVERSION} != ${PORTVERSION}
-PATCH_SITES= ${MASTER_SITES}
-PATCH_SITE_SUBDIR= ${MASTER_SITE_SUBDIR}
-PATCHFILES= ${DISTNAME}-${PORTVERSION}.diff.bz2
-PATCH_DIST_STRIP= -p1
-.endif
-
-OPTIONS= BDB4 "Use Berkeley DB >=2 as backend. (Use BDB 1.85 if off)" off
-
-USE_RC_SUBR= yes
-USE_BZIP2= yes
-USE_RUBY= yes
-USE_RUBY_FEATURES= optparse ruby18
-USE_PERL5_RUN= yes
-
-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>
-
-.if defined(WITH_BDB4)
-# For PKG_DBDRIVER={bdb_btree,bdb_hash,bdb}
-RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/bdb.so:${PORTSDIR}/databases/ruby-bdb
-.else
-RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/bdb1.so:${PORTSDIR}/databases/ruby-bdb1
-.endif
-
-# 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 607f7ef6d1e9..000000000000
--- a/ports-mgmt/portupgrade-devel/distinfo
+++ /dev/null
@@ -1,4 +0,0 @@
-MD5 (pkgtools-20041224.tar.bz2) = 1c69732e569fa423152cc792d2c40113
-SIZE (pkgtools-20041224.tar.bz2) = 104308
-MD5 (pkgtools-20041224-20041226.diff.bz2) = aab3f2885424d5f25c8ab08d48da5f34
-SIZE (pkgtools-20041224-20041226.diff.bz2) = 1086
diff --git a/ports-mgmt/portupgrade-devel/files/patch-CAN-2005-0610 b/ports-mgmt/portupgrade-devel/files/patch-CAN-2005-0610
deleted file mode 100644
index 415dca4bff3c..000000000000
--- a/ports-mgmt/portupgrade-devel/files/patch-CAN-2005-0610
+++ /dev/null
@@ -1,75 +0,0 @@
-diff -ur ../orig.pkgtools-20041224/lib/pkgdb.rb ./lib/pkgdb.rb
---- ../orig.pkgtools-20041224/lib/pkgdb.rb Wed Mar 23 21:37:47 2005
-+++ ./lib/pkgdb.rb Sun May 22 00:39:38 2005
-@@ -96,8 +96,7 @@
- @db_dir = File.expand_path(new_db_dir || ENV['PKG_DBDIR'] || '/var/db/pkg')
-
- @db_file = File.join(@db_dir, 'pkgdb.db')
-- @tmp_dir = ENV['PKG_TMPDIR'] || ENV['TMPDIR'] || '/var/tmp'
-- @fixme_file = File.join(@tmp_dir, 'pkgdb.fixme')
-+ @fixme_file = ENV['PKG_FIXME_FILE'] || "/var/db/pkgdb.fixme"
- @db_filebase = @db_file.sub(/\.db$/, '')
- close_db
-
-Only in ./lib: pkgdb.rb~
-diff -ur ../orig.pkgtools-20041224/lib/pkgmisc.rb ./lib/pkgmisc.rb
---- ../orig.pkgtools-20041224/lib/pkgmisc.rb Wed Mar 23 21:37:47 2005
-+++ ./lib/pkgmisc.rb Thu May 5 14:09:37 2005
-@@ -95,3 +95,31 @@
- end
- end
- end
-+
-+def init_tmpdir
-+ if ! $tmpdir.nil? && $tmpdir != "" then
-+ return
-+ end
-+ maintmpdir = ENV['PKG_TMPDIR'] || ENV['TMPDIR'] || '/var/tmp'
-+ if !FileTest.directory?(maintmpdir)
-+ raise "Temporary directory #{maintmpdir} does not exist"
-+ end
-+
-+ cmdline = shelljoin("/usr/bin/mktemp", "-d", maintmpdir + "/portupgradeXXXXXXXX")
-+ pipe = IO.popen(cmdline)
-+ tmpdir = pipe.gets
-+ pipe.close
-+ if $? != 0 || tmpdir.nil? || tmpdir.length == 0
-+ raise "Could not create temporary directory in #{maintmpdir}"
-+ end
-+ tmpdir.chomp!
-+
-+ at_exit {
-+ begin
-+ Dir.delete(tmpdir)
-+ rescue
-+ warning_message "Could not clean up temporary directory: " + $!
-+ end
-+ }
-+ $tmpdir=tmpdir
-+end
-diff -ur ../orig.pkgtools-20041224/lib/pkgsqldb.rb ./lib/pkgsqldb.rb
---- ../orig.pkgtools-20041224/lib/pkgsqldb.rb Wed Mar 23 21:37:47 2005
-+++ ./lib/pkgsqldb.rb Sun May 22 00:42:04 2005
-@@ -73,8 +73,7 @@
- @db_dir = File.expand_path(new_db_dir || ENV['PKG_DBDIR'] || '/var/db/pkg')
-
- @db_file = File.join(@db_dir, 'pkgdb.sqldb')
-- @tmp_dir = ENV['PKG_TMPDIR'] || ENV['TMPDIR'] || '/var/tmp'
-- @fixme_file = File.join(@tmp_dir, 'pkgdb.fixme')
-+ @fixme_file = ENV['PKG_FIXME_FILE'] || "/var/db/pkgdb.fixme"
- close_db
-
- @db_dir
-Only in ./lib: pkgsqldb.rb~
-diff -ur ../orig.pkgtools-20041224/lib/pkgtools.rb ./lib/pkgtools.rb
---- ../orig.pkgtools-20041224/lib/pkgtools.rb Wed Mar 23 21:37:47 2005
-+++ ./lib/pkgtools.rb Tue May 3 19:29:59 2005
-@@ -204,7 +204,7 @@
- $ports_dir = $portsdb.ports_dir
- $packages_base = ENV['PACKAGES'] || File.join($ports_dir, 'packages')
- $packages_dir = File.join($packages_base, 'All')
-- $tmpdir = ENV['PKG_TMPDIR'] || ENV['TMPDIR'] || '/var/tmp'
-+ init_tmpdir
- $pkg_path = ENV['PKG_PATH'] || $packages_dir
-
- $pkg_sites = (ENV['PKG_SITES'] || '').split
diff --git a/ports-mgmt/portupgrade-devel/files/patch-Makefile.compat b/ports-mgmt/portupgrade-devel/files/patch-Makefile.compat
deleted file mode 100644
index 731d4409da45..000000000000
--- a/ports-mgmt/portupgrade-devel/files/patch-Makefile.compat
+++ /dev/null
@@ -1,11 +0,0 @@
---- ../orig.pkgtools-20041224/Makefile.compat Wed Mar 23 21:37:47 2005
-+++ Makefile.compat Sun May 22 00:46:39 2005
-@@ -89,7 +89,7 @@
- .endif
- .endif
-
--.endif defined(${group}) && !empty(${group})
-+.endif # defined(${group}) && !empty(${group})
- .endfor
-
- .endif
diff --git a/ports-mgmt/portupgrade-devel/files/patch-bin-portsclean.1 b/ports-mgmt/portupgrade-devel/files/patch-bin-portsclean.1
deleted file mode 100644
index e9c95e66154b..000000000000
--- a/ports-mgmt/portupgrade-devel/files/patch-bin-portsclean.1
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: bin/portsclean.1
-===================================================================
---- bin/portsclean.1 (revision 32)
-+++ bin/portsclean.1 (revision 34)
-@@ -8,7 +8,7 @@
- .Nd a tool to clean ports/packages garbage
- .Sh SYNOPSIS
- .Nm
--.Op Fl hCDDinPPQQq
-+.Op Fl hCDDiLnPPQQq
- .Sh DESCRIPTION
- .Nm
- is a tool to help users clean out the working directories of their ports
-@@ -81,7 +81,9 @@
- .Pp
- .It Fl Q
- .It Fl -quiet
--Do not write anything to stdout. Specified twice, do not write
-+Do not write anything to stdout. Specified twice (i.e.
-+.Fl QQ ) ,
-+do not write
- anything to stderr either. This is for internal use.
- .Pp
- .It Fl q
diff --git a/ports-mgmt/portupgrade-devel/files/patch-bin-portupgrade b/ports-mgmt/portupgrade-devel/files/patch-bin-portupgrade
deleted file mode 100644
index 063d81beee94..000000000000
--- a/ports-mgmt/portupgrade-devel/files/patch-bin-portupgrade
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: bin/portupgrade
-===================================================================
---- bin/portupgrade (revision 34)
-+++ bin/portupgrade (revision 36)
-@@ -1560,7 +1560,7 @@
-
- timer_start(time_key = "Installation of #{pkgname}")
-
-- cmdargs = [PkgDB::command(:pkg_add), '-f', pkgname]
-+ cmdargs = [PkgDB::command(:pkg_add), '-f', pkgfile]
-
- progress_message "Installing the new version via the package"
-
-@@ -1705,7 +1705,7 @@
- id_pkgname, id_origin, pkgdep = identify_pkg(file)
-
- if id_origin == origin
-- pkglist << [PkgInfo.new(id_pkgname), file]
-+ pkglist << [PkgInfo.new(id_pkgname), File.join(dir, file)]
- end
- }
- }
diff --git a/ports-mgmt/portupgrade-devel/files/patch-etc-Makefile b/ports-mgmt/portupgrade-devel/files/patch-etc-Makefile
deleted file mode 100644
index 31f27de19fec..000000000000
--- a/ports-mgmt/portupgrade-devel/files/patch-etc-Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: etc/Makefile
-===================================================================
---- etc/Makefile (リビジョン 1049)
-+++ etc/Makefile (作業コピー)
-@@ -32,7 +32,8 @@
- ${script}: ${script:T}
- @mkdir -p ${BUILDDIR}
- ${RUBY} -p \
-- -e 'sub %r:/usr/local:, "${PREFIX}"' \
-+ -e 'sub(%r:/usr/local:, "${PREFIX}")' \
-+ -e 'sub(%r:(/etc/rc\.subr):, "${PREFIX}\\1") if !File.exist?("/etc/rc.subr")' \
- ${.ALLSRC} > ${.TARGET}
- .endfor
-
diff --git a/ports-mgmt/portupgrade-devel/files/patch-lib_portsdb.rb b/ports-mgmt/portupgrade-devel/files/patch-lib_portsdb.rb
deleted file mode 100644
index d4342c93f67b..000000000000
--- a/ports-mgmt/portupgrade-devel/files/patch-lib_portsdb.rb
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/portsdb.rb.orig Tue Aug 2 10:24:50 2005
-+++ lib/portsdb.rb Tue Aug 2 10:25:17 2005
-@@ -846,7 +846,7 @@
-
- def all_depends_list(origin, before_args = nil, after_args = nil)
- if !before_args && !after_args && i = port(origin)
-- i.all_depends.map { |n| origin(n) }
-+ i.all_depends.map { |n| origin(n) }.compact
- else
- all_depends_list!(origin, before_args, after_args)
- end
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 04bfc7e22267..000000000000
--- a/ports-mgmt/portupgrade-devel/pkg-plist
+++ /dev/null
@@ -1,41 +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/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 d872013ac335..000000000000
--- a/ports-mgmt/portupgrade/Makefile
+++ /dev/null
@@ -1,81 +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= 20041226
-PORTREVISION= 7
-CATEGORIES= sysutils
-MASTER_SITES= ftp://ftp.iDaemons.org/pub/distfiles/ \
- ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= knu
-DISTNAME= pkgtools-${DISTVERSION}
-
-MAINTAINER= koma2@lovepeers.org
-COMMENT= FreeBSD ports/packages administration and management tool suite
-
-DISTVERSION= 20041224
-
-.if ${DISTVERSION} != ${PORTVERSION}
-PATCH_SITES= ${MASTER_SITES}
-PATCH_SITE_SUBDIR= ${MASTER_SITE_SUBDIR}
-PATCHFILES= ${DISTNAME}-${PORTVERSION}.diff.bz2
-PATCH_DIST_STRIP= -p1
-.endif
-
-OPTIONS= BDB4 "Use Berkeley DB >=2 as backend. (Use BDB 1.85 if off)" off
-
-USE_RC_SUBR= yes
-USE_BZIP2= yes
-USE_RUBY= yes
-USE_RUBY_FEATURES= optparse ruby18
-USE_PERL5_RUN= yes
-
-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>
-
-.if defined(WITH_BDB4)
-# For PKG_DBDRIVER={bdb_btree,bdb_hash,bdb}
-RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/bdb.so:${PORTSDIR}/databases/ruby-bdb
-.else
-RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/bdb1.so:${PORTSDIR}/databases/ruby-bdb1
-.endif
-
-# 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 607f7ef6d1e9..000000000000
--- a/ports-mgmt/portupgrade/distinfo
+++ /dev/null
@@ -1,4 +0,0 @@
-MD5 (pkgtools-20041224.tar.bz2) = 1c69732e569fa423152cc792d2c40113
-SIZE (pkgtools-20041224.tar.bz2) = 104308
-MD5 (pkgtools-20041224-20041226.diff.bz2) = aab3f2885424d5f25c8ab08d48da5f34
-SIZE (pkgtools-20041224-20041226.diff.bz2) = 1086
diff --git a/ports-mgmt/portupgrade/files/patch-CAN-2005-0610 b/ports-mgmt/portupgrade/files/patch-CAN-2005-0610
deleted file mode 100644
index 415dca4bff3c..000000000000
--- a/ports-mgmt/portupgrade/files/patch-CAN-2005-0610
+++ /dev/null
@@ -1,75 +0,0 @@
-diff -ur ../orig.pkgtools-20041224/lib/pkgdb.rb ./lib/pkgdb.rb
---- ../orig.pkgtools-20041224/lib/pkgdb.rb Wed Mar 23 21:37:47 2005
-+++ ./lib/pkgdb.rb Sun May 22 00:39:38 2005
-@@ -96,8 +96,7 @@
- @db_dir = File.expand_path(new_db_dir || ENV['PKG_DBDIR'] || '/var/db/pkg')
-
- @db_file = File.join(@db_dir, 'pkgdb.db')
-- @tmp_dir = ENV['PKG_TMPDIR'] || ENV['TMPDIR'] || '/var/tmp'
-- @fixme_file = File.join(@tmp_dir, 'pkgdb.fixme')
-+ @fixme_file = ENV['PKG_FIXME_FILE'] || "/var/db/pkgdb.fixme"
- @db_filebase = @db_file.sub(/\.db$/, '')
- close_db
-
-Only in ./lib: pkgdb.rb~
-diff -ur ../orig.pkgtools-20041224/lib/pkgmisc.rb ./lib/pkgmisc.rb
---- ../orig.pkgtools-20041224/lib/pkgmisc.rb Wed Mar 23 21:37:47 2005
-+++ ./lib/pkgmisc.rb Thu May 5 14:09:37 2005
-@@ -95,3 +95,31 @@
- end
- end
- end
-+
-+def init_tmpdir
-+ if ! $tmpdir.nil? && $tmpdir != "" then
-+ return
-+ end
-+ maintmpdir = ENV['PKG_TMPDIR'] || ENV['TMPDIR'] || '/var/tmp'
-+ if !FileTest.directory?(maintmpdir)
-+ raise "Temporary directory #{maintmpdir} does not exist"
-+ end
-+
-+ cmdline = shelljoin("/usr/bin/mktemp", "-d", maintmpdir + "/portupgradeXXXXXXXX")
-+ pipe = IO.popen(cmdline)
-+ tmpdir = pipe.gets
-+ pipe.close
-+ if $? != 0 || tmpdir.nil? || tmpdir.length == 0
-+ raise "Could not create temporary directory in #{maintmpdir}"
-+ end
-+ tmpdir.chomp!
-+
-+ at_exit {
-+ begin
-+ Dir.delete(tmpdir)
-+ rescue
-+ warning_message "Could not clean up temporary directory: " + $!
-+ end
-+ }
-+ $tmpdir=tmpdir
-+end
-diff -ur ../orig.pkgtools-20041224/lib/pkgsqldb.rb ./lib/pkgsqldb.rb
---- ../orig.pkgtools-20041224/lib/pkgsqldb.rb Wed Mar 23 21:37:47 2005
-+++ ./lib/pkgsqldb.rb Sun May 22 00:42:04 2005
-@@ -73,8 +73,7 @@
- @db_dir = File.expand_path(new_db_dir || ENV['PKG_DBDIR'] || '/var/db/pkg')
-
- @db_file = File.join(@db_dir, 'pkgdb.sqldb')
-- @tmp_dir = ENV['PKG_TMPDIR'] || ENV['TMPDIR'] || '/var/tmp'
-- @fixme_file = File.join(@tmp_dir, 'pkgdb.fixme')
-+ @fixme_file = ENV['PKG_FIXME_FILE'] || "/var/db/pkgdb.fixme"
- close_db
-
- @db_dir
-Only in ./lib: pkgsqldb.rb~
-diff -ur ../orig.pkgtools-20041224/lib/pkgtools.rb ./lib/pkgtools.rb
---- ../orig.pkgtools-20041224/lib/pkgtools.rb Wed Mar 23 21:37:47 2005
-+++ ./lib/pkgtools.rb Tue May 3 19:29:59 2005
-@@ -204,7 +204,7 @@
- $ports_dir = $portsdb.ports_dir
- $packages_base = ENV['PACKAGES'] || File.join($ports_dir, 'packages')
- $packages_dir = File.join($packages_base, 'All')
-- $tmpdir = ENV['PKG_TMPDIR'] || ENV['TMPDIR'] || '/var/tmp'
-+ init_tmpdir
- $pkg_path = ENV['PKG_PATH'] || $packages_dir
-
- $pkg_sites = (ENV['PKG_SITES'] || '').split
diff --git a/ports-mgmt/portupgrade/files/patch-Makefile.compat b/ports-mgmt/portupgrade/files/patch-Makefile.compat
deleted file mode 100644
index 731d4409da45..000000000000
--- a/ports-mgmt/portupgrade/files/patch-Makefile.compat
+++ /dev/null
@@ -1,11 +0,0 @@
---- ../orig.pkgtools-20041224/Makefile.compat Wed Mar 23 21:37:47 2005
-+++ Makefile.compat Sun May 22 00:46:39 2005
-@@ -89,7 +89,7 @@
- .endif
- .endif
-
--.endif defined(${group}) && !empty(${group})
-+.endif # defined(${group}) && !empty(${group})
- .endfor
-
- .endif
diff --git a/ports-mgmt/portupgrade/files/patch-bin-portsclean.1 b/ports-mgmt/portupgrade/files/patch-bin-portsclean.1
deleted file mode 100644
index e9c95e66154b..000000000000
--- a/ports-mgmt/portupgrade/files/patch-bin-portsclean.1
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: bin/portsclean.1
-===================================================================
---- bin/portsclean.1 (revision 32)
-+++ bin/portsclean.1 (revision 34)
-@@ -8,7 +8,7 @@
- .Nd a tool to clean ports/packages garbage
- .Sh SYNOPSIS
- .Nm
--.Op Fl hCDDinPPQQq
-+.Op Fl hCDDiLnPPQQq
- .Sh DESCRIPTION
- .Nm
- is a tool to help users clean out the working directories of their ports
-@@ -81,7 +81,9 @@
- .Pp
- .It Fl Q
- .It Fl -quiet
--Do not write anything to stdout. Specified twice, do not write
-+Do not write anything to stdout. Specified twice (i.e.
-+.Fl QQ ) ,
-+do not write
- anything to stderr either. This is for internal use.
- .Pp
- .It Fl q
diff --git a/ports-mgmt/portupgrade/files/patch-bin-portupgrade b/ports-mgmt/portupgrade/files/patch-bin-portupgrade
deleted file mode 100644
index 063d81beee94..000000000000
--- a/ports-mgmt/portupgrade/files/patch-bin-portupgrade
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: bin/portupgrade
-===================================================================
---- bin/portupgrade (revision 34)
-+++ bin/portupgrade (revision 36)
-@@ -1560,7 +1560,7 @@
-
- timer_start(time_key = "Installation of #{pkgname}")
-
-- cmdargs = [PkgDB::command(:pkg_add), '-f', pkgname]
-+ cmdargs = [PkgDB::command(:pkg_add), '-f', pkgfile]
-
- progress_message "Installing the new version via the package"
-
-@@ -1705,7 +1705,7 @@
- id_pkgname, id_origin, pkgdep = identify_pkg(file)
-
- if id_origin == origin
-- pkglist << [PkgInfo.new(id_pkgname), file]
-+ pkglist << [PkgInfo.new(id_pkgname), File.join(dir, file)]
- end
- }
- }
diff --git a/ports-mgmt/portupgrade/files/patch-etc-Makefile b/ports-mgmt/portupgrade/files/patch-etc-Makefile
deleted file mode 100644
index 31f27de19fec..000000000000
--- a/ports-mgmt/portupgrade/files/patch-etc-Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: etc/Makefile
-===================================================================
---- etc/Makefile (リビジョン 1049)
-+++ etc/Makefile (作業コピー)
-@@ -32,7 +32,8 @@
- ${script}: ${script:T}
- @mkdir -p ${BUILDDIR}
- ${RUBY} -p \
-- -e 'sub %r:/usr/local:, "${PREFIX}"' \
-+ -e 'sub(%r:/usr/local:, "${PREFIX}")' \
-+ -e 'sub(%r:(/etc/rc\.subr):, "${PREFIX}\\1") if !File.exist?("/etc/rc.subr")' \
- ${.ALLSRC} > ${.TARGET}
- .endfor
-
diff --git a/ports-mgmt/portupgrade/files/patch-lib_portsdb.rb b/ports-mgmt/portupgrade/files/patch-lib_portsdb.rb
deleted file mode 100644
index d4342c93f67b..000000000000
--- a/ports-mgmt/portupgrade/files/patch-lib_portsdb.rb
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/portsdb.rb.orig Tue Aug 2 10:24:50 2005
-+++ lib/portsdb.rb Tue Aug 2 10:25:17 2005
-@@ -846,7 +846,7 @@
-
- def all_depends_list(origin, before_args = nil, after_args = nil)
- if !before_args && !after_args && i = port(origin)
-- i.all_depends.map { |n| origin(n) }
-+ i.all_depends.map { |n| origin(n) }.compact
- else
- all_depends_list!(origin, before_args, after_args)
- end
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 04bfc7e22267..000000000000
--- a/ports-mgmt/portupgrade/pkg-plist
+++ /dev/null
@@ -1,41 +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/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 5034cc1af97f..000000000000
--- a/ports-mgmt/qtpkg/Makefile
+++ /dev/null
@@ -1,26 +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}"
-
-PLIST_FILES= sbin/qtpkg
-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 5be4b05f5b8d..000000000000
--- a/ports-mgmt/qtpkg/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 (qtpkg.tar.gz) = 0910416a0c23240e3f71d77f825618da
-SIZE (qtpkg.tar.gz) = 7308
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/vulnerability-test-port/Makefile b/ports-mgmt/vulnerability-test-port/Makefile
deleted file mode 100644
index 27642976798e..000000000000
--- a/ports-mgmt/vulnerability-test-port/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-# New ports collection makefile for: vulnerability-test-port
-# Date created: 25 Jan 2004
-# Whom: Oliver Eikemeier
-#
-# $FreeBSD$
-#
-
-PORTNAME= vulnerability-test-port
-PORTVERSION= ${INSTALLATION_DATE}
-CATEGORIES= security
-DISTFILES=
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Standard vulnerability test for port auditing systems
-
-NO_BUILD= yes
-
-.if defined(PARALLEL_PACKAGE_BUILD)
-IGNORE= is disabled on package building systems
-INSTALLATION_DATE= 2004.01.25
-.else
-.ifdef INSTALLATION_DATE
-MYDATE!= date -j -f "%Y.%m.%d" "${INSTALLATION_DATE}" "+%Y.%m.%d" 2>/dev/null
-.if ${MYDATE} != ${INSTALLATION_DATE}
-IGNORE= ": \`\`${INSTALLATION_DATE}\'\' is not a legal date. INSTALLATION_DATE must be in the form YYYY.MM.DD"
-.endif
-.else
-INSTALLATION_DATE!= date -u "+%Y.%m.%d"
-.endif
-.endif
-
-do-install:
- @${DO_NADA}
-
-.include <bsd.port.mk>
diff --git a/ports-mgmt/vulnerability-test-port/pkg-descr b/ports-mgmt/vulnerability-test-port/pkg-descr
deleted file mode 100644
index a07e1b34e991..000000000000
--- a/ports-mgmt/vulnerability-test-port/pkg-descr
+++ /dev/null
@@ -1,20 +0,0 @@
-This is a package to test FreeBSD port auditing systems, e.g. portaudit
-and the upcoming VuXML based system. Even though it installs no files,
-it is registered in the local package database.
-
-Its version number is automagically the installation date, so that you
-can update it every day ;-) If the date is off by one day keep in mind
-that the date is in UTC which may differ from your local time up to
-twelve hours, depending on the time zone you live in.
-
-The portaudit database lists yesterday's vulnerability test port as
-vulnerable so that it should appear in your security report approximately
-after a week, depending on the synchronization schedule of your database.
-
-If you try install the port with
- make INSTALLATION_DATE=`date -u -v-14d "+%Y.%m.%d"` install
-the port is instantly flagged as vulnerable and the ports system should
-hinder you installing it (currently not implemented), otherwise your
-vulnerability database is too old.
-
-Oliver Eikemeier <eik@FreeBSD.org>