From df0bc82b2b44f2f88c6c4a485d41c2c9354500d9 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Mar 2020 17:13:58 +0000 Subject: Fix the X11 build on OSX --- unix/tkUnixFont.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index d15b1dd..897770b 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -839,7 +839,7 @@ TkpGetFontFamilies( Tk_Window tkwin) /* For display to query. */ { int i, new, numNames; - const char *family, **nameList; + char *family, **nameList; Tcl_HashTable familyTable; Tcl_HashEntry *hPtr; Tcl_HashSearch search; @@ -850,7 +850,7 @@ TkpGetFontFamilies( Tcl_InitHashTable(&familyTable, TCL_STRING_KEYS); nameList = ListFonts(Tk_Display(tkwin), "*", &numNames); for (i = 0; i < numNames; i++) { - const char *familyEnd; + char *familyEnd; family = strchr(nameList[i] + 1, '-'); if (family == NULL) { -- cgit v0.12 From 53f23d95d29c5d49a2deca5d751c921dc48ccda2 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 11 Mar 2020 08:45:29 +0000 Subject: Add various build (e.g. MacOS with xquarz, --disable-xft) --- .travis.yml | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5f01fb0..5e7a8a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,10 @@ addons: packages: - tcl-dev - libx11-dev - + homebrew: + packages: + - tcl-tk + - xquartz matrix: include: # Testing on Linux with various compilers @@ -15,13 +18,28 @@ matrix: compiler: gcc env: - BUILD_DIR=unix + - name: "Linux/GCC/Shared/no-xft" + os: linux + dist: bionic + compiler: gcc + env: + - BUILD_DIR=unix + - CFGOPT="--disable-xft" - name: "Linux/GCC/Static" os: linux dist: bionic compiler: gcc env: + - BUILD_DIR=unix - CFGOPT="--disable-shared" + - name: "Linux/GCC/Debug" + os: linux + dist: bionic + compiler: gcc + env: - BUILD_DIR=unix + - CFGOPT="--enable-symbols" +# Older versions of GCC... - name: "Linux/GCC 7/Shared" os: linux dist: bionic @@ -58,7 +76,61 @@ matrix: - g++-5 env: - BUILD_DIR=unix +# Clang + - name: "Linux/Clang/Shared" + os: linux + dist: bionic + compiler: clang + env: + - BUILD_DIR=unix + - name: "Linux/Clang/Shared/no-xft" + os: linux + dist: bionic + compiler: clang + env: + - BUILD_DIR=unix + - CFGOPT="--disable-xft" + - name: "Linux/Clang/Static" + os: linux + dist: bionic + compiler: clang + env: + - CFGOPT="--disable-shared" + - BUILD_DIR=unix + - name: "Linux/Clang/Debug" + os: linux + dist: bionic + compiler: clang + env: + - BUILD_DIR=unix + - CFGOPT="--enable-symbols" +# Testing on Mac, various styles + - name: "macOS/Xcode 11.3/Shared/Unix-like" + os: osx + osx_image: xcode11.3 + env: + - BUILD_DIR=unix + - CFGOPT="--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib" +# Test on Windows with MSVC native +# - name: "Windows/MSVC/Shared" +# os: windows +# compiler: cl +# env: &vcenv +# - BUILD_DIR=win +# - VCDIR="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build" +# before_install: &vcpreinst +# - PATH="$PATH:$VCDIR" +# - cd ${BUILD_DIR} +# install: [] +# script: +# - cmd.exe //C vcvarsall.bat x64 '&&' nmake '-f' makefile.vc all tcltest before_install: + - |- + case $TRAVIS_OS_NAME in + windows) + choco install -y magicsplat-tcl-tk + ;; + esac - cd ${BUILD_DIR} install: - ./configure ${CFGOPT} --prefix=$HOME || (cat config.log && exit 1) @@ -66,3 +138,7 @@ before_script: - export ERROR_ON_FAILURES=1 script: - make binaries libraries tktest +cache: + directories: + - $HOME/AppData/Local/Temp/chocolatey + - $HOME/AppData/Local/Apps/Tcl86 -- cgit v0.12 From 1800da769a5065afec0c18f54f59f3c353ffc766 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 12 Mar 2020 12:13:03 +0000 Subject: Try to fix Travis OSX build --- .travis.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e7a8a6..e1c9f0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,11 @@ addons: packages: - tcl-dev - libx11-dev - homebrew: - packages: - - tcl-tk - - xquartz +# Doesn't work at the moment, see: +# homebrew: +# packages: +# - tcl-tk +# - xquartz matrix: include: # Testing on Linux with various compilers @@ -130,6 +131,10 @@ before_install: windows) choco install -y magicsplat-tcl-tk ;; + osx) + brew update + brew install tcl-tk xquartz + ;; esac - cd ${BUILD_DIR} install: -- cgit v0.12 From 891ce8654aa05e6e3068a65b568abd7018de6c92 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 13 Mar 2020 11:07:41 +0000 Subject: Another attempt to fix OSX build --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e1c9f0b..56a49fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -133,7 +133,8 @@ before_install: ;; osx) brew update - brew install tcl-tk xquartz + brew install tcl-tk + brew cask install xquartz ;; esac - cd ${BUILD_DIR} -- cgit v0.12 From 1238e21206d840a343ed997530575d3dd601a771 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 15 Mar 2020 17:09:35 +0000 Subject: Should now (really!) work on OSX, X11 only. --- .travis.yml | 2 +- unix/Makefile.in | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 56a49fa..5cd2dd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -111,7 +111,7 @@ matrix: osx_image: xcode11.3 env: - BUILD_DIR=unix - - CFGOPT="--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib" + - CFGOPT="--with-tcl=/usr/local/Cellar/tcl-tk/8.6.9_1/lib --disable-corefoundation --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib CFLAGS=-I/usr/local/Cellar/tcl-tk/8.6.9_1/include" # Test on Windows with MSVC native # - name: "Windows/MSVC/Shared" # os: windows diff --git a/unix/Makefile.in b/unix/Makefile.in index 1baa41b..c917516 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -322,9 +322,9 @@ MAN_FLAGS = @MAN_FLAGS@ CC = @CC@ -CC_SWITCHES_NO_STUBS = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ --I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} -I${TCL_GENERIC_DIR} \ --I${TCL_PLATFORM_DIR} ${@TK_WINDOWINGSYSTEM@_INCLUDES} ${AC_FLAGS} \ +CC_SWITCHES_NO_STUBS = -I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} \ +${@TK_WINDOWINGSYSTEM@_INCLUDES} ${CFLAGS} ${CFLAGS_WARNING} \ +${SHLIB_CFLAGS} -I${TCL_GENERIC_DIR} -I${TCL_PLATFORM_DIR} ${AC_FLAGS} \ ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \ ${NO_DEPRECATED_FLAGS} @EXTRA_CC_SWITCHES@ @@ -332,10 +332,10 @@ CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) ${TCL_STUB_FLAGS} APP_CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) @EXTRA_APP_CC_SWITCHES@ -DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} \ --I${TCL_GENERIC_DIR} -I${TCL_PLATFORM_DIR} ${@TK_WINDOWINGSYSTEM@_INCLUDES} \ -${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \ -${KEYSYM_FLAGS} @EXTRA_CC_SWITCHES@ +DEPEND_SWITCHES = -I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} \ +${@TK_WINDOWINGSYSTEM@_INCLUDES} ${CFLAGS} -I${TCL_GENERIC_DIR} \ +-I${TCL_PLATFORM_DIR} ${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} \ +${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} @EXTRA_CC_SWITCHES@ WISH_OBJS = tkAppInit.o -- cgit v0.12 From 1ae85e4478032e462e4e93246165f3cb57767cdc Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 15 Mar 2020 17:32:56 +0000 Subject: Slightly better than previous commit: Don't depend on the exact version number of the availble Tcl 8.6.x brew formula. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5cd2dd9..cba7b2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -111,7 +111,7 @@ matrix: osx_image: xcode11.3 env: - BUILD_DIR=unix - - CFGOPT="--with-tcl=/usr/local/Cellar/tcl-tk/8.6.9_1/lib --disable-corefoundation --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib CFLAGS=-I/usr/local/Cellar/tcl-tk/8.6.9_1/include" + - CFGOPT="--with-tcl=/usr/local/opt/tcl-tk/lib --disable-corefoundation --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib CFLAGS=-I/usr/local/opt/tcl-tk/include" # Test on Windows with MSVC native # - name: "Windows/MSVC/Shared" # os: windows -- cgit v0.12