From owner-freebsd-ports@FreeBSD.ORG Fri Sep 11 00:51:52 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 398E0106568B for ; Fri, 11 Sep 2009 00:51:52 +0000 (UTC) (envelope-from tjg@soe.ucsc.edu) Received: from mail-01.cse.ucsc.edu (mail-01.cse.ucsc.edu [128.114.48.32]) by mx1.freebsd.org (Postfix) with ESMTP id 1F8D88FC21 for ; Fri, 11 Sep 2009 00:51:51 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail-01.cse.ucsc.edu (Postfix) with ESMTP id 4FE651008BE1 for ; Thu, 10 Sep 2009 17:36:25 -0700 (PDT) X-Virus-Scanned: amavisd-new at mail-01.cse.ucsc.edu Received: from mail-01.cse.ucsc.edu ([127.0.0.1]) by localhost (mail-01.cse.ucsc.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1YxnyvVM4zUW for ; Thu, 10 Sep 2009 17:36:25 -0700 (PDT) Received: from mail-01.cse.ucsc.edu (mail-01.cse.ucsc.edu [128.114.48.32]) by mail-01.cse.ucsc.edu (Postfix) with ESMTP id 332BF10084CE for ; Thu, 10 Sep 2009 17:36:25 -0700 (PDT) Date: Thu, 10 Sep 2009 17:36:25 -0700 (PDT) From: Tim Gustafson To: freebsd-ports@freebsd.org Message-ID: <268690413.1237231252629385121.JavaMail.root@mail-01.cse.ucsc.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [128.114.49.22] X-Mailer: Zimbra 5.0.15_GA_2851.RHEL5_64 (ZimbraWebClient - FF3.0 (Win)/5.0.15_GA_2851.RHEL5_64) Subject: 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: Fri, 11 Sep 2009 00:51:52 -0000 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. Tim Gustafson Baskin School of Engineering UC Santa Cruz tjg@soe.ucsc.edu 831-459-5354