summaryrefslogtreecommitdiff
path: root/tk/build.sh
blob: b14a82a48b11ab252641a1d82b3ad2892699fb66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
name=tk
version=8.6.9
version_full="${version}.1"
revision=0
sources=(
    "https://prdownloads.sourceforge.net/tcl/${name}${version_full}-src.tar.gz"
)
build_depends=(
    "pkgconf"
    "tar"
    "tcl==${version}"
)
depends=(
    "libX11"
    "tcl==${version}"
)

function prepare() {
    tar xf ${name}${version_full}-src.tar.gz
    cd ${name}${version}
}

function build() {
    cd unix
    ./configure --prefix=${_prefix} \
        --with-tcl=${_runtime}/lib \
        --with-x
    make -j${_maxjobs}
}

function package() {
    make install DESTDIR="${_pkgdir}"
    pushd "${_pkgdir}/${_prefix}"/bin
        ln -s "${_pkgdir}/${_prefix}"/bin/wish${version%.*} wish
    popd
    chmod 755 "${_pkgdir}/${_prefix}"/lib/*.so
}