pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/42168: 1.6.4.1 on 4.0.1 success



The following reply was made to PR pkg/42168; it has been noted by GNATS.

From: der Mouse <mouse%Rodents-Montreal.ORG@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/42168: 1.6.4.1 on 4.0.1 success
Date: Wed, 30 Dec 2009 22:57:03 -0500 (EST)

 I found building git 1.6.4.1 on NetBSD/i386 4.0.1 to be a fairly easy
 thing.  In off-list email, I was prompted to drop a note to this PR
 reporting this.
 
 Checking my git install, I find cd -P in only one place, that being
 git-sh-setup.  This might have caused trouble if I were trying to set
 up a git repository on my machine, which I wasn't; while possibly a
 problem, it did not lead to "a totally non-functional git".
 
 Perhaps breaking setup is enough for dmcmahill to consider git totally
 non-functional.  Or perhaps this is a version difference.
 
 In any case, here are the changes I made for 4.0.1.  (For 1.4T, in case
 anyone cares (yeahright!), change OLD_ICONV to NO_ICONV in the first
 patch's first hunk.)  The patch to builtin-diff.c is unnecessary (but
 harmless) on systems that have had lib/41919 fixed.  How relevant they
 may be to pkgsrc is perhaps debatable, but this might at least help
 someone who wants to get git working.  Note that you probably do not
 want these patches directly, since they include heavy-handed changes to
 make it install where I want it, but they may serve as a useful
 starting point.
 
 /~\ The ASCII                            Mouse
 \ / Ribbon Campaign
  X  Against HTML               mouse%rodents-montreal.org@localhost
 / \ Email!          7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
 
 diff -u -r git-1.6.4.1/Makefile git-1.6.4.1+/Makefile
 --- git-1.6.4.1/Makefile       2009-08-22 00:54:01.000000000 -0400
 +++ git-1.6.4.1+/Makefile      2009-08-22 18:38:01.000000000 -0400
 @@ -199,6 +199,17 @@
  #
  # Define NO_REGEX if you have no or inferior regex support in your C library.
  
 +NO_OPENSSL=1
 +NO_CURL=1
 +NO_EXPAT=1
 +NO_SVN_TESTS=1
 +MOZILLA_SHA1=1
 +OLD_ICONV=1
 +NO_PERL=1
 +NO_TCLTK=1
 +INTERNAL_QSORT=1
 +NO_DEFLATE_BOUND=1
 +
  GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
        @$(SHELL_PATH) ./GIT-VERSION-GEN
  -include GIT-VERSION-FILE
 @@ -230,21 +241,21 @@
  # runtime figures out where they are based on the path to the executable.
  # This can help installing the suite in a relocatable way.
  
 -prefix = $(HOME)
 -bindir_relative = bin
 -bindir = $(prefix)/$(bindir_relative)
 -mandir = share/man
 -infodir = share/info
 -gitexecdir = libexec/git-core
 -sharedir = $(prefix)/share
 -template_dir = share/git-core/templates
 -htmldir = share/doc/git-doc
 +prefix = /SHOULD/NOT/APPEAR
 +bindir_relative = /SHOULD/NOT/APPEAR
 +bindir = /local/.bin/git-1.6.4.1
 +mandir = /local/.man/git-1.6.4.1
 +infodir = /local/src/git/git-1.6.4.1/junk.info
 +gitexecdir = $(bindir)
 +sharedir = /SHOULD/NOT/APPEAR
 +template_dir = /local/.lib/git-1.6.4.1/templates
 +htmldir = /local/src/git/git-1.6.4.1/junk.html
  ifeq ($(prefix),/usr)
  sysconfdir = /etc
  ETC_GITCONFIG = $(sysconfdir)/gitconfig
  else
 -sysconfdir = $(prefix)/etc
 -ETC_GITCONFIG = etc/gitconfig
 +sysconfdir = /local/etc/git
 +ETC_GITCONFIG = /local/etc/git
  endif
  lib = lib
  # DESTDIR=
 diff -u -r git-1.6.4.1/builtin-diff.c git-1.6.4.1+/builtin-diff.c
 --- git-1.6.4.1/builtin-diff.c 2009-08-22 00:54:01.000000000 -0400
 +++ git-1.6.4.1+/builtin-diff.c        2009-08-22 17:37:55.000000000 -0400
 @@ -92,7 +92,7 @@
                              int argc, const char **argv,
                              struct blobinfo *blob)
  {
 -      unsigned mode = canon_mode(S_IFREG | 0644);
 +      unsigned mode = canon_mode((S_IFREG | 0644));
  
        if (argc > 1)
                usage(builtin_diff_usage);
 diff -u -r git-1.6.4.1/xdiff/xmerge.c git-1.6.4.1+/xdiff/xmerge.c
 --- git-1.6.4.1/xdiff/xmerge.c 2009-08-22 00:54:01.000000000 -0400
 +++ git-1.6.4.1+/xdiff/xmerge.c        2009-08-22 17:33:42.000000000 -0400
 @@ -22,6 +22,8 @@
  
  #include "xinclude.h"
  
 +#define xisalnum(x) isalnum((unsigned char)(x))
 +
  typedef struct s_xdmerge {
        struct s_xdmerge *next;
        /*
 @@ -314,7 +316,7 @@
  static int line_contains_alnum(const char *ptr, long size)
  {
        while (size--)
 -              if (isalnum(*(ptr++)))
 +              if (xisalnum(*(ptr++)))
                        return 1;
        return 0;
  }
 diff -u -r git-1.6.4.1/xdiff/xutils.c git-1.6.4.1+/xdiff/xutils.c
 --- git-1.6.4.1/xdiff/xutils.c 2009-08-22 00:54:01.000000000 -0400
 +++ git-1.6.4.1+/xdiff/xutils.c        2009-08-22 17:27:26.000000000 -0400
 @@ -26,7 +26,7 @@
  
  #define XDL_GUESS_NLINES 256
  
 -
 +#define xisspace(x) isspace((unsigned char)(x))
  
  
  long xdl_bogosqrt(long n) {
 @@ -192,11 +192,11 @@
  
        if (flags & XDF_IGNORE_WHITESPACE) {
                for (i1 = i2 = 0; i1 < s1 && i2 < s2; ) {
 -                      if (isspace(l1[i1]))
 -                              while (isspace(l1[i1]) && i1 < s1)
 +                      if (xisspace(l1[i1]))
 +                              while (xisspace(l1[i1]) && i1 < s1)
                                        i1++;
 -                      if (isspace(l2[i2]))
 -                              while (isspace(l2[i2]) && i2 < s2)
 +                      if (xisspace(l2[i2]))
 +                              while (xisspace(l2[i2]) && i2 < s2)
                                        i2++;
                        if (i1 < s1 && i2 < s2 && l1[i1++] != l2[i2++])
                                return 0;
 @@ -204,12 +204,12 @@
                return (i1 >= s1 && i2 >= s2);
        } else if (flags & XDF_IGNORE_WHITESPACE_CHANGE) {
                for (i1 = i2 = 0; i1 < s1 && i2 < s2; ) {
 -                      if (isspace(l1[i1])) {
 -                              if (!isspace(l2[i2]))
 +                      if (xisspace(l1[i1])) {
 +                              if (!xisspace(l2[i2]))
                                        return 0;
 -                              while (isspace(l1[i1]) && i1 < s1)
 +                              while (xisspace(l1[i1]) && i1 < s1)
                                        i1++;
 -                              while (isspace(l2[i2]) && i2 < s2)
 +                              while (xisspace(l2[i2]) && i2 < s2)
                                        i2++;
                        } else if (l1[i1++] != l2[i2++])
                                return 0;
 @@ -218,9 +218,9 @@
        } else if (flags & XDF_IGNORE_WHITESPACE_AT_EOL) {
                for (i1 = i2 = 0; i1 < s1 && i2 < s2; ) {
                        if (l1[i1] != l2[i2]) {
 -                              while (i1 < s1 && isspace(l1[i1]))
 +                              while (i1 < s1 && xisspace(l1[i1]))
                                        i1++;
 -                              while (i2 < s2 && isspace(l2[i2]))
 +                              while (i2 < s2 && xisspace(l2[i2]))
                                        i2++;
                                if (i1 < s1 || i2 < s2)
                                        return 0;
 @@ -240,9 +240,9 @@
        char const *ptr = *data;
  
        for (; ptr < top && *ptr != '\n'; ptr++) {
 -              if (isspace(*ptr)) {
 +              if (xisspace(*ptr)) {
                        const char *ptr2 = ptr;
 -                      while (ptr + 1 < top && isspace(ptr[1])
 +                      while (ptr + 1 < top && xisspace(ptr[1])
                                        && ptr[1] != '\n')
                                ptr++;
                        if (flags & XDF_IGNORE_WHITESPACE)
 


Home | Main Index | Thread Index | Old Index