Skip to content
Open
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ core_optional_dep(${optional_deps})
core_optional_dyload_dep(${dyload_optional})
core_require_dep(${required_deps})

SET(PYTHON_VERSION 3.7)

if(ENABLE_MARIADBCLIENT AND NOT ENABLE_MARIADBCLIENT STREQUAL AUTO AND ENABLE_MYSQLCLIENT AND NOT ENABLE_MYSQLCLIENT STREQUAL AUTO)
MESSAGE(FATAL_ERROR "You can not use MySql and MariaDB at the same time. Disable one by adding -DENABLE_MYSQLCLIENT=OFF or -DENABLE_MARIADBCLIENT=OFF.")
elseif(ENABLE_MYSQLCLIENT AND NOT ENABLE_MYSQLCLIENT STREQUAL AUTO)
Expand Down
8 changes: 4 additions & 4 deletions addons/repository.xbmc.org/addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</requires>
<extension point="xbmc.addon.repository">
<!-- Do not forget to bump add-on version when changing paths to force a repo refresh -->
<info>http://mirrors.kodi.tv/addons/leia/addons.xml.gz</info>
<checksum verify="sha256">http://mirrors.kodi.tv/addons/leia/addons.xml.gz?sha256</checksum>
<datadir>https://mirrors.kodi.tv/addons/leia</datadir>
<artdir>http://mirrors.kodi.tv/addons/leia</artdir>
<info>http://mirrors.kodi.tv/addons/migration/addons.xml.gz</info>
<checksum verify="sha256">http://mirrors.kodi.tv/addons/migration/addons.xml.gz?sha256</checksum>
<datadir>https://mirrors.kodi.tv/addons/migration</datadir>
<artdir>http://mirrors.kodi.tv/addons/migration</artdir>
<hashes>sha256</hashes>
</extension>
<extension point="xbmc.addon.metadata">
Expand Down
2 changes: 1 addition & 1 deletion cmake/cpack/deb/packages/kodi.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PACKAGE_ARCHITECTURE all
PACKAGE_SECTION video
PACKAGE_PRIORITY optional
PACKAGE_SHLIBDEPS
PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl4 | libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python-bluez | python-lightblue, python-imaging | python-pil, python-simplejson, libass9 | libass5 | libass4, libgif5 | libgif7, libnfs8 | libnfs4 | libnfs1, libbluray1 | libbluray2, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1
PACKAGE_DEPENDS @APP_NAME_LC@-bin (>= @CPACK_DEBIAN_PACKAGE_VERSION@), @APP_NAME_LC@-bin (<< @CPACK_DEBIAN_PACKAGE_VERSION@.1~), curl, libcurl4 | libcurl3, mesa-utils, x11-utils, fonts-liberation | ttf-liberation, fonts-dejavu-core | ttf-dejavu-core, python3-pil, python3-simplejson, libass9 | libass5 | libass4, libgif5 | libgif7, libnfs8 | libnfs4 | libnfs1, libbluray1 | libbluray2, libshairplay0, libvorbisfile3, libaacs0, libcec4, libgnutls30 | libgnutls-deb0-28 | libgnutls28 | libgnutls26, libxslt1.1
PACKAGE_RECOMMENDS libvdpau1, libva-intel-vaapi-driver, libva1
PACKAGE_SUGGESTS @APP_NAME_LC@-pvr-mythtv, @APP_NAME_LC@-pvr-vuplus, @APP_NAME_LC@-pvr-vdr-vnsi, @APP_NAME_LC@-pvr-njoy, @APP_NAME_LC@-pvr-nextpvr, @APP_NAME_LC@-pvr-mediaportal-tvserver, @APP_NAME_LC@-pvr-tvheadend-hts, @APP_NAME_LC@-pvr-dvbviewer, @APP_NAME_LC@-pvr-argustv, @APP_NAME_LC@-pvr-iptvsimple, @APP_NAME_LC@-audioencoder-vorbis, @APP_NAME_LC@-audioencoder-flac, @APP_NAME_LC@-audioencoder-lame
PACKAGE_BREAKS xbmc (<< 2:14.0~git20141019), xbmc-data, xbmc-standalone
Expand Down
10 changes: 5 additions & 5 deletions cmake/modules/FindPython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# PYTHON_LIBRARIES - The python libraries

