Update of /cvsroot/fink/experimental/todai/ecc/main/finkinfo/text
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13141

Modified Files:
        ghostscript-esp.info ghostscript-esp.patch 
Log Message:
Added a shell script "finkcups", which adds/removes files to/from system's CUPS.


Index: ghostscript-esp.patch
===================================================================
RCS file: 
/cvsroot/fink/experimental/todai/ecc/main/finkinfo/text/ghostscript-esp.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ghostscript-esp.patch       26 Feb 2006 17:34:40 -0000      1.5
+++ ghostscript-esp.patch       27 Feb 2006 19:00:13 -0000      1.6
@@ -67,151 +67,6 @@
        }
      }
      spputc(s, pxtSetLineDash);
-Index: gs/src/gxalloc.h
-===================================================================
-RCS file: /cvs/ghostscript/gs/src/gxalloc.h,v
-retrieving revision 1.11
-diff -b -u -r1.11 gxalloc.h
---- gs/src/gxalloc.h   4 Aug 2004 19:36:12 -0000       1.11
-+++ gs/src/gxalloc.h   14 Sep 2004 21:44:37 -0000
-@@ -143,7 +143,7 @@
-     byte *cbot;                       /* bottom of free area */
-                               /* (top of aligned objects) */
-     obj_header_t *rcur;               /* current refs object, 0 if none */
--    byte *rtop;                       /* top of rcur */
-+    byte *rtop;                       /* top of rcur, not aligned to 
obj_align_mod */
-     byte *ctop;                       /* top of free area */
-                               /* (bottom of strings) */
-     byte *climit;             /* top of strings */
-Index: gs/src/gxobj.h
-===================================================================
-RCS file: /cvs/ghostscript/gs/src/gxobj.h,v
-retrieving revision 1.6
-diff -b -u -r1.6 gxobj.h
---- gs/src/gxobj.h     21 Feb 2002 22:24:53 -0000      1.6
-+++ gs/src/gxobj.h     14 Sep 2004 21:44:37 -0000
-@@ -110,20 +110,22 @@
- /* The only possible values for obj_align_mod are 4, 8, or 16.... */
- #if obj_align_mod == 4
- #  define log2_obj_align_mod 2
--#else
--#if obj_align_mod == 8
-+#elif obj_align_mod == 8
- #  define log2_obj_align_mod 3
--#else
--#if obj_align_mod == 16
-+#elif obj_align_mod == 16
- #  define log2_obj_align_mod 4
--#endif
--#endif
-+#elif obj_align_mod == 32  /* for testing, not seen yet in the wild */
-+#  define log2_obj_align_mod 5
-+#else
-+#  error Unexpected value of obj_align_mod
- #endif
- #define obj_align_mask (obj_align_mod-1)
- #define obj_align_round(siz)\
-   (uint)(((siz) + obj_align_mask) & -obj_align_mod)
- #define obj_size_round(siz)\
-   obj_align_round((siz) + sizeof(obj_header_t))
-+#define ptr_align_round(p)\
-+  ((byte *)obj_align_round((size_t)(p)))
- 
- /* Define the real object header type, taking alignment into account. */
- struct obj_header_s {         /* must be a struct because of forward 
reference */
-Index: gs/src/ialloc.c
-===================================================================
-RCS file: /cvs/ghostscript/gs/src/ialloc.c,v
-retrieving revision 1.7
-diff -b -u -r1.7 ialloc.c
---- gs/src/ialloc.c    4 Aug 2004 19:36:12 -0000       1.7
-+++ gs/src/ialloc.c    14 Sep 2004 21:44:37 -0000
-@@ -157,8 +157,8 @@
- 
-     /* If we're allocating a run of refs already, */
-     /* and we aren't about to overflow the maximum run length, use it. */
--    if (mem->cc.rtop == mem->cc.cbot &&
--      num_refs < (mem->cc.ctop - mem->cc.cbot) / sizeof(ref) &&
-+    if (ptr_align_round(mem->cc.rtop) == mem->cc.cbot &&
-+      num_refs < (mem->cc.ctop - mem->cc.rtop) / sizeof(ref) &&
-       mem->cc.rtop - (byte *) mem->cc.rcur + num_refs * sizeof(ref) <
-       max_size_st_refs
-       ) {
-@@ -169,8 +169,8 @@
-                 ialloc_trace_space(mem), client_name_string(cname),
-                 num_refs, (ulong) obj);
-       mem->cc.rcur[-1].o_size += num_refs * sizeof(ref);
--      end = (ref *) (mem->cc.rtop = mem->cc.cbot +=
--                     num_refs * sizeof(ref));
-+      end = (ref *) (mem->cc.rtop += num_refs * sizeof(ref));
-+      mem->cc.cbot = ptr_align_round(mem->cc.rtop);
-       make_mark(end - 1);
-     } else {
-       /*
-@@ -225,12 +225,12 @@
-       return_error(e_Fatal);
-     diff = old_num_refs - new_num_refs;
-     /* Check for LIFO.  See gs_free_ref_array for more details. */
--    if (mem->cc.rtop == mem->cc.cbot &&
-+    if (ptr_align_round(mem->cc.rtop) == mem->cc.cbot &&
-       (byte *) (obj + (old_num_refs + 1)) == mem->cc.rtop
-       ) {
-       /* Shorten the refs object. */
--      ref *end = (ref *) (mem->cc.cbot = mem->cc.rtop -=
--                          diff * sizeof(ref));
-+      ref *end = (ref *) (mem->cc.rtop -= diff * sizeof(ref));
-+      mem->cc.cbot = ptr_align_round(mem->cc.rtop);
- 
-       if_debug4('A', "[a%d:<$ ]%s(%u) 0x%lx\n",
-                 ialloc_trace_space(mem), client_name_string(cname), diff,
-@@ -264,7 +264,7 @@
-      */
-     if (!r_has_type(parr, t_array))
-       DO_NOTHING;             /* don't look for special cases */
--    else if (mem->cc.rtop == mem->cc.cbot &&
-+    else if (ptr_align_round(mem->cc.rtop) == mem->cc.cbot &&
-            (byte *) (obj + (num_refs + 1)) == mem->cc.rtop
-       ) {
-       if ((obj_header_t *) obj == mem->cc.rcur) {
-@@ -278,7 +278,8 @@
-                     ialloc_trace_space(mem), client_name_string(cname),
-                     num_refs, (ulong) obj);
-           mem->cc.rcur[-1].o_size -= num_refs * sizeof(ref);
--          mem->cc.rtop = mem->cc.cbot = (byte *) (obj + 1);
-+          mem->cc.rtop = (byte *) (obj + 1);
-+          mem->cc.cbot = ptr_align_round(mem->cc.rtop);
-           make_mark(obj);
-       }
-       return;
-Index: gs/src/igcref.c
-===================================================================
-RCS file: /cvs/ghostscript/gs/src/igcref.c,v
-retrieving revision 1.6
-diff -b -u -r1.6 igcref.c
---- gs/src/igcref.c    4 Aug 2004 19:36:12 -0000       1.6
-+++ gs/src/igcref.c    14 Sep 2004 21:44:37 -0000
-@@ -720,15 +720,18 @@
-           new_size += sizeof(ref_packed);
-     /* We want to make the newly freed space into a free block, */
-     /* but we can only do this if we have enough room. */
--    if (size - new_size < sizeof(obj_header_t)) {     /* Not enough room.  
Pad to original size. */
-+    if (size < obj_align_round(new_size) + sizeof(obj_header_t)) { /* Not 
enough room.  Pad to original size. */
-       while (new_size < size)
-           *dest++ = pt_tag(pt_integer),
-               new_size += sizeof(ref_packed);
-     } else {
--      obj_header_t *pfree = (obj_header_t *) ((ref *) dest + 1);
-+        byte *pfree_u = (byte *)dest + sizeof(ref);
-+        byte *pfree_a = ptr_align_round(pfree_u);
-+        obj_header_t *pfree = (obj_header_t *)pfree_a;
-+        int align = pfree_a - pfree_u;
- 
-       pfree->o_alone = 0;
--      pfree->o_size = size - new_size - sizeof(obj_header_t);
-+      pfree->o_size = size - new_size - sizeof(obj_header_t) - align;
-       pfree->o_type = &st_bytes;
-     }
-     /* Re-create the final ref. */
 diff -ruN espgs-7.07.1.orig/src/configure.ac espgs-7.07.1/src/configure.ac
 --- espgs-7.07.1.orig/src/configure.ac Thu Mar 24 01:00:21 2005
 +++ espgs-7.07.1/src/configure.ac      Thu Mar 24 01:15:03 2005
@@ -835,3 +690,110 @@
 +
 +% Sazanami Gothic
 +/Sazanami-Gothic-Regular 
(<PREFIX>/lib/X11/fonts/sazanami/sazanami-gothic.ttf) ;
+--- espgs-7.07.1-orig/finkcups 1970-01-01 09:00:00.000000000 +0900
++++ espgs-7.07.1/finkcups      2006-02-28 02:55:25.000000000 +0900
+@@ -0,0 +1,104 @@
++#!/bin/bash
++
++show="/bin/echo"
++run=
++function show_and_run () {
++
++      ${show} "$@"
++      ${run}  "$@"
++}
++
++function get_cups_location () {
++
++      if [ `which cups-config` ]
++      then
++              CUPSSERVER=`cups-config --serverbin`
++              CUPSCONFIG=`cups-config --serverroot`
++              CUPSDATA=`cups-config --datadir`
++      else
++              ${show} " * ${0##*/}: Cannot find the command "cups-config" in 
your PATH!"
++              exit 1
++      fi
++}
++
++function backup_file () {
++
++      if [ -f ${1} ]
++      then
++              show_and_run /bin/mv ${1} ${1}.finksave
++      fi
++}
++
++function restore_file () {
++
++      if [ -f ${1}.finksave ]
++      then
++              show_and_run /bin/mv ${1}.finksave ${1}
++      fi
++}
++
++function remove_symlink () {
++
++      if [ -L ${1} -a -f ${1}.finksave ]
++      then
++              show_and_run /bin/rm ${1}
++      fi
++}
++
++function link_to_system () {
++
++      get_cups_location
++
++      /bin/mkdir -p ${CUPSSERVER}/filter
++      for file in <PREFIX>/lib/cups/filter/*
++      do
++              backup_file ${CUPSSERVER}/filter/${file##*/}
++              show_and_run /bin/ln -s ${file} ${CUPSSERVER}/filter
++      done
++
++      /bin/mkdir -p ${CUPSCONFIG}
++      for file in <PREFIX>/etc/cups/*
++      do
++              backup_file ${CUPSCONFIG}/${file##*/}
++              show_and_run /bin/ln -s ${file} ${CUPSCONFIG}
++      done
++
++      /bin/mkdir -p ${CUPSDATA}/model
++      for file in <PREFIX>/share/cups/model/*
++      do
++              backup_file ${CUPSDATA}/model/${file##*/}
++              show_and_run /bin/ln -s ${file} ${CUPSDATA}/model
++      done
++}
++
++function unlink_from_system () {
++
++      get_cups_location
++
++      for file in <PREFIX>/lib/cups/filter/*
++      do
++              remove_symlink ${CUPSSERVER}/filter/${file##*/}
++              restore_file   ${CUPSSERVER}/filter/${file##*/}
++      done
++
++      for file in <PREFIX>/etc/cups/*
++      do
++              remove_symlink ${CUPSCONFIG}/${file##*/}
++              restore_file   ${CUPSCONFIG}/${file##*/}
++      done
++
++      for file in <PREFIX>/share/cups/model/*
++      do
++              remove_symlink ${CUPSDATA}/model/${file##*/}
++              restore_file   ${CUPSDATA}/model/${file##*/}
++      done
++}
++
++case "$1" in
++      add)
++              link_to_system ;;
++      remove)
++              unlink_from_system ;;
++      *)
++              ${show} "usage: ${0##*/} {add|remove}" ;;
++esac

Index: ghostscript-esp.info
===================================================================
RCS file: 
/cvsroot/fink/experimental/todai/ecc/main/finkinfo/text/ghostscript-esp.info,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ghostscript-esp.info        26 Feb 2006 17:34:40 -0000      1.7
+++ ghostscript-esp.info        27 Feb 2006 19:00:13 -0000      1.8
@@ -1,6 +1,6 @@
 Package: ghostscript-esp
 Version: 7.07.1
-Revision: 21
+Revision: 23
 Description: Enhanced GNU Ghostscript with better CJK and printer support
 Depends: x11, ghostscript-fonts, libpng3-shlibs (>= 1.2.5-3), gettext, 
applesystemfonts, appleotffonts, ipafonts
 BuildDepends: x11-dev, libpng3 (>= 1.2.5-3), gimp-print-dev | gimp-print7-dev, 
cups-dev, gettext-dev
@@ -27,6 +27,7 @@
 Source17: 
http://www.aihara.co.jp/~taiji/gyve/tmp/ghostscript-7.07-nosyoffsetcheck.patch
 Source18: 
http://www.aihara.co.jp/~taiji/gyve/tmp/fix_cidfonttype2_Adobe-Japan1-6.patch
 Source19: 
http://www.aihara.co.jp/~taiji/gyve/tmp/modify_ps2pdfwr-20050921.patch
+Source20: 
http://gentoo.cites.uiuc.edu/pub/gentoo-portage/app-text/ghostscript-esp/files/gs-fix-gc.patch
 Source-MD5:  d30bf5c09f2c7caa8291f6305cf03044
 Source2-MD5: dbd5f3b47ed13132f04c685d608a7547
 Source3-MD5: dfc93dd2aaaf2b86d2fd55f654c13261
@@ -46,6 +47,7 @@
 Source17-MD5: bb72072d807ad0358b2850dead480c98
 Source18-MD5: 8bac43d7cdd1c503557b3209469c06d5
 Source19-MD5: 27903349daf2046d4e244d3d6f81bfaf
+Source20-MD5: 8c6a3d7e8897b4297ef853dbd89e408b
 SourceDirectory: espgs-%v
 Source3ExtractDir: Resource
 Source4ExtractDir: Resource
@@ -95,6 +97,9 @@
  # add NeverEmbedCIDFontList and AlwaysEmbedCIDFontList
  (cd lib && patch -p0 < ../../modify_ps2pdfwr-20050921.patch)
 
+ # Fix the garbage collector on ia64 and ppc
+ patch -p1 < ../gs-fix-gc.patch
+
  sed 's|<PREFIX>|%p|g' < %a/%n.patch | patch -p1
 <<
 NoSetMAKEFLAGS: true
@@ -111,60 +116,14 @@
  cp -R ../Resource %i/share/ghostscript/
  install -m 755 -d %i/share/ghostscript/Resource/Font
  install -m 755 -d %i/share/ghostscript/Resource/CIDFont
+
+ install -m 755 -d       %i/sbin
+ install -m 755 finkcups %i/sbin
 <<
 DocFiles: CHANGES INSTALL LICENSE README*
-PostInstScript: <<
-# if [ `which cups-config` ]
-# then
-# CUPSSERVER=`cups-config --serverbin`
-# CUPSCONFIG=`cups-config --serverroot`
-# CUPSDATA=`cups-config --datadir`
-#
-#   mkdir -p ${CUPSSERVER}/filter
-#   for file in %p/lib/cups/filter/*
-#   do
-#     ln -s ${file} ${CUPSSERVER}/filter
-#   done
-#
-#   mkdir -p ${CUPSCONFIG}
-#   for file in %p/etc/cups/*
-#   do
-#     ln -s ${file} ${CUPSCONFIG} 
-#   done
-#
-#   mkdir -p ${CUPSDATA}/model
-#   for file in %p/share/cups/model/*
-#   do
-#     ln -s ${file} ${CUPSDATA}/model
-#   done
-#
-# fi
-<<
-PreRmScript: <<
-# if [ `which cups-config` ]
-# then
-# CUPSSERVER=`cups-config --serverbin`
-# CUPSCONFIG=`cups-config --serverroot`
-# CUPSDATA=`cups-config --datadir`
-#
-#   for file in %p/lib/cups/filter/*
-#   do
-#     rm -f ${CUPSSERVER}/filter/`basename ${file}`
-#   done
-#
-#   for file in %p/etc/cups/*
-#   do
-#     rm -f ${CUPSCONFIG}/`basename ${file}` 
-#   done
-#
-#   for file in %p/share/cups/model/*
-#   do
-#     rm -f ${CUPSDATA}/model/`basename ${file}`
-#   done
-#
-# fi
-<<
+PreRmScript: [ -x %p/sbin/finkcups ] && %p/sbin/finkcups remove
 DescUsage: <<
+[About Font]
  ESP Ghostscript now supports for applesystemfonts and appleotffonts.
  In the case of previewing Japanese documents, however, GS uses ipafonts
  (TTF) instead of appleotffonts. This is because GS may take a very long
@@ -175,7 +134,14 @@
  In order to create PDF file from PS file with embedded fonts, run ps2pdfwr
  like this:
   $ env NeverEmbedFontList=' ' NeverEmbedCIDFontList=' ' ps2pdfwr sample.ps
- See ps2pdfwr for details. It doesn't embed fonts by default. 
+ See ps2pdfwr for details. It doesn't embed fonts by default.
+
+[About CUPS]
+ In order to enable ESP GS's CUPS, run the following command manually: 
+  $ sudo %p/sbin/finkcups add
+ This makes symbolic links to system's CUPS directory. Backup files are
+ automatically created if files already exist. When this package
+ (ghostscript-esp) is removed, original files are restored from those backups.
 <<
 DescPackaging: <<
  A patch to ps2ps is based on Gentoo Linux's gs7.07.1-ps2ps.patch.
@@ -183,15 +149,15 @@
  A patch to gs_res.ps.in is based on Gentoo Linux's gs7.07.1-cjk.diff.
  A patch to gdevpx.c is based on Gentoo Linux's gs7.05.6-gdevpx.patch.
  Patches to gxalloc.h, gxobj.h, ialloc.c and igcref.c are
-  based on Gentoo Linux'sgs-fix-gc.patch.
+  based on Gentoo Linux's gs-fix-gc.patch.
 
  A patch to configure.ac handles problems of encryption library.
- A patch to cups.mak changes install location of files related to cups.
+ A patch to cups.mak changes install location of files related to CUPS.
  A patch to unixinst.mak adds CIDFnmap.{IPA,Saz,OSX} to install list.
 
  Patches to CIDFnmap.{CJK,IPA,Koc,Saz} are
   based on Gentoo Linux's gs7.07.1-cjk.diff (again).
- Patches to CIDFnmap, CIDFnmap.OSX, and patches from Web are
+ Patches to CIDFnmap, CIDFnmap.OSX, and most of patches from Web are
   based on Mr. Yamada's Web page: http://www.aihara.co.jp/~taiji/gyve/
 <<
 Maintainer: Todai Fink Team <[EMAIL PROTECTED]>



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to