Date: Sun, 24 Sep 2000 03:45:26 +0200 From: Neil Blakey-Milner <nbm@mithrandr.moria.org> To: FreeBSD Ports <ports@FreeBSD.org> Subject: makeport part deux - automated port creation tools. Message-ID: <20000924034526.A46867@mithrandr.moria.org>
next in thread | raw e-mail | index | archive | help
Hi, For some time, I've been using a script called "makeport.pl" to auto-generate port skeletons for new ports. Unfortunately, just as I was about to release it to the world, a whole slew of changes hit the ports tree, and it was way out of date. I'm now recreating the automated generation tools, and they're available at http://mithrandr.moria.org/nbm/mkptools/ . mkpskel takes a tarball and creates an empty ports skeleton in a directory. It'll guess what PORTNAME, PORTVERSION, DISTNAME, and friends are supposed to be. For example gopher2_3.tar.gz becomes: PORTNAME= gopher PORTVERSION= 2.3 DISTNAME= gopher2_3 But bzip2-1.0.1.tar.gz becomes: PORTNAME= bzip2 PORTVERSION= 1.0.1 And Squishdot-0-7-1.tar.gz (incorrectly, due to capitalization) becomes: PORTNAME= Squishdot PORTVERSION= 0.7.1 DISTNAME= Squishdot-0-7-1 And so on. mkpextr extracts the tarball, and figures a few things out. Firstly, it works out what WRKSRC or NO_WRKSUBDIR should be set to, if necessary. Then it checks if there's a Makefile, and sets NO_BUILD and NO_INSTALL if not, or finds the right Makefile. It then checks for 'configure', and sees what options it recognizes in there. For gview, I get: LIB_DEPENDS= gtk12.2:${PORTSDIR}/x11-toolkits/gtk12 GNU_CONFIGURE= YES CONFIGURE_ENV= GTK_CONFIG="${GTK_CONFIG}" GTK_CONFIG= ${X11BASE}/bin/gtk12-config For gicq, I get: LIB_DEPENDS= gnome.4:${PORTSDIR}/x11/gnomelibs \ gtk12.2:${PORTSDIR}/x11-toolkits/gtk12 GNU_CONFIGURE= YES CONFIGURE_ENV= GTK_CONFIG="${GTK_CONFIG}" GTK_CONFIG= ${X11BASE}/bin/gtk12-config For kicq, I get: LIB_DEPENDS= kdecore.4:${PORTSDIR}/x11/kdelibs2 GNU_CONFIGURE= YES USE_QT= YES mkpmerge merges the result of mkpskel and mkpextr, in a way that allows it to be run as often as desired - it places # -- eos --- at the end of Makefile after mkpskel, and mkpextr after it. mkpclean removes Makefile.extr, Makefile.old, and 'make clean's. Anyway, I've only just got back to hacking on these. makeport.pl also attempted USE_GMAKE if 'make' failed in a specific way, and searched for ALL_TARGET, if it wasn't 'all'. Anyway, I'd love some comments. Cheers, Neil -- Neil Blakey-Milner Sunesi Clinical Systems nbm@mithrandr.moria.org 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?20000924034526.A46867>