Ticket #46057: patch-p5-sgmlspm.diff

File patch-p5-sgmlspm.diff, 3.9 KB (added by dbevans (David B. Evans), 10 years ago)

Patch to Portfile to resolve remaining issues

  • Portfile

     
    77perl5.branches      5.16 5.18 5.20
    88perl5.setup         SGMLSpm 1.03ii
    99# version needs to be set because of a bug in the perl5 portgroup that cannot handle characters in the version number.
    10 # See #43727 <http://trac.macports.org/ticket/43727>. 
     10# See #43727 <http://trac.macports.org/ticket/43727>.
    1111version             1.03ii.0
    12 revision            1
     12revision            2
    1313platforms           darwin
    1414license             GPL-2+
    1515maintainers         gmail.com:tlockhart1976 openmaintainer
     
    3131worksrcdir          ${perl5.module}
    3232
    3333if {${perl5.major} != ""} {
     34    patchfiles      patch-Makefile.diff
     35
    3436    post-patch {
    35         reinplace "s|/usr/local/|${destroot}${prefix}/|" ${worksrcpath}/Makefile
    36         reinplace "s|/usr/local/|${destroot}${prefix}/|" ${worksrcpath}/DOC/Makefile
    37 
    38         xinstall -d -m 775 ${destroot}${prefix}/bin
    39         xinstall -d -m 775 ${destroot}${perl5.lib}
    40         xinstall -d -m 775 ${destroot}${perl5.lib}/SGMLS
     37        reinplace "s|__MP_PERL__|${perl5.bin}|" ${worksrcpath}/Makefile
     38        reinplace "s|__MP_BINDIR__|${destroot}${perl5.bindir}|" ${worksrcpath}/Makefile
     39        reinplace "s|__MP_PERL5DIR__|${destroot}${perl5.lib}|" ${worksrcpath}/Makefile
     40        reinplace "s|__MP_HTMLDIR__|${destroot}${prefix}/share/doc/${subport}|" ${worksrcpath}/Makefile
    4141    }
    4242
    43     use_configure       no
    44 
    45     build.args-append   PERL=${perl5.bin} BINDIR=${destroot}${prefix}/bin
    46     build.args-append   PERL5DIR=${destroot}${perl5.lib}
    47     build.args-append   HTMLDIR=${destroot}${prefix}/share/doc/${subport}
    48 
     43    use_configure   no
     44    build {}
     45   
    4946    destroot.target install
    5047}
  • files/patch-Makefile.diff

     
     1--- Makefile.orig       1995-12-05 04:26:11.000000000 -0800
     2+++ Makefile    2014-12-29 15:30:05.000000000 -0800
     3@@ -13,13 +13,13 @@
     4 #
     5 
     6 # Where is the binary for perl5 located on your system?
     7-PERL = /usr/bin/perl
     8+PERL = __MP_PERL__
     9 
     10 # Where do you want the sgmlspl executable script to be installed?
     11-BINDIR = /usr/local/bin
     12+BINDIR = __MP_BINDIR__
     13 
     14 # Where do you put local perl5 libaries?
     15-PERL5DIR = /usr/local/lib/perl5
     16+PERL5DIR = __MP_PERL5DIR__
     17 MODULEDIR = ${PERL5DIR}/SGMLS
     18 
     19 # Where do you want to put sgmlspl specifications?
     20@@ -29,14 +29,14 @@
     21 # do you intend to put it?  'make html' will create two
     22 # subdirectories, ${HTMLDIR}/SGMLSpm and ${HTMLDIR}/sgmlspl, and place
     23 # its files there.
     24-HTMLDIR = /usr/local/lib/www/docs
     25+HTMLDIR = __MP_HTMLDIR__
     26 
     27 
     28 #
     29 # End of user options.
     30 #
     31 
     32-HTML_SOURCES = DOC/HTML/SGMLSpm/ DOC/HTML/sgmlspl/
     33+HTML_SOURCES = DOC/HTML/SGMLSpm DOC/HTML/sgmlspl
     34 
     35 FILES =        ${BINDIR}/sgmlspl \
     36        ${PERL5DIR}/SGMLS.pm \
     37@@ -46,13 +46,17 @@
     38 
     39 all: install docs
     40 
     41-install: install_system # install_html
     42+install: install_system install_html
     43 
     44 install_system: ${MODULEDIR} ${FILES}
     45 
     46 dist: ${DIST}
     47 
     48 ${BINDIR}/sgmlspl: sgmlspl.pl
     49+       if [ ! -d ${BINDIR} ]; then\
     50+         mkdir -p ${BINDIR}; \
     51+         chmod a+x ${BINDIR}; \
     52+       fi
     53        sed -e 's!/usr/bin/perl!${PERL}!' sgmlspl.pl > ${BINDIR}/sgmlspl
     54        chmod a+x,a+r ${BINDIR}/sgmlspl
     55 
     56@@ -62,7 +66,7 @@
     57 
     58 ${MODULEDIR}:
     59        if [ ! -d ${MODULEDIR} ]; then\
     60-         mkdir ${MODULEDIR}; \
     61+         mkdir -p ${MODULEDIR}; \
     62          chmod a+x ${MODULEDIR}; \
     63        fi
     64 
     65@@ -80,8 +84,12 @@
     66 
     67 install_html: ${HTML_SOURCES}
     68        cd DOC; make html
     69+       if [ ! -d ${HTMLDIR} ]; then\
     70+         mkdir -p ${HTMLDIR}; \
     71+         chmod a+x ${HTMLDIR}; \
     72+       fi
     73        rm -rf ${HTMLDIR}/SGMLSpm ${HTMLDIR}/sgmlspl
     74-       cp -r ${HTML_SOURCES} ${HTMLDIR}
     75+       cp -R ${HTML_SOURCES} ${HTMLDIR}
     76        chmod a+x,a+r ${HTMLDIR}/SGMLSpm ${HTMLDIR}/sgmlspl
     77        chmod a+r ${HTMLDIR}/SGMLSpm/* ${HTMLDIR}/sgmlspl/*
     78