diff options
author | 2022-09-12 18:25:26 +0000 | |
---|---|---|
committer | 2022-09-12 18:25:26 +0000 | |
commit | 0ffefd58d2eee505afd11f229912e418e08fc842 (patch) | |
tree | c63f7751b51e8fde84baf2acd281dc27b6009c10 | |
parent | 2022-09-12 17:57:32 UTC (diff) | |
parent | sys-process/lsof: fix configure tests with Clang 15 (diff) | |
download | gentoo-0ffefd58d2eee505afd11f229912e418e08fc842.tar.gz gentoo-0ffefd58d2eee505afd11f229912e418e08fc842.tar.bz2 gentoo-0ffefd58d2eee505afd11f229912e418e08fc842.zip |
Merge updates from master
-rw-r--r-- | app-benchmarks/stress-ng/metadata.xml | 3 | ||||
-rw-r--r-- | app-containers/containerd/metadata.xml | 1 | ||||
-rw-r--r-- | app-containers/docker/metadata.xml | 3 | ||||
-rw-r--r-- | app-containers/lxc/metadata.xml | 1 | ||||
-rw-r--r-- | app-containers/lxd/metadata.xml | 3 | ||||
-rw-r--r-- | app-containers/podman/metadata.xml | 3 | ||||
-rw-r--r-- | app-containers/runc/metadata.xml | 3 | ||||
-rw-r--r-- | app-containers/snapd/metadata.xml | 3 | ||||
-rw-r--r-- | app-emulation/libvirt/metadata.xml | 1 | ||||
-rw-r--r-- | media-libs/libextractor/metadata.xml | 1 | ||||
-rw-r--r-- | profiles/use.desc | 1 | ||||
-rw-r--r-- | sys-apps/dbus-broker/metadata.xml | 1 | ||||
-rw-r--r-- | sys-apps/dbus/dbus-1.14.0-r5.ebuild | 294 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus-1.14.0-clang-15-configure.patch | 26 | ||||
-rw-r--r-- | sys-apps/systemd/metadata.xml | 1 | ||||
-rw-r--r-- | sys-process/lsof/files/lsof-4.95.0-clang-15-configure.patch | 134 | ||||
-rw-r--r-- | sys-process/lsof/lsof-4.95.0-r1.ebuild | 116 | ||||
-rw-r--r-- | www-client/w3m/files/w3m-0.5.3_p20220429-clang-15-configure.patch | 26 | ||||
-rw-r--r-- | www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild | 135 |
19 files changed, 732 insertions, 24 deletions
diff --git a/app-benchmarks/stress-ng/metadata.xml b/app-benchmarks/stress-ng/metadata.xml index 70cc32340938..cf330e398b38 100644 --- a/app-benchmarks/stress-ng/metadata.xml +++ b/app-benchmarks/stress-ng/metadata.xml @@ -13,9 +13,6 @@ that exercise floating point, integer, bit manipulation and control flow and over 20 virtual memory stress tests. </longdescription> - <use> - <flag name="apparmor">Add support for AppArmor.</flag> - </use> <upstream> <bugs-to>https://github.com/ColinIanKing/stress-ng/issues</bugs-to> <remote-id type="github">ColinIanKing/stress-ng</remote-id> diff --git a/app-containers/containerd/metadata.xml b/app-containers/containerd/metadata.xml index 5641ef372193..5d63e8606e99 100644 --- a/app-containers/containerd/metadata.xml +++ b/app-containers/containerd/metadata.xml @@ -17,7 +17,6 @@ <name>Georgy Yakovlev</name> </maintainer> <use> - <flag name="apparmor">Support for AppArmor</flag> <flag name="btrfs">Support for BTRFS snapshot driver</flag> <flag name="cri">Support for Kubernetes CRI</flag> <flag name="device-mapper">Support for device mapper snapshot driver</flag> diff --git a/app-containers/docker/metadata.xml b/app-containers/docker/metadata.xml index bc364de188b5..5f163941881c 100644 --- a/app-containers/docker/metadata.xml +++ b/app-containers/docker/metadata.xml @@ -21,9 +21,6 @@ Enables dependencies for the "aufs" graph driver, including necessary kernel flags. </flag> - <flag name="apparmor"> - Enable AppArmor support. - </flag> <flag name="btrfs"> Enables dependencies for the "btrfs" graph driver, including necessary kernel flags. diff --git a/app-containers/lxc/metadata.xml b/app-containers/lxc/metadata.xml index 8c08b596f2e4..2d20f0346cc6 100644 --- a/app-containers/lxc/metadata.xml +++ b/app-containers/lxc/metadata.xml @@ -10,7 +10,6 @@ <name>Gentoo Virtualization Project</name> </maintainer> <use> - <flag name="apparmor">Enable AppArmor support</flag> <flag name="io-uring">Enable io_uring support, and use io_uring instead of epoll</flag> <flag name="tools">Build and install additional command line tools</flag> </use> diff --git a/app-containers/lxd/metadata.xml b/app-containers/lxd/metadata.xml index a666d3414c49..dd209643cdb4 100644 --- a/app-containers/lxd/metadata.xml +++ b/app-containers/lxd/metadata.xml @@ -9,9 +9,6 @@ <email>virtualization@gentoo.org</email> <name>Gentoo Virtualization Project</name> </maintainer> - <use> - <flag name="apparmor">Enable AppArmor support</flag> - </use> <longdescription> LXD is a modern, secure and powerful system container and virtual machine manager. diff --git a/app-containers/podman/metadata.xml b/app-containers/podman/metadata.xml index 11d7dc7603dc..3a429ae48984 100644 --- a/app-containers/podman/metadata.xml +++ b/app-containers/podman/metadata.xml @@ -15,9 +15,6 @@ and volumes. </longdescription> <use> - <flag name="apparmor"> - Enable AppArmor support. - </flag> <flag name="btrfs"> Enables dependencies for the "btrfs" graph driver, including necessary kernel flags. diff --git a/app-containers/runc/metadata.xml b/app-containers/runc/metadata.xml index d27ad6413b06..76423a903140 100644 --- a/app-containers/runc/metadata.xml +++ b/app-containers/runc/metadata.xml @@ -14,9 +14,6 @@ <name>Georgy Yakovlev</name> </maintainer> <use> - <flag name="apparmor"> - Enable AppArmor support. - </flag> <flag name="kmem"> Enable Kernel Memory Accounting. </flag> diff --git a/app-containers/snapd/metadata.xml b/app-containers/snapd/metadata.xml index 0109791c93ff..730665fd01eb 100644 --- a/app-containers/snapd/metadata.xml +++ b/app-containers/snapd/metadata.xml @@ -9,9 +9,6 @@ <remote-id type="github">snapcore/snapd</remote-id> </upstream> <use> - <flag name="apparmor"> - Enable AppArmor support. - </flag> <flag name="forced-devmode"> Automatically disable application confinement if feature detection fails. </flag> diff --git a/app-emulation/libvirt/metadata.xml b/app-emulation/libvirt/metadata.xml index aa7a5f870674..9784c19f4174 100644 --- a/app-emulation/libvirt/metadata.xml +++ b/app-emulation/libvirt/metadata.xml @@ -52,7 +52,6 @@ Support management of VirtualBox virtualisation (<pkg>app-emulation/virtualbox</pkg>) </flag> <!-- Miscellaneous flags --> - <flag name="apparmor">Enable AppArmor support</flag> <flag name="dtrace">Enable dtrace support via <pkg>dev-util/systemtap</pkg></flag> <flag name="fuse">Allow LXC to use <pkg>sys-fs/fuse</pkg> for mountpoints</flag> <flag name="numa"> diff --git a/media-libs/libextractor/metadata.xml b/media-libs/libextractor/metadata.xml index c746a433d520..bcc04da57cce 100644 --- a/media-libs/libextractor/metadata.xml +++ b/media-libs/libextractor/metadata.xml @@ -3,7 +3,6 @@ <pkgmetadata> <!--maintainer-needed--> <use> - <flag name="apparmor">Enable apparmor support using <pkg>sys-libs/libapparmor</pkg></flag> <flag name="archive">Enable archive support using <pkg>app-arch/libarchive</pkg></flag> <flag name="gsf">Enable OLE2 (MS Office) plug-in support using <pkg>gnome-extra/libgsf</pkg></flag> <flag name="midi">Enable MIDI support through <pkg>media-libs/libsmf</pkg></flag> diff --git a/profiles/use.desc b/profiles/use.desc index 6438ef0eab9b..83c3e70d13ce 100644 --- a/profiles/use.desc +++ b/profiles/use.desc @@ -18,6 +18,7 @@ ao - Use libao audio output library for sound playback apache2 - Add Apache2 support aqua - Include support for the Mac OS X Aqua (Carbon/Cocoa) GUI atm - Enable Asynchronous Transfer Mode protocol support +apparmor - Enable support for the AppArmor application security system appindicator - Build in support for notifications using the libindicate or libappindicator plugin audiofile - Add support for libaudiofile where applicable audit - Enable support for Linux audit subsystem using sys-process/audit diff --git a/sys-apps/dbus-broker/metadata.xml b/sys-apps/dbus-broker/metadata.xml index 38ad8e3af8dd..4c5fa33d8b08 100644 --- a/sys-apps/dbus-broker/metadata.xml +++ b/sys-apps/dbus-broker/metadata.xml @@ -6,7 +6,6 @@ <name>Mike Gilbert</name> </maintainer> <use> - <flag name="apparmor">Enable AppArmor support</flag> <flag name="launcher">dbus-daemon compatibility launcher</flag> </use> </pkgmetadata> diff --git a/sys-apps/dbus/dbus-1.14.0-r5.ebuild b/sys-apps/dbus/dbus-1.14.0-r5.ebuild new file mode 100644 index 000000000000..64f28fbcc48f --- /dev/null +++ b/sys-apps/dbus/dbus-1.14.0-r5.ebuild @@ -0,0 +1,294 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +TMPFILES_OPTIONAL=1 + +# At least at the moment, while a CMake port exists, it's not recommended +# for distributions. +# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L189 +inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd tmpfiles virtualx multilib-minimal + +DESCRIPTION="A message bus system, a simple way for applications to talk to each other" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/dbus/" +SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.xz" + +LICENSE="|| ( AFL-2.1 GPL-2 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug doc elogind selinux static-libs systemd test X" +RESTRICT="!test? ( test )" + +REQUIRED_USE="?? ( elogind systemd )" + +BDEPEND=" + acct-user/messagebus + app-text/xmlto + app-text/docbook-xml-dtd:4.4 + sys-devel/autoconf-archive + virtual/pkgconfig + doc? ( app-doc/doxygen ) +" +COMMON_DEPEND=" + >=dev-libs/expat-2.1.0 + elogind? ( sys-auth/elogind ) + selinux? ( sys-libs/libselinux ) + systemd? ( sys-apps/systemd:0= ) + X? ( + x11-libs/libX11 + x11-libs/libXt + ) +" +DEPEND="${COMMON_DEPEND} + dev-libs/expat + test? ( + ${PYTHON_DEPS} + >=dev-libs/glib-2.40:2 + ) +" +RDEPEND="${COMMON_DEPEND} + acct-user/messagebus + selinux? ( sec-policy/selinux-dbus ) + systemd? ( virtual/tmpfiles ) +" + +DOC_CONTENTS=" + Some applications require a session bus in addition to the system + bus. Please see \`man dbus-launch\` for more information. +" + +# out of sources build dir for make check +TBD="${WORKDIR}/${P}-tests-build" + +PATCHES=( + "${FILESDIR}/dbus-enable-elogind.patch" + "${FILESDIR}/dbus-daemon-optional.patch" # bug #653136 + + "${FILESDIR}/dbus-1.14.0-x-autoconf-fixes.patch" + "${FILESDIR}/dbus-1.12.22-check-fd.patch" + + # https://bugs.gentoo.org/836560 + "${FILESDIR}/dbus-1.14.0-oom_score_adj.patch" + + "${FILESDIR}/dbus-1.14.0-clang-15-configure.patch" +) + +pkg_setup() { + use test && python-any-r1_pkg_setup + + if use kernel_linux; then + CONFIG_CHECK="~EPOLL" + linux-info_pkg_setup + fi +} + +src_prepare() { + default + + if [[ ${CHOST} == *-solaris* ]]; then + # fix standards conflict, due to gcc being c99 by default nowadays + sed -i \ + -e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \ + configure.ac || die + fi + + # required for bug #263909, cross-compile so don't remove eautoreconf + eautoreconf +} + +src_configure() { + local rundir=$(usex kernel_linux /run /var/run) + + sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in \ + > "${T}"/dbus.initd || die + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local docconf myconf testconf + + # so we can get backtraces from apps + case ${CHOST} in + *-mingw*) + # error: unrecognized command line option '-rdynamic', bug #488036 + ;; + *) + append-flags -rdynamic + ;; + esac + + # libaudit is *only* used in DBus wrt SELinux support, so disable it, if + # not on an SELinux profile. + myconf=( + --localstatedir="${EPREFIX}/var" + $(use_enable static-libs static) + $(use_enable debug verbose-mode) + --disable-asserts + --disable-checks + $(use_enable selinux) + $(use_enable selinux libaudit) + --disable-apparmor + $(use_enable kernel_linux inotify) + --disable-kqueue + $(use_enable elogind) + $(use_enable systemd) + $(use_enable systemd user-session) + --disable-embedded-tests + --disable-modular-tests + $(use_enable debug stats) + --with-session-socket-dir="${EPREFIX}"/tmp + --with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid + --with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + --with-systemduserunitdir="$(systemd_get_userunitdir)" + --with-dbus-user=messagebus + $(use_with X x) + ) + + if [[ ${CHOST} == *-darwin* ]]; then + myconf+=( + --enable-launchd + --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents + ) + fi + + if multilib_is_native_abi; then + docconf=( + --enable-xml-docs + $(use_enable doc doxygen-docs) + ) + else + docconf=( + --disable-xml-docs + --disable-doxygen-docs + ) + myconf+=( + --disable-daemon + --disable-selinux + --disable-libaudit + --disable-elogind + --disable-systemd + --without-x + ) + fi + + einfo "Running configure in ${BUILD_DIR}" + ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}" + + if multilib_is_native_abi && use test; then + mkdir "${TBD}" || die + cd "${TBD}" || die + testconf=( + $(use_enable test asserts) + $(use_enable test checks) + $(use_enable test embedded-tests) + $(use_enable test stats) + $(has_version dev-libs/dbus-glib && echo --enable-modular-tests) + ) + einfo "Running configure in ${TBD}" + ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}" + fi +} + +multilib_src_compile() { + if multilib_is_native_abi; then + # After the compile, it uses a selinuxfs interface to + # check if the SELinux policy has the right support + use selinux && addwrite /selinux/access + + einfo "Running make in ${BUILD_DIR}" + emake + + if use test; then + einfo "Running make in ${TBD}" + emake -C "${TBD}" + fi + else + emake -C dbus libdbus-1.la + fi +} + +src_test() { + # DBUS_TEST_MALLOC_FAILURES=0 to avoid huge test logs + # https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L231 + DBUS_TEST_MALLOC_FAILURES=0 DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check + +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" install + else + emake DESTDIR="${D}" install-pkgconfigDATA + emake DESTDIR="${D}" -C dbus \ + install-libLTLIBRARIES install-dbusincludeHEADERS \ + install-nodist_dbusarchincludeHEADERS + fi +} + +multilib_src_install_all() { + newinitd "${T}"/dbus.initd dbus + + if use X; then + # dbus X session script (bug #77504) + # turns out to only work for GDM (and startx). has been merged into + # other desktop (kdm and such scripts) + exeinto /etc/X11/xinit/xinitrc.d + newexe "${FILESDIR}"/80-dbus-r1 80-dbus + fi + + # Needs to exist for dbus sessions to launch + keepdir /usr/share/dbus-1/services + keepdir /etc/dbus-1/{session,system}.d + # machine-id symlink from pkg_postinst() + keepdir /var/lib/dbus + # Let the init script create the /var/run/dbus directory + rm -rf "${ED}"/var/run + + # bug #761763 + rm -rf "${ED}"/usr/lib/sysusers.d + + dodoc AUTHORS NEWS README doc/TODO + readme.gentoo_create_doc + + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + readme.gentoo_print_elog + + if use systemd; then + tmpfiles_process dbus.conf + fi + + # Ensure unique id is generated and put it in /etc wrt bug #370451 but symlink + # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse + # dependencies with hardcoded paths (although the known ones got fixed already) + # TODO: should be safe to remove at least the ln because of the above tmpfiles_process? + dbus-uuidgen --ensure="${EROOT}"/etc/machine-id + ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id + + if [[ ${CHOST} == *-darwin* ]]; then + local plist="org.freedesktop.dbus-session.plist" + elog + elog + elog "For MacOS/Darwin we now ship launchd support for dbus." + elog "This enables autolaunch of dbus at session login and makes" + elog "dbus usable under MacOS/Darwin." + elog + elog "The launchd plist file ${plist} has been" + elog "installed in ${EPREFIX}/Library/LaunchAgents." + elog "For it to be used, you will have to do all of the following:" + elog " + cd ~/Library/LaunchAgents" + elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}" + elog " + logout and log back in" + elog + elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS" + elog "specified and refused to start otherwise, then export the" + elog "the following to your environment:" + elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\"" + fi +} diff --git a/sys-apps/dbus/files/dbus-1.14.0-clang-15-configure.patch b/sys-apps/dbus/files/dbus-1.14.0-clang-15-configure.patch new file mode 100644 index 000000000000..821279c50ee9 --- /dev/null +++ b/sys-apps/dbus/files/dbus-1.14.0-clang-15-configure.patch @@ -0,0 +1,26 @@ +https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/339 + +From 88c96ff6a351758cb7c69a25e3a8464b5164a19c Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Mon, 12 Sep 2022 18:37:35 +0100 +Subject: [PATCH] configure.ac: fix configure tests broken with Clang 15 + (implicit function declarations) + +Clang 15 makes implicit function declarations fatal by default which +leads to some configure tests silently failing/returning +the wrong result. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/configure.ac ++++ b/configure.ac +@@ -613,7 +613,8 @@ AS_IF([test -n "$dbus_va_copy_func"], + AC_CACHE_CHECK([whether $CC knows __sync_sub_and_fetch()], + dbus_cv_sync_sub_and_fetch, + [AC_LINK_IFELSE([ +- AC_LANG_PROGRAM([[]], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4); exit(b); ]])], ++ AC_LANG_PROGRAM([[]], [[#include <stdlib.h> ++ int a = 4; int b = __sync_sub_and_fetch(&a, 4); exit(b); ]])], + [dbus_cv_sync_sub_and_fetch=yes], + [dbus_cv_sync_sub_and_fetch=no]) + ]) +GitLab diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml index d258d4fa7cf8..34a269d81d85 100644 --- a/sys-apps/systemd/metadata.xml +++ b/sys-apps/systemd/metadata.xml @@ -9,7 +9,6 @@ <subslots>Incremented for ABI breaks in libudev or libsystemd</subslots> </slots> <use> - <flag name="apparmor">Enable AppArmor support</flag> <flag name="audit">Enable support for <pkg>sys-process/audit</pkg></flag> <flag name="cgroup-hybrid">Default to hybrid (legacy) cgroup hierarchy instead of unified (modern).</flag> <flag name="curl">Enable support for uploading journals</flag> diff --git a/sys-process/lsof/files/lsof-4.95.0-clang-15-configure.patch b/sys-process/lsof/files/lsof-4.95.0-clang-15-configure.patch new file mode 100644 index 000000000000..2e81a089e273 --- /dev/null +++ b/sys-process/lsof/files/lsof-4.95.0-clang-15-configure.patch @@ -0,0 +1,134 @@ +https://github.com/lsof-org/lsof/pull/248 + +From 52f2c48790ced81aeef98807363ec94a867bbd88 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Mon, 12 Sep 2022 19:02:14 +0100 +Subject: [PATCH] Configure: fix configure tests broken with Clang 15 + (-Wimplicit-int) + +Clang 15 makes -Wimplicit-int an error by default. + +Before this fix, configure would think localtime() and strftime() support +was not present. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/Configure ++++ b/Configure +@@ -681,7 +681,7 @@ case $LSOF_TGT in # { + + rm -f ${LSOF_TMPC}.* + echo "#include <sys/systemcfg.h>" > ${LSOF_TMPC}.c +- echo 'main(){ if (__KERNEL_32()) printf("32\\n");' >> ${LSOF_TMPC}.c ++ echo 'int main(){ if (__KERNEL_32()) printf("32\\n");' >> ${LSOF_TMPC}.c + echo 'else if (__KERNEL_64()) printf("64\\n");' >> ${LSOF_TMPC}.c + echo 'else printf("0\\n");' >> ${LSOF_TMPC}.c + echo "return(0); }" >> ${LSOF_TMPC}.c +@@ -778,7 +778,7 @@ case $LSOF_TGT in # { + rm -f ${LSOF_TMPC}.* + echo "#include <stddef.h>" > ${LSOF_TMPC}.c + echo "#include <sys/user.h>" >> ${LSOF_TMPC}.c +- echo "main(){exit((offsetof(struct user, U_irss) & 0x7) ? 1 : 0);}" >>${LSOF_TMPC}.c ++ echo "int main(){exit((offsetof(struct user, U_irss) & 0x7) ? 1 : 0);}" >>${LSOF_TMPC}.c + echo "Testing user.h with $LSOF_CC" + $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x + if ! ${LSOF_TMPC}.x # { +@@ -811,7 +811,7 @@ case $LSOF_TGT in # { + # Get xlc version number + + rm -f ${LSOF_TMPC}.* +- echo "main(){}" > ${LSOF_TMPC}.c ++ echo "int main(){}" > ${LSOF_TMPC}.c + echo "Getting version number of ${LSOF_CC}." + $LSOF_CC -c ${LSOF_TMPC}.c -I${LSOF_INCLUDE} -o ${LSOF_TMPC}.o -qlist > /dev/null 2>&1 + LSOF_CCV=`head -1 ${LSOF_TMPC}.lst | sed 's/\(.*\) ---.*/\1/'` +@@ -1783,7 +1783,7 @@ kernel generation process. + cat > ${LSOF_TMPC}.c << .LSOF_END_HERE_DOC3 + #undef _KERNEL + #include <sys/types.h> +-main() { ++int main() { + cpumask_t c; + } + .LSOF_END_HERE_DOC3 +@@ -2400,7 +2400,7 @@ LOCKF_OWNER4 + # Test for "const void" support. + + rm -f ${LSOF_TMPC}.* +- echo "main() { const void *x; return(0); }" >> $LSOF_TMPC.c ++ echo "int main() { const void *x; return(0); }" >> $LSOF_TMPC.c + $LSOF_CC $LSOF_TMPC.c -o $LSOF_TMPC.x > /dev/null 2>&1 + if test $? -eq 0 # { + then +@@ -2532,7 +2532,7 @@ LOCKF_OWNER4 + echo "" + echo "Testing $LSOF_CC for 64 bit support" + rm -f ${LSOF_TMPC}.* +- echo "main(){}" > ${LSOF_TMPC}.c ++ echo "int main(){}" > ${LSOF_TMPC}.c + LSOF_TMP1="" + $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1 + if test $? -eq 0 # { +@@ -4605,7 +4605,7 @@ return(0); } + rm -f ${LSOF_TMPC}.* + echo "#define _KMEMUSER" > ${LSOF_TMPC}.c + echo "#include <sys/proc/prdata.h>" >> ${LSOF_TMPC}.c +- echo "main(){" >> ${LSOF_TMPC}.c ++ echo "int main(){" >> ${LSOF_TMPC}.c + echo "enum prnodetype p=PR_GWINDOWS;}" >> ${LSOF_TMPC}.c + echo "Testing prdata.h for PR_GWINDOWS, using $LSOF_CC" + echo $LSOF_CC | grep gcc > /dev/null +@@ -4630,7 +4630,7 @@ return(0); } + rm -f ${LSOF_TMPC}.* + echo "#define _KMEMUSER" > ${LSOF_TMPC}.c + echo "#include <sys/proc/prdata.h>" >> ${LSOF_TMPC}.c +- echo "main(){" >> ${LSOF_TMPC}.c ++ echo "int main(){" >> ${LSOF_TMPC}.c + echo "enum prnodetype p=PR_LDT;}" >> ${LSOF_TMPC}.c + echo "Testing prdata.h for PR_LDT, using $LSOF_CC" + echo $LSOF_CC | grep gcc > /dev/null +@@ -4675,7 +4675,7 @@ return(0); } + + echo "Testing $LSOF_CC for 64 bit support" + rm -f ${LSOF_TMPC}.* +- echo "main(){}" > ${LSOF_TMPC}.c ++ echo "int main(){}" > ${LSOF_TMPC}.c + LSOF_TMP1="" + + # First try gcc's -m64 option -- it's the most current possibility. +@@ -4695,7 +4695,7 @@ return(0); } + + # Try using the older -mcpu=v9 option with gcc instead of -m64. + +- echo "main(){}" > ${LSOF_TMPC}.c ++ echo "int main(){}" > ${LSOF_TMPC}.c + $LSOF_CC ${LSOF_TMPC}.c -mcpu=v9 -o ${LSOF_TMPC}.x > /dev/null 2>&1 + if test $? -eq 0 # { + then +@@ -4751,7 +4751,7 @@ return(0); } + echo "Testing $LSOF_CC for 64 bit $LSOF_TMP2 support" + rm -f ${LSOF_TMPC}.* + LSOF_TMP3="-xarch=$LSOF_TMP1" +- echo "main(){}" > ${LSOF_TMPC}.c ++ echo "int main(){}" > ${LSOF_TMPC}.c + LSOF_TMP4=`$LSOF_CC ${LSOF_TMPC}.c $LSOF_TMP3 -o ${LSOF_TMPC}.x 2>&1` + if test $? -eq 0 # { + then +@@ -5003,7 +5003,7 @@ return(0); } + then + rm -f ${LSOF_TMPC}.* + echo "#include <sys/vnode.h>" > ${LSOF_TMPC}.c +- echo "main(){" >> ${LSOF_TMPC}.c ++ echo "int main(){" >> ${LSOF_TMPC}.c + echo "enum vtype p=VSOCK;}" >> ${LSOF_TMPC}.c + echo "Testing vnode.h for VSOCK, using $LSOF_CC" + echo $LSOF_CC | grep gcc > /dev/null +@@ -5490,7 +5490,7 @@ fi # } + rm -f ${LSOF_TMPC}.* + cat > $LSOF_TMPC.c << .LSOF_END_HERE_DOC2 + #include <time.h> +-main(){ ++int main(){ + time_t cl; + struct tm *ts; + char bf[32]; + diff --git a/sys-process/lsof/lsof-4.95.0-r1.ebuild b/sys-process/lsof/lsof-4.95.0-r1.ebuild new file mode 100644 index 000000000000..b5cabe286fcd --- /dev/null +++ b/sys-process/lsof/lsof-4.95.0-r1.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +MY_P="${P/-/_}" +DESCRIPTION="Lists open files for running Unix processes" +HOMEPAGE="https://github.com/lsof-org/lsof" +SRC_URI="https://github.com/lsof-org/lsof/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="lsof" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="examples ipv6 rpc selinux" + +RDEPEND="rpc? ( net-libs/libtirpc ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND}" +BDEPEND="sys-apps/groff + rpc? ( virtual/pkgconfig )" + +# Needs fixing first +RESTRICT="test" + +PATCHES=( + "${FILESDIR}"/${PN}-4.85-cross.patch # bug #432120 + "${FILESDIR}"/${P}-test-typo.patch + "${FILESDIR}"/${PN}-4.95.0-clang-15-configure.patch +) + +src_prepare() { + default + # fix POSIX compliance with `echo` + sed -i \ + -e 's:echo -n:printf:' \ + AFSConfig Configure Customize Inventory tests/CkTestDB || die + # Convert `test -r header.h` into a compile test. + # Make sure we convert `test ... -a ...` into two `test` commands + # so we can then convert both over into a compile test. #601432 + sed -i -E \ + -e '/if test .* -a /s: -a : \&\& test :g' \ + -e '/test -r/s:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:g' \ + -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \ + Configure || die + + # "create" man-page (bug #689462) + # inspired by shipped "makeman" ksh script + soelim < Lsof.8 > lsof.8 || die +} + +target() { + case ${CHOST} in + *-darwin*) echo darwin ;; + *-freebsd*) echo freebsd ;; + *-solaris*) echo solaris ;; + *-aix*) echo aixgcc ;; + *) echo linux ;; + esac +} + +src_configure() { + append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H") + append-cppflags $(usex ipv6 -{D,U}HASIPv6) + [[ ${CHOST} == *-solaris2.11 ]] && append-cppflags -DHAS_PAD_MUTEX + if [[ ${CHOST} == *-darwin* ]] ; then + # make sys/proc_info.h available in ${T} because of LSOF_INCLUDE + # dummy location -- Darwin needs this for a Configure check to + # succeed + if [[ -e /usr/include/sys/proc_info.h ]] ; then + mkdir -p "${T}"/sys || die + ( cd "${T}"/sys && ln -s /usr/include/sys/proc_info.h ) || die + fi + fi + + export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \ + $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)" + + # Set LSOF_INCLUDE to a dummy location so the script doesn't poke + # around in it and mix /usr/include paths with cross-compile/etc. + touch .neverInv + LINUX_HASSELINUX=$(usex selinux y n) \ + LSOF_INCLUDE=${T} \ + LSOF_CC=$(tc-getCC) \ + LSOF_AR="$(tc-getAR) rc" \ + LSOF_RANLIB=$(tc-getRANLIB) \ + LSOF_CFGF="${CFLAGS} ${CPPFLAGS}" \ + ./Configure -n $(target) || die +} + +src_compile() { + emake DEBUG="" all +} + +src_install() { + dobin lsof + + if use examples ; then + insinto /usr/share/lsof/scripts + doins scripts/* + fi + + doman lsof.8 + dodoc 00* +} + +pkg_postinst() { + if [[ ${CHOST} == *-solaris* ]] ; then + einfo "Note: to use lsof on Solaris you need read permissions on" + einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys" + elif [[ ${CHOST} == *-aix* ]] ; then + einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and" + einfo "/dev/kmem, i.e. you need to be root, or to be in the group system" + fi +} diff --git a/www-client/w3m/files/w3m-0.5.3_p20220429-clang-15-configure.patch b/www-client/w3m/files/w3m-0.5.3_p20220429-clang-15-configure.patch new file mode 100644 index 000000000000..c9543cb64955 --- /dev/null +++ b/www-client/w3m/files/w3m-0.5.3_p20220429-clang-15-configure.patch @@ -0,0 +1,26 @@ +https://github.com/tats/w3m/pull/248 + +From cecac3d8a177362fc27c8a109ac23a8760e74a10 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Mon, 12 Sep 2022 18:41:28 +0100 +Subject: [PATCH] acinclude.m4: fix configure tests broken with Clang 15 + (implicit function declarations) + +Clang 15 makes implicit function declarations fatal by default which +leads to some configure tests silently failing/returning +the wrong result. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -904,7 +904,8 @@ AC_DEFUN([AC_W3M_SIGSETJMP], + [AC_SUBST(HAVE_SIGSETJMP) + AC_MSG_CHECKING(for sigsetjmp) + AC_TRY_COMPILE( +-[#include <setjmp.h>], ++[#include <setjmp.h> ++ #include <stdlib.h>], + [ jmp_buf env; + if (sigsetjmp(env, 1) != 0) { exit(0); } siglongjmp(env, 1);], + [have_sigsetjmp="yes"; AC_DEFINE(HAVE_SIGSETJMP)], + diff --git a/www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild b/www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild new file mode 100644 index 000000000000..5793a2a9b5a5 --- /dev/null +++ b/www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools prefix toolchain-funcs + +MY_P="${P/_p/+git}" +MY_PV="${PV/_p/+git}" + +DESCRIPTION="Text based WWW browser, supports tables and frames" +HOMEPAGE="https://github.com/tats/w3m" +SRC_URI="https://github.com/tats/w3m/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz" +S="${WORKDIR}/${P/_p/-git}" + +LICENSE="w3m" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="fbcon gdk-pixbuf gpm imlib l10n_ja lynxkeymap nls nntp ssl unicode X xface" + +REQUIRED_USE=" + fbcon? ( ?? ( gdk-pixbuf imlib ) ) + X? ( ?? ( gdk-pixbuf imlib ) ) +" + +RDEPEND=" + dev-libs/boehm-gc:= + sys-libs/ncurses:0= + sys-libs/zlib + gdk-pixbuf? ( + x11-libs/gdk-pixbuf + X? ( x11-libs/gdk-pixbuf-xlib ) + ) + !gdk-pixbuf? ( + imlib? ( media-libs/imlib2[X?] ) + ) + gpm? ( sys-libs/gpm ) + ssl? ( dev-libs/openssl:0= ) + X? ( + x11-base/xorg-proto + x11-libs/libXdmcp + x11-libs/libXext + ) + xface? ( media-libs/compface ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.5.3_p20210102-restore-gettext-macro.patch + "${FILESDIR}"/${PN}-0.5.3_p20210102-fix-configure-gettext.patch + "${FILESDIR}"/${PN}-0.5.3_p20220429-clang-15-configure.patch +) + +src_prepare() { + default + + sed -i "/^AR=/s:ar:$(tc-getAR):" {.,${PN}img,libwc}/Makefile.in || die + hprefixify acinclude.m4 + + AT_NOEAUTOHEADER="yes" AT_M4DIR="m4" eautoreconf +} + +src_configure() { + local myconf=() + local image imagelib + + if use gdk-pixbuf ; then + imagelib="gtk3" + elif use imlib ; then + imagelib="imlib2" + fi + if [[ -n "${imagelib}" ]] ; then + use X && image="${image}${image:+,}x11" + use fbcon && image="${image}${image:+,}fb" + fi + # emacs-w3m doesn't like "--enable-m17n --disable-unicode," + # so we better enable or disable both. Default to enable + # m17n and unicode, see bug #47046. + if use l10n_ja ; then + myconf+=( --enable-japanese=$(usex unicode U E) ) + else + myconf+=( --with-charset=$(usex unicode UTF-8 US-ASCII) ) + fi + # lynxkeymap IUSE flag. bug #49397 + myconf+=( --enable-keymap=$(usex lynxkeymap lynx ${PN}) ) + + econf \ + $(use_enable gpm mouse) \ + $(use_enable nls) \ + $(use_enable nntp) \ + $(use_enable ssl digest-auth) \ + $(use_enable xface) \ + $(use_with ssl) \ + --enable-image=${image:-no} \ + --enable-m17n \ + --enable-unicode \ + --with-browser="${EPREFIX}/usr/bin/xdg-open" \ + --with-editor="${EPREFIX}/usr/bin/vi" \ + --with-imagelib="${imagelib:-no}" \ + --with-mailer="${EPREFIX}/bin/mail" \ + --without-migemo \ + --with-termlib=yes \ + "${myconf[@]}" +} + +src_install() { + default + + insinto /etc/${PN} + newins "${FILESDIR}"/${PN}.mailcap mailcap + + insinto /usr/share/${PN}/Bonus + doins Bonus/{*.{cgi,rb},html*,makeref} + + docinto en + dodoc doc/{HISTORY,README,keymap,menu}* + newdoc Bonus/README.eng README.Bonus + docinto html/en + dodoc doc/*.html + + docinto de + dodoc doc-de/README* + docinto html/de + dodoc doc-de/*.html + + docinto ja + dodoc doc-jp/{HISTORY,README,keymap,menu}* + newdoc Bonus/README README.Bonus + docinto html/ja + dodoc doc-jp/*.html +} |