From fc67d17fd22f17a6e9efd7071d3702b59372e923 Mon Sep 17 00:00:00 2001 From: Martin Väth Date: Sat, 4 Apr 2020 10:31:51 +0200 Subject: dev-lang/python, x11-libs/gtk+: Version bumps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Väth --- ...est.support.unlink-ignore-PermissionError.patch | 28 ++ dev-lang/python/python-3.6.10-r1.ebuild | 362 +++++++++++++++++++++ dev-lang/python/python-3.6.10.ebuild | 356 -------------------- dev-lang/python/python-3.7.7-r1.ebuild | 348 ++++++++++++++++++++ dev-lang/python/python-3.7.7.ebuild | 342 ------------------- metadata/pkg_desc_index | 4 +- x11-libs/gtk+/Manifest | 2 +- x11-libs/gtk+/gtk+-3.24.14.ebuild | 256 --------------- x11-libs/gtk+/gtk+-3.24.16.ebuild | 256 +++++++++++++++ 9 files changed, 997 insertions(+), 957 deletions(-) create mode 100644 dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch create mode 100644 dev-lang/python/python-3.6.10-r1.ebuild delete mode 100644 dev-lang/python/python-3.6.10.ebuild create mode 100644 dev-lang/python/python-3.7.7-r1.ebuild delete mode 100644 dev-lang/python/python-3.7.7.ebuild delete mode 100644 x11-libs/gtk+/gtk+-3.24.14.ebuild create mode 100644 x11-libs/gtk+/gtk+-3.24.16.ebuild diff --git a/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch b/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch new file mode 100644 index 00000000..6cae17b5 --- /dev/null +++ b/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch @@ -0,0 +1,28 @@ +From 6e6402caa7962a9c9f7c5327f3c802545824f7f9 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Fri, 3 Apr 2020 10:37:56 -0400 +Subject: [PATCH] test.support.unlink: ignore PermissionError + +Resolves test errors when running in the Gentoo sandbox environment. + +Bug: https://bugs.gentoo.org/679628 +--- + Lib/test/support/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py +index 1f792d8514d..a0772480eb4 100644 +--- a/Lib/test/support/__init__.py ++++ b/Lib/test/support/__init__.py +@@ -488,7 +488,7 @@ else: + def unlink(filename): + try: + _unlink(filename) +- except (FileNotFoundError, NotADirectoryError): ++ except (FileNotFoundError, NotADirectoryError, PermissionError): + pass + + def rmdir(dirname): +-- +2.26.0 + diff --git a/dev-lang/python/python-3.6.10-r1.ebuild b/dev-lang/python/python-3.6.10-r1.ebuild new file mode 100644 index 00000000..d0e1ccac --- /dev/null +++ b/dev-lang/python/python-3.6.10-r1.ebuild @@ -0,0 +1,362 @@ +# Copyright 1999-2020 Gentoo Authors and Martin V\"ath +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs + +MY_P="Python-${PV}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-3.6.10" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE="https://www.python.org/" +SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}/${PYVER}m" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86" +IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tinfo tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND="app-arch/bzip2:= + app-arch/xz-utils:= + dev-libs/libffi:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:=[tinfo?] ) + readline? ( >=sys-libs/readline-4.1:= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( + !libressl? ( dev-libs/openssl:= ) + libressl? ( dev-libs/libressl:= ) + ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= )" +# bluetooth requires headers from bluez +DEPEND="${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( app-arch/xz-utils[extra-filters(+)] ) + virtual/pkgconfig + !sys-devel/gcc[libffi(-)]" +RDEPEND+=" !build? ( app-misc/mime-types )" +PDEPEND=">=app-eselect/eselect-python-20140125-r1" + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" + ) + + ! use tinfo || PATCHES+=("${FILESDIR}/curses_tinfo.patch") + + default + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + Lib/distutils/command/install.py \ + Lib/distutils/sysconfig.py \ + Lib/site.py \ + Lib/sysconfig.py \ + Lib/test/test_site.py \ + Makefile.pre.in \ + Modules/Setup.dist \ + Modules/getpath.c \ + configure.ac \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + eautoreconf +} + +src_configure() { + local disable + # disable automagic bluetooth headers detection + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + tc-export CXX + + # Set LDFLAGS so we link modules with -lpython3.2 correctly. + # Needed on FreeBSD unless Python 3.2 is already installed. + # Please query BSD team before removing this! + append-ldflags "-L." + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --with-fpectl + --enable-shared + $(use_enable ipv6) + $(use_with threads) + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --with-system-expat + --with-system-ffi + ) + + OPT="" econf "${myeconfargs[@]}" + + if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + eerror "configure has detected that the sem_open function is broken." + eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." + die "Broken sem_open function (bug 496328)" + fi +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax_kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # Skip failing tests. + local skipped_tests="gdb" + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # bug 660358 + local -x COLUMNS=80 + + local -x PYTHONDONTWRITEBYTECODE= + + emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local result=$? + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/$(get_libdir)/python${PYVER} + + emake DESTDIR="${D}" altinstall + + # Remove static library + rm "${ED}"/usr/$(get_libdir)/libpython*.a || die + + sed \ + -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ + -e "s/\(PY_LDFLAGS=\).*/\1/" \ + -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax_kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + + use threads || rm -r "${libdir}/multiprocessing" || die + use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # for python-exec + local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) + + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + vars=( PYTHON "${vars[@]}" ) + fi + + python_export "python${PYVER}" "${vars[@]}" + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die + ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${D}${PYTHON_SCRIPTDIR}/python-config" || die + # 2to3, pydoc, pyvenv + ln -s "../../../bin/2to3-${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/pydoc" || die + ln -s "../../../bin/pyvenv-${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/idle" || die + fi +} + +pkg_preinst() { + if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then + python_updater_warning="1" + fi +} + +eselect_python_update() { + if [[ -z "$(eselect python show)" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then + eselect python update + fi + + if [[ -z "$(eselect python show --python${PV%%.*})" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] + then + eselect python update --python${PV%%.*} + fi +} + +pkg_postinst() { + eselect_python_update + + if [[ "${python_updater_warning}" == "1" ]]; then + ewarn "You have just upgraded from an older version of Python." + ewarn + ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." + fi +} + +pkg_postrm() { + eselect_python_update +} diff --git a/dev-lang/python/python-3.6.10.ebuild b/dev-lang/python/python-3.6.10.ebuild deleted file mode 100644 index e354187f..00000000 --- a/dev-lang/python/python-3.6.10.ebuild +++ /dev/null @@ -1,356 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors and Martin V\"ath -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs - -MY_P="Python-${PV}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-3.6.10" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}/${PYVER}m" -KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86" -IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tinfo tk wininst +xml" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:=[tinfo?] ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( - !libressl? ( dev-libs/openssl:= ) - libressl? ( dev-libs/libressl:= ) - ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] ) - virtual/pkgconfig - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND=">=app-eselect/eselect-python-20140125-r1" - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - ! use tinfo || PATCHES+=("${FILESDIR}/curses_tinfo.patch") - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - configure.ac \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - eautoreconf -} - -src_configure() { - local disable - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - --with-fpectl - --enable-shared - $(use_enable ipv6) - $(use_with threads) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - - local -x PYTHONDONTWRITEBYTECODE= - - emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - use threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # for python-exec - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) - - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - vars=( PYTHON "${vars[@]}" ) - fi - - python_export "python${PYVER}" "${vars[@]}" - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${D}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/idle" || die - fi -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || \ - ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || \ - ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] - then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/dev-lang/python/python-3.7.7-r1.ebuild b/dev-lang/python/python-3.7.7-r1.ebuild new file mode 100644 index 00000000..916fe921 --- /dev/null +++ b/dev-lang/python/python-3.7.7-r1.ebuild @@ -0,0 +1,348 @@ +# Copyright 1999-2020 Gentoo Authors and Martin V\"ath +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs + +MY_P="Python-${PV}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-3.7.6" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE="https://www.python.org/" +SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}/${PYVER}m" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc ~x86" +IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tinfo tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND="app-arch/bzip2:= + app-arch/xz-utils:= + dev-libs/libffi:= + sys-apps/util-linux:= + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + gdbm? ( sys-libs/gdbm:=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:=[tinfo?] ) + readline? ( >=sys-libs/readline-4.1:= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( + !libressl? ( dev-libs/openssl:= ) + libressl? ( dev-libs/libressl:= ) + ) + tk? ( + >=dev-lang/tcl-8.0:= + >=dev-lang/tk-8.0:= + dev-tcltk/blt:= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:= )" +# bluetooth requires headers from bluez +DEPEND="${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( app-arch/xz-utils[extra-filters(+)] ) + virtual/pkgconfig + !sys-devel/gcc[libffi(-)]" +RDEPEND+=" !build? ( app-misc/mime-types )" +PDEPEND=">=app-eselect/eselect-python-20140125-r1" + +src_prepare() { + # Ensure that internal copies of expat, libffi and zlib are not used. + rm -fr Modules/expat || die + rm -fr Modules/_ctypes/libffi* || die + rm -fr Modules/zlib || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" + ) + + ! use tinfo || PATCHES+=("${FILESDIR}/curses_tinfo.patch") + + default + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" + + eautoreconf +} + +src_configure() { + local disable + # disable automagic bluetooth headers detection + use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. + export PYTHON_DISABLE_MODULES="${disable}" + + if ! use xml; then + ewarn "You have configured Python without XML support." + ewarn "This is NOT a recommended configuration as you" + ewarn "may face problems parsing any XML documents." + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + if [[ "$(gcc-major-version)" -ge 4 ]]; then + append-flags -fwrapv + fi + + filter-flags -malign-double + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flagq -O3; then + is-flagq -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + tc-export CXX + + # Set LDFLAGS so we link modules with -lpython3.2 correctly. + # Needed on FreeBSD unless Python 3.2 is already installed. + # Please query BSD team before removing this! + append-ldflags "-L." + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + + local dbmliborder + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + $(use_enable ipv6) + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --with-system-expat + --with-system-ffi + ) + + OPT="" econf "${myeconfargs[@]}" +} + +src_compile() { + # Ensure sed works as expected + # https://bugs.gentoo.org/594768 + local -x LC_ALL=C + + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax_kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # Skip failing tests. + local skipped_tests="gdb" + + for test in ${skipped_tests}; do + mv "${S}"/Lib/test/test_${test}.py "${T}" + done + + # bug 660358 + local -x COLUMNS=80 + + local -x PYTHONDONTWRITEBYTECODE= + + emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local result=$? + + for test in ${skipped_tests}; do + mv "${T}/test_${test}.py" "${S}"/Lib/test + done + + elog "The following tests have been skipped:" + for test in ${skipped_tests}; do + elog "test_${test}.py" + done + + elog "If you would like to run them, you may:" + elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" + elog "and run the tests separately." + + if [[ ${result} -ne 0 ]]; then + die "emake test failed" + fi +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + emake DESTDIR="${D}" altinstall + + # Remove static library + rm "${ED}"/usr/$(get_libdir)/libpython*.a || die + + sed \ + -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ + -e "s/\(PY_LDFLAGS=\).*/\1/" \ + -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax_kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die + + use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # for python-exec + local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) + + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + vars=( PYTHON "${vars[@]}" ) + fi + + python_export "python${PYVER}" "${vars[@]}" + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" \ + "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die + ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${D}${PYTHON_SCRIPTDIR}/python-config" || die + # 2to3, pydoc, pyvenv + ln -s "../../../bin/2to3-${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/pydoc" || die + ln -s "../../../bin/pyvenv-${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" \ + "${D}${PYTHON_SCRIPTDIR}/idle" || die + fi +} + +pkg_preinst() { + if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then + python_updater_warning="1" + fi +} + +eselect_python_update() { + if [[ -z "$(eselect python show)" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then + eselect python update + fi + + if [[ -z "$(eselect python show --python${PV%%.*})" || \ + ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] + then + eselect python update --python${PV%%.*} + fi +} + +pkg_postinst() { + eselect_python_update + + if [[ "${python_updater_warning}" == "1" ]]; then + ewarn "You have just upgraded from an older version of Python." + ewarn + ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." + fi +} + +pkg_postrm() { + eselect_python_update +} diff --git a/dev-lang/python/python-3.7.7.ebuild b/dev-lang/python/python-3.7.7.ebuild deleted file mode 100644 index 3bfc9622..00000000 --- a/dev-lang/python/python-3.7.7.ebuild +++ /dev/null @@ -1,342 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors and Martin V\"ath -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs - -MY_P="Python-${PV}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-3.7.6" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}/${PYVER}m" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tinfo tk wininst +xml" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:=[tinfo?] ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( - !libressl? ( dev-libs/openssl:= ) - libressl? ( dev-libs/libressl:= ) - ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] ) - virtual/pkgconfig - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND=">=app-eselect/eselect-python-20140125-r1" - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - ! use tinfo || PATCHES+=("${FILESDIR}/curses_tinfo.patch") - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - eautoreconf -} - -src_configure() { - local disable - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - --enable-shared - $(use_enable ipv6) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - emake CPPFLAGS= CFLAGS= LDFLAGS= - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - - local -x PYTHONDONTWRITEBYTECODE= - - emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - # for python-exec - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) - - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - vars=( PYTHON "${vars[@]}" ) - fi - - python_export "python${PYVER}" "${vars[@]}" - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${D}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${D}${PYTHON_SCRIPTDIR}/idle" || die - fi -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || \ - ! -f "${EROOT}/usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || \ - ! -f "${EROOT}/usr/bin/$(eselect python show --python${PV%%.*})" ]] - then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn "You have just upgraded from an older version of Python." - ewarn - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." - fi -} - -pkg_postrm() { - eselect_python_update -} diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index b1d407df..f30b267a 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -53,7 +53,7 @@ app-text/podofo 0.9.6_p20180715-r1: PoDoFo is a C++ library to work with the PDF app-text/psjoin 0.3: concatenate postscript files. From new PostScript Utilities app-text/stardict 3.0.6-r4 4.0.0_pre20170304: A international dictionary supporting fuzzy and glob style matching dev-cpp/cpplint 99999999: The google styleguide together with cpplint and an emacs file -dev-lang/python 3.6.10 3.7.7: An interpreted, interactive, object-oriented programming language +dev-lang/python 3.6.10-r1 3.7.7-r1: An interpreted, interactive, object-oriented programming language dev-libs/osformat 1.0.5 999999999: C++ library for a typesafe printf/sprintf based on << conversion dev-libs/weston 5.0.0-r1 8.0.0: Wayland reference compositor dev-perl/File-lchown 0.20-r1: Use the lchown(2) and lutimes(2) system call from Perl @@ -132,6 +132,6 @@ www-plugins/noscript 10.6.3: Firefox webextension: restrict active contents like www-plugins/skip-redirect 2.2.1: Firefox webextension: skip intermediary pages before redirecting www-plugins/translate-to-me 1.1: Firefox webextension: translate the selected text with www.linguee.com www-plugins/ublock-origin 1.17.2: Firefox webextension: An efficient list-based blocker -x11-libs/gtk+ 2.24.32-r1 3.24.14: Gimp ToolKit + +x11-libs/gtk+ 2.24.32-r1 3.24.16: Gimp ToolKit + x11-libs/motif 2.3.8-r1: The Motif user interface component toolkit x11-themes/fvwm-crystal 3.4.1-r2 3.6.2: Configurable FVWM theme with transparency and freedesktop compatible menu diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest index f1bfc5ad..d7967b04 100644 --- a/x11-libs/gtk+/Manifest +++ b/x11-libs/gtk+/Manifest @@ -1,3 +1,3 @@ DIST gtk+-2.24.32-patchset-r1.tar.xz 13364 SHA512 1a15dce7578a914585981426d2e5d1cc45866866a70c3f443d1867ab1c0c28fb279bde6c3117b28eec2758a62c1b54bb6fb1b382ad6e9a7cf0114b13f2afd858 DIST gtk+-2.24.32.tar.xz 12620860 SHA512 8e8fd9ae32f1d6fb544da260f00599f0f05090d910d767b06ef086ab4f1f8373a29bb0da9767761c9b5f4cfd51b5c45d0fa5d39b0428c839ddf0a579df806696 -DIST gtk+-3.24.14.tar.xz 20420928 SHA512 a5ce659508933f6a3825aaafe9b30f51bd1357a62a6c66526ebd716627c829aa24543b4f8bd6f701dceda1d9fff94ad105f89f02a14d53749744e868bdff26bf +DIST gtk+-3.24.16.tar.xz 20417592 SHA512 181d31dea038016357cd0eba5b9e8a17056bc061f4ae2ebc713bceee46cd30787993cec463aae658faddc57b9071549fa196f6a2a1f67c314d99e4365f50a0cb diff --git a/x11-libs/gtk+/gtk+-3.24.14.ebuild b/x11-libs/gtk+/gtk+-3.24.14.ebuild deleted file mode 100644 index 001701d2..00000000 --- a/x11-libs/gtk+/gtk+-3.24.14.ebuild +++ /dev/null @@ -1,256 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors and Martin V\"ath -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -GNOME2_LA_PUNT="yes" -GNOME2_EAUTORECONF="yes" - -inherit flag-o-matic gnome2 multilib virtualx multilib-minimal - -DESCRIPTION="Gimp ToolKit +" -HOMEPAGE="https://www.gtk.org/" -SRC_URI=${SRC_URI-} - -LICENSE="LGPL-2+" -SLOT="3" -IUSE="adwaita-icon-theme aqua atk-bridge broadway cloudprint colord cups examples gtk-doc +introspection test vim-syntax wayland +X xinerama" -REQUIRED_USE=" - || ( aqua wayland X ) - xinerama? ( X ) -" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -# Upstream wants us to do their job: -# https://bugzilla.gnome.org/show_bug.cgi?id=768662#c1 -RESTRICT="test" - -# FIXME: introspection data is built against system installation of gtk+:3, -# bug #???? -COMMON_DEPEND=" - >=dev-libs/atk-2.15[introspection?,${MULTILIB_USEDEP}] - >=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}] - >=dev-libs/glib-2.57.2:2[${MULTILIB_USEDEP}] - media-libs/fontconfig[${MULTILIB_USEDEP}] - >=media-libs/libepoxy-1.4[X(+)?,${MULTILIB_USEDEP}] - >=x11-libs/cairo-1.14[aqua?,glib,svg,X?,${MULTILIB_USEDEP}] - >=x11-libs/gdk-pixbuf-2.30:2[introspection?,${MULTILIB_USEDEP}] - >=x11-libs/pango-1.41.0[introspection?,${MULTILIB_USEDEP}] - >=media-libs/harfbuzz-0.9:= - x11-misc/shared-mime-info - - cloudprint? ( - >=net-libs/rest-0.7[${MULTILIB_USEDEP}] - >=dev-libs/json-glib-1.0[${MULTILIB_USEDEP}] ) - colord? ( >=x11-misc/colord-0.1.9:0=[${MULTILIB_USEDEP}] ) - cups? ( >=net-print/cups-2.0[${MULTILIB_USEDEP}] ) - introspection? ( >=dev-libs/gobject-introspection-1.39:= ) - wayland? ( - >=dev-libs/wayland-1.14.91[${MULTILIB_USEDEP}] - >=dev-libs/wayland-protocols-1.14 - media-libs/mesa[wayland,${MULTILIB_USEDEP}] - >=x11-libs/libxkbcommon-0.2[${MULTILIB_USEDEP}] - ) - X? ( - atk-bridge? ( >=app-accessibility/at-spi2-atk-2.5.3[${MULTILIB_USEDEP}] ) - media-libs/mesa[X(+),${MULTILIB_USEDEP}] - x11-libs/libX11[${MULTILIB_USEDEP}] - >=x11-libs/libXi-1.3[${MULTILIB_USEDEP}] - x11-libs/libXext[${MULTILIB_USEDEP}] - >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}] - x11-libs/libXcursor[${MULTILIB_USEDEP}] - x11-libs/libXfixes[${MULTILIB_USEDEP}] - x11-libs/libXcomposite[${MULTILIB_USEDEP}] - x11-libs/libXdamage[${MULTILIB_USEDEP}] - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) - ) -" -DEPEND="${COMMON_DEPEND} - app-text/docbook-xsl-stylesheets - app-text/docbook-xml-dtd:4.1.2 - dev-libs/libxslt - dev-libs/gobject-introspection-common - >=dev-util/gdbus-codegen-2.48 - dev-util/glib-utils - >=dev-util/gtk-doc-am-1.20 - gtk-doc? ( >=dev-util/gtk-doc-1.20 - app-text/docbook-xml-dtd:4.3 ) - >=sys-devel/gettext-0.19.7[${MULTILIB_USEDEP}] - virtual/pkgconfig[${MULTILIB_USEDEP}] - X? ( x11-base/xorg-proto ) - test? ( - media-fonts/font-misc-misc - media-fonts/font-cursor-misc ) -" -# gtk+-3.2.2 breaks Alt key handling in <=x11-libs/vte-0.30.1:2.90 -# gtk+-3.3.18 breaks scrolling in <=x11-libs/vte-0.31.0:2.90 -RDEPEND="${COMMON_DEPEND} - >=dev-util/gtk-update-icon-cache-3 - !=sysprof-3.33.2 - --disable-profiler - --enable-man - --with-xml-catalog="${EPREFIX}"/etc/xml/catalog - # need libdir here to avoid a double slash in a path that libtool doesn't - # grok so well during install (// between $EPREFIX and usr ...) - # TODO: Is this still the case? - --libdir="${EPREFIX}"/usr/$(get_libdir) - CUPS_CONFIG="${EPREFIX}/usr/bin/${CHOST}-cups-config" - ) - - if use wayland; then - myconf+=( - # Include wayland immodule into gtk itself, to avoid problems like - # https://gitlab.gnome.org/GNOME/gnome-shell/issues/109 from a - # user overridden GTK_IM_MODULE envvar - --with-included-immodules=wayland - ) - fi; - - ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}" - - # work-around gtk-doc out-of-source brokedness - if multilib_is_native_abi; then - local d - for d in gdk gtk libgail-util; do - ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die - done - fi -} - -multilib_src_test() { - "${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die - GSETTINGS_SCHEMA_DIR="${S}/gtk" virtx emake check -} - -multilib_src_install() { - gnome2_src_install -} - -multilib_src_install_all() { - insinto /etc/gtk-3.0 - doins "${FILESDIR}"/settings.ini - # Skip README.{in,commits,win32} that would get installed by default - DOCS=( AUTHORS ChangeLog NEWS README ) - einstalldocs -} - -pkg_preinst() { - gnome2_pkg_preinst - - multilib_pkg_preinst() { - # Make immodules.cache belongs to gtk+ alone - local cache="usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" - - if [[ -e ${EROOT}${cache} ]]; then - cp "${EROOT}"${cache} "${ED}"/${cache} || die - else - touch "${ED}"/${cache} || die - fi - } - multilib_parallel_foreach_abi multilib_pkg_preinst -} - -pkg_postinst() { - gnome2_pkg_postinst - - multilib_pkg_postinst() { - gnome2_query_immodules_gtk3 \ - || die "Update immodules cache failed (for ${ABI})" - } - multilib_parallel_foreach_abi multilib_pkg_postinst - - if ! has_version "app-text/evince"; then - elog "Please install app-text/evince for print preview functionality." - elog "Alternatively, check \"gtk-print-preview-command\" documentation and" - elog "add it to your settings.ini file." - fi -} - -pkg_postrm() { - gnome2_pkg_postrm - - if [[ -z ${REPLACED_BY_VERSION} ]]; then - multilib_pkg_postrm() { - rm -f "${EROOT}"usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache - } - multilib_foreach_abi multilib_pkg_postrm - fi -} diff --git a/x11-libs/gtk+/gtk+-3.24.16.ebuild b/x11-libs/gtk+/gtk+-3.24.16.ebuild new file mode 100644 index 00000000..1f5fabeb --- /dev/null +++ b/x11-libs/gtk+/gtk+-3.24.16.ebuild @@ -0,0 +1,256 @@ +# Copyright 1999-2020 Gentoo Authors and Martin V\"ath +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +GNOME2_LA_PUNT="yes" +GNOME2_EAUTORECONF="yes" + +inherit flag-o-matic gnome2 multilib virtualx multilib-minimal + +DESCRIPTION="Gimp ToolKit +" +HOMEPAGE="https://www.gtk.org/" +SRC_URI=${SRC_URI-} + +LICENSE="LGPL-2+" +SLOT="3" +IUSE="adwaita-icon-theme aqua atk-bridge broadway cloudprint colord cups examples gtk-doc +introspection test vim-syntax wayland +X xinerama" +REQUIRED_USE=" + || ( aqua wayland X ) + xinerama? ( X ) +" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +# Upstream wants us to do their job: +# https://bugzilla.gnome.org/show_bug.cgi?id=768662#c1 +RESTRICT="test" + +# FIXME: introspection data is built against system installation of gtk+:3, +# bug #???? +COMMON_DEPEND=" + >=dev-libs/atk-2.15[introspection?,${MULTILIB_USEDEP}] + >=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}] + >=dev-libs/glib-2.57.2:2[${MULTILIB_USEDEP}] + media-libs/fontconfig[${MULTILIB_USEDEP}] + >=media-libs/libepoxy-1.4[X(+)?,${MULTILIB_USEDEP}] + >=x11-libs/cairo-1.14[aqua?,glib,svg,X?,${MULTILIB_USEDEP}] + >=x11-libs/gdk-pixbuf-2.30:2[introspection?,${MULTILIB_USEDEP}] + >=x11-libs/pango-1.41.0[introspection?,${MULTILIB_USEDEP}] + >=media-libs/harfbuzz-0.9:= + x11-misc/shared-mime-info + + cloudprint? ( + >=net-libs/rest-0.7[${MULTILIB_USEDEP}] + >=dev-libs/json-glib-1.0[${MULTILIB_USEDEP}] ) + colord? ( >=x11-misc/colord-0.1.9:0=[${MULTILIB_USEDEP}] ) + cups? ( >=net-print/cups-2.0[${MULTILIB_USEDEP}] ) + introspection? ( >=dev-libs/gobject-introspection-1.39:= ) + wayland? ( + >=dev-libs/wayland-1.14.91[${MULTILIB_USEDEP}] + >=dev-libs/wayland-protocols-1.14 + media-libs/mesa[wayland,${MULTILIB_USEDEP}] + >=x11-libs/libxkbcommon-0.2[${MULTILIB_USEDEP}] + ) + X? ( + atk-bridge? ( >=app-accessibility/at-spi2-atk-2.5.3[${MULTILIB_USEDEP}] ) + media-libs/mesa[X(+),${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + >=x11-libs/libXi-1.3[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}] + x11-libs/libXcursor[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/libXcomposite[${MULTILIB_USEDEP}] + x11-libs/libXdamage[${MULTILIB_USEDEP}] + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) + ) +" +DEPEND="${COMMON_DEPEND} + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.1.2 + dev-libs/libxslt + dev-libs/gobject-introspection-common + >=dev-util/gdbus-codegen-2.48 + dev-util/glib-utils + >=dev-util/gtk-doc-am-1.20 + gtk-doc? ( >=dev-util/gtk-doc-1.20 + app-text/docbook-xml-dtd:4.3 ) + >=sys-devel/gettext-0.19.7[${MULTILIB_USEDEP}] + virtual/pkgconfig[${MULTILIB_USEDEP}] + X? ( x11-base/xorg-proto ) + test? ( + media-fonts/font-misc-misc + media-fonts/font-cursor-misc ) +" +# gtk+-3.2.2 breaks Alt key handling in <=x11-libs/vte-0.30.1:2.90 +# gtk+-3.3.18 breaks scrolling in <=x11-libs/vte-0.31.0:2.90 +RDEPEND="${COMMON_DEPEND} + >=dev-util/gtk-update-icon-cache-3 + !=sysprof-3.33.2 + --disable-profiler + --enable-man + --with-xml-catalog="${EPREFIX}"/etc/xml/catalog + # need libdir here to avoid a double slash in a path that libtool doesn't + # grok so well during install (// between $EPREFIX and usr ...) + # TODO: Is this still the case? + --libdir="${EPREFIX}"/usr/$(get_libdir) + CUPS_CONFIG="${EPREFIX}/usr/bin/${CHOST}-cups-config" + ) + + if use wayland; then + myconf+=( + # Include wayland immodule into gtk itself, to avoid problems like + # https://gitlab.gnome.org/GNOME/gnome-shell/issues/109 from a + # user overridden GTK_IM_MODULE envvar + --with-included-immodules=wayland + ) + fi; + + ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}" + + # work-around gtk-doc out-of-source brokedness + if multilib_is_native_abi; then + local d + for d in gdk gtk libgail-util; do + ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die + done + fi +} + +multilib_src_test() { + "${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die + GSETTINGS_SCHEMA_DIR="${S}/gtk" virtx emake check +} + +multilib_src_install() { + gnome2_src_install +} + +multilib_src_install_all() { + insinto /etc/gtk-3.0 + doins "${FILESDIR}"/settings.ini + # Skip README.{in,commits,win32} that would get installed by default + DOCS=( AUTHORS ChangeLog NEWS README ) + einstalldocs +} + +pkg_preinst() { + gnome2_pkg_preinst + + multilib_pkg_preinst() { + # Make immodules.cache belongs to gtk+ alone + local cache="usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" + + if [[ -e ${EROOT}${cache} ]]; then + cp "${EROOT}"${cache} "${ED}"/${cache} || die + else + touch "${ED}"/${cache} || die + fi + } + multilib_parallel_foreach_abi multilib_pkg_preinst +} + +pkg_postinst() { + gnome2_pkg_postinst + + multilib_pkg_postinst() { + gnome2_query_immodules_gtk3 \ + || die "Update immodules cache failed (for ${ABI})" + } + multilib_parallel_foreach_abi multilib_pkg_postinst + + if ! has_version "app-text/evince"; then + elog "Please install app-text/evince for print preview functionality." + elog "Alternatively, check \"gtk-print-preview-command\" documentation and" + elog "add it to your settings.ini file." + fi +} + +pkg_postrm() { + gnome2_pkg_postrm + + if [[ -z ${REPLACED_BY_VERSION} ]]; then + multilib_pkg_postrm() { + rm -f "${EROOT}"usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache + } + multilib_foreach_abi multilib_pkg_postrm + fi +} -- cgit v1.2.3-65-gdbad