# git on OpenBSD

3 messages from 2005-10-01 to 2005-10-01. Participants: Han Boetes, Junio C Hamano, Martin Langhoff.
Thread: https://gitlist.dev/t/1989

## Han Boetes, 2005-10-01 06:23

Subject: git on OpenBSD
Message-ID: <20051001062348.GA7903@boetes.org>
URL: https://gitlist.dev/e/20051001062348.GA7903%40boetes.org

```
Hi,

I just managed to get git compile on OpenBSD,

I modified the Makefile a bit to make it work. I suppose these
modifications will make it work on Free- and NetBSD as well, but
I haven't tested it so I'm not sure.

iconv is installed in /usr/local that's why I had to add it to the
searchpath.


diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -162,6 +162,10 @@ ifeq ($(shell uname -s),Darwin)
 	NEEDS_SSL_WITH_CRYPTO = YesPlease
 	NEEDS_LIBICONV = YesPlease
 endif
+ifeq ($(shell uname -s),OpenBSD)
+	NEEDS_LIBICONV = YesPlease
+	PLATFORM_DEFINES += -I/usr/local/include -L/usr/local/lib
+endif
 ifeq ($(shell uname -s),SunOS)
 	NEEDS_SOCKET = YesPlease
 	NEEDS_NSL = YesPlease




# Han
-- 
Lbh unir whfg ivbyngrq gur Qvtvgny Zvyyraavhz Pbclevtug Npg  ol  oernxvat  gur
cebgrpgvba bs pbclevtugrq zngrevny. Vs lbh ner abg n pvgvmra  be  erfvqrag  bs
gur HFN, lbh evfx orvat vzcevfbarq naq uryq jvgubhg onvy sbe hc gb  gjb  jrrxf
hcba ragel gb gur HFN (c) Copyright 2001 by Hartmann Schaffer (signature only)

```

## Junio C Hamano, 2005-10-01 07:15

Subject: Re: git on OpenBSD
Message-ID: <7v7jcxaesy.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v7jcxaesy.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20051001062348.GA7903@boetes.org>

```
Han Boetes <han@mijncomputer.nl> writes:

> iconv is installed in /usr/local that's why I had to add it to the
> searchpath.

Is it the standard practice to have iconv in /usr/local on
OpenBSD, or is it just your particular setup?  If the former
that's fine, but if the latter, I am afraid that this change
does not belong to the PLATFOR_DEFINES of the Makefile.

I had to work this exact issue around on a borrowed Solaris box
today (eh, yesterday), and near the proposed update branch head
there is a commit to let you specify where to find iconv stuff
from the command line of the make (or gmake).  The box had some
home compiled stuff in unusual places, so the site specific
things are made configurable via make command line, without
hardcoding particular value in the Makefile.

In either case, thanks for the patch, and please let me know
about the /usr/local vs iconv issue.  If the answer is "yes
iconv is in /usr/local everywhere on a vanilla OpenBSD box",
then I'll queue this patch on top of my today's Solaris
portability patch.

```

## Martin Langhoff, 2005-10-01 09:57

Subject: Re: git on OpenBSD
Message-ID: <46a038f90510010257s53c1e3eas64b3fb9e57b594a1@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90510010257s53c1e3eas64b3fb9e57b594a1%40mail.gmail.com
In-Reply-To: <20051001062348.GA7903@boetes.org>

```
Hi,

There is an old version in the ports, but too old to be useful. A guy
at work got it going on NetBSD without a problem. I think the only
thing we changed was the shebang line in gitk because /bin/wish is
just a stupid script that complains and tells you to call
wish<version>.

cheers,


martin

```
