Skip to content

Commit

Permalink
Merge pull request #40 from smithsp/tk_freetype
Browse files Browse the repository at this point in the history
Add freetype dependencies via tk_variant so that tk builds with freetype fonts
  • Loading branch information
isuruf authored Nov 5, 2023
2 parents 0008d9e + 6410170 commit 943beda
Show file tree
Hide file tree
Showing 18 changed files with 169 additions and 27 deletions.
8 changes: 6 additions & 2 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .ci_support/linux_64_tk_variantnoxft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_name:
- cos6
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
- linux-64
tk:
- '8.6'
tk_variant:
- noxft
zlib:
- '1.2'
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
- linux-64
tk:
- '8.6'
tk_variant:
- xft
zlib:
- '1.2'
24 changes: 24 additions & 0 deletions .ci_support/linux_aarch64_tk_variantnoxft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
BUILD:
- aarch64-conda_cos7-linux-gnu
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_arch:
- aarch64
cdt_name:
- cos7
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
docker_image:
- quay.io/condaforge/linux-anvil-aarch64
target_platform:
- linux-aarch64
tk:
- '8.6'
tk_variant:
- noxft
zlib:
- '1.2'
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ docker_image:
- quay.io/condaforge/linux-anvil-aarch64
target_platform:
- linux-aarch64
tk:
- '8.6'
tk_variant:
- xft
zlib:
- '1.2'
18 changes: 18 additions & 0 deletions .ci_support/linux_ppc64le_tk_variantnoxft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
c_compiler:
- gcc
c_compiler_version:
- '12'
cdt_name:
- cos7
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
docker_image:
- quay.io/condaforge/linux-anvil-ppc64le
target_platform:
- linux-ppc64le
tk_variant:
- noxft
zlib:
- '1.2'
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ docker_image:
- quay.io/condaforge/linux-anvil-ppc64le
target_platform:
- linux-ppc64le
tk_variant:
- xft
zlib:
- '1.2'
6 changes: 5 additions & 1 deletion .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MACOSX_SDK_VERSION:
c_compiler:
- clang
c_compiler_version:
- '15'
- '16'
channel_sources:
- conda-forge
channel_targets:
Expand All @@ -14,5 +14,9 @@ macos_machine:
- x86_64-apple-darwin13.4.0
target_platform:
- osx-64
tk:
- '8.6'
tk_variant:
- noxft
zlib:
- '1.2'
6 changes: 5 additions & 1 deletion .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET:
c_compiler:
- clang
c_compiler_version:
- '15'
- '16'
channel_sources:
- conda-forge
channel_targets:
Expand All @@ -12,5 +12,9 @@ macos_machine:
- arm64-apple-darwin20.0.0
target_platform:
- osx-arm64
tk:
- '8.6'
tk_variant:
- noxft
zlib:
- '1.2'
4 changes: 4 additions & 0 deletions .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ channel_targets:
- conda-forge main
target_platform:
- win-64
tk:
- '8.6'
tk_variant:
- noxft
4 changes: 2 additions & 2 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions .travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 27 additions & 6 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 13 additions & 10 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,30 @@ set -ex

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

ARCH_FLAG=""
if [[ ${ARCH} == 64 ]]; then
ARCH_FLAG="--enable-64bit"
fi

pushd tcl${PKG_VERSION}/unix
# autoreconf -vfi
./configure --prefix="${PREFIX}" \
--host=${HOST} \
${ARCH_FLAG}
./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}" \
--host=${HOST} \
--with-tcl="${PREFIX}"/lib \
--enable-aqua=yes \
${ARCH_FLAG}
${CONFIGURE_ARGS}
cat config.log
make -j${CPU_COUNT} ${VERBOSE_AT}
make install
popd
Expand Down
3 changes: 3 additions & 0 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
tk_variant:
- xft # [linux]
- noxft
# Required for UniformTypeIdentifiers
MACOSX_SDK_VERSION: # [osx and x86_64]
- "11.0" # [osx and x86_64]
17 changes: 16 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% set version = "8.6.13" %}
{% set maj_min = ".".join(version.split(".")[:2]) %}
{% set build = 1 %}

package:
name: tk
Expand All @@ -13,8 +14,17 @@ source:
folder: tk{{ version }}
sha256: 2e65fa069a23365440a3c56c556b8673b5e32a283800d8d9b257e3f584ce0675


{% if tk_variant == 'noxft' and linux %}
# prioritize noxft variant via build number
{% set build = build + 100 %}
{% endif %}

build:
number: 0
number: {{ build }}
string: "{{ tk_variant }}_h{{ PKG_HASH }}_{{ build }}" # [linux]
track_features:
- tk_xft # [tk_variant == 'xft']
detect_binary_files_with_prefix: true
run_exports:
# pin to major.minor because library names have that info in them
Expand All @@ -28,6 +38,11 @@ requirements:
- {{ 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 # [unix]

Expand Down
4 changes: 3 additions & 1 deletion recipe/yum_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
libX11-devel
libX11
libXft
libfontconfig

0 comments on commit 943beda

Please sign in to comment.