From owner-freebsd-ports@FreeBSD.ORG Wed Feb 16 21:12:10 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64B0516A4CE for ; Wed, 16 Feb 2005 21:12:10 +0000 (GMT) Received: from smtp.xbsd.org (xbsd.org [82.233.2.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC7A243D4C for ; Wed, 16 Feb 2005 21:12:09 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from localhost (localhost.xbsd.org [127.0.0.1]) by smtp.xbsd.org (Postfix) with ESMTP id 79E0C1161B; Wed, 16 Feb 2005 22:13:00 +0100 (CET) Received: from smtp.xbsd.org ([127.0.0.1]) by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 37716-03; Wed, 16 Feb 2005 22:12:52 +0100 (CET) Received: from [192.168.42.3] (innercity.xbsd.org [192.168.42.3]) by smtp.xbsd.org (Postfix) with ESMTP id 49A50114BE; Wed, 16 Feb 2005 22:12:52 +0100 (CET) Message-ID: <4213B71B.4070601@xbsd.org> Date: Wed, 16 Feb 2005 22:11:55 +0100 From: Florent Thoumie User-Agent: Mozilla Thunderbird 1.0 (X11/20050107) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alejandro Pulver References: <20050116175951.20a95dfe@ale.varnet.bsd> In-Reply-To: <20050116175951.20a95dfe@ale.varnet.bsd> X-Enigmail-Version: 0.89.6.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4430DB5C88421A7995F2B5C4" X-Virus-Scanned: amavisd-new at xbsd.org cc: freebsd-ports@freebsd.org Subject: Re: Questions about creating a port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2005 21:12:10 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4430DB5C88421A7995F2B5C4 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Alejandro Pulver wrote: > Hello, > > I want to create a port of the modified version of 'generator' called 'generator-cbiere'. > > I partially made the port: it compiles and runs, but I have some questions about the distribution, installation, patching, compiler warnings and type decalrations. > > Distribution: > > The program is distributed by the author as a (complete) compressed (tar/bz2) source called 'generator-0.35-cbiere.tar.bz2', or as a compressed (bz2) patch called 'generator-0.35-cbiere.udiff.bz2' (that must be applied to the original version of 'generator'). > > Both are called in a non-standard format ("${PORTNAME}${PORTVERSION}-cbiere"), I think it should be 'generator-cbiere-0.35'. So (for using the complete source) I have to change ${DISTFILES} (or ${DISTNAME} and ${EXTRACT_SUFX}) and ${WORKSRC}, or upload that file to my server with the correct name. > > Which one is the best method to distribute the port (full source or patch)? Can I include the patch (96386 bytes) directly in the 'files/' directory of the port? I'll use full source, and modify DISTFILES, try to use upstream sites. > Installation: > > The program is installed as 'bin/generator-gtk', like 'generator' (the original version), so they will conflict. How can I avoid this (I mean how to rename the binary 'generator-gtk' to 'generator-cbiere-gtk')? You can either set CONFLICTS or use in-line editing (USE_REINPLACE and REINPLACE_CMD) to modify the Makefile so that it installs generator binary under a different name. > Compiler warnings: > > There are (a lot of) compiler warnings about unused variables. The original port ('generator') does not show them, so I suppose the responsible is who did the patch. Should I fix them? You can try to fix them removing unused variables and sending patches upstream (to the developers). I guess you could use : CFLAGS += -Wno-unused too. > Type decalrations: > > The modified version (generator-cbiere) did not compile because there was an invalid type declaration "u_int64_t", that I changed into "uint64_t". Then I noticed declarations saying "uint8", and I think the standard defines it as "uint8_t". Should I change them? Just do a patch, or use REINPLACE_CMD. > Patching: > > In almost all the cases I will end with more than one patch, so: should I use different patches or merge them in one? Try to create a patch for each file modified and name it like these : x patch-src::Makefile.in if the patch modifies ${WRKDIR}/src/Makefile.in. x patch-foo.c if the patch modifies ${WRKDIR}/foo.c. Put these patches in ${FILESDIR} (files/). -- Florent Thoumie flz@xbsd.org --------------enig4430DB5C88421A7995F2B5C4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCE7cfMxEkbVFH3PQRAttIAJ9idR3QigEksO3ulelFI0f85U0KrgCdELAK IWftR1NlEyI9f4fFFgp1BBs= =qAkX -----END PGP SIGNATURE----- --------------enig4430DB5C88421A7995F2B5C4--