Ticket #13849: Portfile-squeak.diff

File Portfile-squeak.diff, 3.9 KB (added by Damien.Pollet@…, 16 years ago)

portfile patch

  • Portfile

    old new  
    4242default_variants        +quartz
    4343
    4444extract.only            ${squeak_vm_src}.gz
    45 post-extract            {
    46         system "cd ${workpath} && mv Squeak-${squeak_vm_version} Squeak-${squeak_img_version}"
    47         file mkdir ${worksrcpath}/build
     45post-extract {
     46        system          "cd ${workpath} && mv Squeak-${squeak_vm_version} Squeak-${squeak_img_version}"
     47        file mkdir      ${worksrcpath}/build
     48        # should do that but requires to rerun autoconf, I prefer to just patch inisqueak instead
     49        # reinplace     "s|imgdir=`eval echo \${libdir}/squeak`|imgdir=`eval echo \${datadir}`|" ${worksrcpath}/platforms/unix/config/configure.ac
     50        # reinplace     "s|plgdir=`eval echo \${imgdir}/\${VM_VERSION}`|plgdir=`eval echo \${libdir}/squeak/\${VM_VERSION}|" ${worksrcpath}/platforms/unix/config/configure.ac
    4851}
    4952
    5053configure.cmd           ../platforms/unix/config/configure
    5154configure.dir           ${worksrcpath}/build
    52 configure.args          --libdir=${prefix}/share --without-quartz --without-x
     55configure.args          --libdir=${prefix}/lib \
     56                        --mandir=${prefix}/share/man \
     57                        --without-quartz --without-x
    5358
    5459build.dir               ${worksrcpath}/build
    5560build.type              gnu
     
    6065        set unzip       "[binaryInPath "unzip"] -o"
    6166        set gzip        "[binaryInPath "gzip"] -f"
    6267       
    63         # Have inisqueak look for a specific version image
    64         reinplace       "s|IMAGE=squeak|IMAGE=squeak.${squeak_img_version}-${squeak_patch_no}|g" ${worksrcpath}/build/inisqueak
    65         reinplace       "s|CHANGES=squeak|CHANGES=squeak.${squeak_img_version}-${squeak_patch_no}|g" ${worksrcpath}/build/inisqueak
     68        set datadir     ${prefix}/share/squeak
     69       
     70        # Have inisqueak look at the right place
     71        reinplace       "s|MAJOR=3|MAJOR=${squeak_short_vrsn}|" ${worksrcpath}/build/inisqueak
     72        reinplace       "s|imgdir=${prefix}/lib/squeak|imgdir=${datadir}|" ${worksrcpath}/build/inisqueak
    6673
    67         # Install it
     74        # Install inisqueak
    6875        xinstall        -m 755 ${worksrcpath}/build/inisqueak \
    6976                                ${destroot}${prefix}/bin/
    7077       
    71         # Now extract the image
    72         file            copy ${distpath}/${squeak_img_src} ${worksrcpath}
    73         file            copy ${distpath}/${squeak_vm_src}.gz ${worksrcpath}
    74         system          "cd ${worksrcpath} && ${unzip} ${squeak_img_src}"
    75         system          "cd ${worksrcpath} && ${gzip} -d ${squeak_vm_src}.gz"
    76 
    77         # And install the image
    78         xinstall        -d ${destroot}${prefix}/share/squeak
    79         xinstall        -m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img} \
    80                                 ${destroot}${prefix}/share/squeak/
    81         xinstall        -m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img_changes} \
    82                                 ${destroot}${prefix}/share/squeak/
     78        # fix bad doc install path (should use --docdir or --datarootdir during configure)
     79        xinstall        -d ${destroot}${datadir}
     80        move            ${destroot}${prefix}/doc ${destroot}${prefix}/share
     81       
     82        # Recompress and install the default image
     83        system          "cd ${worksrcpath} && ${unzip} ${distpath}/${squeak_img_src}"
     84        system          "cd ${worksrcpath} && ${gzip} ${squeak_img_name}/${squeak_img}"
     85        system          "cd ${worksrcpath} && ${gzip} ${squeak_img_name}/${squeak_img_changes}"
     86        xinstall        -d ${destroot}${datadir}
     87        xinstall        -m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img}.gz \
     88                                ${destroot}${datadir}
     89        xinstall        -m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img_changes}.gz \
     90                                ${destroot}${datadir}
    8391        xinstall        -m 644 ${worksrcpath}/${squeak_img_name}/WelcomeSqueak${squeak_short_vrsn} \
    84                                 ${destroot}${prefix}/share/squeak/
     92                                ${destroot}${datadir}
    8593        xinstall        -m 644 ${worksrcpath}/${squeak_img_name}/SqueakV${squeak_short_vrsn}.sources \
    86                                 ${destroot}${prefix}/share/squeak/
    87 
    88         # And compress the image
    89         system          "cd ${destroot}${prefix}/share/squeak && ${gzip} ${squeak_img}"
    90         system          "cd ${destroot}${prefix}/share/squeak && ${gzip} ${squeak_img_changes}"
     94                                ${destroot}${datadir}
    9195
     96        # Link compressed image and changes
     97        system          "cd ${destroot}${datadir} && ln -s ${squeak_img}.gz squeak.image.gz"
     98        system          "cd ${destroot}${datadir} && ln -s ${squeak_img_changes}.gz squeak.changes.gz"
    9299}
    93100
    94101variant quartz  {