diff --git a/common/shlibs b/common/shlibs index c1815a5690a..810de8a5c50 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1208,3 +1208,4 @@ libvchiq_arm.so rpi-firmware-20130228_1 libvcos.so rpi-firmware-20130228_1 liblockdev.so.1 lockdev-1.0.3_1 libcec.so.2 libcec-2.1.1_1 +libpython3.3m.so.1.0 python3-3.3.0_1 diff --git a/srcpkgs/python3-devel b/srcpkgs/python3-devel new file mode 120000 index 00000000000..b8a0adbbb97 --- /dev/null +++ b/srcpkgs/python3-devel @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/srcpkgs/python3/python3-devel.template b/srcpkgs/python3/python3-devel.template new file mode 100644 index 00000000000..e776d6d93f4 --- /dev/null +++ b/srcpkgs/python3/python3-devel.template @@ -0,0 +1,10 @@ +# Template file for 'python-devel'. +# +depends="python3>=${version}" +short_desc="Python development files" + +do_install() { + vmove "usr/bin/python*-config" usr/bin + vmove usr/lib/pkgconfig usr/lib + vmove "usr/include/python3*/*" usr/include/python3.3m +} diff --git a/srcpkgs/python3/template b/srcpkgs/python3/template new file mode 100644 index 00000000000..8d11cee36fb --- /dev/null +++ b/srcpkgs/python3/template @@ -0,0 +1,55 @@ +# Template build file for 'python3'. +pkgname=python3 +version=3.3.0 +revision=1 +wrksrc="Python-${version}" +short_desc="Interpreted, interactive, object-oriented programming language (3.x series)" +maintainer="Juan RP " +homepage="http://www.python.org" +license="PSF" +distfiles="http://www.python.org/ftp/python/$version/Python-$version.tar.xz" +checksum=09994d2885a8ef61b4b2389527a9805a4a05e3e0f121dbc8e4222f9010f5bbd7 + +subpackages="${pkgname}-devel" + +makedepends="libffi-devel readline-devel gdbm-devel openssl-devel + expat-devel db-devel sqlite-devel bzip2-devel zlib-devel liblzma-devel" + +pre_configure() { + sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python3|" Lib/cgi.py + rm -r Modules/expat + rm -r Modules/zlib + rm -r Modules/_ctypes/{darwin,libffi}* +} + +if [ "$XBPS_CROSS_BUILD" ]; then + msg_error "$pkgname cannot be cross build.\n" +fi + +# Native build +do_configure() { + # Force posix semaphores by default; sem_open requires /dev/shm and + # it's not mounted in chroot. + unset LD CC AR AS RANLIB + + ./configure ${CONFIGURE_SHARED_ARGS} --with-threads --enable-ipv6 \ + --with-signal-module --enable-shared --with-system-ffi \ + --enable-unicode=ucs4 --with-system-expat --with-computed-gotos \ + --with-system-expat --with-dbmliborder=gdbm:ndbm \ + --disable-static ac_cv_posix_semaphores_enabled=yes +} + +do_build() { + make ${makejobs} +} + +do_install() { + make DESTDIR=${DESTDIR} install + chmod 755 ${DESTDIR}/usr/lib/libpython*.so* + install -Dm644 LICENSE ${DESTDIR}/usr/share/licenses/${pkgname}/LICENSE + + # Remove test files. + rm -rf ${DESTDIR}/usr/lib/python3.3/test + # Remove python3.3m hardlink + rm -f ${DESTDIR}/usr/bin/python3.3m +}