if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_PYTHON python>=2.7 QUIET)
pkg_check_modules(PC_PYTHON python3>=3.5 QUIET)
endif()

find_program(PYTHON_EXECUTABLE python ONLY_CMAKE_FIND_ROOT_PATH)
find_library(PYTHON_LIBRARY NAMES python2.7 PATHS ${PC_PYTHON_LIBDIR})
find_path(PYTHON_INCLUDE_DIR NAMES Python.h PATHS ${PC_PYTHON_INCLUDE_DIRS} ${DEPENDS_PATH}/include/python2.7)
find_program(PYTHON_EXECUTABLE python3 ONLY_CMAKE_FIND_ROOT_PATH)
find_library(PYTHON_LIBRARY NAMES python3.7 python3.6 python3.5 PATHS ${PC_PYTHON_LIBDIR})
find_path(PYTHON_INCLUDE_DIR NAMES Python.h PATHS ${PC_PYTHON_INCLUDE_DIRS})

if(KODI_DEPENDSBUILD)
find_library(FFI_LIBRARY ffi REQUIRED)
Expand All @@ -25,7 +25,7 @@ if(KODI_DEPENDSBUILD)

set(PYTHON_LIBRARIES ${PYTHON_LIBRARY} ${FFI_LIBRARY} ${EXPAT_LIBRARY} ${INTL_LIBRARY} ${GMP_LIBRARY} ${PYTHON_DEP_LIBRARIES})
else()
find_package(PythonLibs 2.7 REQUIRED)
find_package(PythonLibs 3.5 REQUIRED)
list(APPEND PYTHON_LIBRARIES ${PC_PYTHON_STATIC_LIBRARIES})
endif()

Expand Down
2 changes: 1 addition & 1 deletion cmake/scripts/android/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ add_custom_target(bundle
${CMAKE_BINARY_DIR}/tools/android/packaging/media
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tools/android/packaging/xbmc/res
${CMAKE_BINARY_DIR}/tools/android/packaging/xbmc/res
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDS_PATH}/lib/python2.7 ${libdir}/python2.7
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDS_PATH}/lib/python${PYTHON_VERSION} ${libdir}/python${PYTHON_VERSION}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDS_PATH}/share/${APP_NAME_LC} ${datadir}/${APP_NAME_LC}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}>
${libdir}/${APP_NAME_LC}/$<TARGET_FILE_NAME:${APP_NAME_LC}>)
Expand Down
1 change: 1 addition & 0 deletions cmake/scripts/ios/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD
"FULL_PRODUCT_NAME=${APP_NAME}.app"
"WRAPPER_EXTENSION=app"
"SRCROOT=${CMAKE_BINARY_DIR}"
"PYTHON_VERSION=${PYTHON_VERSION}"
${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command
COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}"
"NATIVEPREFIX=${NATIVEPREFIX}"
Expand Down
1 change: 1 addition & 0 deletions cmake/scripts/osx/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ add_custom_target(bundle
"APP_NAME=${APP_NAME}"
"FULL_PRODUCT_NAME=${APP_NAME}.app"
"SRCROOT=${CMAKE_BINARY_DIR}"
"PYTHON_VERSION=${PYTHON_VERSION}"
${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-osx.command)
set_target_properties(bundle PROPERTIES FOLDER "Build Utilities")
add_dependencies(bundle ${APP_NAME_LC})
Expand Down
3 changes: 1 addition & 2 deletions cmake/scripts/windows/ArchSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH}
list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR})
list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})
set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python)

# -------- Compiler options ---------

Expand Down Expand Up @@ -74,7 +73,7 @@ link_directories(${DEPENDENCIES_DIR}/lib)

