Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add tk #907

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions recipes/recipes_emscripten/tk/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

set -ex

IFS="." read -a VER_ARR <<<"${PKG_VERSION}"


pushd tcl${PKG_VERSION}/unix
# autoreconf -vfi
./configure --prefix="${PREFIX}"
make -j${CPU_COUNT} ${VERBOSE_AT}
make install install-private-headers
popd

if [[ "$target_platform" == osx-* ]]; then
CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-aqua=yes"
elif [[ "$tk_variant" == xft ]]; then
CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-xft"
# Remove requires.private for now. Otherwise we need devel packages of
# libxrender-devel and the deps in libxrender-devel is broken anyway.
sed -i.bak 's/Requires.private: xrender, /Requires.private: /g' $BUILD_PREFIX/$HOST/sysroot/usr/lib/pkgconfig/xft.pc
pkg-config --cflags xft fontconfig
fi

pushd tk${PKG_VERSION}/unix
# autoreconf -vfi
./configure --prefix="${PREFIX}" \
--with-tcl="${PREFIX}"/lib \
${CONFIGURE_ARGS}
cat config.log
make -j${CPU_COUNT} ${VERBOSE_AT}
make install
popd

rm -rf "${PREFIX}"/{man,share}

# Link binaries to non-versioned names to make them easier to find and use.
ln -s "${PREFIX}"/bin/tclsh${VER_ARR[0]}.${VER_ARR[1]} "${PREFIX}"/bin/tclsh
ln -s "${PREFIX}"/bin/wish${VER_ARR[0]}.${VER_ARR[1]} "${PREFIX}"/bin/wish

# copy headers
cp "${SRC_DIR}"/tk${PKG_VERSION}/{unix,macosx,generic}/*.h "${PREFIX}"/include/

# Remove buildroot traces
sed -i.bak -e "s,${SRC_DIR}/tk${PKG_VERSION}/unix,${PREFIX}/lib,g" -e "s,${SRC_DIR}/tk${PKG_VERSION},${PREFIX}/include,g" ${PREFIX}/lib/tkConfig.sh
sed -i.bak -e "s,${SRC_DIR}/tcl${PKG_VERSION}/unix,${PREFIX}/lib,g" -e "s,${SRC_DIR}/tcl${PKG_VERSION},${PREFIX}/include,g" ${PREFIX}/lib/tclConfig.sh
rm -f ${PREFIX}/lib/tkConfig.sh.bak
rm -f ${PREFIX}/lib/tclConfig.sh.bak
43 changes: 43 additions & 0 deletions recipes/recipes_emscripten/tk/rattler_recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
context:
name: "tk"
version: "8.6.14"

package:
name: ${{ name }}
version: ${{ version }}

source:
- url: https://github.com/tcltk/tk/archive/refs/tags/core-8-6-14.tar.gz
sha256: e7dd80b3c164656daf82962d84b370fa8a1fda5143ccfe0103854aa7f7b5d94d

build:
number: 0

requirements:
build:
- ${{ compiler('c') }}
- ${{ cdt('xorg-x11-proto-devel') }} # [linux]
- ${{ cdt('libx11-devel') }} # [linux]
- ${{ cdt('libxcb') }} # [linux]
- ${{ cdt('libxau') }} # [linux]
- make # [linux]
- ${{ cdt('freetype-devel') }} # [linux and tk_variant == 'xft']
- ${{ cdt('fontconfig-devel') }} # [linux and tk_variant == 'xft']
- ${{ cdt('libXrender-devel') }} # [linux and tk_variant == 'xft']
- ${{ cdt('libXft-devel') }} # [linux and tk_variant == 'xft']
- pkg-config # [linux and tk_variant == 'xft']
host:
- zlib

# tests TODO:

about:
homepage: http://www.tcl.tk/
license: TCL
license_family: BSD
license_file: tcl{{ version }}/license.terms
summary: A dynamic programming language with GUI support. Bundles Tcl and Tk.

extra:
recipe-maintainers:
- IsabelParedes
Loading