aboutsummaryrefslogtreecommitdiffstats
path: root/print/ghostscript8/files
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2007-08-16 23:20:30 +0800
committerrafan <rafan@FreeBSD.org>2007-08-16 23:20:30 +0800
commit506917d5c0ddbe11e31a30605d49df860d74eb85 (patch)
treee09ead4f633eb7c8d44f9972eb79f37adc5a4ab3 /print/ghostscript8/files
parent487747eab2377094266d6125d75e685c74d39062 (diff)
downloadfreebsd-ports-gnome-506917d5c0ddbe11e31a30605d49df860d74eb85.tar.gz
freebsd-ports-gnome-506917d5c0ddbe11e31a30605d49df860d74eb85.tar.zst
freebsd-ports-gnome-506917d5c0ddbe11e31a30605d49df860d74eb85.zip
- Update to 8.60. The contributed drivers made by gs-esp are now merged in,
but still missing improved CJKV font handling functions. PR: ports/115395 Submitted by: KATO Tsuguru <tkato432 at yahoo.com>
Diffstat (limited to 'print/ghostscript8/files')
-rw-r--r--print/ghostscript8/files/patch-contrib__gdevhl12.c11
-rw-r--r--print/ghostscript8/files/patch-contrib__japanese__gdevfmlbp.c11
-rw-r--r--print/ghostscript8/files/patch-contrib__pcl3__eprn__eprnparm.c238
-rw-r--r--print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.c237
-rw-r--r--print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.h22
-rw-r--r--print/ghostscript8/files/patch-contrib__pcl3__src__gdevpcl3.c314
-rw-r--r--print/ghostscript8/files/patch-lib__ps2epsi.CAN-2004-096719
-rw-r--r--print/ghostscript8/files/patch-lib__pv.sh.CAN-2004-096716
-rw-r--r--print/ghostscript8/files/patch-src:fapi_ft.c20
-rw-r--r--print/ghostscript8/files/patch-src:unix-gcc.mak80
10 files changed, 70 insertions, 898 deletions
diff --git a/print/ghostscript8/files/patch-contrib__gdevhl12.c b/print/ghostscript8/files/patch-contrib__gdevhl12.c
deleted file mode 100644
index 64ef936f0975..000000000000
--- a/print/ghostscript8/files/patch-contrib__gdevhl12.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- contrib/gdevhl12.c.orig Thu Apr 26 01:27:24 2007
-+++ contrib/gdevhl12.c Tue May 15 16:49:03 2007
-@@ -474,7 +474,7 @@
- continue;
- #if 1
- /* XXX - please report if you ever see this, then change to #if 0 */
-- fprintf(stderr,
-+ dprintf1(
- "hl1250: compression failed (y=%u), doing 1200x300 dpi\n",
- band + y);
- #endif
diff --git a/print/ghostscript8/files/patch-contrib__japanese__gdevfmlbp.c b/print/ghostscript8/files/patch-contrib__japanese__gdevfmlbp.c
deleted file mode 100644
index 8bd0d2b123e5..000000000000
--- a/print/ghostscript8/files/patch-contrib__japanese__gdevfmlbp.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- contrib/japanese/gdevfmlbp.c.orig Thu Apr 26 01:27:24 2007
-+++ contrib/japanese/gdevfmlbp.c Tue May 15 16:49:03 2007
-@@ -121,7 +121,7 @@
- height_inches >= 9.2 ? PAPER_SIZE_B5 :
- height_inches >= 7.6 ? PAPER_SIZE_A5 : PAPER_SIZE_HAGAKI), landscape);
- #ifdef FMLBP_DEBUG
-- fprintf(stderr, "w=%d(%f) x h=%d(%f) -> %s\n",
-+ dprintf5("w=%d(%f) x h=%d(%f) -> %s\n",
- dev->width, width_inches, dev->height, height_inches, paper);
- #endif/*FMLBP_DEBUG*/
- return paper;
diff --git a/print/ghostscript8/files/patch-contrib__pcl3__eprn__eprnparm.c b/print/ghostscript8/files/patch-contrib__pcl3__eprn__eprnparm.c
deleted file mode 100644
index 5d0443b4ff75..000000000000
--- a/print/ghostscript8/files/patch-contrib__pcl3__eprn__eprnparm.c
+++ /dev/null
@@ -1,238 +0,0 @@
---- contrib/pcl3/eprn/eprnparm.c.orig Thu Apr 26 01:27:24 2007
-+++ contrib/pcl3/eprn/eprnparm.c Tue May 15 02:02:42 2007
-@@ -146,7 +146,7 @@
- /* First we construct a properly NUL-terminated string */
- s = (char *) malloc(in_value->size + 1);
- if (s == NULL) {
-- fprintf(stderr, ERRPREF
-+ eprintf1(ERRPREF
- "Memory allocation failure in eprn_get_int(): %s.\n",
- strerror(errno));
- return_error(gs_error_VMerror);
-@@ -352,8 +352,7 @@
- 'eprn->media_overrides' should be NULL.
-
- The function returns zero on success and a non-zero ghostscript error value
-- otherwise. In the latter case, an error message will have been issued on
-- stderr.
-+ otherwise. In the latter case, an error message will have been issued.
-
- ******************************************************************************/
-
-@@ -379,7 +378,7 @@
-
- /* Open the file */
- if ((f = fopen(eprn->media_file, "r")) == NULL) {
-- fprintf(stderr, "%s" ERRPREF "Error opening the media configuration file\n"
-+ eprintf5("%s" ERRPREF "Error opening the media configuration file\n"
- "%s `%s'\n%s for reading: %s.\n",
- epref, epref, eprn->media_file, epref, strerror(errno));
- return_error(gs_error_invalidfileaccess);
-@@ -395,7 +394,7 @@
-
- /* Check for buffer overflow */
- if ((s = strchr(buffer, '\n')) == NULL && fgetc(f) != EOF) {
-- fprintf(stderr, "%s" ERRPREF "Exceeding line length %d in "
-+ eprintf5("%s" ERRPREF "Exceeding line length %d in "
- "media configuration file\n%s %s, line %d.\n",
- epref, BUFFER_SIZE - 2 /* '\n'+'\0' */, epref, eprn->media_file, line);
- cleanup();
-@@ -453,7 +452,7 @@
- new_list = (eprn_PageDescription *)
- realloc(list, (read+1)*sizeof(eprn_PageDescription));
- if (new_list == NULL) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf2("%s" ERRPREF
- "Memory allocation failure in eprn_read_media_data(): %s.\n",
- epref, strerror(errno));
- cleanup();
-@@ -477,14 +476,14 @@
- {
- ms_MediaCode code = ms_find_code_from_name(s, eprn->flag_desc);
- if (code == ms_none) {
-- fprintf(stderr, "%s" ERRPREF "Unknown media name (%s) in "
-+ eprintf5("%s" ERRPREF "Unknown media name (%s) in "
- "media configuration file\n%s %s, line %d.\n",
- epref, s, epref, eprn->media_file, line);
- cleanup();
- return_error(gs_error_rangecheck);
- }
- if (code & MS_ROTATED_FLAG) {
-- fprintf(stderr, "%s" ERRPREF "Invalid substring \"" MS_ROTATED_STRING
-+ eprintf5("%s" ERRPREF "Invalid substring \"" MS_ROTATED_STRING
- "\" in media name (%s)\n"
- "%s in media configuration file %s, line %d.\n",
- epref, s, epref, eprn->media_file, line);
-@@ -499,7 +498,7 @@
- &current->bottom, &current->right, &current->top, &chars_read) != 4 ||
- t[chars_read] != '\0') {
- if (*t != '\0') *(t-1) = ' '; /* remove NUL after media name */
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf5("%s" ERRPREF
- "Syntax error in media configuration file %s, line %d:\n%s %s\n",
- epref, eprn->media_file, line, epref, buffer);
- cleanup();
-@@ -509,7 +508,7 @@
- /* Check for sign */
- if (current->left < 0 || current->bottom < 0 || current->right < 0 ||
- current->top < 0) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf4("%s" ERRPREF
- "Ghostscript does not support negative margins (line %d in the\n"
- "%s media configuration file %s).\n",
- epref, line, epref, eprn->media_file);
-@@ -530,14 +529,14 @@
- The user might not notice the reason without help, hence we check. */
- if (ms_without_flags(current->code) == ms_CustomPageSize &&
- eprn->cap->custom == NULL)
-- fprintf(stderr, "%s" WARNPREF "The media configuration file %s\n"
-+ eprintf6("%s" WARNPREF "The media configuration file %s\n"
- "%s contains a custom page size entry in line %d, "
- "but custom page sizes\n"
- "%s are not supported by the %s.\n",
- wpref, eprn->media_file, wpref, line, wpref, eprn->cap->name);
- }
- if (ferror(f)) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf2("%s" ERRPREF
- "Unidentified system error while reading `%s'.\n",
- epref, eprn->media_file);
- cleanup();
-@@ -547,7 +546,7 @@
-
- /* Was the file empty? */
- if (read == 0) {
-- fprintf(stderr, "%s" ERRPREF "The media configuration file %s\n"
-+ eprintf3("%s" ERRPREF "The media configuration file %s\n"
- "%s does not contain any media information.\n",
- epref, eprn->media_file, epref);
- return_error(gs_error_rangecheck);
-@@ -557,7 +556,7 @@
- eprn->media_overrides = (eprn_PageDescription *) gs_malloc(gs_lib_ctx_get_non_gc_memory_t(), read + 1,
- sizeof(eprn_PageDescription), "eprn_read_media_data");
- if (eprn->media_overrides == NULL) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf1("%s" ERRPREF
- "Memory allocation failure from gs_malloc() in eprn_read_media_data().\n",
- epref);
- free(list);
-@@ -585,8 +584,7 @@
- from the specified media configuration file.
-
- The return code will be zero an success and a ghostscript error code
-- otherwise. In the latter case, an error message will have been issued on
-- stderr.
-+ otherwise. In the latter case, an error message will have been issued.
-
- The 'length' may be positive in which case it denotes the length of the
- string 'media_file' or zero in which case the string is assumed to be
-@@ -629,7 +627,7 @@
- eprn->media_file = (char *)gs_malloc(gs_lib_ctx_get_non_gc_memory_t(), length + 1, sizeof(char),
- "eprn_set_media_data");
- if (eprn->media_file == NULL) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf1("%s" ERRPREF
- "Memory allocation failure from gs_malloc() in "
- "eprn_set_media_data().\n",
- epref);
-@@ -928,9 +926,9 @@
- rc = eprn_get_int(&string_value, eprn_colour_model_list, &temp); \
- if (rc != 0) { \
- if (rc != gs_error_VMerror) { \
-- fprintf(stderr, "%s" ERRPREF "Unknown colour model: `", epref); \
-- fwrite(string_value.data, sizeof(char), string_value.size, stderr); \
-- fputs("'.\n", stderr); \
-+ eprintf1("%s" ERRPREF "Unknown colour model: `", epref); \
-+ errwrite(string_value.data, sizeof(char)*string_value.size); \
-+ eprintf("'.\n"); \
- } \
- last_error = rc; \
- param_signal_error(plist, pname, last_error); \
-@@ -994,7 +992,7 @@
- eprn->black_levels = temp;
- }
- else {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf2("%s" ERRPREF
- "The value for BlackLevels is outside the range permitted: %d.\n",
- epref, temp);
- last_error = gs_error_rangecheck;
-@@ -1011,7 +1009,7 @@
- eprn->non_black_levels = temp;
- }
- else {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf2("%s" ERRPREF
- "The value for CMYLevels is outside the range permitted: %d.\n",
- epref, temp);
- last_error = gs_error_rangecheck;
-@@ -1025,8 +1023,8 @@
- bool temp;
- if ((rc = param_read_bool(plist, "CUPSAccounting", &temp)) == 0) {
- if (eprn->CUPS_accounting && !temp)
-- fputs(CUPS_WARNPREF WARNPREF
-- "Attempt to set CUPSAccounting from true to false.\n", stderr);
-+ eprintf(CUPS_WARNPREF WARNPREF
-+ "Attempt to set CUPSAccounting from true to false.\n");
- else eprn->CUPS_accounting = temp;
- }
- else if (rc < 0) last_error = rc;
-@@ -1042,10 +1040,10 @@
- eprn->intensity_rendering = temp;
- }
- else {
-- fprintf(stderr, "%s" ERRPREF "Invalid method for IntensityRendering: `",
-+ eprintf1("%s" ERRPREF "Invalid method for IntensityRendering: `",
- epref);
-- fwrite(string_value.data, sizeof(char), string_value.size, stderr);
-- fputs("'.\n", stderr);
-+ errwrite(string_value.data, sizeof(char)*string_value.size);
-+ eprintf("'.\n");
- last_error = gs_error_rangecheck;
- param_signal_error(plist, pname, last_error);
- }
-@@ -1066,7 +1064,7 @@
- eprn->default_orientation = temp;
- }
- else {
-- fprintf(stderr,
-+ eprintf2(
- "%s" ERRPREF "LeadingEdge may only have values 0 to 3, not %d.\n",
- epref, temp);
- last_error = gs_error_rangecheck;
-@@ -1111,7 +1109,7 @@
- /* Current (up to at least gs 6.50) ghostscript versions do not accept
- negative MediaPosition values. */
- if (eprn->media_position < 0)
-- fprintf(stderr, "%s" WARNPREF
-+ eprintf3("%s" WARNPREF
- "Ghostscript does not accept negative values (%d) for the\n"
- "%s `MediaPosition' parameter.\n",
- wpref, eprn->media_position, wpref);
-@@ -1145,7 +1143,7 @@
- eprn->pagecount_file = (char *)gs_malloc(gs_lib_ctx_get_non_gc_memory_t(), string_value.size + 1,
- sizeof(char), "eprn_put_params");
- if (eprn->pagecount_file == NULL) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf1( "%s" ERRPREF
- "Memory allocation failure from gs_malloc() in eprn_put_params().\n",
- epref);
- last_error = gs_error_VMerror;
-@@ -1167,7 +1165,7 @@
- eprn->non_black_levels = temp;
- }
- else {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf2("%s" ERRPREF
- "The value for RGBLevels is outside the range permitted: %d.\n",
- epref, temp);
- last_error = gs_error_rangecheck;
-@@ -1187,7 +1185,7 @@
- */
- if ((rc = param_read_int(plist, (pname = "BitsPerPixel"), &temp)) == 0) {
- if (temp != dev->color_info.depth) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf3("%s" ERRPREF
- "Attempt to set `BitsPerPixel' to a value (%d)\n"
- "%s other than the one selected by the driver.\n",
- epref, temp, epref);
diff --git a/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.c b/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.c
deleted file mode 100644
index 696feccb9a52..000000000000
--- a/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.c
+++ /dev/null
@@ -1,237 +0,0 @@
---- contrib/pcl3/eprn/gdeveprn.c.orig Thu Apr 26 01:27:24 2007
-+++ contrib/pcl3/eprn/gdeveprn.c Tue May 15 01:34:15 2007
-@@ -95,6 +95,7 @@
- #ifdef EPRN_TRACE
- #include "gdebug.h"
- #endif /* EPRN_TRACE */
-+#include "gxstdio.h"
-
- /* Special headers for this device */
- #ifndef EPRN_NO_PAGECOUNTFILE
-@@ -143,8 +144,8 @@
- "! eprn_get_initial_matrix(): code is still ms_none.\n");
- #endif
- if (eprn_set_page_layout(dev) != 0)
-- fputs(" Processing can't be stopped at this point although this error "
-- "occurred.\n", stderr);
-+ eprintf(" Processing can't be stopped at this point although this error "
-+ "occurred.\n");
- /* The current function has a signature without the ability to signal
- an error condition. */
- }
-@@ -303,17 +304,17 @@
-
- Function: print_flags
-
-- Print a textual description of 'flags' on 'f'.
-+ Print a textual description of 'flags' to the error stream.
-
- ******************************************************************************/
-
--static void print_flags(FILE *f, ms_MediaCode flags, const ms_Flag *user_flags)
-+static void print_flags(ms_MediaCode flags, const ms_Flag *user_flags)
- {
- /* Non-standard flags first */
- if (user_flags != NULL) {
- while (user_flags->code != ms_none) {
- if (user_flags->code & flags) {
-- fputs(user_flags->name, f);
-+ errprintf(user_flags->name);
- flags &= ~user_flags->code;
- }
- user_flags++;
-@@ -321,17 +322,17 @@
- }
-
- /* Standard substrings */
-- if (flags & MS_SMALL_FLAG) fputs(MS_SMALL_STRING, f);
-- if (flags & MS_BIG_FLAG ) fputs(MS_BIG_STRING, f);
-- if (flags & MS_EXTRA_FLAG) fputs(MS_EXTRA_STRING, f);
-+ if (flags & MS_SMALL_FLAG) eprintf(MS_SMALL_STRING);
-+ if (flags & MS_BIG_FLAG ) eprintf(MS_BIG_STRING);
-+ if (flags & MS_EXTRA_FLAG) eprintf(MS_EXTRA_STRING);
- flags &= ~(MS_SMALL_FLAG | MS_BIG_FLAG | MS_EXTRA_FLAG);
-
- /* Completeness check */
- if (flags & ~MS_TRANSVERSE_FLAG)
-- fprintf(f, "0x%04X", (unsigned int)(flags & ~MS_TRANSVERSE_FLAG));
-+ eprintf1("0x%04X", (unsigned int)(flags & ~MS_TRANSVERSE_FLAG));
-
- /* Standard qualifier */
-- if (flags & MS_TRANSVERSE_FLAG) fputs("." MS_TRANSVERSE_STRING, f);
-+ if (flags & MS_TRANSVERSE_FLAG) eprintf("." MS_TRANSVERSE_STRING);
-
- return;
- }
-@@ -347,37 +348,37 @@
-
- If the derived device has set a flag mismatch error reporting function, the
- call will be passed to that function. Otherwise a general error message is
-- written on 'err'.
-+ written through the graphics library's eprintf().
-
- ******************************************************************************/
-
--static void eprn_flag_mismatch(FILE *err, const struct s_eprn_Device *eprn,
-+static void eprn_flag_mismatch(const struct s_eprn_Device *eprn,
- bool no_match)
- {
-- if (eprn->fmr != NULL) (*eprn->fmr)(err, eprn, no_match);
-+ if (eprn->fmr != NULL) (*eprn->fmr)(eprn, no_match);
- else {
- const char *epref = eprn->CUPS_messages? CUPS_ERRPREF: "";
-
-- fprintf(err, "%s" ERRPREF "The %s does not support ",
-+ eprintf2("%s" ERRPREF "The %s does not support ",
- epref, eprn->cap->name);
-- if (eprn->desired_flags == 0) fprintf(err, "an empty set of media flags");
-+ if (eprn->desired_flags == 0) eprintf("an empty set of media flags");
- else {
-- fputs("the \"", err);
-- print_flags(err, eprn->desired_flags, eprn->flag_desc);
-- fputs("\" flag(s)", err);
-+ eprintf("the \"");
-+ print_flags(eprn->desired_flags, eprn->flag_desc);
-+ eprintf("\" flag(s)");
- }
-- fprintf(err, "\n%s (ignoring presence or absence of \"", epref);
-+ eprintf1("\n%s (ignoring presence or absence of \"", epref);
- {
- ms_MediaCode optional = MS_TRANSVERSE_FLAG;
- if (eprn->optional_flags != NULL) {
- const ms_MediaCode *of = eprn->optional_flags;
- while (*of != ms_none) optional |= *of++;
- }
-- print_flags(err, optional, eprn->flag_desc);
-+ print_flags(optional, eprn->flag_desc);
- }
-- fputs("\") for ", err);
-- if (no_match) fputs("any", err); else fputs("this", err);
-- fputs(" page size.\n", err);
-+ eprintf("\") for ");
-+ if (no_match) eprintf("any"); else eprintf("this");
-+ eprintf(" page size.\n");
- }
-
- return;
-@@ -483,7 +484,7 @@
- the media flags, or the page descriptions have been changed.
-
- The function returns zero on success and a non-zero value otherwise.
-- In the latter case, an error message has been issued on stderr. This can only
-+ In the latter case, an error message has been issued. This can only
- occur if the media size is not supported with the flags requested.
-
- On success, the following variables in the device structure are consistent:
-@@ -615,21 +616,21 @@
- /* No discrete match */
- if (best_cmatch == NULL) {
- /* No match at all. */
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf3("%s" ERRPREF
- "This document requests a page size of %.0f x %.0f bp.\n",
- epref, dev->MediaSize[0], dev->MediaSize[1]);
- if (eprn->cap->custom == NULL) {
- /* The printer does not support custom page sizes */
- if (eprn->media_overrides != NULL)
-- fprintf(stderr,
-+ eprintf1(
- "%s The media configuration file does not contain an entry for "
- " this size.\n", epref);
- else
-- fprintf(stderr, "%s This size is not supported by the %s.\n",
-+ eprintf2("%s This size is not supported by the %s.\n",
- epref, eprn->cap->name);
- }
- else
-- fprintf(stderr,
-+ eprintf3(
- "%s This size is not supported as a discrete size and it exceeds "
- "the\n"
- "%s custom page size limits for the %s.\n",
-@@ -637,7 +638,7 @@
- return -1;
- }
- if (eprn->media_overrides != NULL && best_cdmatch == NULL) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf6("%s" ERRPREF
- "This document requests a page size of %.0f x %.0f bp\n"
- "%s but there is no entry for this size in the "
- "media configuration file\n"
-@@ -692,7 +693,7 @@
- }
- /* If we've found a match, 'code' is no longer 'ms_none'. */
- if (eprn->code == ms_none) {
-- eprn_flag_mismatch(stderr, eprn, no_match);
-+ eprn_flag_mismatch(eprn, no_match);
- return -1;
- }
-
-@@ -762,7 +763,7 @@
-
- rc = gdev_prn_open((gx_device *)dev);
- if (rc < 0) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf2("%s" ERRPREF
- "Failure of gdev_prn_open(), code is %d.\n",
- epref, rc);
- return rc;
-@@ -944,13 +945,13 @@
- &eprn->black_levels, &eprn->non_black_levels) != 0) {
- gs_param_string str;
-
-- fprintf(stderr, "%s" ERRPREF "The requested combination of colour model (",
-+ eprintf1("%s" ERRPREF "The requested combination of colour model (",
- epref);
- str.size = 0;
- if (eprn_get_string(eprn->colour_model, eprn_colour_model_list, &str) != 0)
- assert(0); /* Bug. No harm on NDEBUG because I've just set the size. */
-- fwrite(str.data, str.size, sizeof(str.data[0]), stderr);
-- fprintf(stderr, "),\n"
-+ errwrite(str.data, str.size * sizeof(str.data[0]));
-+ eprintf7("),\n"
- "%s resolution (%gx%g ppi) and intensity levels (%d, %d) is\n"
- "%s not supported by the %s.\n",
- epref, device->HWResolution[0], device->HWResolution[1],
-@@ -1022,9 +1023,8 @@
- updating the file. */
- else {
- /* pcf_getcount() has issued an error message. */
-- fputs(
-- " No further attempts will be made to access the page count file.\n",
-- stderr);
-+ eprintf(
-+ " No further attempts will be made to access the page count file.\n");
- gs_free(gs_lib_ctx_get_non_gc_memory_t(), eprn->pagecount_file, strlen(eprn->pagecount_file) + 1,
- sizeof(char), "eprn_open_device");
- eprn->pagecount_file = NULL;
-@@ -1060,7 +1060,7 @@
- }
- }
- if (eprn->scan_line.str == NULL) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf1("%s" ERRPREF
- "Memory allocation failure from gs_malloc() in eprn_open_device().\n",
- epref);
- return_error(gs_error_VMerror);
-@@ -1156,7 +1156,7 @@
- accounting, this seems unfair.
- */
- if (rc == 0 && eprn->CUPS_accounting)
-- fprintf(stderr, "PAGE: %ld %d\n", dev->ShowpageCount, num_copies);
-+ eprintf2("PAGE: %ld %d\n", dev->ShowpageCount, num_copies);
- /* The arguments are the number of the page, starting at 1, and the number
- of copies of that page. */
-
-@@ -1166,9 +1166,8 @@
- assert(num_copies > 0); /* because of signed/unsigned */
- if (pcf_inccount(eprn->pagecount_file, num_copies) != 0) {
- /* pcf_inccount() has issued an error message. */
-- fputs(
-- " No further attempts will be made to access the page count file.\n",
-- stderr);
-+ eprintf(
-+ " No further attempts will be made to access the page count file.\n");
- gs_free(gs_lib_ctx_get_non_gc_memory_t(), eprn->pagecount_file, strlen(eprn->pagecount_file) + 1,
- sizeof(char), "eprn_output_page");
- eprn->pagecount_file = NULL;
diff --git a/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.h b/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.h
deleted file mode 100644
index 1da6579effbc..000000000000
--- a/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.h
+++ /dev/null
@@ -1,22 +0,0 @@
---- contrib/pcl3/eprn/gdeveprn.h.orig Thu Apr 26 01:33:54 2007
-+++ contrib/pcl3/eprn/gdeveprn.h Tue May 15 02:03:02 2007
-@@ -396,8 +396,8 @@
- struct s_eprn_Device;
- /* The preceding statement is needed in order to establish a forward
- declaration for "struct s_eprn_Device" at file scope. */
--typedef void (*eprn_FlagMismatchReporter)(FILE *f,
-- const struct s_eprn_Device *dev, bool no_match);
-+typedef void (*eprn_FlagMismatchReporter)(const struct s_eprn_Device *dev,
-+ bool no_match);
- /* A function of this kind will be called if the requested media flags cannot
- be satisfied by the printer although the size itself is supported for some
- (unspecified) set of flags. The parameter 'no_match' indicates whether the
-@@ -406,7 +406,7 @@
- capabilities). The requested set of media selection flags is available in
- 'dev->eprn.desired_flags' and 'dev->eprn.optional_flags' (MS_ROTATED_FLAG
- will never be set).
-- The function must write an error message on 'f'.
-+ The function must write an error message.
- */
-
- /*****************************************************************************/
diff --git a/print/ghostscript8/files/patch-contrib__pcl3__src__gdevpcl3.c b/print/ghostscript8/files/patch-contrib__pcl3__src__gdevpcl3.c
deleted file mode 100644
index dd8e850bf6e0..000000000000
--- a/print/ghostscript8/files/patch-contrib__pcl3__src__gdevpcl3.c
+++ /dev/null
@@ -1,314 +0,0 @@
---- contrib/pcl3/src/gdevpcl3.c.orig Thu Apr 26 01:27:24 2007
-+++ contrib/pcl3/src/gdevpcl3.c Tue May 15 01:48:00 2007
-@@ -338,7 +338,7 @@
- /* First we construct a properly NUL-terminated string */
- s = (char *) malloc(in_value->size + 1);
- if (s == NULL) {
-- fprintf(stderr, ERRPREF
-+ eprintf1(ERRPREF
- "Memory allocation failure in get_int_for_string(): %s.\n",
- strerror(errno));
- return_error(gs_error_VMerror);
-@@ -434,25 +434,25 @@
- const char *epref = eprn->CUPS_messages? CUPS_ERRPREF: "";
-
- if (eprn->desired_flags == 0) {
-- fprintf(stderr,
-+ eprintf2(
- "%s" ERRPREF "The %s does not support the requested media properties.\n",
- epref, eprn->cap->name);
- }
- else if (eprn->desired_flags == MS_BIG_FLAG) {
-- fprintf(stderr, "%s" ERRPREF "The %s does not support banner printing",
-+ eprintf2("%s" ERRPREF "The %s does not support banner printing",
- epref, eprn->cap->name);
-- if (!no_match) fputs(" for this size", stderr);
-- fputs(".\n", stderr);
-+ if (!no_match) eprintf(" for this size");
-+ eprintf(".\n");
- }
- else if (eprn->desired_flags == PCL_CARD_FLAG) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf2("%s" ERRPREF
- "The %s does not support a `Card' variant for ",
- epref, eprn->cap->name);
-- if (no_match) fputs("any", stderr); else fputs("this", stderr);
-- fputs(" size.\n", stderr);
-+ if (no_match) eprintf("any"); else eprintf("this");
-+ eprintf(" size.\n");
- }
- else {
-- fprintf(stderr,
-+ eprintf1(
- "%s" ERRPREF "Banner printing on postcards?? You must be joking!\n",
- epref);
- }
-@@ -699,8 +699,8 @@
- be copied to '*s'.
-
- The function returns a negative ghostscript error code on error and zero
-- otherwise. In the former case an error message will have been issued on
-- stderr, using 'epref' as a prefix for the message.
-+ otherwise. In the former case an error message will have been issued,
-+ using 'epref' as a prefix for the message.
-
- ******************************************************************************/
-
-@@ -728,7 +728,7 @@
-
- if (s->str == NULL) {
- s->length = 0;
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf1("%s" ERRPREF
- "Memory allocation failure from gs_malloc().\n", epref);
- rc = gs_error_VMerror;
- param_signal_error(plist, pname, rc);
-@@ -760,8 +760,7 @@
- copied.
-
- The function returns a negative ghostscript error code on error and zero
-- otherwise. In the former case an error message will have been issued on
-- stderr.
-+ otherwise. In the former case an error message will have been issued.
-
- ******************************************************************************/
-
-@@ -785,7 +784,7 @@
- "fetch_cstring");
-
- if (*s == NULL) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf1("%s" ERRPREF
- "Memory allocation failure from gs_malloc().\n", epref);
- rc = gs_error_VMerror;
- param_signal_error(plist, pname, rc);
-@@ -907,9 +906,9 @@
- eprn_init_device((eprn_Device *)dev, &pcl3_printers[dev->printer].desc);
- }
- else {
-- fprintf(stderr, "%s" ERRPREF "Unknown subdevice name: `", epref);
-- fwrite(string_value.data, sizeof(char), string_value.size, stderr);
-- fputs("'.\n", stderr);
-+ eprintf1("%s" ERRPREF "Unknown subdevice name: `", epref);
-+ errwrite(string_value.data, sizeof(char)*string_value.size);
-+ eprintf("'.\n");
- last_error = gs_error_rangecheck;
- param_signal_error(plist, pname, last_error);
- }
-@@ -925,8 +924,8 @@
- == 0) {
- if (temp != pcl_cm_none && temp != pcl_cm_rl && temp != pcl_cm_tiff &&
- temp != pcl_cm_delta && temp != pcl_cm_crdr) {
-- fprintf(stderr,
-- "%s" ERRPREF "Unsupported compression method: %d.\n", epref, temp);
-+ eprintf2("%s" ERRPREF "Unsupported compression method: %d.\n",
-+ epref, temp);
- last_error = gs_error_rangecheck;
- param_signal_error(plist, pname, last_error);
- }
-@@ -934,7 +933,7 @@
- if (temp == pcl_cm_crdr && (dev->printer == HPDeskJet ||
- dev->printer == HPDeskJetPlus || dev->printer == HPDJ500)) {
- /* This I know to be the case for the DJ 500. The others are guessed. */
-- fprintf(stderr,
-+ eprintf2(
- "%s" ERRPREF "The %s does not support compression method 9.\n",
- epref, dev->eprn.cap->name);
- last_error = gs_error_rangecheck;
-@@ -956,7 +955,7 @@
- if (1 <= temp && temp <= 5 && (dev->printer != HPDJ500C || temp <= 3))
- requested.depletion = temp;
- else {
-- fprintf(stderr, "%s" ERRPREF "Invalid value for depletion: %d.\n",
-+ eprintf2("%s" ERRPREF "Invalid value for depletion: %d.\n",
- epref, temp);
- last_error = gs_error_rangecheck;
- param_signal_error(plist, pname, last_error);
-@@ -978,7 +977,7 @@
- Hence I'm giving an error message only in those cases where HP
- explicitly states that the printer does not support the command.
- */
-- fprintf(stderr,
-+ eprintf2(
- "%s" ERRPREF "The %s does not support setting a dry time.\n",
- epref, dev->eprn.cap->name);
- last_error = gs_error_rangecheck;
-@@ -987,8 +986,8 @@
- else data->dry_time = temp;
- }
- else {
-- fprintf(stderr,
-- "%s" ERRPREF "Invalid value for the dry time: %d.\n", epref, temp);
-+ eprintf2("%s" ERRPREF "Invalid value for the dry time: %d.\n",
-+ epref, temp);
- last_error = gs_error_rangecheck;
- param_signal_error(plist, pname, last_error);
- }
-@@ -1008,7 +1007,7 @@
- dev->Duplex_set = 0; /* force to "null" */
- }
- else {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf2("%s" ERRPREF
- "You can use a non-trivial value for DuplexCapability\n"
- "%s only for unspec and unspecold.\n", epref, epref);
- last_error = gs_error_rangecheck;
-@@ -1016,9 +1015,9 @@
- }
- }
- else {
-- fprintf(stderr, "%s" ERRPREF "Invalid duplex capability: `", epref);
-- fwrite(string_value.data, sizeof(char), string_value.size, stderr);
-- fputs("'.\n", stderr);
-+ eprintf1("%s" ERRPREF "Invalid duplex capability: `", epref);
-+ errwrite(string_value.data, sizeof(char)*string_value.size);
-+ eprintf("'.\n");
- last_error = gs_error_rangecheck;
- param_signal_error(plist, pname, last_error);
- }
-@@ -1037,12 +1036,12 @@
- if ((rc = param_read_bool(plist, (pname = "Duplex"), &temp)) == 0 &&
- temp && dev->duplex_capability == Duplex_none) {
- if (dev->printer == pcl3_generic_new || dev->printer == pcl3_generic_old)
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf3("%s" ERRPREF
- "The '%s' device does not support duplex printing unless\n"
- "%s 'DuplexCapability' is not 'none'.\n",
- epref, find_subdevice_name(dev->printer), epref);
- else
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf2("%s" ERRPREF
- "The %s does not support duplex printing.\n",
- epref, dev->eprn.cap->name);
- last_error = gs_error_rangecheck;
-@@ -1071,9 +1070,9 @@
- rc = get_int_for_string(&string_value, media_type_list, &temp);
- if (rc != 0) {
- if (rc != gs_error_VMerror) {
-- fprintf(stderr, "%s" ERRPREF "Unknown medium: `", epref);
-- fwrite(string_value.data, sizeof(char), string_value.size, stderr);
-- fputs("'.\n", stderr);
-+ eprintf1("%s" ERRPREF "Unknown medium: `", epref);
-+ errwrite(string_value.data, sizeof(char)*string_value.size);
-+ eprintf("'.\n");
- }
- last_error = rc;
- param_signal_error(plist, pname, last_error);
-@@ -1081,7 +1080,7 @@
- else {
- new_quality = true;
- if (temp < 0 || 6 < temp)
-- fprintf(stderr, "%s" WARNPREF "Unknown media type code: %d.\n",
-+ eprintf2("%s" WARNPREF "Unknown media type code: %d.\n",
- wpref, temp);
- pcl3_set_mediatype(data, temp);
- }
-@@ -1107,7 +1106,7 @@
- if (pcl_has_CRD(data->level))
- data->level = (temp? pcl_level_3plus_CRD_only: pcl_level_3plus_S68);
- else if (temp == true) {
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf1("%s" ERRPREF
- "OnlyCRD may be set only for group-3 devices.\n", epref);
- last_error = gs_error_rangecheck;
- param_signal_error(plist, pname, last_error);
-@@ -1140,9 +1139,9 @@
- rc = get_int_for_string(&string_value, print_quality_list, &temp);
- if (rc != 0) {
- if (rc != gs_error_VMerror) {
-- fprintf(stderr, "%s" ERRPREF "Unknown print quality: `", epref);
-- fwrite(string_value.data, sizeof(char), string_value.size, stderr);
-- fputs("'.\n", stderr);
-+ eprintf1("%s" ERRPREF "Unknown print quality: `", epref);
-+ errwrite(string_value.data, sizeof(char)*string_value.size);
-+ eprintf("'.\n");
- }
- last_error = rc;
- param_signal_error(plist, pname, last_error);
-@@ -1150,7 +1149,7 @@
- else {
- new_quality = true;
- if (temp < -1 || 1 < temp)
-- fprintf(stderr, "%s" WARNPREF "Unknown print quality: %d.\n",
-+ eprintf2("%s" WARNPREF "Unknown print quality: %d.\n",
- wpref, temp);
- pcl3_set_printquality(data, temp);
- }
-@@ -1165,7 +1164,7 @@
- == 0) {
- if (0 <= temp && temp <= 2) requested.quality = temp;
- else {
-- fprintf(stderr,
-+ eprintf2(
- "%s" ERRPREF "Invalid value for raster graphics quality: %d.\n",
- epref, temp);
- last_error = gs_error_rangecheck;
-@@ -1186,7 +1185,7 @@
- if ((rc = param_read_int(plist, (pname = "SendNULs"), &temp)) == 0) {
- if (data->NULs_to_send >= 0) data->NULs_to_send = temp;
- else {
-- fprintf(stderr,
-+ eprintf2(
- "%s" ERRPREF "Invalid value for SendNULs parameter: %d.\n",
- epref, temp);
- last_error = gs_error_rangecheck;
-@@ -1202,7 +1201,7 @@
- (rc = param_read_int(plist, pname, &temp)) == 0) {
- if (0 <= temp && temp <= 2) requested.shingling = temp;
- else {
-- fprintf(stderr, "%s" ERRPREF "Invalid value for shingling: %d.\n",
-+ eprintf2("%s" ERRPREF "Invalid value for shingling: %d.\n",
- epref, temp);
- last_error = gs_error_rangecheck;
- param_signal_error(plist, pname, last_error);
-@@ -1280,7 +1279,7 @@
- /* Check on rendering parameters */
- if ((dev->eprn.black_levels > 2 || dev->eprn.non_black_levels > 2) &&
- dev->file_data.print_quality == -1)
-- fprintf(stderr,
-+ eprintf2(
- "%s" WARNPREF "More than 2 intensity levels and draft quality\n"
- "%s are unlikely to work in combination.\n", wpref, wpref);
-
-@@ -1311,18 +1310,18 @@
- */
- char buffer[50];
-
-- fprintf(stderr, "%s" ERRPREF
-+ eprintf2("%s" ERRPREF
- "The current configuration for this driver has identified the\n"
- "%s page setup requested by the document as being for `",
- epref, epref);
- if (ms_find_name_from_code(buffer, sizeof(buffer),
-- dev->eprn.code, flag_description) == 0) fputs(buffer, stderr);
-- else fputs("UNKNOWN", stderr); /* should never happen */
-- fprintf(stderr, "' (%.0f x %.0f bp).\n"
-+ dev->eprn.code, flag_description) == 0) eprintf(buffer);
-+ else eprintf("UNKNOWN"); /* should never happen */
-+ eprintf3("' (%.0f x %.0f bp).\n"
- "%s The driver does not know how to do this in PCL.\n",
- dev->MediaSize[0], dev->MediaSize[1], epref);
- if (dev->eprn.media_file != NULL)
-- fprintf(stderr,
-+ eprintf2(
- "%s You should therefore not include such an entry in the\n"
- "%s media configuration file.\n", epref, epref);
- return_error(gs_error_rangecheck);
-@@ -1473,7 +1472,7 @@
- pcl_cm_is_differential(dev->file_data.compression) &&
- rd.previous == NULL) {
- free(lengths); free(rd.next); free(rd.previous);
-- fprintf(stderr, "%s" ERRPREF "Memory allocation failure from malloc().\n",
-+ eprintf1("%s" ERRPREF "Memory allocation failure from malloc().\n",
- epref);
- return_error(gs_error_VMerror);
- }
-@@ -1514,7 +1513,7 @@
- free(lengths); free(rd.next); free(rd.previous);
- for (j = 0; j < 2; j++) free(rd.workspace[j]);
-
-- fprintf(stderr, "%s" ERRPREF "Memory allocation failure from malloc().\n",
-+ eprintf1("%s" ERRPREF "Memory allocation failure from malloc().\n",
- epref);
- return_error(gs_error_VMerror);
- }
diff --git a/print/ghostscript8/files/patch-lib__ps2epsi.CAN-2004-0967 b/print/ghostscript8/files/patch-lib__ps2epsi.CAN-2004-0967
deleted file mode 100644
index c1b1cbcc3fbe..000000000000
--- a/print/ghostscript8/files/patch-lib__ps2epsi.CAN-2004-0967
+++ /dev/null
@@ -1,19 +0,0 @@
---- lib/ps2epsi.orig Thu May 25 02:19:27 2006
-+++ lib/ps2epsi Fri Mar 23 10:55:11 2007
-@@ -5,14 +5,8 @@
- # executable name set in the makefile
- GS_EXECUTABLE=gs
-
--# try to create a temporary file securely
--tmpdir=/tmp/ps2epsi.$$
--(umask 077 && mkdir $tmpdir)
--if test ! -d $tmpdir; then
-- echo "failed: could not create temporary file"
-- exit 1
--fi
--tmpfile=$tmpdir/ps2epsi$$
-+tmpfile=`mktemp -t ps2epsi.XXXXXX || exit 1`
-+trap "rm -rf $tmpfile" 0 1 2 3 7 13 15
-
- export outfile
-
diff --git a/print/ghostscript8/files/patch-lib__pv.sh.CAN-2004-0967 b/print/ghostscript8/files/patch-lib__pv.sh.CAN-2004-0967
deleted file mode 100644
index a37fc43aada9..000000000000
--- a/print/ghostscript8/files/patch-lib__pv.sh.CAN-2004-0967
+++ /dev/null
@@ -1,16 +0,0 @@
---- lib/pv.sh.orig Mon Nov 28 02:18:26 2005
-+++ lib/pv.sh Mon Nov 28 02:18:59 2005
-@@ -29,9 +29,10 @@
- PAGE=$1
- shift
- FILE=$1
-+TEMPFILE=`mktemp -t ${FILE}XXXXXX` || exit 1
- shift
--trap "rm -rf $TEMPDIR/$FILE.$$.pv" 0 1 2 15
-+trap "rm -rf $TEMPFILE" 0 1 2 15
- #dvips -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
--dvips -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
--gs $FILE.$$.pv
-+dvips -p $PAGE -n 1 $FILE $* -o $TEMPFILE
-+gs $TEMPFILE
- exit 0
diff --git a/print/ghostscript8/files/patch-src:fapi_ft.c b/print/ghostscript8/files/patch-src:fapi_ft.c
index 52f28daefcf7..d1c936dd64c4 100644
--- a/print/ghostscript8/files/patch-src:fapi_ft.c
+++ b/print/ghostscript8/files/patch-src:fapi_ft.c
@@ -1,16 +1,20 @@
---- src/fapi_ft.c.orig Mon Mar 13 17:18:19 2006
-+++ src/fapi_ft.c Sun Mar 18 16:23:21 2007
-@@ -26,11 +26,14 @@
- #include "math_.h"
+--- src/fapi_ft.c.orig Wed Jul 11 09:26:24 2007
++++ src/fapi_ft.c Fri Aug 10 02:40:41 2007
+@@ -28,11 +28,14 @@
+ #include "gserror.h"
/* FreeType headers */
-#include "freetype/freetype.h"
+-#include "freetype/ftincrem.h"
+-#include "freetype/ftglyph.h"
+-#include "freetype/ftoutln.h"
+-#include "freetype/fttrigon.h"
+#include "ft2build.h"
+#include FT_FREETYPE_H
- #include "freetype/ftincrem.h"
- #include "freetype/ftglyph.h"
- #include "freetype/ftoutln.h"
- #include "freetype/fttrigon.h"
++#include FT_INCREMENTAL_H
++#include FT_GLYPH_H
++#include FT_OUTLINE_H
++#include FT_TRIGONOMETRY_H
+#include "gserrors.h"
+#include "gserror.h"
diff --git a/print/ghostscript8/files/patch-src:unix-gcc.mak b/print/ghostscript8/files/patch-src:unix-gcc.mak
index fe6c53b5c5cc..15462223d8b1 100644
--- a/print/ghostscript8/files/patch-src:unix-gcc.mak
+++ b/print/ghostscript8/files/patch-src:unix-gcc.mak
@@ -1,5 +1,5 @@
---- src/unix-gcc.mak.orig Sat May 12 02:02:29 2007
-+++ src/unix-gcc.mak Fri May 25 04:03:33 2007
+--- src/unix-gcc.mak.orig Tue Jul 31 05:13:56 2007
++++ src/unix-gcc.mak Fri Aug 10 22:01:41 2007
@@ -21,15 +21,17 @@
# source, generated intermediate file, and object directories
# for the graphics library (GL) and the PostScript/PDF interpreter (PS).
@@ -42,7 +42,24 @@
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
scriptdir = $(bindir)
-@@ -143,7 +144,7 @@
+@@ -62,6 +63,7 @@
+ datadir = $(prefix)/share
+ gsdir = $(datadir)/ghostscript
+ gsdatadir = $(gsdir)/$(GS_DOT_VERSION)
++gssharedir = $(libdir)/ghostscript/$(GS_DOT_VERSION)
+
+ docdir=$(gsdatadir)/doc
+ exdir=$(gsdatadir)/examples
+@@ -108,7 +110,7 @@
+ # -DHAVE_HYPOT
+ # use the system hypot() call
+
+-CAPOPT= -DHAVE_MKSTEMP
++CAPOPT= -DHAVE_MKSTEMP -DHAVE_HYPOT
+
+ # Define the name of the executable file.
+
+@@ -143,7 +145,7 @@
# some older JPEG streams that violate the standard. If the JPEG
# library built from local sources, the patch will be applied.
@@ -51,7 +68,7 @@
JPEG_NAME=jpeg
# Define the directory where the PNG library sources are stored,
-@@ -158,7 +159,7 @@
+@@ -158,7 +160,7 @@
# what its name is.
# See gs.mak and Make.htm for more information.
@@ -60,7 +77,7 @@
LIBPNG_NAME=png
# Define the directory where the zlib sources are stored.
-@@ -170,7 +171,7 @@
+@@ -170,7 +172,7 @@
# what its name is (usually libz, but sometimes libgz).
# See gs.mak and Make.htm for more information.
@@ -69,7 +86,7 @@
#ZLIB_NAME=gz
ZLIB_NAME=z
-@@ -179,6 +180,14 @@
+@@ -179,6 +181,14 @@
JBIG2_LIB=jbig2dec
JBIG2SRCDIR=jbig2dec
@@ -84,7 +101,7 @@
# Define the directory where the icclib source are stored.
# See icclib.mak for more information
-@@ -202,7 +211,7 @@
+@@ -207,7 +217,7 @@
# Define the name of the C compiler.
@@ -93,29 +110,30 @@
# Define the name of the linker for the final link step.
# Normally this is the same as the C compiler.
-@@ -219,9 +228,9 @@
+@@ -224,10 +234,10 @@
# Define the added flags for standard, debugging, profiling
# and shared object builds.
-CFLAGS_STANDARD=-O2
--CFLAGS_DEBUG=-g -O0
--CFLAGS_PROFILE=-pg -O2
+CFLAGS_STANDARD?=-O2
-+CFLAGS_DEBUG=-g
-+CFLAGS_PROFILE=-pg
- CFLAGS_SO=-fPIC
+ CFLAGS_DEBUG=-g -O0
+ CFLAGS_PROFILE=-pg -O2
+-CFLAGS_SO=-fPIC -shared
++CFLAGS_SO=-fPIC
# Define the other compilation flags. Add at most one of the following:
-@@ -235,7 +244,7 @@
+ # -DBSD4_2 for 4.2bsd systems.
+@@ -240,7 +250,8 @@
# We don't include -ansi, because this gets in the way of the platform-
# specific stuff that <math.h> typically needs; nevertheless, we expect
# gcc to accept ANSI-style function prototypes and function definitions.
--XCFLAGS=
-+XCFLAGS+=-I${JPXSRCDIR}/src/libjasper/include -I${LOCALBASE}/include/libpng -I${LOCALBASE}/include
+-XCFLAGS=-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"$(gssharedir)\"
++XCFLAGS+=-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"$(gssharedir)\"
++XCFLAGS+=-DUPD_SIGNAL=0 -I${JPXSRCDIR}/src/libjasper/include -I${LOCALBASE}/include/libpng -I${LOCALBASE}/include
CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)
-@@ -246,7 +255,7 @@
+@@ -251,7 +262,7 @@
# -R /usr/local/xxx/lib:/usr/local/lib
# giving the full path names of the shared library directories.
# XLDFLAGS can be set from the command line.
@@ -124,7 +142,16 @@
LDFLAGS=$(XLDFLAGS)
-@@ -279,7 +288,7 @@
+@@ -262,7 +273,7 @@
+ # Solaris may need -lnsl -lsocket -lposix4.
+ # (Libraries required by individual drivers are handled automatically.)
+
+-EXTRALIBS=-rdynamic -ldl
++EXTRALIBS+=-Wl,-export-dynamic
+
+ # Define the standard libraries to search at the end of linking.
+ # Most platforms require -lpthread for the POSIX threads library;
+@@ -284,7 +295,7 @@
# Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
# not in $(XINCLUDE).
@@ -133,7 +160,7 @@
# Define the directory/ies and library names for the X11 library files.
# XLIBDIRS is for ld and should include -L; XLIBDIR is for LD_RUN_PATH
-@@ -291,12 +300,12 @@
+@@ -296,12 +307,12 @@
# Solaris and other SVR4 systems with dynamic linking probably want
#XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib
# X11R6 (on any platform) may need
@@ -149,7 +176,7 @@
# Define whether this platform has floating point hardware:
# FPU_TYPE=2 means floating point is faster than fixed point.
-@@ -314,16 +323,16 @@
+@@ -319,16 +330,16 @@
# If POSIX sync primitives are used, also change the STDLIBS to include
# the pthread library.
@@ -169,7 +196,16 @@
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev
# The following is strictly for testing.
FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)stocht.dev $(GLD)pipe.dev
-@@ -447,6 +456,9 @@
+@@ -418,7 +429,7 @@
+ DEVICE_DEVS21=$(DD)spotcmyk.dev $(DD)devicen.dev $(DD)xcf.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)bmp16m.dev $(DD)bmp32b.dev $(DD)psdcmyk.dev $(DD)psdrgb.dev
+
+ # Shared library target to build.
+-GS_SHARED_OBJS=$(GLOBJDIR)/X11.so $(GLOBJDIR)/lvga256.so $(GLOBJDIR)/vgalib.so
++#GS_SHARED_OBJS=$(GLOBJDIR)/X11.so $(GLOBJDIR)/lvga256.so $(GLOBJDIR)/vgalib.so
+ #GS_SHARED_OBJS=$(GLOBJDIR)/X11.so
+
+ # ---------------------------- End of options --------------------------- #
+@@ -457,6 +468,9 @@
include $(GLSRCDIR)/zlib.mak
include $(GLSRCDIR)/libpng.mak
include $(GLSRCDIR)/jbig2.mak
@@ -179,7 +215,7 @@
include $(GLSRCDIR)/icclib.mak
include $(GLSRCDIR)/ijs.mak
include $(GLSRCDIR)/devs.mak
-@@ -456,6 +468,7 @@
+@@ -466,6 +480,7 @@
include $(GLSRCDIR)/unix-dll.mak
include $(GLSRCDIR)/unix-end.mak
include $(GLSRCDIR)/unixinst.mak