Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 229065 Details for
Bug 317091
Please review Prefix changes for dev-lang/python 2.5.4-r4 and 2.6.5-r1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
python-2.6.5-r1 prefix changes
python-2.6.5-r1.ebuild-prefix.patch (text/plain), 14.69 KB, created by
Fabian Groffen
on 2010-04-25 09:45:40 UTC
(
hide
)
Description:
python-2.6.5-r1 prefix changes
Filename:
MIME Type:
Creator:
Fabian Groffen
Created:
2010-04-25 09:45:40 UTC
Size:
14.69 KB
patch
obsolete
>--- python-2.6.5-r1.ebuild 2010-03-31 04:36:03.000000000 +0200 >+++ python-2.6.5-r1.ebuild 2010-04-25 11:28:35.756029000 +0200 >@@ -19,15 +19,15 @@ > LICENSE="PSF-2.2" > SLOT="2.6" > PYTHON_ABI="${SLOT}" >-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" >-IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" >+KEYWORDS="~ppc-aix ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" >+IUSE="aqua -berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" > > # NOTE: dev-python/{elementtree,celementtree,pysqlite,ctypes} > # do not conflict with the ones in python proper. - liquidx > > RDEPEND=">=app-admin/eselect-python-20091230 > >=sys-libs/zlib-1.1.3 >- virtual/libffi >+ !m68k-mint? ( virtual/libffi ) > virtual/libintl > !build? ( > berkdb? ( || ( >@@ -74,8 +74,46 @@ > rm "${WORKDIR}/${PV}"/*_all_crosscompile.patch > fi > >+ # hardcoding GNU specifics breaks platforms not using GNU binutils >+ case $($(tc-getAS) --noexecstack -v 2>&1 </dev/null) in >+ *"GNU Binutils"*) # GNU as with noexecstack support >+ : >+ ;; >+ *) >+ EPATCH_EXCLUDE=07_all_ctypes_execstack.patch >+ ;; >+ esac > EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}" > >+ # apply before Gentoo libdir comes into effect >+ # these patches get rid of unwanted looking around in the host OS >+ epatch "${FILESDIR}"/${PN}-2.6.5-readline-prefix.patch >+ epatch "${FILESDIR}"/${PN}-2.5.1-no-usrlocal.patch >+ epatch "${FILESDIR}"/${PN}-2.6.2-use-first-bsddb-found.patch >+ epatch "${FILESDIR}"/${PN}-2.6.2-no-bsddb185.patch >+ >+ # Darwin/OSX Framework related patches and tweaks >+ epatch "${FILESDIR}"/${PN}-2.5.1-darwin-bundle.patch >+ epatch "${FILESDIR}"/${PN}-2.6.2-no-special-darwin-libffi.patch >+ epatch "${FILESDIR}"/${PN}-2.6.2-darwin-no-framework-lookup.patch >+ epatch "${FILESDIR}"/${PN}-2.6.2-mac.patch >+ epatch "${FILESDIR}"/${PN}-2.6.5-mac-just-prefix.patch # injects @@LIBDIR >+ # need this to have _NSGetEnviron being used, which by default isn't, also >+ # in a non-Framework build (use !aqua) upstream doesn't build like this >+ [[ ${CHOST} == *-darwin* ]] && use !aqua && \ >+ append-flags -DWITH_NEXT_FRAMEWORK >+ # this activates stuff from python-2.6.2-mac.patch (2.7+ has this fixed) >+ sed -i -e "s:@@APPLICATIONS_DIR@@:${EPREFIX}/Applications:g" \ >+ Mac/Makefile.in \ >+ Mac/IDLE/Makefile.in \ >+ Mac/Tools/Doc/setup.py \ >+ Mac/PythonLauncher/Makefile.in || die >+ # we need to set this to prevent the framework path to be used in an OSX >+ # Framework build, which causes misc unwanted effects in our UNIX-savvy env >+ sed -i -e '/-DPREFIX=/s:$(prefix):'"${EPREFIX}/usr"':' \ >+ -e '/-DEXEC_PREFIX=/s:$(exec_prefix):'"${EPREFIX}/usr"':' \ >+ Makefile.pre.in || die >+ > sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ > Lib/distutils/command/install.py \ > Lib/distutils/sysconfig.py \ >@@ -94,6 +132,45 @@ > rm Lib/distutils/command/wininst-*.exe > fi > >+ # build static for mint >+ [[ ${CHOST} == *-mint* ]] && epatch "${FILESDIR}"/${PN}-2.6.2-mint.patch >+ >+ # do not use 'which' to find binaries, but go through the PATH. >+ epatch "${FILESDIR}"/${PN}-2.4.4-ld_so_aix-which.patch >+ # at least IRIX starts spitting out ugly errors, but we want to use Prefix >+ # grep anyway >+ epatch "${FILESDIR}"/${PN}-2.5.1-no-hardcoded-grep.patch >+ # make it compile on IRIX as well >+ epatch "${FILESDIR}"/${PN}-2.6.5-irix.patch >+ # and generate a libpython2.6.so >+ epatch "${FILESDIR}"/${PN}-2.6-irix-libpython2.6.patch >+ # AIX sometimes keeps ".nfsXXX" files around: ignore them in distutils >+ epatch "${FILESDIR}"/${PN}-2.5.1-distutils-aixnfs.patch >+ # this fails to compile on OpenSolaris at least, do we need it? >+ epatch "${FILESDIR}"/${PN}-2.6.2-no-sunaudiodev.patch >+ # 64-bits Solaris 8-10 have a missing libcrypt symlink >+ epatch "${FILESDIR}"/${PN}-2.6.2-solaris64-crypt.patch >+ # fixes compilation on more recent OpenSolaris, from them >+ epatch "${FILESDIR}"/${PN}-2.6.4-netpacket-solaris.patch >+ # http://bugs.python.org/issue6308 >+ epatch "${FILESDIR}"/${PN}-2.6.2-termios-noqnx.patch >+ # build shared library on aix #278845 >+ epatch "${FILESDIR}"/${PN}-2.6.2-aix-shared.patch >+ # hpux before 11.31 >+ epatch "${FILESDIR}"/${PN}-2.6.2-missing-SEM_FAILED.patch >+ >+ # patch to make python behave nice with interix. There is one part >+ # maybe affecting other x86-platforms, thus conditional. >+ if [[ ${CHOST} == *-interix* ]] ; then >+ # this one could be applied unconditionally, but to keep it >+ # clean, I do it together with the conditional one. >+ epatch "${FILESDIR}"/${PN}-2.5.1-interix-sleep.patch >+ # some more modules fixed (_multiprocessing, dl) >+ epatch "${FILESDIR}"/${PN}-2.6.2-interix-modules.patch >+ # -r2 because of 12_all_check_availability_of_nis_headers >+ epatch "${FILESDIR}"/${PN}-2.6.4-r2-interix-nis.patch >+ fi >+ > # Fix OtherFileTests.testStdin() not to assume > # that stdin is a tty for bug #248081. > sed -e "s:'osf1V5':'osf1V5' and sys.stdin.isatty():" -i Lib/test/test_file.py || die "sed failed" >@@ -119,6 +196,7 @@ > use ssl || export PYTHON_DISABLE_SSL="1" > use tk || disable+=" _tkinter" > use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. >+ use x64-macos && disable+=" Nav _Qt" # Carbon > export PYTHON_DISABLE_MODULES="${disable}" > > if ! use xml; then >@@ -146,6 +224,10 @@ > use hardened && replace-flags -O3 -O2 > fi > >+ # http://bugs.gentoo.org/show_bug.cgi?id=302137 >+ [[ ${CHOST} == powerpc-*-darwin* ]] && is-flag "-mtune=*" \ >+ && replace-flags -O2 -O3 >+ > if tc-is-cross-compiler; then > OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ > ./configure --{build,host}=${CBUILD} || die "cross-configure failed" >@@ -167,16 +249,37 @@ > # Please query BSD team before removing this! > append-ldflags "-L." > >+ # python defaults to use 'cc_r' on aix >+ [[ ${CHOST} == *-aix* ]] && myconf="${myconf} --with-gcc=$(tc-getCC)" >+ >+ # Don't include libmpc on IRIX - it is only available for 64bit MIPS4 >+ [[ ${CHOST} == *-irix* ]] && export ac_cv_lib_mpc_usconfig=no >+ >+ # Interix poll is broken >+ [[ ${CHOST} == *-interix* ]] && export ac_cv_func_poll=no >+ >+ [[ ${CHOST} == *-mint* ]] && export ac_cv_func_poll=no >+ >+ # we need this to get pythonw, the GUI version of python >+ # --enable-framework and --enable-shared are mutually exclusive: >+ # http://bugs.python.org/issue5809 >+ use aqua \ >+ && myconf="${myconf} --enable-framework=${EPREFIX}/usr/lib" \ >+ || myconf="${myconf} --enable-shared" >+ >+ # note: for a framework build we need to use ucs2 because OSX >+ # uses that internally too: >+ # http://bugs.python.org/issue763708 > OPT="" econf \ > --with-fpectl \ >- --enable-shared \ > $(use_enable ipv6) \ > $(use_with threads) \ >- $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ >+ $( (use wide-unicode && use !aqua) && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ > --infodir='${prefix}/share/info' \ > --mandir='${prefix}/share/man' \ > --with-libc="" \ >- --with-system-ffi >+ --with-system-ffi \ >+ ${myconf} > } > > src_compile() { >@@ -218,34 +321,157 @@ > done > > elog "If you'd like to run them, you may:" >- elog "cd $(python_get_libdir)/test" >+ elog "cd ${EPREFIX}$(python_get_libdir)/test" > elog "and run the tests separately." > > python_disable_pyc > } > > src_install() { >- emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" >+ [[ ${CHOST} == *-mint* ]] && keepdir /usr/lib/python${SLOT}/lib-dynload/ >+ # do not make multiple targets in parallel when there are broken >+ # sharedmods (during bootstrap), would build them twice in parallel. >+ if use aqua ; then >+ local fwdir="${EPREFIX}"/usr/$(get_libdir)/Python.framework >+ >+ # let the makefiles do their thing >+ emake -j1 CC="$(tc-getCC)" DESTDIR="${D}" STRIPFLAG= frameworkinstall || die "emake frameworkinstall failed" >+ emake DESTDIR="${D}" maninstall || die "emake maninstall failed" >+ >+ # avoid framework incompatability, degrade to a normal UNIX lib >+ mkdir -p "${ED}"/usr/$(get_libdir) >+ cp "${D}${fwdir}"/Versions/${SLOT}/Python \ >+ "${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib || die >+ chmod u+w "${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib >+ install_name_tool \ >+ -id "${EPREFIX}"/usr/$(get_libdir)/libpython${SLOT}.dylib \ >+ "${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib >+ chmod u-w "${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib >+ cp "${S}"/libpython${SLOT}.a \ >+ "${ED}"/usr/$(get_libdir)/ || die >+ >+ # rebuild python executable to be the non-pythonw (python wrapper) >+ # version so we don't get framework crap >+ $(tc-getCC) "${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib \ >+ -o "${ED}"/usr/bin/python${SLOT} \ >+ Modules/python.o || die >+ >+ # don't install the "Current" symlink, will always conflict >+ rm "${D}${fwdir}"/Versions/Current || die >+ # update whatever points to it, eselect-python sets them >+ rm "${D}${fwdir}"/{Headers,Python,Resources} || die >+ >+ # remove unversioned files (that are not made versioned below) >+ pushd "${ED}"/usr/bin > /dev/null >+ rm -f python python-config python${SLOT}-config >+ # python${SLOT} was created above >+ for f in pythonw smtpd${SLOT}.py pydoc idle ; do >+ rm -f ${f} ${f}${SLOT} >+ done >+ # pythonw needs to remain in the framework (that's the whole >+ # reason we go through this framework hassle) >+ ln -s ../lib/Python.framework/Versions/${SLOT}/bin/pythonw2.6 || die >+ # copy the scripts to we can fix their shebangs >+ for f in 2to3 pydoc${SLOT} idle${SLOT} python${SLOT}-config ; do >+ cp "${D}${fwdir}"/Versions/${SLOT}/bin/${f} . || die >+ sed -i -e '1c\#!'"${EPREFIX}"'/usr/bin/python'"${SLOT}" \ >+ ${f} || die >+ done >+ # "fix" to have below collision fix not to bail >+ mv pydoc${SLOT} pydoc || die >+ mv idle${SLOT} idle || die >+ popd > /dev/null >+ >+ # basically we don't like the framework stuff at all, so just move >+ # stuff around or add some symlinks to make our life easier >+ mkdir -p "${ED}"/usr >+ mv "${D}${fwdir}"/Versions/${SLOT}/share \ >+ "${ED}"/usr/ || die "can't move share" >+ # get includes just UNIX style >+ mkdir -p "${ED}"/usr/include >+ mv "${D}${fwdir}"/Versions/${SLOT}/include/python${SLOT} \ >+ "${ED}"/usr/include/ || die "can't move include" >+ pushd "${D}${fwdir}"/Versions/${SLOT}/include > /dev/null >+ ln -s ../../../../../include/python${SLOT} || die >+ popd > /dev/null >+ # remove now dead symlink >+ rm "${ED}"/usr/lib/python${SLOT}/config/libpython${SLOT}.a >+ >+ # same for libs >+ # NOTE: can't symlink the entire dir, because a real dir already exists >+ # on upgrade (site-packages), however since we h4x0rzed python to >+ # actually look into the UNIX-style dir, we just switch them around. >+ mkdir -p "${ED}"/usr/$(get_libdir) >+ mv "${D}${fwdir}"/Versions/${SLOT}/lib/python${SLOT} \ >+ "${ED}"/usr/lib/ || die "can't move python${SLOT}" >+ pushd "${D}${fwdir}"/Versions/${SLOT}/lib > /dev/null >+ ln -s ../../../../python${SLOT} || die >+ popd > /dev/null >+ >+ # fix up Makefile >+ sed -i \ >+ -e '/^LINKFORSHARED=/s/_PyMac_Error.*$/PyMac_Error/' \ >+ -e '/^LDFLAGS=/s/=.*$/=/' \ >+ -e '/^prefix=/s:=.*$:= '"${EPREFIX}"'/usr:' \ >+ -e '/^PYTHONFRAMEWORK=/s/=.*$/=/' \ >+ -e '/^PYTHONFRAMEWORKDIR=/s/=.*$/= no-framework/' \ >+ -e '/^PYTHONFRAMEWORKPREFIX=/s/=.*$/=/' \ >+ -e '/^PYTHONFRAMEWORKINSTALLDIR=/s/=.*$/=/' \ >+ -e '/^LDLIBRARY=/s:=.*$:libpython$(VERSION).dylib:' \ >+ "${ED}"/usr/lib/python${SLOT}/config/Makefile || die >+ >+ # add missing version.plist file >+ mkdir -p "${D}${fwdir}"/Versions/${SLOT}/Resources >+ cat > "${D}${fwdir}"/Versions/${SLOT}/Resources/version.plist << EOF >+<?xml version="1.0" encoding="UTF-8"?> >+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" >+"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >+<plist version="1.0"> >+<dict> >+ <key>BuildVersion</key> >+ <string>1</string> >+ <key>CFBundleShortVersionString</key> >+ <string>${PV}</string> >+ <key>CFBundleVersion</key> >+ <string>${PV}</string> >+ <key>ProjectName</key> >+ <string>Python</string> >+ <key>SourceVersion</key> >+ <string>${PV}</string> >+</dict> >+</plist> >+EOF >+ else >+ emake DESTDIR="${D}" altinstall || die "emake altinstall failed" >+ emake DESTDIR="${D}" maninstall || die "emake maninstall failed" >+ fi > >- mv "${D}usr/bin/python${SLOT}-config" "${D}usr/bin/python-config-${SLOT}" >+ mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}" > > # Fix collisions between different slots of Python. >- mv "${D}usr/bin/2to3" "${D}usr/bin/2to3-${SLOT}" >- mv "${D}usr/bin/pydoc" "${D}usr/bin/pydoc${SLOT}" >- mv "${D}usr/bin/idle" "${D}usr/bin/idle${SLOT}" >- mv "${D}usr/share/man/man1/python.1" "${D}usr/share/man/man1/python${SLOT}.1" >- rm -f "${D}usr/bin/smtpd.py" >+ mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" >+ mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" >+ mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" >+ mv "${ED}usr/share/man/man1/python.1" "${ED}usr/share/man/man1/python${SLOT}.1" >+ rm -f "${ED}usr/bin/smtpd.py" >+ >+ # http://src.opensolaris.org/source/xref/jds/spec-files/trunk/SUNWPython.spec >+ # These #defines cause problems when building c99 compliant python modules >+ # http://bugs.python.org/issue1759169 >+ [[ ${CHOST} == *-solaris* ]] && dosed -e \ >+ 's:^\(^#define \(_POSIX_C_SOURCE\|_XOPEN_SOURCE\|_XOPEN_SOURCE_EXTENDED\).*$\):/* \1 */:' \ >+ /usr/include/python${SLOT}/pyconfig.h > > if use build; then >- rm -fr "${D}usr/bin/idle${SLOT}" "${D}$(python_get_libdir)/"{bsddb,idlelib,lib-tk,sqlite3,test} >+ rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{bsddb,idlelib,lib-tk,sqlite3,test} > else >- use elibc_uclibc && rm -fr "${D}$(python_get_libdir)/"{bsddb/test,test} >- use berkdb || rm -fr "${D}$(python_get_libdir)/"{bsddb,test/test_bsddb*} >- use sqlite || rm -fr "${D}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} >- use tk || rm -fr "${D}usr/bin/idle${SLOT}" "${D}$(python_get_libdir)/"{idlelib,lib-tk} >+ use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/"{bsddb/test,test} >+ use berkdb || rm -fr "${ED}$(python_get_libdir)/"{bsddb,test/test_bsddb*} >+ use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} >+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,lib-tk} > fi > >- use threads || rm -fr "${D}$(python_get_libdir)/multiprocessing" >+ use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing" > > prep_ml_includes $(python_get_includedir) > >@@ -258,7 +484,11 @@ > newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} > > # Don't install empty directory. >- rmdir "${D}$(python_get_libdir)/lib-old" >+ rmdir "${ED}$(python_get_libdir)/lib-old" >+ >+ # fix invalid shebang /usr/local/bin/python >+ sed -i -e '1c\#!'"${EPREFIX}"'/usr/bin/python' \ >+ "${ED}"/usr/$(get_libdir)/python${SLOT}/cgi.py > } > > pkg_preinst() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 317091
:
229063
| 229065