From owner-freebsd-ports@FreeBSD.ORG Tue Sep 15 12:58:53 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34AA6106566B for ; Tue, 15 Sep 2009 12:58:53 +0000 (UTC) (envelope-from mel.flynn+fbsd.ports@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id F22338FC08 for ; Tue, 15 Sep 2009 12:58:52 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.lan.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 2CB2C7E818; Tue, 15 Sep 2009 04:59:05 -0800 (AKDT) From: Mel Flynn To: freebsd-ports@freebsd.org Date: Tue, 15 Sep 2009 14:58:50 +0200 User-Agent: KMail/1.12.1 (FreeBSD/8.0-BETA4; KDE/4.3.1; i386; ; ) References: <268690413.1237231252629385121.JavaMail.root@mail-01.cse.ucsc.edu> In-Reply-To: <268690413.1237231252629385121.JavaMail.root@mail-01.cse.ucsc.edu> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200909151458.50325.mel.flynn+fbsd.ports@mailing.thruhere.net> Cc: Tim Gustafson Subject: Re: Creating a New Port: /usr/ports/security/pecl-kadm5 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2009 12:58:53 -0000 On Friday 11 September 2009 02:36:25 Tim Gustafson wrote: > I'm trying to create a new port. To get myself started, I copied pecl-hash > and then modified the Makefile and the distinfo file. When I try to make > my port, it downloads the file from the PECL repository, extracts it, runs > configure and then starts compiling, but in the end I get a bunch of > errors from cc about undefined constants: > > kadm5.c: In function 'kadm5_error': > kadm5.c:285: error: 'KADM5_FAILURE' undeclared (first use in this function) > kadm5.c:285: error: (Each undeclared identifier is reported only once > kadm5.c:285: error: for each function it appears in.) > kadm5.c:288: error: 'KADM5_AUTH_GET' undeclared (first use in this > function) kadm5.c:291: error: 'KADM5_AUTH_ADD' undeclared (first use in > this function) > > So, I manually edited work/kadm5-0.2.3/kadm5.c and added: > > #include "kadm5/kadm5_err.h" > > That file has -most- of the needed declarations, but there are a few more > that aren't there, and I'm thinking the version of Kerberos that's > installed in FreeBSD 7.2 just doesn't have those declarations (the two > missing declarations are for KADM5_AUTH_SETKEY and > KADM5_SETKEY_DUP_ENCTYPES). > > So, my first question is: How can I tell my port to patch > work/kadm5-0.2.3/kadm5.c with the needed line above? > > My second question is: Is there a "proper way" to hack the needed values > into kadm5_err.h? Should I make a new .h file and include it as part of > the port only? > > And last but not least: > > After I manually patched the kadm5.c file and hacked the missing > declarations into kadm5_err.h, I get a different set of errors: > > kadm5.c: In function 'kadm5_error': > kadm5.c:440: error: label at end of compound statement > kadm5.c: In function 'zif_kadm5_get_principals': > kadm5.c:1048: warning: passing argument 3 of 'kadm5_free_name_list' makes > pointer from integer without a cast kadm5.c: In function > 'zif_kadm5_get_policies': > kadm5.c:1184: warning: passing argument 3 of 'kadm5_free_name_list' makes > pointer from integer without a cast > > Now, I am not a C programmer. I took a C class in about 1996 and that's > more or less the last I've done in C. Is there anyone out there who might > be kind enough to help me get this port working? I have a real need for > Kerberos administration from within PHP, and this PECL library being > absent has been a stumbling block for a long time now. Could shar(1) your current work? I can likely fix the issues you're seeing, but it would be nice if you can save me some cycles finding the urls and making the distinfo. How to shar a port is I think covered in the porters handbook. In short: cd /usr/ports shar `find category/portname -type f` >/tmp/portname.sh. -- Mel