123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- # This file is part of the OpenADK project. OpenADK is copyrighted
- # material, please see the LICENCE file in the top-level directory.
- include ${TOPDIR}/rules.mk
- PKG_NAME:= python
- PKG_VERSION:= 3.1.1
- PKG_RELEASE:= 1
- PKG_MD5SUM:= f1317dbb2398374d6691edd5bff1b91d
- PKG_DESCR:= Python scripting language (Version 3)
- PKG_SECTION:= lang
- PKG_URL:= http://www.python.org/
- PKG_SITES:= http://www.python.org/ftp/python/3.1.1/
- PKG_HOST_DEPENDS:= !netbsd !openbsd !cygwin
- DISTFILES= Python-${PKG_VERSION}.tgz
- WRKDIST= ${WRKDIR}/Python-${PKG_VERSION}
- include ${TOPDIR}/mk/package.mk
- $(eval $(call PKG_template,PYTHON,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
- MAKE_ENV+= OPT="$(TARGET_CFLAGS)" \
- HOSTPYTHON=./hostpython \
- HOSTPGEN=./Parser/hostpgen
- CONFIGURE_ENV+= OPT="$(TARGET_CFLAGS)"
- CONFIGURE_ARGS:= --with-threads \
- --with-system-ffi \
- --without-cxx-main
- post-extract:
- (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
- OPT="$(CFLAGS_FOR_BUILD)" \
- ./configure --without-cxx-main --without-threads \
- --prefix=$(STAGING_HOST_DIR) \
- );
- $(MAKE) -C ${WRKBUILD} python Parser/pgen
- $(MAKE) -C ${WRKBUILD} install
- ${CP} ${WRKBUILD}/Parser/pgen ${STAGING_HOST_DIR}/bin/pgen
- ${CP} ${WRKBUILD}/python ${STAGING_HOST_DIR}/bin/hostpython
- ${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen
- ${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython
- $(MAKE) -C ${WRKBUILD} distclean
- pre-configure:
- $(SED) "s#@@CPU_ARCH@@#$(CPU_ARCH)#" ${WRKBUILD}/configure
- post-install:
- ${INSTALL_DIR} ${IDIR_PYTHON}/usr/bin ${IDIR_PYTHON}/usr/lib
- ${INSTALL_DIR} ${IDIR_PYTHON}/usr/lib/python3.1
- ${INSTALL_BIN} ${WRKINST}/usr/bin/python3 ${IDIR_PYTHON}/usr/bin
- ${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON}/usr/lib
- cd ${IDIR_PYTHON}/usr/bin && ln -s python3 python
- ${CP} ${WRKINST}/usr/lib/python3.1/* ${IDIR_PYTHON}/usr/lib/python3.1
- include ${TOPDIR}/mk/pkg-bottom.mk
|