[82385] trunk/dports/print/ghostscript
takanori at macports.org
takanori at macports.org
Fri Aug 12 17:13:38 PDT 2011
Revision: 82385
http://trac.macports.org/changeset/82385
Author: takanori at macports.org
Date: 2011-08-12 17:13:37 -0700 (Fri, 12 Aug 2011)
Log Message:
-----------
ghostscript:
- quick fix to avoid segfault in gs_glyph_data_free()
Modified Paths:
--------------
trunk/dports/print/ghostscript/Portfile
Added Paths:
-----------
trunk/dports/print/ghostscript/files/patch-base_gsgdata.c.diff
trunk/dports/print/ghostscript/files/patch-base_gsgdata.h.diff
trunk/dports/print/ghostscript/files/patch-configure.ac.diff
Modified: trunk/dports/print/ghostscript/Portfile
===================================================================
--- trunk/dports/print/ghostscript/Portfile 2011-08-13 00:10:52 UTC (rev 82384)
+++ trunk/dports/print/ghostscript/Portfile 2011-08-13 00:13:37 UTC (rev 82385)
@@ -5,6 +5,7 @@
name ghostscript
version 9.04
+revision 1
categories print
license GPL-3+
maintainers takanori openmaintainer
@@ -25,7 +26,10 @@
mappingresources4pdf_other_${mrversion}.tar.Z:misc
patchfiles patch-base_unix-dll.mak.diff \
patch-base_stdpre.h.diff \
- patch-base_unixinst.mak.diff
+ patch-base_unixinst.mak.diff \
+ patch-base_gsgdata.c.diff \
+ patch-base_gsgdata.h.diff
+# patch-configure.ac.diff
checksums ${distname}.tar.gz \
md5 9c2fb4af1eb609d09dba5bb0fa76173a \
@@ -88,16 +92,16 @@
configure.cppflags-append "-isystem${prefix}/include"
# gs9.xx: The default optimization flag (-O2) causes pdfwrite's strange 'passed invalid object' problem.
-configure.optflags -O0
+#configure.optflags -O0
# gs compiled by clang/llvm-gcc-4.2 sometimes produces 'Segmentation fault: 11'
-if {${configure.compiler} == "llvm-gcc-4.2"} {
+#if {${configure.compiler} == "llvm-gcc-4.2"} {
# if {[rpm-vercomp $xcodeversion 4.1] >= 0} {
# configure.compiler clang
# } else {
- configure.compiler gcc-4.2
+# configure.compiler gcc-4.2
# }
-}
+#}
configure.args --disable-compile-inits \
--disable-cups \
Added: trunk/dports/print/ghostscript/files/patch-base_gsgdata.c.diff
===================================================================
--- trunk/dports/print/ghostscript/files/patch-base_gsgdata.c.diff (rev 0)
+++ trunk/dports/print/ghostscript/files/patch-base_gsgdata.c.diff 2011-08-13 00:13:37 UTC (rev 82385)
@@ -0,0 +1,11 @@
+--- base/gsgdata.c.orig 2011-08-05 20:12:20.000000000 +0900
++++ base/gsgdata.c 2011-08-13 08:40:58.000000000 +0900
+@@ -51,7 +51,7 @@
+ gs_glyph_data_free(gs_glyph_data_t *pgd, client_name_t cname)
+ {
+ if (pgd != 0) {
+- if (pgd->procs != 0)
++ if (pgd->procs == &gs_glyph_cache_elem_procs || pgd->procs == &no_free_procs || pgd->procs == &free_by_font_procs)
+ pgd->procs->free(pgd, cname);
+ gs_glyph_data_from_null(pgd);
+ }
Added: trunk/dports/print/ghostscript/files/patch-base_gsgdata.h.diff
===================================================================
--- trunk/dports/print/ghostscript/files/patch-base_gsgdata.h.diff (rev 0)
+++ trunk/dports/print/ghostscript/files/patch-base_gsgdata.h.diff 2011-08-13 00:13:37 UTC (rev 82385)
@@ -0,0 +1,12 @@
+--- base/gsgdata.h.orig 2011-08-05 20:12:20.000000000 +0900
++++ base/gsgdata.h 2011-08-13 08:40:25.000000000 +0900
+@@ -127,4 +127,9 @@
+ /* from_null(pgd) is a shortcut for from_string(pgd, NULL, 0, NULL). */
+ void gs_glyph_data_from_null(gs_glyph_data_t *pgd);
+
++// prototypes
++static const gs_glyph_data_procs_t gs_glyph_cache_elem_procs;
++static const gs_glyph_data_procs_t no_free_procs;
++static const gs_glyph_data_procs_t free_by_font_procs;
++
+ #endif /* gsgdata_INCLUDED */
Added: trunk/dports/print/ghostscript/files/patch-configure.ac.diff
===================================================================
--- trunk/dports/print/ghostscript/files/patch-configure.ac.diff (rev 0)
+++ trunk/dports/print/ghostscript/files/patch-configure.ac.diff 2011-08-13 00:13:37 UTC (rev 82385)
@@ -0,0 +1,11 @@
+--- configure.ac.orig 2011-08-05 20:12:20.000000000 +0900
++++ configure.ac 2011-08-13 01:02:40.000000000 +0900
+@@ -131,7 +131,7 @@
+ ;;
+ Darwin*)
+ if test $ac_cv_prog_gcc = yes; then
+- CC_OPT_FLAGS_TO_TRY="-O2"
++ CC_OPT_FLAGS_TO_TRY="-g -O0"
+ CC_DBG_FLAGS_TO_TRY="-g -O0"
+ fi
+ ;;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110812/9e6a6607/attachment.html>
More information about the macports-changes
mailing list