Hi Jan, In my current attempt to build LilyPond with GUB, I hit a name clash in netpbm, patch attached. I hate languages without namespaces or equivalent concept :-)
Best, John
From 030efb393486e5717e74dc91b9b145020ab7b014 Mon Sep 17 00:00:00 2001 From: John Mandereau <john.mander...@gmail.com> Date: Sun, 13 Sep 2009 16:26:07 +0200 Subject: [PATCH] Fix name conflict between netpbm and glibc 2.10.1 on Fedora 11 --- gub/specs/netpbm.py | 3 +- .../netpbm-10.35-glibc-2.10.1-name-conflict.patch | 182 ++++++++++++++++++++ 2 files changed, 184 insertions(+), 1 deletions(-) create mode 100644 patches/netpbm-10.35-glibc-2.10.1-name-conflict.patch diff --git a/gub/specs/netpbm.py b/gub/specs/netpbm.py index 75a8395..e122722 100644 --- a/gub/specs/netpbm.py +++ b/gub/specs/netpbm.py @@ -4,6 +4,7 @@ from gub import tools class Netpbm__tools (tools.AutoBuild): # source='svn:https://svn.sourceforge.net/svnroot/netpbm/stable&revision=172' source='http://lilypond.org/download/gub-sources/netpbm-patched-10.35.tar.bz2' + patches = ['netpbm-10.35-glibc-2.10.1-name-conflict.patch'] def _get_build_dependencies (self): return ['flex', 'libjpeg', 'libpng', 'libtiff', 'zlib'] #libxml2? libx11-dev def configure (self): @@ -29,7 +30,7 @@ XML2_CFLAGS=NONE X11LIB=NONE ''') def install (self): - # Great. netpmb's install will not create any parent directories + # Great. netpbm's install will not create any parent directories self.system ('mkdir -p %(install_prefix)s') # but demands that the toplevel install directory does not yet exist. # It's a feature! :-) diff --git a/patches/netpbm-10.35-glibc-2.10.1-name-conflict.patch b/patches/netpbm-10.35-glibc-2.10.1-name-conflict.patch new file mode 100644 index 0000000..d704894 --- /dev/null +++ b/patches/netpbm-10.35-glibc-2.10.1-name-conflict.patch @@ -0,0 +1,182 @@ +--- a/converter/ppm/xpmtoppm.c~ 2009-09-13 16:10:07.000000000 +0200 ++++ b/converter/ppm/xpmtoppm.c 2009-09-13 16:07:47.000000000 +0200 +@@ -121,7 +121,7 @@ + + + static void +-getline(char * const line, ++xpmtoppm_getline(char * const line, + size_t const size, + FILE * const stream) { + /*---------------------------------------------------------------------------- +@@ -139,7 +139,7 @@ + Exit program if the line doesn't fit in the buffer. + -----------------------------------------------------------------------------*/ + if (size > sizeof(lastInputLine)) +- pm_error("INTERNAL ERROR: getline() received 'size' parameter " ++ pm_error("INTERNAL ERROR: xpmtoppm_getline() received 'size' parameter " + "which is out of bounds"); + + if (backup) { +@@ -355,7 +355,7 @@ + int * const transparentP) { + /*---------------------------------------------------------------------------- + Read the header of the XPM file on stream 'stream'. Assume the +- getline() stream is presently positioned to the beginning of the ++ xpmtoppm_getline() stream is presently positioned to the beginning of the + file and it is a Version 3 XPM file. Leave the stream positioned + after the header. + +@@ -386,25 +386,25 @@ + *widthP = *heightP = *ncolorsP = *chars_per_pixelP = -1; + + /* Read the XPM signature comment */ +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + if (strncmp(line, xpm3_signature, strlen(xpm3_signature)) != 0) + pm_error("Apparent XPM 3 file does not start with '/* XPM */'. " + "First line is '%s'", xpm3_signature); + + /* Read the assignment line */ +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + if (strncmp(line, "static char", 11) != 0) + pm_error("Cannot find data structure declaration. Expected a " + "line starting with 'static char', but found the line " + "'%s'.", line); + + /* Read the hints line */ +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + /* skip the comment line if any */ + if (!strncmp(line, "/*", 2)) { + while (!strstr(line, "*/")) +- getline(line, sizeof(line), stream); +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + } + if (sscanf(line, "\"%d %d %d %d\",", widthP, heightP, + ncolorsP, chars_per_pixelP) != 4) +@@ -438,10 +438,10 @@ + *transparentP = -1; /* initial value */ + + for (seqNum = 0; seqNum < *ncolorsP; seqNum++) { +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + /* skip the comment line if any */ + if (!strncmp(line, "/*", 2)) +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + + interpretXpm3ColorTableLine(line, seqNum, *chars_per_pixelP, + *colorsP, *ptabP, transparentP); +@@ -456,7 +456,7 @@ + pixel ** const colorsP, int ** const ptabP) { + /*---------------------------------------------------------------------------- + Read the header of the XPM file on stream 'stream'. Assume the +- getline() stream is presently positioned to the beginning of the ++ xpmtoppm_getline() stream is presently positioned to the beginning of the + file and it is a Version 1 XPM file. Leave the stream positioned + after the header. + +@@ -475,7 +475,7 @@ + /* Read the initial defines. */ + processedStaticChar = FALSE; + while (!processedStaticChar) { +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + + if (sscanf(line, "#define %s %d", str1, &v) == 2) { + char *t1; +@@ -523,7 +523,7 @@ + /* If there's a monochrome color table, skip it. */ + if (!strncmp(t1, "mono", 4)) { + for (;;) { +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + if (!strncmp(line, "static char", 11)) + break; + } +@@ -546,7 +546,7 @@ + + /* Read color table. */ + for (i = 0; i < *ncolorsP; ++i) { +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + + if ((t1 = strchr(line, '"')) == NULL) + pm_error("D error scanning color table"); +@@ -582,7 +582,7 @@ + "static char ..."). + */ + for (;;) { +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + if (strncmp(line, "static char", 11) == 0) + break; + } +@@ -686,7 +686,7 @@ + backup = FALSE; + + /* Read the header line */ +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + backup = TRUE; /* back up so next read reads this line again */ + + rc = sscanf(line, "/* %s */", str1); +@@ -707,7 +707,7 @@ + pm_error("Could not get %d bytes of memory for image", totalpixels); + cursor = *dataP; + maxcursor = *dataP + totalpixels - 1; +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + /* read next line (first line may not always start with comment) */ + while (cursor <= maxcursor) { + if (strncmp(line, "/*", 2) == 0) { +@@ -717,7 +717,7 @@ + ncolors, ptab, &cursor, maxcursor); + } + if (cursor <= maxcursor) +- getline(line, sizeof(line), stream); ++ xpmtoppm_getline(line, sizeof(line), stream); + } + if (ptab) free(ptab); + } +--- a/converter/ppm/xvminitoppm.c~ 2009-09-13 16:10:22.000000000 +0200 ++++ b/converter/ppm/xvminitoppm.c 2009-09-13 16:06:25.000000000 +0200 +@@ -52,7 +52,7 @@ + + + static void +-getline(FILE * const ifP, ++xpmtoppm_getline(FILE * const ifP, + char * const buf, + size_t const size) { + +@@ -105,7 +105,7 @@ + int rc; + bool endOfComments; + +- getline(ifP, buf, sizeof(buf)); ++ xpmtoppm_getline(ifP, buf, sizeof(buf)); + + if (!STRNEQ(buf, "P7 332", 6)) + pm_error("Input is not a XV thumbnail picture. It does not " +@@ -113,14 +113,14 @@ + + endOfComments = FALSE; + while (!endOfComments) { +- getline(ifP, buf, sizeof(buf)); ++ xpmtoppm_getline(ifP, buf, sizeof(buf)); + if (STRNEQ(buf, "#END_OF_COMMENTS", 16)) + endOfComments = TRUE; + else if (STRNEQ(buf, "#BUILTIN", 8)) + pm_error("This program does not know how to " + "convert builtin XV thumbnail pictures"); + } +- getline(ifP, buf, sizeof(buf)); ++ xpmtoppm_getline(ifP, buf, sizeof(buf)); + rc = sscanf(buf, "%u %u %u", &cols, &rows, &maxval); + if (rc != 3) + pm_error("error parsing dimension info '%s'. " -- 1.6.2.5
signature.asc
Description: Ceci est une partie de message numériquement signée
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel