Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Oct 1998 14:46:19 +0200
From:      Wolfram Schneider <wosch@cs.tu-berlin.de>
To:        Brian Nelson <notgod@notgod.com>, www@FreeBSD.ORG
Cc:        ports@FreeBSD.ORG
Subject:   ports INDEX perl Module (Re: webmastering....)
Message-ID:  <19981020144619.A8784@caramba.cs.tu-berlin.de>
In-Reply-To: <3627B579.65C605F9@notgod.com>; from Brian Nelson on Fri, Oct 16, 1998 at 02:07:05PM -0700
References:  <3627B579.65C605F9@notgod.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1998-10-16 14:07:05 -0700, Brian Nelson wrote:
> I hear from jkh that you may need some assistance.
> 
> I don't have tons of time, but I have developed some perl tools that may
> be helpful...  document indexing scripts and the like.
> 
> Let me know if you want any help.  If anything, I am a warm body that
> can post documents, etc.

>From my TODO list:

We need someone who rewrite our ports INDEX perl scripts.
The first step is to write a ports INDEX perl Module.
Contact: wosch@freebsd.org


1. A single line in /usr/ports/INDEX looks like:

   xfig-3.2.2|/usr/ports/graphics/xfig|/usr/X11R6|A drawing program for X11|/usr/ports/graphics/xfig/pkg/DESCR|ports@FreeBSD.ORG|graphics x11|XFree86-3.3.2 Xaw3d-1.3 jpeg-6b xpm-3.4k|XFree86-3.3.2 Xaw3d-1.3 jpeg-6b netpbm-94.3.1 tiff-3.4 transfig-3.2 xpm-3.4k


2. The format is

   distribution-name|port-path|installation-prefix|comment| \
       description-file|maintainer|categories|build deps|run deps

3. The above INDEX line parsed into an anonymous hash object:

$port = {	
	DISTRIBUTION_NAME   => 'xfig-3.2.2',
	PORT_PATH           => '/usr/ports/graphics/xfig',
	INSTALLATION_PREFIX => '/usr/X11R6',
	COMMENT             => 'A drawing program for X11',
	DESCRIPTION_FILE    => '/usr/ports/graphics/xfig/pkg/DESCR',
	MAINTAINER          => 'ports@FreeBSD.ORG',
	CATEGORIES          => ['graphics', 'x11'],
	BUILD_DEPS          => ['XFree86-3.3.2', 'Xaw3d-1.3', 'jpeg-6b', 
	                        'xpm-3.4k'],
	RUN_DEPS            => ['XFree86-3.3.2',  'Xaw3d-1.3', 'jpeg-6b',
				'netpbm-94.3.1', 'tiff-3.4', 'transfig-3.2',
				'xpm-3.4k'] 
};

4. Now we need some functions:

Print a $port object as HTML output
Print a $port object as ASCII output
Find all objects which are maintained by user XYZ
Find all objects which are in category XYZ
Find all objects which run/build depend on port XYZ
Find all objects which match the string XYZ in DISTRIBUTION_NAME
  or COMMENT
Sort objects by DISTRIBUTION_NAME 


5. Finally, modify the cgi script url.cgi, ports.cgi , pds.cgi 
and the script portindex to use this module.

-- 
Wolfram Schneider <wosch@freebsd.org> http://freebsd.org/~w/ 
FreeBSD Webmaster

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981020144619.A8784>