Ticket #13388: ghostscript.diff

File ghostscript.diff, 7.0 KB (added by takanori@…, 17 years ago)
  • files/patch-src_unix-aux.mak.diff

     
     1--- src/unix-aux.mak.orig       2007-10-20 09:55:55.000000000 +0900
     2+++ src/unix-aux.mak    2007-11-23 18:29:40.000000000 +0900
     3@@ -83,7 +83,7 @@
     4  $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gsutil.$(OBJ)
     5 
     6 $(MKROMFS_XE): $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS)
     7-       $(CCAUX) $(GENOPT) $(CFLAGS_DEBUG) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE) $(MKROMFS_OBJS) -lm $(EXTRALIBS)
     8+       $(CCAUX) $(GENOPT) $(CFLAGS_DEBUG) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE) $(MKROMFS_OBJS) -lm $(EXTRALIBS) $(LDFLAGS)
     9 
     10 # Query the environment to construct gconfig_.h.
     11 # The "else true;" is required because Ultrix's implementation of sh -e
  • files/patch-configure.diff

     
     1--- configure.orig      2007-11-22 05:16:00.000000000 +0900
     2+++ configure   2007-11-24 00:03:39.000000000 +0900
     3@@ -7022,7 +7022,7 @@
     4 fi
     5 if test $ac_cv_header_fontconfig_fontconfig_h = yes; then
     6 
     7-                   FONTCONFIG_LIBS="-lfontconfg"
     8+                   FONTCONFIG_LIBS="-lfontconfig"
     9                    HAVE_FONTCONFIG="-DHAVE_FONTCONFIG"
     10 
     11 fi
  • files/patch-src_macosx.mak.diff

     
     1--- src/macosx.mak.orig 2007-11-10 06:18:04.000000000 +0900
     2+++ src/macosx.mak      2007-11-24 02:24:40.000000000 +0900
     3@@ -54,7 +54,7 @@
     4 
     5 FRAMEWORK_NAME=Ghostscript
     6 FRAMEWORK_EXT=.framework
     7-prefix = /Library/Frameworks/$(FRAMEWORK_NAME)$(FRAMEWORK_EXT)
     8+prefix = @@DESTROOT@@@@PREFIX@@/Library/Frameworks/$(FRAMEWORK_NAME)$(FRAMEWORK_EXT)
     9 exec_prefix = $(prefix)
     10 bindir = $(exec_prefix)/bin
     11 scriptdir = $(bindir)
  • files/patch-src_macos-fw.mak.diff

     
     1--- src/macos-fw.mak.orig       2007-06-06 07:23:38.000000000 +0900
     2+++ src/macos-fw.mak    2007-11-24 02:24:12.000000000 +0900
     3@@ -78,7 +78,7 @@
     4 # a separate .dylib target if we're going to build them at all
     5 # we should also be passing compatibility versions
     6 
     7-SODEFS=LDFLAGS='$(LDFLAGS) $(CFLAGS_SO) -dynamiclib -install_name $(prefix)/$(FRAMEWORK_NAME)'\
     8+SODEFS=LDFLAGS='$(LDFLAGS) $(CFLAGS_SO) -dynamiclib -install_name @@PREFIX@@/Library/Frameworks/$(FRAMEWORK_NAME)$(FRAMEWORK_EXT)/$(FRAMEWORK_NAME)'\
     9  GS_XE=$(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR)\
     10  STDIO_IMPLEMENTATION=c\
     11  DISPLAY_DEV=$(DD)$(SOOBJRELDIR)/display.dev\
  • Portfile

     
    22
    33PortSystem 1.0
    44name        ghostscript
    5 version     8.60
     5version     8.61
    66homepage    http://www.cs.wisc.edu/~ghost/
    77description GPL Ghostscript, An interpreter for PostScript and PDF
    88categories  print
     
    1919distfiles   ${distname}.tar.gz:source \
    2020        ghostscript-fonts-std-8.11.tar.gz:fonts \
    2121        ghostscript-fonts-other-6.0.tar.gz:fonts
     22patchfiles  patch-configure.diff \
     23            patch-src_macos-fw.mak.diff \
     24            patch-src_macosx.mak.diff \
     25            patch-src_unix-aux.mak.diff
    2226
    23 checksums   ${distname}.tar.gz md5 ce7c276891411e0865e006f0310ea1ec \
     27checksums   ${distname}.tar.gz md5 aa55ca90b891c1b3b7402a09a2146a87 \
    2428        ghostscript-fonts-std-8.11.tar.gz md5 6865682b095f8c4500c54b285ff05ef6 \
    2529        ghostscript-fonts-other-6.0.tar.gz md5 1a643ae62ef166562e4d422b1a601272
    2630
     
    4044
    4145build.target
    4246
    43 destroot.destdir    prefix=${destroot}/${prefix}
     47destroot.violate_mtree  yes
    4448
    4549post-destroot   {
    46         file copy ${workpath}/fonts ${destroot}/${prefix}/share/ghostscript
     50        copy ${workpath}/fonts ${destroot}${prefix}/share/ghostscript/fonts
    4751        }
    4852
     53pre-activate {
     54    # remove some files accidentally installed by gs 8.60. (#12637)
     55    if {![variant_isset no_cups]} {
     56        set renamed_files {}
     57        foreach f {/private/etc/cups/pstoraster.convs
     58                   /usr/libexec/cups/filter/pstopxl
     59                   /usr/libexec/cups/filter/pstoraster
     60                   /usr/share/cups/model/pxlcolor.ppd
     61                   /usr/share/cups/model/pxlmono.ppd} {
     62            if {[file exists ${f}]} {
     63                if {[file exists ${f}.old]} {
     64                    delete ${f}.old
     65                }
     66                move ${f} ${f}.old
     67                lpush renamed_files ${f}
     68            }
     69        }
     70        if {[llength ${renamed_files}]} {
     71            ui_msg "\nThe following files have been renamed (and should be removed):"
     72            foreach f ${renamed_files} {
     73                ui_msg "    ${f} -> ${f}.old"
     74            }
     75            ui_msg ""
     76        }
     77    }
     78}
     79
    4980# Added variant that build the Ghostscript framework. (Thanks, Sal!)
    5081variant gslib   {
    5182        post-patch {
    52             cd ${workpath}/${name}-${version}
    53             reinplace "s|/Library/Frameworks|${destroot}${prefix}/Library/Frameworks|" \
    54                         src/macosx.mak
     83            foreach f {src/macosx.mak src/macos-fw.mak} {
     84                reinplace "s|@@DESTROOT@@|${destroot}|" ${worksrcpath}/${f}
     85                reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/${f}
     86            }
    5587        }
    5688     
    5789        post-build {
    58             cd ${workpath}/${name}-${version}
    59             file rename Makefile Makefile.CONFIGURE
    60             file link Makefile src/macosx.mak
    61             system "make framework"
    62             file delete Makefile
    63             file rename Makefile.CONFIGURE Makefile
     90            move ${worksrcpath}/Makefile ${worksrcpath}/Makefile.CONFIGURE
     91            ln -s ${worksrcpath}/src/macosx.mak ${worksrcpath}/Makefile
     92            system "cd ${worksrcpath} && make framework"
     93            delete ${worksrcpath}/Makefile
     94            move ${worksrcpath}/Makefile.CONFIGURE ${worksrcpath}/Makefile
    6495        }
    6596     
    6697        post-destroot {
    67             cd ${workpath}/${name}-${version}
    6898            xinstall -m 755 -d ${destroot}${prefix}/Library/Frameworks
    69             file rename Makefile Makefile.CONFIGURE
    70             file link Makefile src/macosx.mak
    71             system "make framework_install"
    72             file delete Makefile
    73             file rename Makefile.CONFIGURE Makefile
     99            move ${worksrcpath}/Makefile ${worksrcpath}/Makefile.CONFIGURE
     100            ln -s ${worksrcpath}/src/macosx.mak ${worksrcpath}/Makefile
     101            system "cd ${worksrcpath} && make framework_install"
     102            delete ${worksrcpath}/Makefile
     103            move ${worksrcpath}/Makefile.CONFIGURE ${worksrcpath}/Makefile
    74104        }
    75105}
    76106