Date: Wed, 16 Feb 2005 22:11:55 +0100 From: Florent Thoumie <flz@xbsd.org> To: Alejandro Pulver <alejandro@varnet.biz> Cc: freebsd-ports@freebsd.org Subject: Re: Questions about creating a port Message-ID: <4213B71B.4070601@xbsd.org> In-Reply-To: <20050116175951.20a95dfe@ale.varnet.bsd> References: <20050116175951.20a95dfe@ale.varnet.bsd>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4213B71B.4070601>