Skip to content

Commit

Permalink
Merge pull request #311 from Alexpux/develop
Browse files Browse the repository at this point in the history
Fix Python building with tcl/tk. Update GMP. Some fixes.
  • Loading branch information
niXman committed Oct 4, 2013
2 parents dd7ff70 + bdca45d commit da923f3
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Expand Up @@ -9,8 +9,6 @@
*.lzma
*.tmp
*.bak
*.diff
*.patch
*.orig
*.rej
*.old
Expand Down
5 changes: 3 additions & 2 deletions library/subtargets.sh
Expand Up @@ -60,8 +60,8 @@ function fun_get_subtargets {
bzip2
libffi
expat
#tcl
#tk
tcl
tk
$([[ $python_version == 3.3.0 ]] && echo xz-utils)
sqlite
ncurses
Expand Down Expand Up @@ -134,6 +134,7 @@ function fun_get_subtargets {
local readonly SUBTARGETS=(
zlib
${PYTHON_SUBTARGETS[@]}
3rdparty-post
cleanup
licenses
build-info
Expand Down
21 changes: 21 additions & 0 deletions patches/tk/tk-8.6.1-prevent-tclStubsPtr-segfault.patch
@@ -0,0 +1,21 @@
diff -urN a/generic/tkEvent.c b/generic/tkEvent.c
--- a/generic/tkEvent.c 2013-09-03 13:52:34.000000000 +0100
+++ b/generic/tkEvent.c 2013-10-03 23:14:31.623094600 +0100
@@ -2039,7 +2039,16 @@
{
ExitHandler *exitPtr;

- Tcl_DeleteExitHandler(TkFinalize, NULL);
+ /* There's no guarantee that Tcl_InitStubs
+ * has been called before exit; tclStubsPtr
+ * is NULL in this case.
+ */
+#if defined(USE_TCL_STUBS)
+ if (tclStubsPtr == NULL)
+ return;
+#endif
+
+ Tcl_DeleteExitHandler(TkFinalize, NULL);

Tcl_MutexLock(&exitMutex);
for (exitPtr = firstExitPtr; exitPtr != NULL; exitPtr = firstExitPtr) {
26 changes: 21 additions & 5 deletions scripts/3rdparty-post.sh
Expand Up @@ -35,12 +35,28 @@

# **************************************************************************

[[ ! -f $BUILDS_DIR/3rdparty-post.marker ]] && {
DLLS=( $(find $LIBS_DIR/bin -type f -name *.dll) )
[[ ${#DLLS[@]} >0 ]] && {
cp -f ${DLLS[@]} $PREFIX/opt/bin/ >/dev/null 2>&1
function python_deps_post {
[[ ! -f $BUILDS_DIR/3rdparty-post.marker ]] && {
local _dlls=( $(find $LIBS_DIR/bin -type f -name *.dll) )
[[ ${#_dlls[@]} >0 ]] && {
[[ $BUILD_MODE == gcc ]] && {
cp -f ${_dlls[@]} $PREFIX/opt/bin/ >/dev/null 2>&1
} || {
cp -f ${_dlls[@]} $PREFIX/bin/ >/dev/null 2>&1
local _toolchain_path=$(eval "echo \${${BUILD_ARCHITECTURE}_HOST_MINGW_PATH}")
local _gcc_dll=( $(find $_toolchain_path/bin -type f \
-name libstdc++*.dll -o \
-name libgcc*.dll -o \
-name libwinpthread*.dll) )
[[ ${#_gcc_dll[@]} >0 ]] && {
cp -f ${_gcc_dll[@]} $PREFIX/bin/ >/dev/null 2>&1
}
}
}
touch $BUILDS_DIR/3rdparty-post.marker
}
touch $BUILDS_DIR/3rdparty-post.marker
}

python_deps_post

# **************************************************************************
1 change: 1 addition & 0 deletions scripts/gcc-4_8-branch.sh
Expand Up @@ -50,6 +50,7 @@ PKG_PATCHES=(
gcc/gcc-4.7-stdthreads.patch
gcc/gcc-4.8-iconv.patch
gcc/gcc-4.8-libstdc++export.patch
gcc/gcc-4.8.1-fix-dw2.patch
)

#
Expand Down
2 changes: 1 addition & 1 deletion scripts/gmp.sh
Expand Up @@ -35,7 +35,7 @@

# **************************************************************************

PKG_VERSION=5.1.2
PKG_VERSION=5.1.3
PKG_NAME=$BUILD_ARCHITECTURE-gmp-${PKG_VERSION}-$LINK_TYPE_SUFFIX
PKG_DIR_NAME=gmp-${PKG_VERSION}
PKG_TYPE=.tar.bz2
Expand Down
1 change: 1 addition & 0 deletions scripts/tk.sh
Expand Up @@ -50,6 +50,7 @@ PKG_PRIORITY=extra

PKG_PATCHES=(
tk/tk-8.6.1-mingwexcept.patch
tk/tk-8.6.1-prevent-tclStubsPtr-segfault.patch
)

#
Expand Down
6 changes: 2 additions & 4 deletions todo.txt
Expand Up @@ -6,8 +6,6 @@
it is necessary to decide whether it is needed in the python distribution archive, or no.
if no - in the 'scripts/cleanup.sh' script add the code in order to remove it.

3. Fix building Python with TCL/TK.
3. Fix building Python with shared NCURSES.

4. Fix building Python with shared NCURSES.

5. Fix building GNU Make with autotools.
4. Fix building GNU Make with autotools.

0 comments on commit da923f3

Please sign in to comment.