[PATCH] Building git on NetBSD

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH] Building git on NetBSD

From: walt <hidden>
Date: 2016-06-15 22:42:11

This gets git going on NetBSD:
--- 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
I'm no software developer so I'm not sure about the syntax of the -rpath
flag.  It does what I wanted, but it results in lots of warnings about
not being used because no linking is taking place.  Should this maybe
go in LDFLAGS instead of CFLAGS?  Dunno.

Anyway, I actually used cg-clone on NetBSD to clone the git repository,
and I'll try to get the pkgsrc guys interested in creating packages for
cogito and git.

Oh, one person was concerned about the cogito scripts running on the
NetBSD version of sh, which isn't bash.  So far I've tried cg-clone,
cg-update, and gitk, and all worked just like on linux.  Any chance
that some of the other scripts may not work as well on a non-bash sh?

Re: [PATCH] Building git on NetBSD

From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:42:11

walt wrote:
I'm no software developer so I'm not sure about the syntax of the -rpath
flag.  It does what I wanted, but it results in lots of warnings about
not being used because no linking is taking place.  Should this maybe
go in LDFLAGS instead of CFLAGS?  Dunno.
Yes it should. Currently the git makefile doesn't distinguish between 
CFLAGS and LDFLAGS which results in a fair few warnings.
Oh, one person was concerned about the cogito scripts running on the
NetBSD version of sh, which isn't bash.  So far I've tried cg-clone,
cg-update, and gitk, and all worked just like on linux.  Any chance
that some of the other scripts may not work as well on a non-bash sh?
gitk is in tcl so I'd be surprised if that didn't work.

I don't think there's been a whole lot of testing for other shells but 
the friendly folks on this list usually takes care of fixing such things 
fairly quickly so long as someone tells them where to look or, 
preferrably, sends a patch that does the trick.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help