Kaydet (Commit) 84b36c70 authored tarafından David Ostrovsky's avatar David Ostrovsky Kaydeden (comit) Stephan Bergmann

Drop support for MSVC 2013

Change-Id: Ibf47c9ff7b5fb098e284a58c547b61286264dd80
Reviewed-on: https://gerrit.libreoffice.org/22588Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 0a041a3b
......@@ -2097,10 +2097,9 @@ libo_FUZZ_ARG_WITH(doxygen,
,with_doxygen=yes)
AC_ARG_WITH(visual-studio,
AS_HELP_STRING([--with-visual-studio=<2013/2015/2017>],
AS_HELP_STRING([--with-visual-studio=<2015/2017>],
[Specify which Visual Studio version to use in case several are
installed. If not specified, only 2013 is detected automatically
because 2015 and 2017 support is currently experimental.]),
installed. If not specified, defaults to 2015.]),
,)
AC_ARG_WITH(windows-sdk,
......@@ -3269,8 +3268,6 @@ map_vs_year_to_version()
unset vsversion
case $1 in
2013)
vsversion=12.0;;
2015)
vsversion=14.0;;
2017)
......@@ -3291,8 +3288,8 @@ vs_versions_to_check()
map_vs_year_to_version "$1"
vsversions=$vsversion
else
# By default we prefer 2013/2015/2017, in this order
vsversions="12.0 14.0 15.0"
# By default we prefer 2015/2017, in this order
vsversions="14.0 15.0"
fi
}
......@@ -3348,7 +3345,7 @@ find_ucrt()
find_msvc()
{
# Find Visual C++ 2013/2015/2017
# Find Visual C++ 2015/2017
# Args: $1 (optional) : The VS version year
# Return values: $vctest, $vcyear, $vcnum, $vcnumwithdot, $vcbuildnumber
......@@ -3382,10 +3379,6 @@ find_msvc()
if test -n "$vctest"; then
vcnumwithdot=$ver
case "$vcnumwithdot" in
12.0)
vcyear=2013
vcnum=120
;;
14.0)
vcyear=2015
vcnum=140
......@@ -3415,7 +3408,7 @@ if test "$_os" = "WINNT"; then
if test -n "$with_visual_studio"; then
AC_MSG_ERROR([No Visual Studio $with_visual_studio installation found])
else
AC_MSG_ERROR([No Visual Studio 2013/2015/2017 installation found])
AC_MSG_ERROR([No Visual Studio 2015/2017 installation found])
fi
fi
......@@ -3454,27 +3447,21 @@ if test "$_os" = "WINNT"; then
UCRTSDKDIR=
UCRTVERSION=
AC_MSG_CHECKING([whether UCRT is needed for this compiler version])
if test "$vcnum" = "120"; then
AC_MSG_RESULT([No])
else
AC_MSG_RESULT([Yes])
AC_MSG_CHECKING([for UCRT location])
find_ucrt
if test -n "$UCRTSDKDIR"; then
AC_MSG_RESULT([found])
PathFormat "${UCRTSDKDIR}Include/$UCRTVERSION/ucrt"
ucrtincpath_formatted=$formatted_path
# SOLARINC is used for external modules and must be set too.
# And no, it's not sufficient to set SOLARINC only, as configure
# itself doesn't honour it.
SOLARINC="$SOLARINC -I$ucrtincpath_formatted"
CFLAGS="$CFLAGS -I$ucrtincpath_formatted"
CXXFLAGS="$CXXFLAGS -I$ucrtincpath_formatted"
CPPFLAGS="$CPPFLAGS -I$ucrtincpath_formatted"
else
AC_MSG_ERROR([not found])
fi
AC_MSG_CHECKING([for UCRT location])
find_ucrt
if test -n "$UCRTSDKDIR"; then
AC_MSG_RESULT([found])
PathFormat "${UCRTSDKDIR}Include/$UCRTVERSION/ucrt"
ucrtincpath_formatted=$formatted_path
# SOLARINC is used for external modules and must be set too.
# And no, it's not sufficient to set SOLARINC only, as configure
# itself doesn't honour it.
SOLARINC="$SOLARINC -I$ucrtincpath_formatted"
CFLAGS="$CFLAGS -I$ucrtincpath_formatted"
CXXFLAGS="$CXXFLAGS -I$ucrtincpath_formatted"
CPPFLAGS="$CPPFLAGS -I$ucrtincpath_formatted"
else
AC_MSG_ERROR([not found])
fi
AC_SUBST(UCRTSDKDIR)
AC_SUBST(UCRTVERSION)
......@@ -3501,10 +3488,6 @@ if test "$_os" = "WINNT"; then
# Find the version of devenv.exe
DEVENV="$VC_PRODUCT_DIR/../Common7/IDE/devenv.exe"
if test ! -e "$DEVENV" -a "$vcnum" = "120"; then
# for Visual Studio 2013 Express, fall back
DEVENV="$VC_PRODUCT_DIR/../Common7/IDE/WDExpress.exe"
fi
if test ! -e "$DEVENV"; then
AC_MSG_ERROR([No devenv.exe found, Visual Studio installation broken?])
fi
......@@ -3518,13 +3501,8 @@ if test "$_os" = "WINNT"; then
CL_LIB=
if test "$BITNESS_OVERRIDE" = ""; then
if test "$vcnum" = "120"; then
MSPDB_PATH="$VC_PRODUCT_DIR/../VC/bin"
CL_DIR=bin
else
MSPDB_PATH="$VC_PRODUCT_DIR/../Common7/IDE"
CL_DIR=bin
fi
MSPDB_PATH="$VC_PRODUCT_DIR/../Common7/IDE"
CL_DIR=bin
else
if test "$vcexpress" = "Express"; then
MSPDB_PATH="$VC_PRODUCT_DIR/bin"
......@@ -3627,10 +3605,6 @@ if test "$_os" = "WINNT"; then
# are always "better", we list them in reverse chronological order.
case $vcnum in
120)
COMEX=15
WINDOWS_SDK_ACCEPTABLE_VERSIONS="8.1A 8.1 8.0 7.1A"
;;
140)
COMEX=19
WINDOWS_SDK_ACCEPTABLE_VERSIONS="10.0A 10.0 8.1A 8.1 8.0 7.1A"
......@@ -5324,7 +5298,7 @@ find_msms()
my_msm_file=Microsoft_VC${VCVER}_CRT_x86.msm
AC_MSG_CHECKING([for $my_msm_file])
msmdir=
for ver in 12.0 14.0 15.0; do
for ver in 14.0 15.0; do
reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VS/MSMDir
if test -n "$regvalue"; then
if test -e "$regvalue/$my_msm_file"; then
......@@ -8127,14 +8101,7 @@ int main(int argc, char **argv) {
internal)
SYSTEM_PYTHON=
PYTHON_VERSION_MAJOR=3
# On windows we are supporting two different python versions: 3.3 and 3.5.
# We msut do it as long as we support MSVC 2013. Python 3.3 can be removed
# when MSVC 2013 support was dropped.
if test "$COM" = "MSC" -a "$VCVER" = "120"; then
PYTHON_VERSION_MINOR=3
else
PYTHON_VERSION_MINOR=5
fi
PYTHON_VERSION_MINOR=5
PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.0
AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"])
BUILD_TYPE="$BUILD_TYPE PYTHON"
......@@ -12781,7 +12748,7 @@ place yourself in a working directory of you choice.
git clone git://git.savannah.gnu.org/make.git
[go to Start menu, click "All Programs", click "Visual Studio 2013", click "Visual Studio Tools", double-click "VS2013 x86 Native Tools Command Prompt" or "VS2013 x64 Native Tools Command Prompt"]
[go to Start menu, click "All Programs", click "Visual Studio 2015", click "Visual Studio Tools", double-click "VS2015 x86 Native Tools Command Prompt" or "VS2015 x64 Native Tools Command Prompt"]
set PATH=%PATH%;C:\Cygwin\bin
[or Cygwin64, if that is what you have]
cd path-to-make-repo-you-cloned-above
......
......@@ -145,15 +145,8 @@ export PNG_TARBALL := libpng-1.6.28.tar.gz
export POPPLER_MD5SUM := dfdd55d5df39685bbb82b0c08fa4ef66
export POPPLER_TARBALL := poppler-0.52.0.tar.xz
export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2
ifeq ($(PYTHON_VERSION_MINOR),3)
export PYTHON_MD5SUM := 803a75927f8f241ca78633890c798021
export PYTHON_TARBALL := Python-3.3.5.tgz
else
export PYTHON_MD5SUM := 6192f0e45f02575590760e68c621a488
export PYTHON_TARBALL := Python-3.5.3.tgz
endif
export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz
export RASQAL_TARBALL := 1f5def51ca0026cd192958ef07228b52-rasqal-0.9.33.tar.gz
export REDLAND_TARBALL := e5be03eda13ef68aabab6e42aa67715e-redland-1.0.17.tar.gz
......
......@@ -87,7 +87,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,PDFIUM,pdfium) \
$(call gb_Helper_optional,POPPLER,poppler) \
$(call gb_Helper_optional,POSTGRESQL,postgresql) \
$(call gb_Helper_optional,PYTHON,$(if $(filter $(PYTHON_VERSION_MINOR),3),python33,python3)) \
$(call gb_Helper_optional,PYTHON,python3) \
$(call gb_Helper_optional,REDLAND,redland) \
$(call gb_Helper_optional,REVENGE,librevenge) \
$(call gb_Helper_optional,RHINO,rhino) \
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalProject_ExternalProject,python3))
$(eval $(call gb_ExternalProject_use_externals,python3,\
expat \
openssl \
zlib \
))
$(eval $(call gb_ExternalProject_register_targets,python3,\
build \
$(if $(filter MACOSX,$(OS)),\
fixscripts \
fixinstallnames \
executables \
) \
))
ifeq ($(OS),WNT)
# TODO: using Debug configuration and related mangling of pyconfig.h
# at least for MSVC 2008 it is necessary to clear MAKEFLAGS because
# nmake is invoked
$(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_ExternalProject_run,build,\
MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build \
/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
$(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 \
/p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
,PCBuild)
else
# this was added in 2004, hopefully is obsolete now (and why only intel anyway)? $(if $(filter SOLARIS-INTEL,$(OS)$(CPUNAME)),--disable-ipv6)
# --with-system-expat: this should find the one in the solver (or system)
# create a symlink "LO_lib" because the .so are in a directory with platform
# specific name like build/lib.linux-x86_64-3.3
python3_cflags = $(ZLIB_CFLAGS)
ifneq (,$(ENABLE_VALGRIND))
python3_cflags += $(VALGRIND_CFLAGS)
endif
$(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_ExternalProject_run,build,\
./configure \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(ENABLE_VALGRIND),--with-valgrind) \
--prefix=/python-inst \
$(if $(filter MACOSX,$(OS)),,--with-system-expat) \
$(if $(filter AIX,$(OS)), \
--disable-ipv6 --with-threads OPT="-g0 -fwrapv -O3 -Wall", \
$(if $(gb_Module_CURRENTMODULE_DEBUG_ENABLED), \
OPT="$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)")) \
$(if $(filter MACOSX,$(OS)), \
$(if $(filter INTEL,$(CPUNAME)),--enable-universalsdk=$(MACOSX_SDK_PATH) \
--with-universal-archs=intel \
) \
--enable-framework=/@__________________________________________________OOO --with-framework-name=LibreOfficePython, \
--enable-shared \
) \
CC="$(strip $(CC) \
$(if $(SYSTEM_OPENSSL),,-I$(call gb_UnpackedTarball_get_dir,openssl)/include \
$(if $(DISABLE_OPENSSL),,-I$(call gb_UnpackedTarball_get_dir,openssl)/include)) \
$(if $(SYSTEM_EXPAT),,-I$(call gb_UnpackedTarball_get_dir,expat)/lib) \
$(if $(SYSBASE), -I$(SYSBASE)/usr/include) \
)" \
$(if $(python3_cflags),CFLAGS='$(python3_cflags)') \
$(if $(filter -fsanitize=%,$(CC)),LINKCC="$(CXX)") \
LDFLAGS="$(strip $(LDFLAGS) \
$(if $(SYSTEM_OPENSSL),,-L$(call gb_UnpackedTarball_get_dir,openssl)) \
$(if $(SYSTEM_EXPAT),,-L$(gb_StaticLibrary_WORKDIR)) \
$(if $(SYSBASE), -L$(SYSBASE)/usr/lib) \
$(gb_LTOFLAGS) \
)" \
&& MAKEFLAGS= $(MAKE) \
$(if $(filter MACOSX,$(OS)),DESTDIR=$(EXTERNAL_WORKDIR)/python-inst install) \
&& ln -s build/lib.* LO_lib \
)
endif
ifeq ($(OS),MACOSX)
python3_fw_prefix=$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO/LibreOfficePython.framework
# rule to allow relocating the whole framework, removing reference to buildinstallation directory
$(call gb_ExternalProject_get_state_target,python3,fixscripts) : $(call gb_ExternalProject_get_state_target,python3,build)
$(call gb_Output_announce,python3 - remove reference to installroot from scripts,build,CUS,5)
$(COMMAND_ECHO)for file in \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3 \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/idle$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pydoc$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)-config \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m-config \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pyvenv-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) ; do \
{ rm "$$file" && $(gb_AWK) '\
BEGIN {print "#!/bin/bash\n\
origpath=$$(pwd)\n\
bindir=$$(cd $$(dirname \"$$0\") ; pwd)\n\
cd \"$$origpath\"\n\
\"$$bindir/../Resources/Python.app/Contents/MacOS/LibreOfficePython\" - $$@ <<EOF"} \
FNR==1{next} \
{print} \
END {print "EOF"}' > "$$file" ; } < "$$file" ; chmod +x "$$file" ; done
touch $@
$(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_ExternalProject_get_state_target,python3,build)
$(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@executable_path/../../../../LibreOfficePython \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/Resources/Python.app/Contents/MacOS/LibreOfficePython
for file in $(shell $(FIND) $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload -name "*.so") ; do \
$(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@loader_path/../../../LibreOfficePython $$file ; done
touch $@
# also delete binaries that are symlinked in scp2
$(call gb_ExternalProject_get_state_target,python3,executables) : $(call gb_ExternalProject_get_state_target,python3,build)
cd $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin ; \
for file in python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
pythonw$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) ; do \
$(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@executable_path/../LibreOfficePython $$file ; done
touch $@
endif
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_GeneratedPackage_GeneratedPackage,python3,$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO))
$(eval $(call gb_GeneratedPackage_use_unpacked,python3,python3))
$(eval $(call gb_GeneratedPackage_use_external_project,python3,python3))
$(eval $(call gb_GeneratedPackage_add_dir,python3,$(INSTROOT)/Frameworks/LibreOfficePython.framework,LibreOfficePython.framework))
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
include $(module_directory)/../../solenv/gbuild/partial_build.mk
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Module_Module,python3))
ifneq ($(DISABLE_PYTHON),TRUE)
$(eval $(call gb_Module_add_targets,python3,\
UnpackedTarball_python3 \
ExternalProject_python3 \
$(if $(filter MACOSX,$(OS)),GeneratedPackage_python3,ExternalPackage_python3) \
))
endif
# vim: set noet sw=4 ts=4:
CPython implementation of Python 3 from http://www.python.org
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_UnpackedTarball_UnpackedTarball,python3))
$(eval $(call gb_UnpackedTarball_set_tarball,python3,$(PYTHON_TARBALL),,python3))
$(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
PCbuild/pcbuild.sln \
))
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python33/i100492-freebsd.patch.1 \
external/python33/python-3.3.0-i42553.patch.2 \
external/python33/python-3.3.3-aix.patch.1 \
external/python33/python-3.3.0-darwin.patch.1 \
external/python33/python-3.3.0-msvc2012.patch.1 \
external/python33/python-3.3.0-msvc-disable.patch.1 \
external/python33/python-3.3.0-msvc-x64.patch.1 \
external/python33/python-3.3.0-ssl.patch.1 \
external/python33/python-3.3.0-gcc-4.8.patch.1 \
external/python33/python-3.3.0-pythreadstate.patch.1 \
external/python33/python-3.3.0-clang.patch.1 \
external/python33/python-3.3.3-py17797.patch.1 \
external/python33/python-3.3.3-msvc2012-winxp.patch.1 \
external/python33/python-3.3.5-pyexpat-symbols.patch.1 \
external/python33/python-3.3.5-vs2013.patch.1 \
external/python33/python-3.3.5-darwin-gnu-xargs.patch.1 \
external/python33/python-msvc-disable-sse2.patch.1 \
external/python33/python-lsan.patch.0 \
external/python33/ubsan.patch.0 \
external/python33/clang-cl.patch.0 \
))
ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python33/python-3.3.3-elf-rpath.patch.1 \
))
endif
ifneq ($(ENABLE_RUNTIME_OPTIMIZATIONS),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python33/python-3.3.3-disable-obmalloc.patch.0 \
))
endif
ifeq ($(OS),WNT)
ifneq ($(filter 120,$(VCVER)),)
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python33/python-vc2013.patch.1 \
))
endif
endif
# vim: set noet sw=4 ts=4:
--- Include/pyport.h
+++ Include/pyport.h
@@ -219,7 +219,7 @@
/* Smallest negative value of type Py_ssize_t. */
#define PY_SSIZE_T_MIN (-PY_SSIZE_T_MAX-1)
-#if SIZEOF_PID_T > SIZEOF_LONG
+#if defined SIZEOF_PID_T && SIZEOF_PID_T > SIZEOF_LONG
# error "Python doesn't support sizeof(pid_t) > sizeof(long)"
#endif
FreeBSD porting fixes, patch by maho@openoffice.org
--- Python-3.3.0/configure 2012-11-28 09:00:41.094955090 +0000
+++ Python-3.3.0/configure 2012-11-28 09:01:13.033329526 +0000
@@ -5545,11 +5545,6 @@
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
- case $ac_sys_system in
- FreeBSD*)
- SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
- ;;
- esac
INSTSONAME="$LDLIBRARY".$SOVERSION
if test "$with_pydebug" != yes
then
--- Python-3.3.0/Lib/test/test_threading.py 2012-11-28 09:00:41.292957412 +0000
+++ Python-3.3.0/Lib/test/test_threading.py 2012-11-28 09:01:13.017329339 +0000
@@ -451,7 +451,7 @@
# #12316 and #11870), and fork() from a worker thread is known to trigger
# problems with some operating systems (issue #3863): skip problematic tests
# on platforms known to behave badly.
- platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
+ platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'netbsd5',
'os2emx', 'hp-ux11')
def _run_and_join(self, script):
--- Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:00:41.097955124 +0000
+++ Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:01:13.018329351 +0000
@@ -42,6 +42,10 @@
#endif
#endif
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#endif
+
/* The POSIX spec says that implementations supporting the sem_*
family of functions must indicate this by defining
_POSIX_SEMAPHORES. */
@@ -60,7 +64,6 @@
in default setting. So the process scope is preferred to get
enough number of threads to work. */
#ifdef __FreeBSD__
-#include <osreldate.h>
#if __FreeBSD_version >= 500000 && __FreeBSD_version < 504101
#undef PTHREAD_SYSTEM_SCHED_SUPPORTED
#endif
@@ -186,6 +189,9 @@
{
pthread_t th;
int status;
+#ifdef __FreeBSD__
+ sigset_t set, oset;
+#endif
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_t attrs;
#endif
@@ -214,7 +220,10 @@
#if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
#endif
-
+#ifdef __FreeBSD__
+ sigfillset(&set);
+ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
+#endif
status = pthread_create(&th,
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
&attrs,
@@ -225,6 +234,9 @@
(void *)arg
);
+#ifdef __FreeBSD__
+ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
+#endif
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_destroy(&attrs);
#endif
-*- Mode: diff -*-
--- python3/setup.py
+++ python3/setup.py
@@ -436,7 +436,7 @@
if ret >> 8 == 0:
with open(tmpfile) as fp:
for line in fp.readlines():
- if line.startswith("gcc version"):
+ if line.startswith("gcc version") or line.startswith("clang -cc1 version"):
is_gcc = True
elif line.startswith("#include <...>"):
in_incdirs = True
-*- Mode: diff -*-
LO needs to build both against MacOSX SDK and not produce universal binaries.
diff -ru python3.old_/configure python3/configure
--- python3.old_/configure 2012-09-29 10:00:50.000000000 +0200
+++ python3/configure 2012-11-13 16:37:26.030013256 +0100
@@ -6353,7 +6353,19 @@
if test "${enable_universalsdk}"; then
UNIVERSAL_ARCH_FLAGS=""
if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
- UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
+ # LO does not use Universal Binaries (but the only way to set a SDK
+ # here implies that, so de-universalize here...)
+ case `/usr/bin/arch` in
+ i386)
+ UNIVERSAL_ARCH_FLAGS="-arch i386"
+ ;;
+ ppc)
+ UNIVERSAL_ARCH_FLAGS=""
+ ;;
+ *)
+ as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
+ ;;
+ esac
ARCH_RUN_32BIT=""
LIPO_32BIT_FLAGS=""
elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
On OS X avoid /usr/local/lib and include like the plague, we don't
want to accidentally get some MacPorts etc stuff.
On OS X, always run the compiler (which is Clang, not gcc) to find out
what the include paths are. On a clean modern installation, there is
no /usr/include.
--- python3/setup.py
+++ python3/setup.py
@@ -460,11 +460,11 @@
# Ensure that /usr/local is always used, but the local build
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
- if not cross_compiling:
+ if not cross_compiling and host_platform != 'darwin':
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia
- if cross_compiling:
+ if cross_compiling or host_platform == 'darwin':
self.add_gcc_paths()
self.add_multiarch_paths()
--- python3/Mac/Makefile.in.orig 2013-09-13 20:16:50.558137603 +0200
+++ python3/Mac/Makefile.in 2013-09-13 21:57:14.790962423 +0200
@@ -39,7 +39,7 @@
INSTALL_SCRIPT= @INSTALL_SCRIPT@
INSTALL_DATA=@INSTALL_DATA@
LN=@LN@
-STRIPFLAG=-s
+STRIPFLAG=
CPMAC=CpMac
APPTEMPLATE=$(srcdir)/Resources/app
--- python3/Mac/Resources/framework/Info.plist.in
+++ python3/Mac/Resources/framework/Info.plist.in
@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
- <string>Python</string>
+ <string>@PYTHONFRAMEWORK@</string>
<key>CFBundleGetInfoString</key>
<string>Python Runtime and Library</string>
<key>CFBundleIdentifier</key>
--- python3/Mac/Resources/app/Info.plist.in
+++ python3/Mac/Resources/app/Info.plist.in
@@ -18,7 +18,7 @@
</dict>
</array>
<key>CFBundleExecutable</key>
- <string>Python</string>
+ <string>LibreOfficePython</string>
<key>CFBundleGetInfoString</key>
<string>%version%, (c) 2004-2014 Python Software Foundation.</string>
<key>CFBundleHelpBookFolder</key>
--- Python-3.3.0/Include/modsupport.h 2012-09-29 10:00:26.000000000 +0200
+++ Python-3.3.0/Include/modsupport.h 2013-03-08 10:46:28.671938738 +0100
@@ -26,7 +26,11 @@
/* Due to a glitch in 3.2, the _SizeT versions weren't exported from the DLL. */
#if !defined(PY_SSIZE_T_CLEAN) || !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...);
-PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
+PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...)
+#ifdef PY_SSIZE_T_CLEAN
+ Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3)
+#endif
+ ;
PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
const char *, char **, ...);
PyAPI_FUNC(int) PyArg_ValidateKeywordArguments(PyObject *);
definition of gethostbyname conflicts with system /usr/include/unistd.h,
available since at least Solaris 2.6 according to python-Bugs-837046
Author: taniguchi@openoffice.org
--- misc/Python-2.6.1/Include/pyport.h 2008-06-11 09:41:16.000000000 +0200
+++ misc/build/Python-2.6.1/Include/pyport.h 2011-06-06 17:31:17.000000000 +0200
@@ -449,11 +449,6 @@
in platform-specific #ifdefs.
**************************************************************************/
-#ifdef SOLARIS
-/* Unchecked */
-extern int gethostname(char *, int);
-#endif
-
#ifdef HAVE__GETPTY
#include <sys/types.h> /* we need to import mode_t */
extern char * _getpty(int *, int, mode_t, int);
Disable some stuff LO does not need, especially stuff with external dependencies
diff -ru python3/PCbuild/pcbuild.sln python3.new/PCbuild/pcbuild.sln
--- python3/PCbuild/pcbuild.sln 2012-09-29 10:00:48.000000000 +0200
+++ python3.new/PCbuild/pcbuild.sln 2012-11-12 22:13:49.445159668 +0100
@@ -12,10 +12,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcxproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcxproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcxproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"
@@ -32,30 +28,16 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcxproj", "{13CECB97-4119-4316-9D42-8534019A5A44}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcxproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bz2", "_bz2.vcxproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcxproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_lzma", "_lzma.vcxproj", "{F9D71780-F393-11E0-BE50-0800200C9A66}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcxproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcxproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcxproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcxproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
Adapt VC10/MSVC2010 stuff for VC11/MSVC2012 (apparently builds with both then)
diff -ru python3.old_/PCbuild/_msi.vcxproj python3/PCbuild/_msi.vcxproj