From owner-freebsd-perl@FreeBSD.ORG Fri Aug 5 07:21:43 2005 Return-Path: X-Original-To: perl@freebsd.org Delivered-To: freebsd-perl@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72CCC16A41F for ; Fri, 5 Aug 2005 07:21:43 +0000 (GMT) (envelope-from tobez@tobez.org) Received: from heechee.tobez.org (heechee.tobez.org [217.157.39.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id B792C43D49 for ; Fri, 5 Aug 2005 07:21:42 +0000 (GMT) (envelope-from tobez@tobez.org) Received: by heechee.tobez.org (Postfix, from userid 1001) id 9D66A12546C; Fri, 5 Aug 2005 09:21:40 +0200 (CEST) Date: Fri, 5 Aug 2005 09:21:40 +0200 From: Anton Berezin To: perl@freebsd.org Message-ID: <20050805072140.GA45501@heechee.tobez.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Powered-By: FreeBSD http://www.freebsd.org/ Cc: Subject: automated p5 ports creation X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2005 07:21:43 -0000 --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Just saw this subject to come up on IRC (again). So it is probably a good time to share what I already have. Actually, everybody with a relatively modern lang/perl5.8 installed has it as a BSDPAN secret mode, dubbed P5PORTER mode :-) The P5PORTER mode operation assumes that you have YAML and Template-Toolkit installed. 1. Create a directory somewhere (I've used ~/perl-ports), and copy attached Makefile.skeleton to it. Edit it to your liking. 2. Choose some CPAN distribution which should be in ports but for some reason is not. 3. Download. Unpack somewhere. cd somewhere. 4. Run P5PORTER=~/perl-ports perl Makefile.PL Pay attention to the output. In particular, BSDPAN is supposed to warn you about dependencies it cannot resolve, as well as about dependencies which are in the ports collection but which are not currently installed. This process is at the moment very heuristic (that is, dumb). Resolve the dependencies, create ports for non-existing ones (possibly using the same procedure), install the dependencies. make realclean; repeat (4) until all dependencies are reported as installed. 5. Run P5PORTER=~/perl-ports make 6. if (5) works, run make test. If any patching is needed, record the patches somewhere. 7. if (6) works, go root and run P5PORTER=~/perl-ports make install 8. pkg_delete bsdpan-Correct-Distribution-Name-0.42 Clean up any files/dirs pkg_delete failed to delete for some reason (there should not be any). 9. Go to ~/perl-ports/p5-Correct-Distribution-Name Review and fix Makefile and pkg-plist. Copy the directory to /usr/ports/right_place. Do make makesum 10. Proceed with normal testing/fixing cycle for a brand new port. 11. Add the port or send a PR with it. Needless to say, this will probably only work for the simple cases, and is by no means fool-proof. Enjoy, \Anton. -- The moronity of the universe is a monotonically increasing function. -- Jarkko Hietaniemi --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="Makefile.skeleton" # New ports collection makefile for: XXX/p5-[% portname %] # Date created: [% today %] # Whom: Anton Berezin # # $FreeBSD$ # PORTNAME= [% portname %] PORTVERSION= [% portversion %] CATEGORIES= XXX perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} # if this is wrong, fix it by hand MASTER_SITE_SUBDIR= [% subdir %] PKGNAMEPREFIX= p5- MAINTAINER= tobez@FreeBSD.org COMMENT= [% comment %] [% IF has_dependencies %]BUILD_DEPENDS= [% freebsd_dependencies %] RUN_DEPENDS= ${BUILD_DEPENDS} [% END %]PERL_CONFIGURE= yes MAN3= [% man3 %] .include # .... or .... .include .if ${PERL_LEVEL} < 500600 IGNORE= Port requires perl 5.6.0 or later. Install lang/perl5 and try again .endif .include --6TrnltStXW4iwmi0--