Date: Fri, 5 Aug 2005 09:21:40 +0200 From: Anton Berezin <tobez@freebsd.org> To: perl@freebsd.org Subject: automated p5 ports creation Message-ID: <20050805072140.GA45501@heechee.tobez.org>
next in thread | raw e-mail | index | archive | help
--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 <tobez@FreeBSD.org> # # $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 <bsd.port.mk> # .... or .... .include <bsd.port.pre.mk> .if ${PERL_LEVEL} < 500600 IGNORE= Port requires perl 5.6.0 or later. Install lang/perl5 and try again .endif .include <bsd.port.post.mk> --6TrnltStXW4iwmi0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050805072140.GA45501>