# Additional libraries
list(APPEND DEPLIBS bcrypt.lib d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib
PowrProf.lib setupapi.lib Shlwapi.lib dwmapi.lib dxguid.lib DelayImp.lib)
PowrProf.lib setupapi.lib Shlwapi.lib dwmapi.lib dxguid.lib DelayImp.lib Mincore.lib)

# NODEFAULTLIB option
set(_nodefaultlibs_RELEASE libcmt)
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ mini_wdk-10.0.14393.0-win32.7z
mysql-connector-c-6.1.9-win10-ARM-v141.7z
openssl-1.0.2o-win10-ARM-v141.7z
pcre-8.40-win10-ARM-v141.7z
pillow-4.2.1-v1-win10-ARM-v141.7z
pycryptodome-3.4.7-v1-win10-ARM-v140.7z
python-2.7.14-v2-win10-ARM-v141.7z
rapidjson-1.1.0-win32.7z
shairplay-ce80e00-win10-ARM-v140.7z
sqlite-3170000-win10-ARM-v140.7z
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ mini_wdk-10.0.14393.0-win32.7z
mysql-connector-c-6.1.9-win10-Win32-v141.7z
openssl-1.0.2o-win10-Win32-v141.7z
pcre-8.40-win10-Win32-v141.7z
pillow-4.2.1-v1-win10-Win32-v141.7z
pycryptodome-3.4.7-v1-win10-Win32-v140.7z
python-2.7.14-v2-win10-Win32-v141.7z
rapidjson-1.1.0-win32.7z
shairplay-ce80e00-win10-Win32-v140.7z
sqlite-3170000-win10-Win32-v140.7z
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ mini_wdk-10.0.14393.0-win32.7z
mysql-connector-c-6.1.9-win10-x64-v141.7z
openssl-1.0.2o-win10-x64-v141.7z
pcre-8.40-win10-x64-v141.7z
pillow-4.2.1-v1-win10-x64-v141.7z
pycryptodome-3.4.7-v1-win10-x64-v140.7z
python-2.7.14-v2-win10-x64-v141.7z
rapidjson-1.1.0-win32.7z
shairplay-ce80e00-win10-x64-v140.7z
sqlite-3170000-win10-x64-v140.7z
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ mini_wdk-10.0.14393.0-win32.7z
mysql-connector-c-6.1.6-win32-vc140-v2.7z
openssl-1.0.2g-win32-vc140-v2.7z
pcre-8.37-win32-vc140-v3.7z
pillow-3.1.0-win32-vc140.7z
pycryptodome-3.4.3-win32.7z
python-2.7.13-win32-vc140-v3.7z
python3-3.7.1-Win32-v141.7z
rapidjson-1.1.0-win32.7z
shairplay-0.9.0-win32-vc140-v2.7z
sqlite-3.10.2-win32-vc140.7z
Expand Down
4 changes: 1 addition & 3 deletions project/BuildDependencies/scripts/0_package.target-x64.list
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ mini_wdk-10.0.14393.0-x64.7z
mariadb-connector-c-3.0.6-x64-v141.7z
openssl-1.1.1-x64-v141.7z
pcre-8.40-x64-vc140.7z
pillow-4.2.1-x64-vc140.zip
pycryptodome-3.4.7-x64-vc140.zip
python-2.7.13-x64-vc140-v3.7z
python3-3.7.1-x64-v141.7z
rapidjson-1.1.0-win32.7z
shairplay-ce80e00-x64-vc140.7z
sqlite-3.17.0-x64-vc140.7z
Expand Down
10 changes: 5 additions & 5 deletions tools/android/packaging/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ sharedobb: shared
@echo "$(CMAKE_SOURCE_DIR)/main.@APP_NAME_LC@.obb created"

python: | xbmc/assets
mkdir -p xbmc/assets/python2.7/lib/
cp -rfp $(PREFIX)/lib/python2.7 xbmc/assets/python2.7/lib/
cd xbmc/assets/python2.7/lib/python2.7/; rm -rf test config lib-dynload
mkdir -p xbmc/assets/python@PYTHON_VERSION@/lib/
cp -rfp $(PREFIX)/lib/python@PYTHON_VERSION@ xbmc/assets/python@PYTHON_VERSION@/lib/
cd xbmc/assets/python@PYTHON_VERSION@/lib/python@PYTHON_VERSION@/; rm -rf test config lib-dynload

