Ticket #44829: patch-itcl-Portfile.diff

File patch-itcl-Portfile.diff, 6.8 KB (added by jul_bsd@…, 9 years ago)
  • lang/itcl//Portfile

    old new  
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    12# $Id: Portfile 91510 2012-04-03 21:59:59Z jeremyhu@macports.org $
    23
    34PortSystem 1.0
    45
    5 name                    itcl
    6 version                 3.4b1
    7 categories              lang
    8 license                 Tcl/Tk
    9 maintainers             nomaintainer
    10 description             Object oriented extension to Tcl.
    11 long_description        ${description}
    12 homepage                http://incrtcl.sourceforge.net/
    13 platforms               darwin
    14 master_sites            sourceforge:incrtcl:itcl \
    15                         sourceforge:tcl:tcl
    16 dist_subdir             tcltk
    17 distname                ${name}${version}
     6name                itcl
     7version             4.0.2
     8categories          lang
     9license             Tcl/Tk
     10maintainers         nomaintainer
     11description         Object oriented extension to Tcl.
     12long_description    ${description}
     13homepage            http://incrtcl.sourceforge.net/
     14platforms           darwin
     15master_sites        sourceforge:incrtcl:itcl \
     16                    sourceforge:tcl:tcl
     17dist_subdir         tcltk
     18distname            ${name}${version}
    1819# Set tclv and md5 checksum to the current MacPorts Tcl port version, though port doesn't
    1920# break if they aren't in sync.
    2021
    21 set tclv                8.5.9
     22set vstub           ${version}
     23set tclv            8.6.2
     24distfiles           ${distname}.tar.gz:itcl \
     25                    tcl${tclv}-src.tar.gz:tcl
     26depends_build       port:tcl port:tk
     27build.args          CPPFLAGS=-I${prefix}/include
     28
     29configure.env       TCLROOT=${prefix}
     30configure.cflags    "-I${workpath}/tcl${tclv}/generic -I${workpath}/tcl${tclv}/unix"
     31#configure.ldflags-append    "-tcl8.5"
     32
     33## FIXME! Error: org.macports.activate for port itcl returned: Image error: /opt/local/include/itcl.h is being used by the active tcl port. + many other files...
     34configure.args      --with-tcl=${prefix}/lib \
     35                    --includedir=${prefix}/include/itcl
    2236
    23 distfiles               ${distname}.tar.gz:itcl \
    24                                 tcl${tclv}-src.tar.gz:tcl
    25 checksums               ${distname}.tar.gz md5 e4c97750c08ab47e960b91911fdd0132 \
    26                                 tcl${tclv}-src.tar.gz md5 8512d8db3233041dd68a81476906012a
    27 depends_build           port:tcl port:tk
    28 build.args              CPPFLAGS=-I${prefix}/include
    29 worksrcdir              ${name}3.4
    30 
    31 configure.env           TCLROOT=${prefix}
    32 configure.cflags        "-I${workpath}/tcl${tclv}/generic -I${workpath}/tcl${tclv}/unix"
    33 configure.ldflags-append        "-tcl8.5"
    34 
    35 configure.args          --with-tcl=${prefix}/lib
    36 
    37 configure.universal_args-delete --disable-dependency-tracking
     37configure.universal_args-delete    --disable-dependency-tracking
    3838
    3939post-patch {
    40         reinplace "s|@itcl_LIB_FILE@|${prefix}/lib/libitcl3.4.dylib|g" \
     40    reinplace "s|@itcl_LIB_FILE@|${prefix}/lib/libitcl${version}.dylib|g" \
    4141               ${worksrcpath}/itclConfig.sh.in
    42         reinplace "s|@PACKAGE_VERSION@|3.4|g" \
     42    reinplace "s|@PACKAGE_VERSION@|${version}|g" \
    4343                ${worksrcpath}/itclConfig.sh.in
    44         reinplace "s|@itcl_BUILD_LIB_SPEC@|-L${prefix}/lib -litcl|g" \
     44    reinplace "s|@itcl_BUILD_LIB_SPEC@|-L${prefix}/lib -litcl|g" \
    4545                ${worksrcpath}/itclConfig.sh.in
    46         reinplace "s|@itcl_LIB_SPEC@|-L${prefix}/lib -litcl|g" \
     46    reinplace "s|@itcl_LIB_SPEC@|-L${prefix}/lib -litcl|g" \
    4747                ${worksrcpath}/itclConfig.sh.in
    48         reinplace "s|\"@PKG_LIB_FILE@\"|.. @PKG_LIB_FILE@|g" \
    49                 ${worksrcpath}/pkgIndex.tcl.in
     48    reinplace "s|\"@PKG_LIB_FILE@\"|.. @PKG_LIB_FILE@|g" \
     49        ${worksrcpath}/pkgIndex.tcl.in
    5050}
    5151
    5252post-build {
    53                 system "ranlib ${worksrcpath}/libitclstub3.4.a"
     53    system "ranlib ${worksrcpath}/libitclstub${vstub}.a"
    5454}
    5555
    5656destroot {
    57         set _d ${destroot}${prefix}
    58         set _w ${worksrcpath}
    59         file mkdir ${_d}/lib/itcl3.4
    60         xinstall -m 755 ${_w}/itclConfig.sh ${_d}/lib/itcl3.4
    61         file copy -force ${_w}/pkgIndex.tcl ${_d}/lib/itcl3.4
    62         file copy -force ${_w}/library/itcl.tcl ${_d}/lib/itcl3.4
    63         file copy -force ${_w}/libitcl3.4.dylib ${_d}/lib
    64         file copy -force ${_w}/libitclstub3.4.a ${_d}/lib
     57    set _d ${destroot}${prefix}
     58    set _w ${worksrcpath}
     59    file mkdir ${_d}/lib/itcl${version}
     60    xinstall -m 755 ${_w}/itclConfig.sh ${_d}/lib/itcl${vstub}
     61    file copy -force ${_w}/pkgIndex.tcl ${_d}/lib/itcl${vstub}
     62    file copy -force ${_w}/library/itcl.tcl ${_d}/lib/itcl${vstub}
     63    file copy -force ${_w}/libitcl${vstub}.dylib ${_d}/lib
     64    file copy -force ${_w}/libitclstub${vstub}.a ${_d}/lib
    6565
    66         file mkdir ${_d}/include
     66    file mkdir ${_d}/include/itcl4
    6767        foreach x {itcl.h itclDecls.h itclInt.h itclIntDecls.h } {
    68                 file copy -force ${_w}/generic/$x ${_d}/include
     68                file copy -force ${_w}/generic/$x ${_d}/include/itcl4/
    6969        }
    7070
    71         foreach x [glob ${_w}/doc/*.n] {
    72                 file copy -force $x ${_d}/share/man/mann
    73         }
     71    foreach x [glob ${_w}/doc/*.n] {
     72        file copy -force $x ${_d}/share/man/mann
     73    }
     74}
     75
     76## FIXME! clang: error: no such file or directory: '{-I/Users/julien/.macports/opt/local/var/macports/build/_Users_julien_tmp_myports_lang_itcl/itcl3/work/tcl8.6.2/generic'
     77variant universal {}
     78#configure.cflags-append    "${configure.cflags} [get_canonical_archflags cc]"
     79
     80if {${subport} eq ${name}} {
     81    checksums           itcl${version}.tar.gz \
     82                        rmd160  acc09f343a57b95e7ce9ba4613963748af0a9cb8 \
     83                        sha256  d93f63a52af2b6d10a1995fc03431a4b626c1a5b1a5e7868fb489ce31925e916 \
     84                        tcl${tclv}-src.tar.gz \
     85                        rmd160  574bffdf3e390cf6460ab4a9d4b59db0e58f2998 \
     86                        sha256  86f7ae5f581dd0904d04415637ab3aef5a50986c1b6d04c340e2b1b0258da9c4
     87
     88    test.run            yes
     89    test.target         test
     90
     91    conflicts ${name}3
     92
     93    livecheck.type     regex
     94    livecheck.url       https://sourceforge.net/projects/incrtcl/files/%5Bincr%20Tcl_Tk%5D-4-source/
     95    livecheck.regex     "itcl (\\d+(?:\\.\\d+)*)"
     96}
     97
     98subport ${name}3 {
     99    version                3.4.1
     100    distname            itcl${version}
     101    distfiles           ${distname}.tar.gz:itcl \
     102                        tcl${tclv}-src.tar.gz:tcl
     103    checksums           itcl${version}.tar.gz \
     104                        rmd160  a3293d8e7beeee8cd308a7c56edf7c790a374ef4 \
     105                        sha256  5330832ce72da97610497a58eca904287d0ff91f9ec741a4e4810d5b933c8568 \
     106                        tcl${tclv}-src.tar.gz \
     107                        rmd160  574bffdf3e390cf6460ab4a9d4b59db0e58f2998 \
     108                        sha256  86f7ae5f581dd0904d04415637ab3aef5a50986c1b6d04c340e2b1b0258da9c4
     109    worksrcdir          ${name}${version}
     110
     111    set vstub           3.4
     112
     113    conflicts ${name}
     114
     115    livecheck.type     regex
     116    livecheck.url       https://sourceforge.net/projects/incrtcl/files/%5BIncr%20Tcl_Tk%5D-source/
     117    livecheck.regex     "title=\"(\\d+(?:\\.\\d+)*)\""
    74118}