From owner-freebsd-ports@FreeBSD.ORG Fri Sep 11 01:01:09 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 F00151065672 for ; Fri, 11 Sep 2009 01:01:09 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: from mail-qy0-f200.google.com (mail-qy0-f200.google.com [209.85.221.200]) by mx1.freebsd.org (Postfix) with ESMTP id A11C58FC1B for ; Fri, 11 Sep 2009 01:01:09 +0000 (UTC) Received: by qyk38 with SMTP id 38so594204qyk.27 for ; Thu, 10 Sep 2009 18:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:to:subject :references:date:mime-version:content-transfer-encoding:from :message-id:in-reply-to:user-agent; bh=HIb3GbZBZjxWRdzMqwLi9ryqQS/B/oZ6F+Qu7iU3+8g=; b=CBDWTSeONshIV+52MWAinJp2i4eEeeYltgCj8LUI509OfGEYpR01vyOi0ojrzEeTzA 5cCK+ko77fG+GmCzdZnko2fynXhh+ddSIknSrWTVJQUhcy/N8CJZmGomPaKCBpw4TRjY M6cCPHfQ2l+e1qo/sCCoAZJHFPpwPxbZ9HXDY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:to:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; b=Whm9xdCGn1tZjKSANc7YWajXZUQNdekoyyosYtQkNJEraYhyfB+hgDYv9PEIoos+aY G8fiRLqILAMemSj5qcfdv8I7EIFhF6HwUu6hUI788dTVtU16RaunqiW8OmmleZ1ttQhm eSOcHN6B0W+N3DzhJAvbnrZulFkbrV4xLXs3o= Received: by 10.224.36.103 with SMTP id s39mr2062721qad.74.1252630865748; Thu, 10 Sep 2009 18:01:05 -0700 (PDT) Received: from localhost (c-71-230-240-241.hsd1.pa.comcast.net [71.230.240.241]) by mx.google.com with ESMTPS id 5sm425976qwg.49.2009.09.10.18.01.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 10 Sep 2009 18:01:04 -0700 (PDT) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: "Tim Gustafson" , freebsd-ports@freebsd.org References: <268690413.1237231252629385121.JavaMail.root@mail-01.cse.ucsc.edu> Date: Thu, 10 Sep 2009 20:58:24 -0400 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Glen Barber" Message-ID: In-Reply-To: <268690413.1237231252629385121.JavaMail.root@mail-01.cse.ucsc.edu> User-Agent: Opera Mail/10.00 (FreeBSD) Cc: 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: Fri, 11 Sep 2009 01:01:10 -0000 Hi. On Thu, 10 Sep 2009 20:36:25 -0400, 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: [snip] > 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? > You will want to create a '-patch' line in the Makefile. See the following as a reference: http://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html > 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? > You can create a ${PORTNAME}/files directory containing the file(s) you need, specific to your port and FreeBSD. See the following link for more information: http://www.freebsd.org/doc/en/books/porters-handbook/install.html > 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: > [snip] Sorry. There are lots of experienced folks who can help with C errors. I, unfortunately, am not one of them. You may want to bookmark this, as well: http://www.freebsd.org/doc/en/books/porters-handbook/ Cheers, -- Glen Barber