Subject: Re: Request for a pkgsrc version of 'git'
To: None <tech-pkg@netbsd.org>
From: None <wa1ter@myrealbox.com>
List: tech-pkg
Date: 11/12/2005 05:58:16
On Thu, 10 Nov 2005, Masao Uebayashi wrote:

> Date: Thu, 10 Nov 2005 12:01:20 +0900 (JST)
> From: Masao Uebayashi <uebayasi@brains.co.jp>
> Cc: tech-pkg@NetBSD.org
> Newsgroups: gmane.os.netbsd.devel.packages
> Subject: Re: Request for a pkgsrc version of 'git'
>
> Last I looked, there was wrapper scripts by which the latest Linux
> kernel source can be retrieved.  I didn't proceed because the scripts
> used Bash (and u*ly).
>
> Could you port those scripts so that they run on NetBSD, hopefully
> without Bash?  I can help pkgsrc task, but I don't want to do Bash.  I
> think this is a fair trade-off. :-)

I have git and cogito (the wrapper scripts) working now on NetBSD, but
I did it by compiling git manually using gmake.  I also modified the
git Makefile like this:

--- Makefile.orig	2005-11-12 05:06:55.000000000 -0800
+++ Makefile
@@ -212,6 +212,10 @@ ifeq ($(uname_S),OpenBSD)
 	NEEDS_LIBICONV = YesPlease
 	ALL_CFLAGS += -I/usr/local/include -L/usr/local/lib
 endif
+ifeq ($(uname_S),NetBSD)
+	NEEDS_LIBICONV = YesPlease
+	ALL_CFLAGS += -I/usr/pkg/include -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib
+endif
 ifneq (,$(findstring arm,$(uname_M)))
 	ARM_SHA1 = YesPlease
 endif

git also needs these packages: wget, curl, libiconv, python, and gmake.

The tarballs for git and cogito are here:
http://www.kernel.org/pub/software/scm/git-core/git-core-0.99.9g.tar.gz
http://www.kernel.org/pub/software/scm/cogito/cogito-0.15.1.tar.gz

I also had to do ulimit -n 1024 before I could actually use cg-clone
to clone the git repository -- but it worked with no modifications!

To install git and cogito to the correct place you need to do this:
gmake prefix=/usr/pkg install

Unfortunately I don't understand pkgsrc well enough to put the
packages together myself.  Any help would be much appreciated!