Ticket #34826: tk84.patch

File tk84.patch, 4.0 KB (added by gustafn, 12 years ago)
  • Portfile

    diff -ur /opt/local/var/macports/sources/rsync.macports.org/release/ports/x11/tk/Portfile x11/tk84/Portfile
    old new  
     1# -*- Tcl -*-
    12# $Id: Portfile 87065 2011-11-09 01:07:52Z mww@macports.org $
    23
    34PortSystem      1.0
    45
    5 name            tk
    6 version         8.5.11
     6name            tk84
     7version         8.4.19
    78categories      x11
    89license         Tcl/Tk
    910maintainers     mww openmaintainer
     
    1516  Ousterhout, Addison-Wesley, ISBN 0-201-63337-X.
    1617
    1718platforms       darwin
    18 # tk/aqua can't build 64-bit, ticket #20799
    19 if {[variant_isset quartz]} {
    20     supported_archs i386 ppc
    21 }
    22 
    2319master_sites    sourceforge:tcl
    2420dist_subdir     tcltk
    25 distname        ${name}${version}-src
    26 worksrcdir      ${name}${version}/unix
     21distname        tk${version}-src
     22worksrcdir      tk${version}/unix
    2723
    28 checksums \
    29   ${distname}${extract.suffix} \
    30                     md5     b61b72f0aad230091b100746f078b8f1 \
    31                     sha1    3d7c88cb4cc328c906e2e4c3631fd93ed33e6cb3 \
    32                     rmd160  a47fa209ed86b425e904711c910d401573dd89d2 \
    3324# suck in Tcl as well so we can use it internally.
    3425distfiles-append    tcl${version}-src${extract.suffix}
    35 checksums-append \
    36   tcl${version}-src${extract.suffix} \
    37                     md5     b01a9691c83990b3db0ce62d1012ca67 \
    38                     sha1    cb70dcfb7625389afd774e0438a7ade3e7aa13c8 \
    39                     rmd160  36140b5e8365c190202132dd6f0dfeb831ea9bc8
    4026
    41 depends_build   port:pkgconfig
     27checksums \
     28    ${distname}${extract.suffix} \
     29                    md5     9b998d0456d1b956eb9da610837a9c47 \
     30                    sha1    56d09be8a7670b2686d76b7526ff24b0240ca120 \
     31                    rmd160  c963297655740ad4b29a99c489c35a64e5e817ce \
     32    tcl${version}-src${extract.suffix} \
     33                    md5     ade2c033a7b545ee108f3fdfeb629fcf \
     34                    sha1    ed25c5a206bcd603c2d5e58790354b9be178f331 \
     35                    rmd160  6e3d2991e8e44a2e32f0da8fdf7ab07aa9b8202f
    4236
    43 # force usage of MacPorts Tcl
     37depends_build   port:pkgconfig
    4438depends_lib \
    45     port:tcl \
     39    port:tcl84 \
    4640    port:Xft2 \
    47     port:xorg-libXScrnSaver \
    4841    port:fontconfig
    4942
     43#
     44# The patch is essentially a backport of:
     45# http://sourceforge.net/tracker/index.php?func=detail&aid=2010422&group_id=12997&atid=112997
     46#
     47patch.dir ${worksrcpath}/..
     48patchfiles genericevent.patch
     49
    5050post-patch {
    5151    reinplace s|@TCL_SRC_DIR@|${worksrcpath}/../../tcl${version}/|g ${worksrcpath}/Makefile.in
    5252}
    5353
    54 configure.args      --mandir=${prefix}/share/man --with-tcl=${prefix}/lib
     54configure.args      --mandir=${prefix}/share/man --enable-threads --with-tcl=${prefix}/lib/tcl84
    5555configure.cppflags  -I${workpath}/tcl${version}/generic
    5656configure.ldflags   -L${worksrcpath} -L${prefix}/lib -lfontconfig
    5757
    58 destroot.destdir    INSTALL_ROOT=${destroot}
     58destroot.post_args \
     59   INSTALL_ROOT=${destroot} \
     60   INCLUDE_INSTALL_DIR=${destroot}${prefix}/include/tcl84 \
     61   LIB_INSTALL_DIR=${destroot}${prefix}/lib/tcl84 \
     62   MAN_INSTALL_DIR=${destroot}${prefix}/share/man/tcl84
     63
    5964post-destroot {
    60     ln -s wish8.5 ${destroot}${prefix}/bin/wish
    61     ln -s libtk8.5.dylib ${destroot}${prefix}/lib/libtk.dylib
     65    #ln -s wish8.5 ${destroot}${prefix}/bin/wish
     66    ln -s ${prefix}/lib/tcl84/libtk8.4.dylib ${destroot}${prefix}/lib/libtk8.4.dylib
     67    ln -s ${prefix}/lib/tcl84/libtkstub8.4.a ${destroot}${prefix}/lib/libtkstub8.4.a
     68    reinplace "s|${prefix}/include|${prefix}/include/tcl84|g" ${destroot}${prefix}/lib/tcl84/tkConfig.sh
    6269}
    6370
    6471if {${configure.build_arch} == "x86_64" || ${configure.build_arch} == "ppc64"} {
    6572    configure.args-append   --enable-64bit
    6673}
    6774
    68 variant quartz {
    69     depends_lib-delete port:Xft2 port:xorg-libXScrnSaver
    70     configure.args-append   --enable-aqua
    71     post-destroot {
    72         delete ${destroot}${prefix}/include/X11
    73     }
    74 }
    75 
    7675platform darwin {
    7776    configure.args-append   tcl_cv_type_64bit="long long"
    7877}