res:
mkdir -p xbmc/res xbmc/res/raw xbmc/res/values images
Expand All @@ -138,15 +138,15 @@ res:

libs: $(PREFIX)/lib/@APP_NAME_LC@/lib@APP_NAME_LC@.so
rm -rf xbmc/lib/$(CPU) xbmc/obj/local/$(CPU)
mkdir -p xbmc/lib/$(CPU) xbmc/assets/python2.7/lib/ xbmc/obj/local/$(CPU)
mkdir -p xbmc/lib/$(CPU) xbmc/assets/python@PYTHON_VERSION@/lib/ xbmc/obj/local/$(CPU)
cp -fpL $(SRCLIBS) xbmc/obj/local/$(CPU)/
cp -fp $(PREFIX)/lib/@APP_NAME_LC@/lib@APP_NAME_LC@.so xbmc/obj/local/$(CPU)/
find $(PREFIX)/lib/@APP_NAME_LC@/addons -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \; || true
find $(PREFIX)/share/@APP_NAME_LC@/addons -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \; || true
find $(DEPENDS_PATH)/share/kodi/addons -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \; || true
find $(DEPENDS_PATH)/lib/kodi/addons -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \; || true
find $(PREFIX)/lib/@APP_NAME_LC@/system -name "*.so" -exec cp -fp {} xbmc/obj/local/$(CPU)/ \;
DIR=${CURDIR}; cd $(PREFIX)/lib/python2.7/site-packages; for i in `find Cryptodome -name \*.so` ; do FN=`echo $$i | cut -c1- | tr "/" "_"` ; mv $$i $$DIR/xbmc/obj/local/$(CPU)/$$FN ; done
DIR=${CURDIR}; cd $(PREFIX)/lib/python@PYTHON_VERSION@/site-packages; for i in `find Cryptodome -name \*.so` ; do FN=`echo $$i | cut -c1- | tr "/" "_"` ; mv $$i $$DIR/xbmc/obj/local/$(CPU)/$$FN ; done
cd xbmc/obj/local/$(CPU)/; find . -name "*.so" -not -name "lib*.so" | sed "s/\.\///" | xargs -I@ mv @ lib@
cp -fp xbmc/obj/local/$(CPU)/*.so xbmc/lib/$(CPU)/
$(STRIP) --strip-unneeded xbmc/lib/$(CPU)/*.so
Expand Down
2 changes: 1 addition & 1 deletion tools/android/packaging/xbmc/src/Splash.java.in
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public class Splash extends Activity

if (!(sName.startsWith("assets/") || (mInstallLibs && sName.startsWith("lib/"))))
continue;
if (sName.startsWith("assets/python2.7"))
if (sName.startsWith("assets/python"))
continue;

String sFullPath = null;
Expand Down
8 changes: 4 additions & 4 deletions tools/darwin/Support/copyframeworks-ios.command
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ for a in $(otool -L "$TARGET_BINARY" | grep "$EXTERNAL_LIBS\|$DYLIB_NAMEPATH" |
install_name_tool -change "$a" "$DYLIB_NAMEPATH/$(basename $a)" "$TARGET_BINARY"
done

echo "Package $EXTERNAL_LIBS/lib/python2.7"
echo "Package $EXTERNAL_LIBS/lib/python$PYTHON_VERSION"
mkdir -p "$TARGET_CONTENTS/Frameworks/lib"
PYTHONSYNC="rsync -aq --exclude .DS_Store --exclude *.a --exclude *.exe --exclude test --exclude tests"
${PYTHONSYNC} "$EXTERNAL_LIBS/lib/python2.7" "$TARGET_FRAMEWORKS/lib/"
rm -rf "$TARGET_FRAMEWORKS/lib/python2.7/config"
${PYTHONSYNC} "$EXTERNAL_LIBS/lib/python$PYTHON_VERSION" "$TARGET_FRAMEWORKS/lib/"
rm -rf "$TARGET_FRAMEWORKS/lib/python$PYTHON_VERSION/config"

echo "Checking python *.so for dylib dependencies"
check_xbmc_dylib_depends "$TARGET_FRAMEWORKS"/lib/python2.7 "*.so"
check_xbmc_dylib_depends "$TARGET_FRAMEWORKS"/lib/python$PYTHON_VERSION "*.so"

echo "Checking system *.so for dylib dependencies"
check_xbmc_dylib_depends "$XBMC_HOME"/system "*.so"
Expand Down
10 changes: 5 additions & 5 deletions tools/darwin/Support/copyframeworks-osx.command
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ for a in $(otool -LX "$TARGET_BINARY" | grep "$EXTERNAL_LIBS" | awk ' { print $
install_name_tool -change "$a" "$DYLIB_NAMEPATH/$(basename $a)" "$TARGET_BINARY"
done

echo "Package $EXTERNAL_LIBS/lib/python2.7"
echo "Package $EXTERNAL_LIBS/lib/python$PYTHON_VERSION"
mkdir -p "$TARGET_CONTENTS/Libraries/lib"
PYTHONSYNC="rsync -aq --exclude .DS_Store --exclude *.a --exclude *.exe --exclude test --exclude tests"
${PYTHONSYNC} "$EXTERNAL_LIBS/lib/python2.7" "$TARGET_FRAMEWORKS/lib/"
rm -rf "$TARGET_FRAMEWORKS/lib/python2.7/config"
${PYTHONSYNC} "$EXTERNAL_LIBS/lib/python$PYTHON_VERSION" "$TARGET_FRAMEWORKS/lib/"
rm -rf "$TARGET_FRAMEWORKS/lib/python$PYTHON_VERSION/config"

echo "Checking $TARGET_FRAMEWORKS/lib/python2.7 *.so for dylib dependencies"
check_xbmc_dylib_depends "$TARGET_FRAMEWORKS"/lib/python2.7 "*.so"
echo "Checking $TARGET_FRAMEWORKS/lib/python$PYTHON_VERSION *.so for dylib dependencies"
check_xbmc_dylib_depends "$TARGET_FRAMEWORKS"/lib/python$PYTHON_VERSION "*.so"

echo "Checking $XBMC_HOME/system *.so for dylib dependencies"
check_xbmc_dylib_depends "$XBMC_HOME"/system "*.so"
Expand Down
11 changes: 5 additions & 6 deletions tools/depends/native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ endif

NATIVE= m4-native gettext-native autoconf-native automake-native \
libtool-native pkg-config-native yasm-native cmake-native \
gas-preprocessor-native python27-native zlib-native \
gas-preprocessor-native libffi-native python3-native zlib-native \
pcre-native swig-native \
libpng-native libjpeg-turbo-native liblzo2-native giflib-native \
distribute-native distutilscross-native JsonSchemaBuilder TexturePacker \
Expand All @@ -23,7 +23,7 @@ endif

ifeq ($(OS),linux)
ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),raspberry-pi aml gbm))
NATIVE += meson-native ninja-native python3-native
NATIVE += meson-native ninja-native
endif
endif

Expand All @@ -46,11 +46,10 @@ libpng-native: zlib-native
meson-native: python3-native
ninja-native: python3-native
swig-native: pcre-native
distribute-native: python27-native
distutilscross-native: python27-native distribute-native
distribute-native: python3-native
distutilscross-native: python3-native distribute-native
tar-native: xz-native automake-native
python27-native: zlib-native
python3-native: $(EXPAT) zlib-native
python3-native: $(EXPAT) libffi-native zlib-native
wayland-scanner-native: expat-native
waylandpp-scanner-native: cmake-native

Expand Down
2 changes: 1 addition & 1 deletion tools/depends/native/distribute-native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)

.installed-$(PLATFORM): $(PLATFORM)
cd $(PLATFORM); $(PREFIX)/bin/python setup.py install --prefix=$(PREFIX)
cd $(PLATFORM); $(PREFIX)/bin/python3 setup.py install --prefix=$(PREFIX)
touch $@

clean:
Expand Down
5 changes: 3 additions & 2 deletions tools/depends/native/distutilscross-native/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include ../../Makefile.include
PREFIX=$(NATIVEPREFIX)
PLATFORM=$(NATIVEPLATFORM)
DEPS= ../../Makefile.include Makefile
DEPS= ../../Makefile.include Makefile python3.patch

# lib name, version
LIBNAME=distutilscross
Expand All @@ -17,9 +17,10 @@ $(TARBALLS_LOCATION)/$(ARCHIVE):
$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
-rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); patch -p1 -i ../python3.patch

.installed-$(PLATFORM): $(PLATFORM)
cd $(PLATFORM); $(PREFIX)/bin/python setup.py install --prefix=$(PREFIX)
cd $(PLATFORM); $(PREFIX)/bin/python3 setup.py install --prefix=$(PREFIX)
touch $@

clean:
Expand Down
11 changes: 11 additions & 0 deletions tools/depends/native/distutilscross-native/python3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/distutilscross/crosscompile.py
+++ b/distutilscross/crosscompile.py
@@ -32,7 +32,7 @@
_get_python_lib = sysconfig.get_python_lib
def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
if os.environ.has_key('PYTHONXCPREFIX'):
- print "Setting prefix"
+ print("Setting prefix")
prefix = os.environ['PYTHONXCPREFIX']

return _get_python_lib(plat_specific, standard_lib, prefix)
2 changes: 1 addition & 1 deletion tools/depends/native/expat-native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.bz2

# configuration settings
CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) ./conftools; ./configure --prefix=$(PREFIX) --disable-shared
CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) ./conftools; CFLAGS="-fPIC" ./configure --prefix=$(PREFIX) --disable-shared

LIBDYLIB=$(PLATFORM)/.libs/lib$(LIBNAME).a

Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
include ../../Makefile.include
PREFIX=$(NATIVEPREFIX)
PLATFORM=$(NATIVEPLATFORM)
DEPS= ../../Makefile.include Makefile

# lib name, version
LIBNAME=Python
VERSION=2.7.15
LIBNAME=libffi
VERSION=3.2.1
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.xz
CWD=$(shell pwd)
HOSTPYTHONDIR=$(CWD)/$(PLATFORM)/hostpython
ARCHIVE=$(SOURCE).tar.gz

CONFIGURE=./configure --prefix=$(NATIVEPREFIX) --disable-shared --disable-toolbox-glue --disable-framework
# configuration settings
CONFIGURE= CFLAGS="-fPIC" ./configure --prefix=$(NATIVEPREFIX) --disable-shared --disable-builddir

LIBDYLIB=$(PLATFORM)/python
ifeq ($(NATIVE_OS), osx)
LIBDYLIB=$(PLATFORM)/python.exe
endif

LIBDYLIB=$(PLATFORM)/.libs/$(LIBNAME).a

all: .installed-$(PLATFORM)

$(TARBALLS_LOCATION)/$(ARCHIVE):
cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)

$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); $(CONFIGURE)

$(LIBDYLIB): $(PLATFORM)
cd $(PLATFORM); $(MAKE) regen-grammar
cd $(PLATFORM); $(MAKE)
$(MAKE) -j 1 -C $(PLATFORM)
touch $@

.installed-$(PLATFORM): $(LIBDYLIB)
cd $(PLATFORM); $(MAKE) install
install $(PLATFORM)/Parser/pgen $(NATIVEPREFIX)/bin
touch $(LIBDYLIB)
$(MAKE) -C $(PLATFORM) install
mkdir -p $(NATIVEPREFIX)/include/ffi
cp $(NATIVEPREFIX)/lib/$(SOURCE)/include/* $(NATIVEPREFIX)/include/ffi/
touch $@

clean:
rm -rf $(PLATFORM) .installed-$(PLATFORM)
$(MAKE) -C $(PLATFORM) clean
rm -f .installed-$(PLATFORM)

distclean::
rm -rf $(PLATFORM) .installed-$(PLATFORM)
Loading