$NetBSD: patch-ad,v 1.3 2006/11/14 13:16:00 wennmach Exp $ Adapt to pkgsrc directory infrastructure. --- src/gmt_init.c.orig 2006-11-10 11:06:58.000000000 +0100 +++ src/gmt_init.c 2006-11-10 11:08:27.000000000 +0100 @@ -2509,7 +2509,7 @@ if (get == 0) { /* Must use GMT system defaults via gmt.conf */ - GMT_getsharepath (CNULL, "gmt", ".conf", line); + GMT_getsharepath ("gmt", "gmt", ".conf", line); if ((fp = fopen (line, "r")) == NULL) { fprintf (stderr, "GMT Fatal Error: Cannot open/find GMT configuration file %s\n", line); exit (EXIT_FAILURE); @@ -2530,7 +2530,7 @@ id = get; id--; /* Get 0 or 1 */ - GMT_getsharepath (CNULL, ".gmtdefaults_", suffix[id], line); + GMT_getsharepath ("gmt", ".gmtdefaults_", suffix[id], line); path = (char *) GMT_memory (VNULL, (size_t)(strlen (line) + 1), (size_t)1, GMT_program); @@ -2640,7 +2640,7 @@ char line[BUFSIZ], path[BUFSIZ]; double slop; - GMT_getsharepath (CNULL, name, CNULL, path); + GMT_getsharepath ("gmt", name, CNULL, path); if (!strcmp ("Sphere", name)) { /* Special case where previous setting in .gmtdefaults4 is a custom ellipse which @@ -2717,7 +2717,7 @@ char line[BUFSIZ], media[80]; FILE *fp; - GMT_getsharepath (CNULL, "gmtmedia", ".d", line); + GMT_getsharepath ("gmt", "gmtmedia", ".d", line); if ((fp = fopen (line, "r")) == NULL) return (0); n_alloc = GMT_TINY_CHUNK; @@ -2775,10 +2775,10 @@ char file[BUFSIZ], line[BUFSIZ], full[16], abbrev[16], c[16], dwu; int i, nm = 0, nw = 0, nu = 0; - GMT_getsharepath ("time", name, ".d", file); + GMT_getsharepath ("gmt/time", name, ".d", file); if ((fp = fopen (file, "r")) == NULL) { fprintf (stderr, "GMT Warning: Could not load time language %s - revert to us (English)!\n", name); - GMT_getsharepath ("time", "us", ".d", file); + GMT_getsharepath ("gmt/time", "us", ".d", file); if ((fp = fopen (file, "r")) == NULL) { fprintf (stderr, "GMT Error: Could not find %s!\n", file); exit (EXIT_FAILURE); @@ -5482,7 +5482,7 @@ int code = 0, pos; FILE *in; - GMT_getsharepath ("pslib", enc->name, ".ps", line); + GMT_getsharepath ("gmt/pslib", enc->name, ".ps", line); if ((in = fopen (line, "r")) == NULL) { perror (line); exit (EXIT_FAILURE); @@ -5556,7 +5556,7 @@ /* First the standard 35 PostScript fonts from Adobe */ - GMT_getsharepath ("pslib", "PS_font_info", ".d", fullname); + GMT_getsharepath ("gmt/pslib", "PS_font_info", ".d", fullname); if ((in = fopen (fullname, "r")) == NULL) { fprintf (stderr, "GMT Fatal Error: "); perror (fullname); @@ -5584,7 +5584,7 @@ /* Then any custom fonts */ - if (GMT_getsharepath ("pslib", "CUSTOM_font_info", ".d", fullname)) { /* Decode Custom font file */ + if (GMT_getsharepath ("gmt/pslib", "CUSTOM_font_info", ".d", fullname)) { /* Decode Custom font file */ if ((in = fopen (fullname, "r")) == NULL) { fprintf (stderr, "GMT Fatal Error: "); perror (fullname);