├── .gitignore ├── README.md ├── env ├── app-accessibility │ └── espeak ├── app-admin │ └── sudo ├── app-cdr │ └── cdrtools ├── app-editors │ └── emacs ├── app-misc │ ├── cw │ └── screen ├── app-portage │ ├── layman │ └── ufed ├── app-text │ ├── acroread │ ├── texlive-core │ └── xindy ├── buildpkg.conf ├── config-protect.conf ├── dev-java │ └── icedtea ├── dev-lang │ ├── parrot │ ├── python │ ├── ruby │ └── yasm ├── dev-libs │ ├── clisp │ ├── ffcall │ ├── libcgroup │ └── xmlrpc-c ├── dev-lisp │ └── clisp ├── dev-perl │ └── XML-SAX-Base ├── dev-tex │ └── latex2html-2008-r1 ├── dev-texlive │ └── texlive-binextra ├── dev-util │ ├── android-sdk-update-manager │ └── schroot ├── dev-vcs │ ├── cvs │ └── git ├── doc-symlinks.conf ├── font-alias.conf ├── fortune.conf ├── games-arcade │ └── emilia-pinball ├── mail-mta │ └── esmtp ├── media-libs │ ├── avidemux-core │ ├── avidemux-plugins │ ├── libdv │ └── libsdl ├── media-sound │ └── apulse ├── media-tv │ ├── gentoo-vdr-scripts │ ├── kdetv │ ├── linuxtv-dvb-apps │ ├── nvtv │ ├── tvheadend │ └── v4l-dvb-hg ├── media-video │ ├── acidrip │ ├── avidemux │ ├── mpv │ └── nvidia-settings ├── net-libs │ └── wvstreams ├── net-misc │ └── r8168 ├── net-print │ └── foo2zjs ├── net-proxy │ └── wwwoffle ├── net-voip │ └── yate ├── nobuildpkg.conf ├── noccache.conf ├── nocompress.conf ├── nodoc.conf ├── noheaders.conf ├── nohtml.conf ├── noinfo.conf ├── noinit.conf ├── noman.conf ├── noprotect.conf ├── nousersandbox.conf ├── patches │ ├── avidemux-core-no-update.patch │ ├── avidemux-no-update.patch │ ├── avidemux-plugins-no-update.patch │ ├── baselayout-java-setu.patch │ ├── cvs-1.12.12-getcwd.patch │ ├── emacs-26.3-server-socket-dir.patch │ ├── emacs-server-socket-dir.patch │ ├── emacs:25-brotli-lz4-zstd.patch │ ├── emacs:27-brotli-lz4-zstd.patch │ ├── emacs:30-brotli-lz4-zstd.patch │ ├── emacs:30.1-brotli-zstd-lz4.patch │ ├── foo2zjs-foreground.patch │ ├── layman-git-pull.patch │ ├── linuxtv-dvb-apps-czap-record.patch │ ├── openrc-sleep.patch │ ├── portage-brotli-lz4-zstd.patch │ ├── portage-force-shallow.patch │ ├── portage-no-refresh-keys.patch │ ├── portage-reset-hard.patch │ ├── portage-rm-use_local_desc.patch │ ├── portage-update-index.patch │ ├── texinfo-brotli-lz4-zstd.patch │ ├── texlive-core-mktexlsr.patch │ ├── tvheadend-4.0.9-gcc-6.patch │ ├── ufed-hidden.patch │ ├── ufed-no-backup.patch │ └── wvstreams-unused-broken-getstatus.patch ├── portage.conf ├── sci-libs │ ├── blas-reference │ ├── cblas-reference │ └── lapack-reference ├── sci-mathematics │ └── fricas ├── scripts │ ├── mv_all_kernel_sources │ ├── mv_initremove │ ├── mv_ln_libs │ ├── mv_noinst │ ├── mv_noopts │ ├── mv_nosuid │ ├── mv_openrcrun │ ├── mv_patch │ ├── mv_pax │ ├── mv_paxopen │ ├── mv_rmkeep │ ├── mv_rmla │ ├── mv_rmstatic │ └── mv_rmstaticla ├── sys-apps │ ├── baselayout-java │ ├── dchroot │ ├── man │ ├── openrc │ ├── portage │ ├── texinfo │ └── util-linux ├── sys-devel │ └── gcc ├── sys-fs │ ├── cryptsetup │ ├── lvm2 │ └── udisks ├── sys-kernel │ ├── gentoo-sources │ ├── hardened-sources │ └── vanilla-sources ├── sys-libs │ └── ncurses ├── x11-apps │ └── xinit ├── x11-drivers │ └── nvidia-drivers ├── x11-misc │ └── slim ├── x11-terms │ └── st ├── x11-themes │ └── fvwm-crystal └── xzcompress.conf └── package.cflags ├── README ├── all-systems ├── checks ├── flto ├── gcc ├── gold ├── graphite ├── lowmem ├── no-add ├── no-ninja ├── patches ├── pie ├── spectre ├── temporary └── test /.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | /* 3 | !/.gitignore 4 | !/README.md 5 | !/env 6 | !/package.cflags 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # portage-env-mv 2 | 3 | These are Martin Väth's local `/etc/portage/env` and 4 | `/etc/portage/package.cflags` directories (for gentoo), 5 | full of local fixes and hacks. 6 | 7 | This is mainly meant for personal use, but it is under the GPL v2 license. 8 | 9 | The package.cflags subdirectory is meant to be used through portage-bashrc-mv 10 | - https://github.com/vaeth/portage-bashrc-mv/ 11 | 12 | An ebuild for the latter is in the mv overlay (available over layman). 13 | 14 | You can include local files into `*/local` (this is not under git control). 15 | 16 | The login picture for slim should be provided this way in 17 | - `/etc/portage/env/local/pic/login.jpg` 18 | 19 | (`*/pic` or `*/login.jpg` can be a symlink which is resolved). 20 | 21 | 22 | Moreover, some patches should be provided this way in one of 23 | 24 | - `/etc/portage/env/local/patches` 25 | - `/etc/portage/env/patches/local` 26 | - `$MV_PATCHES` 27 | 28 | -------------------------------------------------------------------------------- /env/app-accessibility/espeak: -------------------------------------------------------------------------------- 1 | ../scripts/mv_rmstatic -------------------------------------------------------------------------------- /env/app-admin/sudo: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_ECONF="--with-vardir=/var/run $EXTRA_ECONF" 3 | 4 | post_src_install() { 5 | einfo "mv's hack: ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN*" 6 | rm -rf -- "$ED/var/db/sudo" 7 | rm -v -- "$ED/usr/bin/sudoedit" 8 | einfo "mv's hack ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* applied" 9 | } 10 | 11 | pkg_postinst() { 12 | : 13 | } 14 | -------------------------------------------------------------------------------- /env/app-cdr/cdrtools: -------------------------------------------------------------------------------- 1 | [ "$PV" = '99999999' ] || . /etc/portage/env/scripts/mv_nosuid 2 | -------------------------------------------------------------------------------- /env/app-editors/emacs: -------------------------------------------------------------------------------- 1 | socket=emacs-server-socket-dir.patch 2 | #compress=emacs:30-brotli-zstd-lz4.patch 3 | compress=emacs:30.1-brotli-zstd-lz4.patch 4 | if [ "${PV%%.*}" -le 28 ]; then 5 | if [ "${PV%%.*}" -ge 27 ] 6 | then compress=emacs:27-brotli-lz4-zstd.patch 7 | else socket=emacs-26.3-server-socket-dir.patch 8 | compress=emacs:25-brotli-lz4-zstd.patch 9 | fi 10 | fi 11 | 12 | . /etc/portage/env/scripts/mv_patch \ 13 | $socket \ 14 | $compress 15 | -------------------------------------------------------------------------------- /env/app-misc/cw: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch 2 | 3 | post_src_prepare () { 4 | mv_start && cd def >/dev/null 2>&1 && \ 5 | sed -i -e '/path/d' -e '3iother cal' cal && \ 6 | sed -i -e 's!syslog!all!' syslog && \ 7 | mv -i -- cal cal-color && \ 8 | mv -i -- messages@ all@ && \ 9 | mv -i -- xferlog@ Xorg.0.log@ && \ 10 | rm -v -- \ 11 | auth.log@ \ 12 | clock \ 13 | cw-test.cgi \ 14 | dig \ 15 | figlet \ 16 | finger \ 17 | gcc \ 18 | mpg123 \ 19 | nfsstat \ 20 | nmap \ 21 | nslookup \ 22 | pmap_dump \ 23 | praliases \ 24 | quota \ 25 | quotastats \ 26 | showmount \ 27 | smbstatus \ 28 | tcpdump \ 29 | traceroute 30 | mv_end 31 | } 32 | -------------------------------------------------------------------------------- /env/app-misc/screen: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch 2 | 3 | SCREEN_SOCKET=${EPREFIX%/}/run/screen 4 | 5 | pre_src_prepare() { 6 | mv_start 7 | EXTRA_ECONF=${EXTRA_ECONF:-}${EXTRA_ECONF:+ }--with-socket-dir=${SCREEN_SOCKET} 8 | mv_sed \ 9 | "s'/usr/local/screens'${SCREEN_SOCKET}'g" \ 10 | doc/screen.1 11 | mv_end 12 | } 13 | 14 | post_src_install() { 15 | mv_start 16 | mv_sed \ 17 | "s'\([^ ]*[ ]\)[ ]*[^ ]*'\1${SCREEN_SOCKET}'" \ 18 | "${ED}"/usr/lib/tmpfiles.d/screen.conf 19 | mv_end 20 | } 21 | -------------------------------------------------------------------------------- /env/app-portage/layman: -------------------------------------------------------------------------------- 1 | 2 | . /etc/portage/env/scripts/mv_patch git-pull 3 | -------------------------------------------------------------------------------- /env/app-portage/ufed: -------------------------------------------------------------------------------- 1 | 2 | . /etc/portage/env/scripts/mv_patch hidden no-backup 3 | -------------------------------------------------------------------------------- /env/app-text/acroread: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch 2 | 3 | post_src_unpack() { 4 | mv_start 5 | local i e=true p1 p2 6 | p1="\$HOME/.adobe/Acrobat/${PV%.*}/JavaScripts" 7 | p2="\$HOME/.adobe/Acrobat/${PV%%.*}.0/JavaScripts" 8 | for i in $LAUNCHERS 9 | do einfo "Patching $i" 10 | sed -i -e '2i# Patch to prevent acroread from phoning home:' \ 11 | -e "2itest -d \"$p1\" || mkdir -p -- \"$p1\"" \ 12 | -e "2itest -d \"$p2\" || mkdir -p -- \"$p2\"" \ 13 | -e "2iln -sf -- /dev/null \"$p1/glob.settings.js\"" \ 14 | -e "2iln -sf -- /dev/null \"$p2/glob.settings.js\"" \ 15 | -- "$i" || { 16 | e=false 17 | eerror "$i not found in $PWD" 18 | } 19 | done 20 | $e 21 | mv_end 22 | } 23 | -------------------------------------------------------------------------------- /env/app-text/texlive-core: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch mktexlsr 2 | -------------------------------------------------------------------------------- /env/app-text/xindy: -------------------------------------------------------------------------------- 1 | ../scripts/mv_paxopen -------------------------------------------------------------------------------- /env/buildpkg.conf: -------------------------------------------------------------------------------- 1 | FEATURES=buildpkg 2 | -------------------------------------------------------------------------------- /env/config-protect.conf: -------------------------------------------------------------------------------- 1 | FEATURES=-config-protect-if-modified 2 | -------------------------------------------------------------------------------- /env/dev-java/icedtea: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch \ 2 | -e '1s.#! /bin/sh.#!/bin/bash.' configure 3 | -------------------------------------------------------------------------------- /env/dev-lang/parrot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | 5 | post_src_install() { 6 | einfo "mv's hack: ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN*" 7 | test -d "$ED/usr/src/parrot" || die "mv's hack ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* should no longer move /usr/src/parrot to /usr/share/parrot" 8 | ! test -r "$ED/usr/share/parrot" || die "mv's hack ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* cannot move /usr/src/parrot to /usr/share/parrot" 9 | dodir /usr/share 10 | mv -v -- "$ED/usr/src/parrot" "$ED/usr/share" 11 | [ -n "`find "$D" -name '*.a' -print -quit`" ] || die "mv's hack ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* should no longer remove .a" 12 | find "$D" -name '*.a' -exec rm -v -- '{}' '+' 13 | einfo "mv's hack ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* applied" 14 | } 15 | -------------------------------------------------------------------------------- /env/dev-lang/python: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | 5 | case ${SLOT} in 6 | *2.7*) 7 | . /etc/portage/env/scripts/mv_rmstatic;; 8 | esac 9 | -------------------------------------------------------------------------------- /env/dev-lang/ruby: -------------------------------------------------------------------------------- 1 | ../scripts/mv_rmstatic -------------------------------------------------------------------------------- /env/dev-lang/yasm: -------------------------------------------------------------------------------- 1 | ../scripts/mv_rmstatic -------------------------------------------------------------------------------- /env/dev-libs/clisp: -------------------------------------------------------------------------------- 1 | ../scripts/mv_paxopen -------------------------------------------------------------------------------- /env/dev-libs/ffcall: -------------------------------------------------------------------------------- 1 | ../scripts/mv_rmstatic -------------------------------------------------------------------------------- /env/dev-libs/libcgroup: -------------------------------------------------------------------------------- 1 | 2 | post_src_install() { 3 | rm -- "$ED"/etc/conf.d/* 4 | rm -- "$ED"/etc/init.d/* 5 | } 6 | -------------------------------------------------------------------------------- /env/dev-libs/xmlrpc-c: -------------------------------------------------------------------------------- 1 | ../scripts/mv_rmstatic -------------------------------------------------------------------------------- /env/dev-lisp/clisp: -------------------------------------------------------------------------------- 1 | ../scripts/mv_paxopen -------------------------------------------------------------------------------- /env/dev-perl/XML-SAX-Base: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch 2 | 3 | post_src_install() { 4 | mv_start && find "$ED" -type d -name 'SAX' -exec /bin/sh -c \ 5 | 'for i 6 | do j=$i/ParserDetails.ini 7 | if test -r "$j" 8 | then echo "File $j already exists" 9 | exit 1 10 | fi 11 | echo "Generating $j" 12 | cat >"$j" </dev/null 2>&1 \ 14 | && die "mv's hack from $f is redundant" 15 | elog "mv's hack from $f applied" 16 | else elog "mv's hack from $f does not appear to be necessary" 17 | fi 18 | } 19 | -------------------------------------------------------------------------------- /env/media-libs/libsdl: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_rmstaticla 2 | . /etc/portage/env/scripts/mv_patch 3 | 4 | post_src_install() { 5 | mv_rmstaticla 6 | mv_start 7 | echo 'SDL_MOUSE_RELATIVE=0' >50sdlmouse || die 8 | echo 'SDL_AUDIODRIVER=alsa' >50sdlsound || die 9 | doenvd 50sdlmouse 50sdlsound || die 10 | mv_end 11 | } 12 | -------------------------------------------------------------------------------- /env/media-sound/apulse: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch 2 | 3 | post_src_install () { 4 | local libdirs 5 | libdirs='/usr/lib/apulse' 6 | if use amd64 7 | then libdirs='/usr/local/lib32/qt4 /usr/lib32/apulse' 8 | else libdirs='/usr/local/lib/qt4 /usr/lib/apulse' 9 | fi 10 | printf '%s' \ 11 | '#!/bin/sh 12 | for apulsedir in '"$libdirs"' 13 | do test -d "$apulsedir" && { 14 | LD_LIBRARY_PATH=$apulsedir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} 15 | } 16 | done 17 | if [ -n "$LD_LIBRARY_PATH" ] 18 | then printf '\''%s\n'\'' "export LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"" 19 | export LD_LIBRARY_PATH 20 | fi 21 | printf '\''%s\n'\'' "/opt/bin/skype $*" 22 | exec /opt/bin/skype "$@" 23 | ' >"$T/skype" 24 | dobin "$T/skype" 25 | } 26 | -------------------------------------------------------------------------------- /env/media-tv/gentoo-vdr-scripts: -------------------------------------------------------------------------------- 1 | 2 | post_src_prepare() { 3 | mkdir "${S}"/xine 4 | : >"${S}"/xine/tvxine 5 | } 6 | 7 | post_src_install() { 8 | local f 9 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* 10 | einfo "mv's hack in $f" 11 | if rm -rv -- "$ED/etc/systemd" 12 | then einfo "mv's hack in $f applied" 13 | else die "mv's hack in $f is redundant" 14 | fi 15 | } 16 | -------------------------------------------------------------------------------- /env/media-tv/kdetv: -------------------------------------------------------------------------------- 1 | ../scripts/mv_rmstatic -------------------------------------------------------------------------------- /env/media-tv/linuxtv-dvb-apps: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch czap-record 2 | . /etc/portage/env/scripts/mv_rmstatic 3 | -------------------------------------------------------------------------------- /env/media-tv/nvtv: -------------------------------------------------------------------------------- 1 | post_src_prepare() { 2 | mkdir "${S}"/xine 3 | : >"${S}"/xine/tvxine 4 | } 5 | -------------------------------------------------------------------------------- /env/media-tv/tvheadend: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch \ 2 | -e 's/-Werror//' Makefile 3 | -------------------------------------------------------------------------------- /env/media-tv/v4l-dvb-hg: -------------------------------------------------------------------------------- 1 | 2 | . /etc/portage/env/scripts/mv_patch my 3 | 4 | pkg_setup () { 5 | chmod a+r /proc/modules 6 | chmod -R go+rX /sys 7 | } 8 | -------------------------------------------------------------------------------- /env/media-video/acidrip: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch 2 | 3 | post_src_prepare() { 4 | mencoder -ovc help 2>/dev/null | grep MEncoder || { 5 | mv_start 6 | ewarn 'mencoder fails. Overriding test' 7 | sed -i \ 8 | -e 's/mencoder -ovc help/echo MEncoder/' \ 9 | -e 's/mencoder -oac help/echo mp3lame/' \ 10 | Makefile.PL 11 | mv_end 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /env/media-video/avidemux: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch no-update 2 | -------------------------------------------------------------------------------- /env/media-video/mpv: -------------------------------------------------------------------------------- 1 | ../scripts/mv_paxopen -------------------------------------------------------------------------------- /env/media-video/nvidia-settings: -------------------------------------------------------------------------------- 1 | ../scripts/mv_rmstatic -------------------------------------------------------------------------------- /env/net-libs/wvstreams: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch unused-broken-getstatus 2 | 3 | -------------------------------------------------------------------------------- /env/net-misc/r8168: -------------------------------------------------------------------------------- 1 | pre_pkg_setup() { 2 | CONFIG_CHECK="~!R8169" 3 | } -------------------------------------------------------------------------------- /env/net-print/foo2zjs: -------------------------------------------------------------------------------- 1 | [ "$PORTAGE_REPO_NAME" = mv ] || . /etc/portage/env/scripts/mv_patch \ 2 | -e s\''^UDEVDIR=.*$'\'"UDEVDIR=${ED%/}/lib/udev/rules.d"\' Makefile \ 3 | -e s\''\[ -d \$(UDEVDIR) \]'\''mkdir -p -- "$(UDEVDIR)"'\' Makefile \ 4 | foreground 5 | -------------------------------------------------------------------------------- /env/net-proxy/wwwoffle: -------------------------------------------------------------------------------- 1 | 2 | post_src_install() { 3 | rm -- "$ED"/etc/conf.d/wwwoffled-online \ 4 | "$ED"/etc/init.d/wwwoffled-online \ 5 | || die "${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* is redundant" 6 | } 7 | -------------------------------------------------------------------------------- /env/net-voip/yate: -------------------------------------------------------------------------------- 1 | ../scripts/mv_noopts -------------------------------------------------------------------------------- /env/nobuildpkg.conf: -------------------------------------------------------------------------------- 1 | FEATURES=-buildpkg 2 | -------------------------------------------------------------------------------- /env/noccache.conf: -------------------------------------------------------------------------------- 1 | FEATURES=-ccache 2 | -------------------------------------------------------------------------------- /env/nocompress.conf: -------------------------------------------------------------------------------- 1 | BINPKG_COMPRESS="" 2 | BINPKG_COMPRESS_FLAGS="" 3 | 4 | -------------------------------------------------------------------------------- /env/nodoc.conf: -------------------------------------------------------------------------------- 1 | FEATURES=nodoc 2 | -------------------------------------------------------------------------------- /env/noheaders.conf: -------------------------------------------------------------------------------- 1 | INSTALL_MASK_ADD=/usr/include 2 | INSTALL_MASK="$INSTALL_MASK 3 | $INSTALL_MASK_ADD" 4 | PKG_INSTALL_MASK="$PKG_INSTALL_MASK 5 | $INSTALL_MASK_ADD" 6 | -------------------------------------------------------------------------------- /env/nohtml.conf: -------------------------------------------------------------------------------- 1 | INSTALL_MASK_ADD=/usr/share/gtk-doc 2 | INSTALL_MASK="$INSTALL_MASK 3 | $INSTALL_MASK_ADD" 4 | PKG_INSTALL_MASK="$PKG_INSTALL_MASK 5 | $INSTALL_MASK_ADD" 6 | -------------------------------------------------------------------------------- /env/noinfo.conf: -------------------------------------------------------------------------------- 1 | FEATURES=noinfo 2 | -------------------------------------------------------------------------------- /env/noinit.conf: -------------------------------------------------------------------------------- 1 | INSTALL_MASK="$INSTALL_MASK 2 | /etc/conf.d 3 | /etc/init.d 4 | /usr/lib/systemd" 5 | -------------------------------------------------------------------------------- /env/noman.conf: -------------------------------------------------------------------------------- 1 | FEATURES=noman 2 | -------------------------------------------------------------------------------- /env/noprotect.conf: -------------------------------------------------------------------------------- 1 | FEATURES="-collision-protect -protect-owned" 2 | -------------------------------------------------------------------------------- /env/nousersandbox.conf: -------------------------------------------------------------------------------- 1 | FEATURES="-usersandbox" 2 | 3 | -------------------------------------------------------------------------------- /env/patches/avidemux-core-no-update.patch: -------------------------------------------------------------------------------- 1 | avidemux-no-update.patch -------------------------------------------------------------------------------- /env/patches/avidemux-no-update.patch: -------------------------------------------------------------------------------- 1 | --- 1/avidemux/qt4/ADM_update/src/ADM_update.cpp 2 | +++ 1/avidemux/qt4/ADM_update/src/ADM_update.cpp 3 | @@ -96,8 +96,9 @@ 4 | */ 5 | void ADM_checkForUpdate(ADM_updateComplete *up) 6 | { 7 | - 8 | + /* 9 | ADMCheckUpdate *update=new ADMCheckUpdate(up); 10 | QTimer::singleShot(0, update, SLOT(execute())); 11 | + */ 12 | } 13 | //EOF 14 | -------------------------------------------------------------------------------- /env/patches/avidemux-plugins-no-update.patch: -------------------------------------------------------------------------------- 1 | avidemux-no-update.patch -------------------------------------------------------------------------------- /env/patches/baselayout-java-setu.patch: -------------------------------------------------------------------------------- 1 | Make shell work with set -u 2 | Patch by Martin Vaeth from Jul 24, 2015 3 | --- 1/src/java-config-2.sh.in 4 | +++ 1/src/java-config-2.sh.in 5 | @@ -9,13 +9,14 @@ 6 | # See https://bugs.gentoo.org/show_bug.cgi?id=169925 7 | # for more details" 8 | 9 | -if [ -z "${UID}" ] ; then 10 | +if [ -z "${UID-}" ] ; then 11 | # id lives in /usr/bin which might not be mounted 12 | if type id >/dev/null 2>/dev/null ; then 13 | user_id=$(id -u) 14 | else 15 | - [ "${USER}" = "root" ] && user_id=0 16 | + [ "${USER-}" = "root" ] && user_id=0 17 | fi 18 | +else user_id=${UID} 19 | fi 20 | 21 | # The root user uses the system vm 22 | @@ -27,7 +28,7 @@ 23 | fi 24 | 25 | # prepending to come before generation 1 26 | -export MANPATH="${JAVA_HOME}/man:${MANPATH}" 27 | -export JDK_HOME=${JAVA_HOME} 28 | -export JAVAC=${JDK_HOME}/bin/javac 29 | +export MANPATH="${JAVA_HOME}/man${MANPATH:+:}${MANPATH-}" 30 | +export JDK_HOME="${JAVA_HOME}" 31 | +export JAVAC="${JDK_HOME}/bin/javac" 32 | unset gentoo_user_vm gentoo_system_vm user_id 33 | -------------------------------------------------------------------------------- /env/patches/cvs-1.12.12-getcwd.patch: -------------------------------------------------------------------------------- 1 | Avoid that getcwd breaks with certain file systems (unionfs, aufs?, overlayfs?) 2 | Patch by Martin Vaeth from Apr 3, 2013 3 | --- 1/lib/getcwd.c 4 | +++ 1/lib/getcwd.c 5 | @@ -101,10 +101,17 @@ 6 | #endif 7 | 8 | #if D_INO_IN_DIRENT 9 | -# define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino)) 10 | +/*# define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino))*/ 11 | #else 12 | -# define MATCHING_INO(dp, ino) true 13 | +/*# define MATCHING_INO(dp, ino) true*/ 14 | #endif 15 | +/* Patch: Always ignore dirent.d_ino entries, even if they exist, 16 | + although this slows down the getcwd algorithm. 17 | + The reason is that for some filesystem (e.g. combination squashfs/unionfs) 18 | + this gives a different value than stat() and thus confuses the algorithm. 19 | +*/ 20 | +# define MATCHING_INO(dp, ino) true 21 | + 22 | 23 | #if !_LIBC 24 | # define __getcwd getcwd 25 | @@ -153,7 +160,12 @@ 26 | size_t allocated = size; 27 | size_t used; 28 | 29 | -#if HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD 30 | +/*#if HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD */ 31 | +/* Patch: The above is commented out, because the system's getcwd should 32 | + be preferred even if AT_FDCWD is defined, i.e. even if the following 33 | + algorithm would be fast: The system's getcwd does not rely so much 34 | + about D_INO_IN_DIRENT (see the above patch why this is bad). */ 35 | +#if HAVE_PARTLY_WORKING_GETCWD 36 | /* The system getcwd works, except it sometimes fails when it 37 | shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If 38 | AT_FDCWD is not defined, the algorithm below is O(N**2) and this 39 | -------------------------------------------------------------------------------- /env/patches/emacs-26.3-server-socket-dir.patch: -------------------------------------------------------------------------------- 1 | Support EMACS_SERVER_SOCKET_DIR in emacsclient. 2 | Patch by Martin Vaeth from Sep 7, 2014 3 | --- 1/lib-src/emacsclient.c 4 | +++ 1/lib-src/emacsclient.c 5 | @@ -491,6 +491,15 @@ 6 | { 7 | alternate_editor = egetenv ("ALTERNATE_EDITOR"); 8 | 9 | + const char *sockdir = egetenv("EMACS_SERVER_SOCKET_DIR"); 10 | + if(sockdir) 11 | + { 12 | + char *buf = (char *) xmalloc (strlen (sockdir) + 7 + 1); 13 | + strcpy (buf, sockdir); 14 | + strcat (buf, "/server"); 15 | + socket_name = buf; 16 | + } 17 | + 18 | while (1) 19 | { 20 | int opt = getopt_long_only (argc, argv, 21 | -------------------------------------------------------------------------------- /env/patches/emacs-server-socket-dir.patch: -------------------------------------------------------------------------------- 1 | Support EMACS_SERVER_SOCKET_DIR in emacsclient. 2 | Patch by Martin Vaeth from Sep 7, 2014; update Sep 12, 2020 3 | --- 1/lib-src/emacsclient.c 4 | +++ 1/lib-src/emacsclient.c 5 | @@ -500,6 +500,16 @@ 6 | { 7 | alternate_editor = egetenv ("ALTERNATE_EDITOR"); 8 | tramp_prefix = egetenv ("EMACSCLIENT_TRAMP"); 9 | +#ifdef SOCKETS_IN_FILE_SYSTEM 10 | + const char *sockdir = egetenv("EMACS_SERVER_SOCKET_DIR"); 11 | + if(sockdir) 12 | + { 13 | + char *buf = (char *) xmalloc (strlen (sockdir) + 7 + 1); 14 | + strcpy (buf, sockdir); 15 | + strcat (buf, "/server"); 16 | + socket_name = buf; 17 | + } 18 | +#endif 19 | 20 | while (true) 21 | { 22 | -------------------------------------------------------------------------------- /env/patches/emacs:25-brotli-lz4-zstd.patch: -------------------------------------------------------------------------------- 1 | --- 1/lisp/info.el 2 | +++ 1/lisp/info.el 3 | @@ -497,6 +497,9 @@ 4 | '( (".gz" . "gunzip") 5 | (".z" . "gunzip") 6 | (".bz2" . ("bzip2" "-dc")) 7 | + (".br" . ("brotli" "-dcf")) 8 | + (".lz4" . ("lz4" "-d" "-q")) 9 | + (".zst" . ("zst" "-d" "-f" "-q" "--long=31")) 10 | (".inz" . "gunzip") 11 | (".igz" . "gunzip") 12 | (".info.Z" . "gunzip") 13 | @@ -515,12 +516,18 @@ 14 | (".info.gz" . "gunzip") 15 | (".info.z" . "gunzip") 16 | (".info.bz2" . ("bzip2" "-dc")) 17 | + (".info.br" . ("brotli" "-dcf")) 18 | + (".info.lz4" . ("lz4" "-d" "-q")) 19 | + (".info.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 20 | (".info.xz" . "unxz") 21 | (".info" . nil) 22 | ("-info.Z" . "uncompress") 23 | ("-info.Y" . "unyabba") 24 | ("-info.gz" . "gunzip") 25 | ("-info.bz2" . ("bzip2" "-dc")) 26 | + ("-info.br" . ("brotli" "-dcf")) 27 | + ("-info.lz4" . ("lz4" "-d" "-q")) 28 | + ("-info.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 29 | ("-info.z" . "gunzip") 30 | ("-info.xz" . "unxz") 31 | ("-info" . nil) 32 | @@ -529,6 +534,9 @@ 33 | ("/index.gz" . "gunzip") 34 | ("/index.z" . "gunzip") 35 | ("/index.bz2" . ("bzip2" "-dc")) 36 | + ("/index.br" . ("brotli" "-dcf")) 37 | + ("/index.lz4" . ("lz4" "-d" "-q")) 38 | + ("/index.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 39 | ("/index.xz" . "unxz") 40 | ("/index" . nil) 41 | (".Z" . "uncompress") 42 | @@ -536,6 +543,9 @@ 43 | (".gz" . "gunzip") 44 | (".z" . "gunzip") 45 | (".bz2" . ("bzip2" "-dc")) 46 | + (".br" . ("bro" "-dcf")) 47 | + (".lz4" . ("lz4" "-d" "-q")) 48 | + (".zst" . ("zst" "-d" "-f" "-q" "--long=31")) 49 | (".xz" . "unxz") 50 | ("" . nil))) 51 | "List of file name suffixes and associated decoding commands. 52 | --- 1/lisp/jka-cmpr-hook.el 53 | +++ 1/lisp/jka-cmpr-hook.el 54 | @@ -238,6 +238,34 @@ 55 | "XZ compressing" "xz" ("-c" "-q") 56 | "XZ uncompressing" "xz" ("-c" "-q" "-d") 57 | t nil "\3757zXZ\0"] 58 | + ["\\.bro?\\'" 59 | + "brotli compressing" "brotli" ("-c" "-w" "24" "--best") 60 | + "brotli uncompressing" "brotli" ("-c" "-d") 61 | + nil t ""] 62 | + ["\\.tbro?\\'" 63 | + "brotli compressing" "brotli" ("-c" "-w" "24" "--best") 64 | + "brotli uncompressing" "brotli" ("-c" "-d") 65 | + nil t ""] 66 | + ["\\.lz4\\'" 67 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 68 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 69 | + t t "\4\42\115\30"] 70 | + ["\\.tl4\\'" 71 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 72 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 73 | + t t "\004\042\115\030"] 74 | + ["\\.tl?z4\\'" 75 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 76 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 77 | + t t "\004\042\115\030"] 78 | + ["\\.zst\\'" 79 | + "zstd compressing" "zstd" ("-c" "-q" "-f" "-T0" "--ultra" "-22") 80 | + "zstd uncompressing" "zstd" ("-c" "-q" "-f" "-d" "--long=31") 81 | + t t "\050\265\057\375"] 82 | + ["\\.tzst?\\'" 83 | + "zstd compressing" "zstd" ("-c" "-q" "-f" "-T0" "--ultra" "-22") 84 | + "zstd uncompressing" "zstd" ("-c" "-q" "-f" "-d" "--long=31") 85 | + t t "\050\265\057\375"] 86 | ;; dzip is gzip with random access. Its compression program can't 87 | ;; read/write stdin/out, so .dz files can only be viewed without 88 | ;; saving, having their contents decompressed with gzip. 89 | @@ -308,7 +336,11 @@ 90 | (defcustom jka-compr-mode-alist-additions 91 | (purecopy '(("\\.tgz\\'" . tar-mode) 92 | ("\\.tbz2?\\'" . tar-mode) 93 | - ("\\.txz\\'" . tar-mode))) 94 | + ("\\.txz\\'" . tar-mode) 95 | + ("\\.tbro?\\'" . tar-mode) 96 | + ("\\.tl4\\'" . tar-mode) 97 | + ("\\.tl?z4\\'" . tar-mode) 98 | + ("\\.tzst?\\'" . tar-mode))) 99 | "List of pairs added to `auto-mode-alist' when installing jka-compr. 100 | Uninstalling jka-compr removes all pairs from `auto-mode-alist' that 101 | installing added. 102 | -------------------------------------------------------------------------------- /env/patches/emacs:27-brotli-lz4-zstd.patch: -------------------------------------------------------------------------------- 1 | --- 1/lisp/info.el 2 | +++ 1/lisp/info.el 3 | @@ -503,6 +503,9 @@ 4 | '( (".gz" . "gunzip") 5 | (".z" . "gunzip") 6 | (".bz2" . ("bzip2" "-dc")) 7 | + (".br" . ("brotli" "-dcf")) 8 | + (".lz4" . ("lz4" "-d" "-q")) 9 | + (".zst" . ("zst" "-d" "-f" "-q" "--long=31")) 10 | (".inz" . "gunzip") 11 | (".igz" . "gunzip") 12 | (".info.Z" . "gunzip") 13 | @@ -521,12 +524,18 @@ 14 | (".info.gz" . "gunzip") 15 | (".info.z" . "gunzip") 16 | (".info.bz2" . ("bzip2" "-dc")) 17 | + (".info.br" . ("brotli" "-dcf")) 18 | + (".info.lz4" . ("lz4" "-d" "-q")) 19 | + (".info.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 20 | (".info.xz" . "unxz") 21 | (".info" . nil) 22 | ("-info.Z" . "uncompress") 23 | ("-info.Y" . "unyabba") 24 | ("-info.gz" . "gunzip") 25 | ("-info.bz2" . ("bzip2" "-dc")) 26 | + ("-info.br" . ("brotli" "-dcf")) 27 | + ("-info.lz4" . ("lz4" "-d" "-q")) 28 | + ("-info.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 29 | ("-info.z" . "gunzip") 30 | ("-info.xz" . "unxz") 31 | ("-info" . nil) 32 | @@ -535,6 +544,9 @@ 33 | ("/index.gz" . "gunzip") 34 | ("/index.z" . "gunzip") 35 | ("/index.bz2" . ("bzip2" "-dc")) 36 | + ("/index.br" . ("brotli" "-dcf")) 37 | + ("/index.lz4" . ("lz4" "-d" "-q")) 38 | + ("/index.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 39 | ("/index.xz" . "unxz") 40 | ("/index" . nil) 41 | (".Z" . "uncompress") 42 | @@ -542,6 +554,9 @@ 43 | (".gz" . "gunzip") 44 | (".z" . "gunzip") 45 | (".bz2" . ("bzip2" "-dc")) 46 | + (".br" . ("bro" "-dcf")) 47 | + (".lz4" . ("lz4" "-d" "-q")) 48 | + (".zst" . ("zst" "-d" "-f" "-q" "--long=31")) 49 | (".xz" . "unxz") 50 | ("" . nil))) 51 | "List of file name suffixes and associated decoding commands. 52 | --- 1/lisp/jka-cmpr-hook.el 53 | +++ 1/lisp/jka-cmpr-hook.el 54 | @@ -238,6 +238,34 @@ 55 | "XZ compressing" "xz" ("-c" "-q") 56 | "XZ uncompressing" "xz" ("-c" "-q" "-d") 57 | t nil "\3757zXZ\0"] 58 | + ["\\.bro?\\'" 59 | + "brotli compressing" "brotli" ("-c" "-w" "24" "--best") 60 | + "brotli uncompressing" "brotli" ("-c" "-d") 61 | + nil t ""] 62 | + ["\\.tbro?\\'" 63 | + "brotli compressing" "brotli" ("-c" "-w" "24" "--best") 64 | + "brotli uncompressing" "brotli" ("-c" "-d") 65 | + nil t ""] 66 | + ["\\.lz4\\'" 67 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 68 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 69 | + t t "\4\42\115\30"] 70 | + ["\\.tl4\\'" 71 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 72 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 73 | + t t "\004\042\115\030"] 74 | + ["\\.tl?z4\\'" 75 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 76 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 77 | + t t "\004\042\115\030"] 78 | + ["\\.zst\\'" 79 | + "zstd compressing" "zstd" ("-c" "-q" "-f" "-T0" "--ultra" "-22") 80 | + "zstd uncompressing" "zstd" ("-c" "-q" "-f" "-d" "--long=31") 81 | + t t "\050\265\057\375"] 82 | + ["\\.tzst?\\'" 83 | + "zstd compressing" "zstd" ("-c" "-q" "-f" "-T0" "--ultra" "-22") 84 | + "zstd uncompressing" "zstd" ("-c" "-q" "-f" "-d" "--long=31") 85 | + t t "\050\265\057\375"] 86 | ;; dzip is gzip with random access. Its compression program can't 87 | ;; read/write stdin/out, so .dz files can only be viewed without 88 | ;; saving, having their contents decompressed with gzip. 89 | @@ -317,7 +345,10 @@ 90 | (purecopy '(("\\.tgz\\'" . tar-mode) 91 | ("\\.tbz2?\\'" . tar-mode) 92 | ("\\.txz\\'" . tar-mode) 93 | - ("\\.tzst\\'" . tar-mode))) 94 | + ("\\.tbro?\\'" . tar-mode) 95 | + ("\\.tl4\\'" . tar-mode) 96 | + ("\\.tl?z4\\'" . tar-mode) 97 | + ("\\.tzst?\\'" . tar-mode))) 98 | "List of pairs added to `auto-mode-alist' when installing jka-compr. 99 | Uninstalling jka-compr removes all pairs from `auto-mode-alist' that 100 | installing added. 101 | -------------------------------------------------------------------------------- /env/patches/emacs:30-brotli-lz4-zstd.patch: -------------------------------------------------------------------------------- 1 | --- 1/emacs/lisp/info.el 2 | +++ 1/emacs/lisp/info.el 3 | @@ -431,7 +431,10 @@ 4 | (if (eq system-type 'ms-dos) 5 | '( (".gz" . "gunzip") 6 | (".z" . "gunzip") 7 | + (".br" . ("brotli" "-dcf")) 8 | (".bz2" . ("bzip2" "-dc")) 9 | + (".lz4" . ("lz4" "-d" "-q")) 10 | + (".zst" . ("zst" "-d" "-f" "-q" "--long=31")) 11 | (".inz" . "gunzip") 12 | (".igz" . "gunzip") 13 | (".info.Z" . "gunzip") 14 | @@ -449,33 +452,41 @@ 15 | (".info.Y" . "unyabba") 16 | (".info.gz" . "gunzip") 17 | (".info.z" . "gunzip") 18 | + (".info.br" . ("brotli" "-dcf")) 19 | (".info.bz2" . ("bzip2" "-dc")) 20 | + (".info.lz4" . ("lz4" "-d" "-q")) 21 | (".info.xz" . "unxz") 22 | - (".info.zst" . ("zstd" "-dc")) 23 | + (".info.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 24 | (".info" . nil) 25 | ("-info.Z" . "uncompress") 26 | ("-info.Y" . "unyabba") 27 | ("-info.gz" . "gunzip") 28 | + ("-info.br" . ("brotli" "-dcf")) 29 | ("-info.bz2" . ("bzip2" "-dc")) 30 | + ("-info.lz4" . ("lz4" "-d" "-q")) 31 | ("-info.z" . "gunzip") 32 | ("-info.xz" . "unxz") 33 | - ("-info.zst" . ("zstd" "-dc")) 34 | + ("-info.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 35 | ("-info" . nil) 36 | ("/index.Z" . "uncompress") 37 | ("/index.Y" . "unyabba") 38 | ("/index.gz" . "gunzip") 39 | ("/index.z" . "gunzip") 40 | + ("/index.br" . ("brotli" "-dcf")) 41 | ("/index.bz2" . ("bzip2" "-dc")) 42 | + ("/index.lz4" . ("lz4" "-d" "-q")) 43 | ("/index.xz" . "unxz") 44 | - ("/index.zst" . ("zstd" "-dc")) 45 | + ("/index.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 46 | ("/index" . nil) 47 | (".Z" . "uncompress") 48 | (".Y" . "unyabba") 49 | (".gz" . "gunzip") 50 | (".z" . "gunzip") 51 | + (".br" . ("bro" "-dcf")) 52 | (".bz2" . ("bzip2" "-dc")) 53 | + (".lz4" . ("lz4" "-d" "-q")) 54 | (".xz" . "unxz") 55 | - (".zst" . ("zstd" "-dc")) 56 | + (".zst" . ("zst" "-d" "-f" "-q" "--long=31")) 57 | ("" . nil))) 58 | "List of file name suffixes and associated decoding commands. 59 | Each entry should be (SUFFIX . STRING); the file is given to 60 | --- 1/emacs/lisp/jka-cmpr-hook.el 61 | +++ 1/emacs/lisp/jka-cmpr-hook.el 62 | @@ -247,6 +247,26 @@ 63 | "XZ compressing" "xz" ("-c" "-q") 64 | "XZ uncompressing" "xz" ("-c" "-q" "-d") 65 | t nil "\3757zXZ\0"] 66 | + ["\\.bro?\\'" 67 | + "brotli compressing" "brotli" ("-c" "-w" "24" "--best") 68 | + "brotli uncompressing" "brotli" ("-c" "-d") 69 | + nil t ""] 70 | + ["\\.tbro?\\'" 71 | + "brotli compressing" "brotli" ("-c" "-w" "24" "--best") 72 | + "brotli uncompressing" "brotli" ("-c" "-d") 73 | + nil t ""] 74 | + ["\\.lz4\\'" 75 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 76 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 77 | + t t "\004\042\115\030"] 78 | + ["\\.tl4\\'" 79 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 80 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 81 | + t t "\004\042\115\030"] 82 | + ["\\.tl?z4\\'" 83 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 84 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 85 | + t t "\004\042\115\030"] 86 | ;; dzip is gzip with random access. Its compression program can't 87 | ;; read/write stdin/out, so .dz files can only be viewed without 88 | ;; saving, having their contents decompressed with gzip. 89 | @@ -258,7 +279,7 @@ 90 | "zstd compressing" "zstd" ("-c" "-q") 91 | "zstd uncompressing" "zstd" ("-c" "-q" "-d") 92 | t t "\050\265\057\375"] 93 | - ["\\.tzst\\'" 94 | + ["\\.tzst?\\'" 95 | "zstd compressing" "zstd" ("-c" "-q") 96 | "zstd uncompressing" "zstd" ("-c" "-q" "-d") 97 | t nil "\050\265\057\375"])) 98 | @@ -332,6 +353,9 @@ 99 | (purecopy '(("\\.tgz\\'" . tar-mode) 100 | ("\\.tbz2?\\'" . tar-mode) 101 | ("\\.txz\\'" . tar-mode) 102 | + ("\\.tbro?\\'" . tar-mode) 103 | + ("\\.tl4\\'" . tar-mode) 104 | + ("\\.tl?z4\\'" . tar-mode) 105 | ("\\.tzst\\'" . tar-mode))) 106 | "List of pairs added to `auto-mode-alist' when installing jka-compr. 107 | Uninstalling jka-compr removes all pairs from `auto-mode-alist' that 108 | -------------------------------------------------------------------------------- /env/patches/emacs:30.1-brotli-zstd-lz4.patch: -------------------------------------------------------------------------------- 1 | --- 1/lisp/info.el 2 | +++ 1/lisp/info.el 3 | @@ -479,7 +479,10 @@ 4 | (if (eq system-type 'ms-dos) 5 | '( (".gz" . "gunzip") 6 | (".z" . "gunzip") 7 | + (".br" . ("brotli" "-dcf")) 8 | (".bz2" . ("bzip2" "-dc")) 9 | + (".lz4" . ("lz4" "-d" "-q")) 10 | + (".zst" . ("zst" "-d" "-f" "-q" "--long=31")) 11 | (".inz" . "gunzip") 12 | (".igz" . "gunzip") 13 | (".info.Z" . "gunzip") 14 | @@ -497,36 +500,44 @@ 15 | (".info.Y" . "unyabba") 16 | (".info.gz" . "gunzip") 17 | (".info.z" . "gunzip") 18 | + (".info.br" . ("brotli" "-dcf")) 19 | (".info.bz2" . ("bzip2" "-dc")) 20 | + (".info.lz4" . ("lz4" "-d" "-q")) 21 | (".info.xz" . "unxz") 22 | - (".info.zst" . ("zstd" "-dc")) 23 | + (".info.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 24 | (".info.lz" . ("lzip" "-dc")) 25 | (".info" . nil) 26 | ("-info.Z" . "uncompress") 27 | ("-info.Y" . "unyabba") 28 | ("-info.gz" . "gunzip") 29 | ("-info.bz2" . ("bzip2" "-dc")) 30 | + ("-info.lz4" . ("lz4" "-d" "-q")) 31 | ("-info.z" . "gunzip") 32 | + ("-info.br" . ("brotli" "-dcf")) 33 | ("-info.xz" . "unxz") 34 | - ("-info.zst" . ("zstd" "-dc")) 35 | + ("-info.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 36 | ("-info.lz" . ("lzip" "-dc")) 37 | ("-info" . nil) 38 | ("/index.Z" . "uncompress") 39 | ("/index.Y" . "unyabba") 40 | ("/index.gz" . "gunzip") 41 | ("/index.z" . "gunzip") 42 | + ("/index.br" . ("brotli" "-dcf")) 43 | ("/index.bz2" . ("bzip2" "-dc")) 44 | + ("/index.lz4" . ("lz4" "-d" "-q")) 45 | ("/index.xz" . "unxz") 46 | - ("/index.zst" . ("zstd" "-dc")) 47 | + ("/index.zst" . ("zst" "-d" "-f" "-q" "--long=31")) 48 | ("/index.lz" . ("lzip" "-dc")) 49 | ("/index" . nil) 50 | (".Z" . "uncompress") 51 | (".Y" . "unyabba") 52 | (".gz" . "gunzip") 53 | (".z" . "gunzip") 54 | + (".br" . ("bro" "-dcf")) 55 | (".bz2" . ("bzip2" "-dc")) 56 | + (".lz4" . ("lz4" "-d" "-q")) 57 | (".xz" . "unxz") 58 | - (".zst" . ("zstd" "-dc")) 59 | + (".zst" . ("zst" "-d" "-f" "-q" "--long=31")) 60 | (".lz" . ("lzip" "-dc")) 61 | ("" . nil))) 62 | "List of file name suffixes and associated decoding commands. 63 | --- 1/lisp/jka-cmpr-hook.el 64 | +++ 1/lisp/jka-cmpr-hook.el 65 | @@ -247,6 +247,26 @@ 66 | "XZ compressing" "xz" ("-c" "-q") 67 | "XZ uncompressing" "xz" ("-c" "-q" "-d") 68 | t nil "\3757zXZ\0"] 69 | + ["\\.bro?\\'" 70 | + "brotli compressing" "brotli" ("-c" "-w" "24" "--best") 71 | + "brotli uncompressing" "brotli" ("-c" "-d") 72 | + nil t ""] 73 | + ["\\.tbro?\\'" 74 | + "brotli compressing" "brotli" ("-c" "-w" "24" "--best") 75 | + "brotli uncompressing" "brotli" ("-c" "-d") 76 | + nil t ""] 77 | + ["\\.lz4\\'" 78 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 79 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 80 | + t t "\004\042\115\030"] 81 | + ["\\.tl4\\'" 82 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 83 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 84 | + t t "\004\042\115\030"] 85 | + ["\\.tl?z4\\'" 86 | + "lz4 compressing" "lz4" ("-c" "-q" "-9") 87 | + "lz4 uncompressing" "lz4" ("-c" "-q" "-d") 88 | + t t "\004\042\115\030"] 89 | ;; dzip is gzip with random access. Its compression program can't 90 | ;; read/write stdin/out, so .dz files can only be viewed without 91 | ;; saving, having their contents decompressed with gzip. 92 | @@ -258,7 +278,7 @@ 93 | "zstd compressing" "zstd" ("-c" "-q") 94 | "zstd uncompressing" "zstd" ("-c" "-q" "-d") 95 | t t "\050\265\057\375"] 96 | - ["\\.tzst\\'" 97 | + ["\\.tzst?\\'" 98 | "zstd compressing" "zstd" ("-c" "-q") 99 | "zstd uncompressing" "zstd" ("-c" "-q" "-d") 100 | t nil "\050\265\057\375"])) 101 | @@ -332,6 +352,9 @@ 102 | (purecopy '(("\\.tgz\\'" . tar-mode) 103 | ("\\.tbz2?\\'" . tar-mode) 104 | ("\\.txz\\'" . tar-mode) 105 | + ("\\.tbro?\\'" . tar-mode) 106 | + ("\\.tl4\\'" . tar-mode) 107 | + ("\\.tl?z4\\'" . tar-mode) 108 | ("\\.tzst\\'" . tar-mode))) 109 | "List of pairs added to `auto-mode-alist' when installing jka-compr. 110 | Uninstalling jka-compr removes all pairs from `auto-mode-alist' that 111 | -------------------------------------------------------------------------------- /env/patches/foo2zjs-foreground.patch: -------------------------------------------------------------------------------- 1 | --- 1/hplj1000 2 | +++ 1/hplj1000 3 | @@ -220,14 +220,12 @@ 4 | fi 5 | 6 | log "loading HP LaserJet $MODEL firmware $fw to $_dev ..." 7 | - # There is a timeout problem with udev and FC4, so spin it off. 8 | - ( 9 | if cat $fw > $_dev; then 10 | log "... download successful." 11 | else 12 | log "... download failed." 13 | + return 1 14 | fi 15 | - ) & 16 | return 0 17 | } 18 | 19 | -------------------------------------------------------------------------------- /env/patches/layman-git-pull.patch: -------------------------------------------------------------------------------- 1 | --- 1/layman/overlays/modules/git/git.py 2 | +++ 1/layman/overlays/modules/git/git.py 3 | @@ -29,6 +29,9 @@ 4 | from layman.utils import path, run_command 5 | from layman.overlays.source import OverlaySource, require_supported 6 | 7 | +import subprocess 8 | +import sys 9 | + 10 | #=============================================================================== 11 | # 12 | # Class GitOverlay 13 | @@ -121,6 +123,31 @@ 14 | return run_command(self.config, self.command(), args, cmd=self.type, 15 | cwd=target) 16 | 17 | + def manual_sync(self, target): 18 | + process = subprocess.Popen([self.command(), 19 | + 'rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{upstream}' ], 20 | + cwd=target, stdout=subprocess.PIPE) 21 | + try: 22 | + revision = process.communicate()[0] 23 | + except Exception as err: 24 | + sys.stderr.write("git rev-parse failed\n") 25 | + return 1 26 | + revision = revision.decode('utf-8') 27 | + revision = revision.rstrip() 28 | + if revision == '': 29 | + sys.stderr.write("git rev-parse failed to return revision\n") 30 | + return 1 31 | + run_command(self.config, self.command(), 32 | + [ 'update-index', '--refresh', '-q', '--unmerged' ], 33 | + cwd=target, cmd="git update-index --refresh -q --unmerged") 34 | + result = run_command(self.config, self.command(), [ 'fetch' ], 35 | + cwd=target, cmd="git fetch") 36 | + if result != 0: 37 | + return 1 38 | + return run_command(self.config, self.command(), 39 | + [ 'reset', '--hard', revision ], 40 | + cwd=target, cmd="git reset --hard %s" % revision) 41 | + 42 | def sync(self, base): 43 | '''Sync overlay.''' 44 | 45 | @@ -137,10 +161,11 @@ 46 | if len(cfg_opts): 47 | args.extend(cfg_opts.split()) 48 | 49 | - return self.postsync( 50 | - run_command(self.config, self.command(), args, cwd=target, 51 | - cmd=self.type), 52 | - cwd=target) 53 | + result = run_command(self.config, self.command(), args, cwd=target, 54 | + cmd=self.type) 55 | + if result != 0: 56 | + result = self.manual_sync(target) 57 | + return self.postsync(result, cwd=target) 58 | 59 | def supported(self): 60 | '''Overlay type supported?''' 61 | -------------------------------------------------------------------------------- /env/patches/linuxtv-dvb-apps-czap-record.patch: -------------------------------------------------------------------------------- 1 | # Martin Väth 2 | # Apply an analogous patch for czap as for tzap to support recording to a file. 3 | 4 | --- 1/util/szap/czap.c 5 | +++ 1/util/szap/czap.c 6 | @@ -1,3 +1,7 @@ 7 | +#define _FILE_OFFSET_BITS 64 8 | +#define _LARGEFILE_SOURCE 1 9 | +#define _LARGEFILE64_SOURCE 1 10 | + 11 | #include 12 | #include 13 | #include 14 | @@ -9,6 +13,7 @@ 15 | #include 16 | #include 17 | #include 18 | +#include 19 | 20 | #include 21 | #include 22 | @@ -18,6 +23,9 @@ 23 | 24 | static char FRONTEND_DEV [80]; 25 | static char DEMUX_DEV [80]; 26 | +static char DVR_DEV [80]; 27 | +static int timeout_flag=0; 28 | +static int silent=0,timeout=0; 29 | static int exit_after_tuning; 30 | 31 | #define CHANNEL_FILE "channels.conf" 32 | @@ -194,6 +202,9 @@ 33 | PERROR("SET Delsys failed"); 34 | return -1; 35 | } 36 | + if (silent < 2) 37 | + fprintf (stderr,"tuning to %i Hz\n", frontend->frequency); 38 | + 39 | if (ioctl(fe_fd, FE_SET_FRONTEND, frontend) < 0) { 40 | PERROR ("ioctl FE_SET_FRONTEND failed"); 41 | return -1; 42 | @@ -201,43 +212,91 @@ 43 | return 0; 44 | } 45 | 46 | +static void do_timeout(int x) 47 | +{ 48 | + (void)x; 49 | + if (timeout_flag == 0) { 50 | + timeout_flag = 1; 51 | + alarm(2); 52 | + signal(SIGALRM, do_timeout); 53 | + } else { 54 | + /* something has gone wrong ... exit */ 55 | + exit(1); 56 | + } 57 | +} 58 | 59 | -static 60 | -int monitor_frontend (int fe_fd, int human_readable) 61 | +static void print_frontend_stats(int fe_fd, int human_readable) 62 | { 63 | fe_status_t status; 64 | uint16_t snr, signal; 65 | uint32_t ber, uncorrected_blocks; 66 | 67 | - do { 68 | - ioctl(fe_fd, FE_READ_STATUS, &status); 69 | - ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &signal); 70 | - ioctl(fe_fd, FE_READ_SNR, &snr); 71 | - ioctl(fe_fd, FE_READ_BER, &ber); 72 | - ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks); 73 | - 74 | - if (human_readable) { 75 | - printf ("status %02x | signal %3u%% | snr %3u%% | ber %d | unc %d | ", 76 | - status, (signal * 100) / 0xffff, (snr * 100) / 0xffff, ber, uncorrected_blocks); 77 | - } else { 78 | - printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ", 79 | - status, signal, snr, ber, uncorrected_blocks); 80 | - } 81 | - 82 | - if (status & FE_HAS_LOCK) 83 | - printf("FE_HAS_LOCK"); 84 | + ioctl(fe_fd, FE_READ_STATUS, &status); 85 | + ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &signal); 86 | + ioctl(fe_fd, FE_READ_SNR, &snr); 87 | + ioctl(fe_fd, FE_READ_BER, &ber); 88 | + ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks); 89 | + 90 | + if (human_readable) { 91 | + fprintf (stderr, "status %02x | signal %3u%% | snr %3u%% | ber %d | unc %d | ", 92 | + status, (signal * 100) / 0xffff, (snr * 100) / 0xffff, ber, uncorrected_blocks); 93 | + } else { 94 | + fprintf (stderr, "status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ", 95 | + status, signal, snr, ber, uncorrected_blocks); 96 | + } 97 | 98 | - usleep(1000000); 99 | + if (status & FE_HAS_LOCK) 100 | + fprintf(stderr, "FE_HAS_LOCK"); 101 | 102 | - printf("\n"); 103 | + fprintf(stderr, "\n"); 104 | +} 105 | 106 | +static 107 | +int monitor_frontend (int fe_fd, int human_readable) 108 | +{ 109 | + fe_status_t status; 110 | + do { 111 | + ioctl(fe_fd, FE_READ_STATUS, &status); 112 | + if (!silent) 113 | + print_frontend_stats(fe_fd, human_readable); 114 | if (exit_after_tuning && (status & FE_HAS_LOCK)) 115 | break; 116 | - } while (1); 117 | + usleep(1000000); 118 | + } while (!timeout_flag); 119 | + if (silent < 2) 120 | + print_frontend_stats (fe_fd, human_readable); 121 | 122 | return 0; 123 | } 124 | 125 | +#define BUFLEN (188*256) 126 | +static void copy_to_file(int in_fd, int out_fd) 127 | +{ 128 | + char buf[BUFLEN]; 129 | + int r; 130 | + long long int rc = 0LL; 131 | + 132 | + while (timeout_flag==0) { 133 | + r=read(in_fd,buf,BUFLEN); 134 | + if (r < 0) { 135 | + if (errno == EOVERFLOW) { 136 | + printf("buffer overrun\n"); 137 | + continue; 138 | + } 139 | + PERROR("Read failed"); 140 | + break; 141 | + } 142 | + if (write(out_fd,buf,r) < 0) { 143 | + PERROR("Write failed"); 144 | + break; 145 | + } 146 | + rc+=r; 147 | + } 148 | + 149 | + if (silent<2) { 150 | + fprintf(stderr, "copied %lld bytes (%lld Kbytes/sec)\n",rc,rc/(1024*timeout)); 151 | + } 152 | +} 153 | 154 | static const char *usage = 155 | "\nusage: %s [options] -l\n" 156 | @@ -251,6 +310,11 @@ 157 | " -x : exit after tuning\n" 158 | " -H : human readable output\n" 159 | " -r : set up /dev/dvb/adapterX/dvr0 for TS recording\n" 160 | + " -t number : timeout (seconds)\n" 161 | + " -o file : output filename (use -o - for stdout)\n" 162 | + " -s : only print summary\n" 163 | + " -S : run silently (no output)\n" 164 | + " -F : set up frontend only, don't touch demux\n" 165 | " -p : add pat and pmt to TS recording (implies -r)\n"; 166 | 167 | int main(int argc, char **argv) 168 | @@ -261,11 +325,14 @@ 169 | char *channel = NULL; 170 | int adapter = 0, frontend = 0, demux = 0, dvr = 0; 171 | int vpid, apid, sid, pmtpid = 0; 172 | - int frontend_fd, video_fd, audio_fd, pat_fd, pmt_fd; 173 | + int frontend_fd, video_fd, audio_fd, pat_fd, pmt_fd, dvr_fd, file_fd; 174 | int opt, list_channels = 0, chan_no = 0; 175 | + int record = 0; 176 | + int frontend_only = 0; 177 | + char *filename = NULL; 178 | int human_readable = 0, rec_psi = 0; 179 | 180 | - while ((opt = getopt(argc, argv, "Hln:hrn:a:f:d:c:x:p")) != -1) { 181 | + while ((opt = getopt(argc, argv, "Hln:hrn:a:f:d:c:x:pt:o:sSF")) != -1) { 182 | switch (opt) { 183 | case 'a': 184 | adapter = strtoul(optarg, NULL, 0); 185 | @@ -276,6 +343,13 @@ 186 | case 'd': 187 | demux = strtoul(optarg, NULL, 0); 188 | break; 189 | + case 't': 190 | + timeout = strtoul(optarg, NULL, 0); 191 | + break; 192 | + case 'o': 193 | + filename = strdup(optarg); 194 | + record=1; 195 | + /* fall through */ 196 | case 'r': 197 | dvr = 1; 198 | break; 199 | @@ -288,6 +362,15 @@ 200 | case 'p': 201 | rec_psi = 1; 202 | break; 203 | + case 's': 204 | + silent = 1; 205 | + break; 206 | + case 'S': 207 | + silent = 2; 208 | + break; 209 | + case 'F': 210 | + frontend_only = 1; 211 | + break; 212 | case 'x': 213 | exit_after_tuning = 1; 214 | break; 215 | @@ -322,7 +405,11 @@ 216 | snprintf (DEMUX_DEV, sizeof(DEMUX_DEV), 217 | "/dev/dvb/adapter%i/demux%i", adapter, demux); 218 | 219 | - printf ("using '%s' and '%s'\n", FRONTEND_DEV, DEMUX_DEV); 220 | + snprintf (DVR_DEV, sizeof(DVR_DEV), 221 | + "/dev/dvb/adapter%i/dvr%i", adapter, demux); 222 | + 223 | + if (silent < 2) 224 | + fprintf (stderr, "using '%s' and '%s'\n", FRONTEND_DEV, DEMUX_DEV); 225 | 226 | if (!confname) 227 | { 228 | @@ -353,6 +440,9 @@ 229 | if (setup_frontend(frontend_fd, &frontend_param) < 0) 230 | return -1; 231 | 232 | + if (frontend_only) 233 | + goto just_the_frontend_dude; 234 | + 235 | if (rec_psi) { 236 | pmtpid = get_pmt_pid(DEMUX_DEV, sid); 237 | if (pmtpid <= 0) { 238 | @@ -380,6 +470,9 @@ 239 | return -1; 240 | } 241 | 242 | + if (silent < 2) 243 | + fprintf(stderr,"video pid 0x%04x, audio pid 0x%04x\n", vpid, apid); 244 | + 245 | if (set_pesfilter (video_fd, vpid, DMX_PES_VIDEO, dvr) < 0) 246 | return -1; 247 | 248 | @@ -391,7 +484,41 @@ 249 | if (set_pesfilter (audio_fd, apid, DMX_PES_AUDIO, dvr) < 0) 250 | return -1; 251 | 252 | - monitor_frontend (frontend_fd, human_readable); 253 | + signal(SIGALRM,do_timeout); 254 | + if (timeout > 0) 255 | + alarm(timeout); 256 | + 257 | + if (record) { 258 | + if (filename != NULL) { 259 | + if (strcmp(filename,"-") != 0) { 260 | + file_fd = open(filename,O_WRONLY|O_LARGEFILE|O_CREAT,0644); 261 | + if (file_fd < 0) { 262 | + PERROR("open of '%s' failed",filename); 263 | + return -1; 264 | + } 265 | + } else { 266 | + file_fd=1; 267 | + } 268 | + } else { 269 | + PERROR("Record mode but no filename!"); 270 | + return -1; 271 | + } 272 | + 273 | + if ((dvr_fd = open(DVR_DEV, O_RDONLY)) < 0) { 274 | + PERROR("failed opening '%s'", DVR_DEV); 275 | + return -1; 276 | + } 277 | + if (silent < 2) 278 | + print_frontend_stats(frontend_fd, human_readable); 279 | + 280 | + copy_to_file(dvr_fd,file_fd); 281 | + 282 | + if (silent < 2) 283 | + print_frontend_stats(frontend_fd, human_readable); 284 | + } else { 285 | +just_the_frontend_dude: 286 | + monitor_frontend(frontend_fd, human_readable); 287 | + } 288 | 289 | close (pat_fd); 290 | close (pmt_fd); 291 | -------------------------------------------------------------------------------- /env/patches/openrc-sleep.patch: -------------------------------------------------------------------------------- 1 | Add a new option rc_sleep_seconds to sleep before execution of each command. 2 | Patch by Martin Vaeth from May 28, 2022 3 | --- 1/etc/rc.conf 4 | +++ 1/etc/rc.conf 5 | @@ -15,6 +15,11 @@ 6 | # set to YES. 7 | #rc_interactive="YES" 8 | 9 | +# The value of rc_sleep_seconds (or of the environment variable SLEEP_SECONDS 10 | +# if the former is not set) specify the number of seconds to sleep before the 11 | +# execution of each command 12 | +#rc_sleep_seconds=5 13 | + 14 | # If we need to drop to a shell, you can specify it here. 15 | # If not specified we use $SHELL, otherwise the one specified in /etc/passwd, 16 | # otherwise /bin/sh 17 | --- 1/src/openrc/rc.c 18 | +++ 1/src/openrc/rc.c 19 | @@ -196,9 +196,25 @@ 20 | want_interactive(void) 21 | { 22 | char c; 23 | + const char *sleep_string; 24 | + static int sleep_seconds = -1; 25 | static bool gotinteractive; 26 | static bool interactive; 27 | 28 | + if (sleep_seconds < 0) { 29 | + sleep_string = rc_conf_value("rc_sleep_seconds"); 30 | + if (sleep_string == NULL) { 31 | + sleep_string = getenv("SLEEP_SECONDS"); 32 | + } 33 | + if (sleep_string == NULL) { 34 | + sleep_seconds = 0; 35 | + } else { 36 | + sleep_seconds = atoi(sleep_string); 37 | + } 38 | + } 39 | + if (sleep_seconds > 0) { 40 | + sleep(sleep_seconds); 41 | + } 42 | if (rc_yesno(getenv("EINFO_QUIET"))) 43 | return false; 44 | if (!gotinteractive) { 45 | -------------------------------------------------------------------------------- /env/patches/portage-brotli-lz4-zstd.patch: -------------------------------------------------------------------------------- 1 | --- 1/bin/ecompress-file 2 | +++ 1/bin/ecompress-file 3 | @@ -32,6 +32,15 @@ 4 | *.lz) 5 | lzip -df "${x}" || __helpers_die "lzip -d failed" 6 | x=${x%.lz};; 7 | + *.br) 8 | + brotli -dfj "${x}" || __helpers_die "brotli -dj failed" 9 | + x=${x%.*};; 10 | + *.lz4) 11 | + unlz4 -f -q --rm "${x}" || __helpers_die "unlz4 failed" 12 | + x=${x%.*};; 13 | + *.zst) 14 | + unzstd -f -q --long=31 --rm "${x}" || __helpers_die "unzstd failed" 15 | + x=${x%.*};; 16 | esac 17 | 18 | filtered_args+=( "$x" ) 19 | -------------------------------------------------------------------------------- /env/patches/portage-force-shallow.patch: -------------------------------------------------------------------------------- 1 | --- 1/lib/portage/sync/modules/git/git.py 2 | +++ 1/lib/portage/sync/modules/git/git.py 3 | @@ -141,6 +141,8 @@ 4 | if shallow: 5 | git_cmd_opts += " --depth %d" % self.repo.sync_depth 6 | 7 | + shallow = True 8 | + if shallow: 9 | # For shallow fetch, unreachable objects may need to be pruned 10 | # manually, in order to prevent automatic git gc calls from 11 | # eventually failing (see bug 599008). 12 | -------------------------------------------------------------------------------- /env/patches/portage-no-refresh-keys.patch: -------------------------------------------------------------------------------- 1 | --- a/lib/portage/sync/syncbase.py 2 | +++ a/lib/portage/sync/syncbase.py 3 | @@ -201,33 +201,7 @@ 4 | @type openpgp_env: gemato.openpgp.OpenPGPEnvironment 5 | """ 6 | out = portage.output.EOutput(quiet=('--quiet' in self.options['emerge_config'].opts)) 7 | - out.ebegin('Refreshing keys from keyserver') 8 | - retry_decorator = self._key_refresh_retry_decorator() 9 | - if retry_decorator is None: 10 | - openpgp_env.refresh_keys() 11 | - else: 12 | - def noisy_refresh_keys(): 13 | - """ 14 | - Since retry does not help for some types of 15 | - errors, display errors as soon as they occur. 16 | - """ 17 | - try: 18 | - openpgp_env.refresh_keys() 19 | - except Exception as e: 20 | - writemsg_level("%s\n" % (e,), 21 | - level=logging.ERROR, noiselevel=-1) 22 | - raise # retry 23 | - 24 | - # The ThreadPoolExecutor that asyncio uses by default 25 | - # does not support cancellation of tasks, therefore 26 | - # use ForkExecutor for task cancellation support, in 27 | - # order to enforce timeouts. 28 | - loop = global_event_loop() 29 | - with ForkExecutor(loop=loop) as executor: 30 | - func_coroutine = functools.partial(loop.run_in_executor, 31 | - executor, noisy_refresh_keys) 32 | - decorated_func = retry_decorator(func_coroutine, loop=loop) 33 | - loop.run_until_complete(decorated_func()) 34 | + out.ebegin('Skipping key refreshing') 35 | out.eend(0) 36 | 37 | 38 | -------------------------------------------------------------------------------- /env/patches/portage-reset-hard.patch: -------------------------------------------------------------------------------- 1 | --- 1/lib/portage/sync/modules/git/git.py 2 | +++ 1/lib/portage/sync/modules/git/git.py 3 | @@ -229,7 +229,7 @@ 4 | if shallow: 5 | # Since the default merge strategy typically fails when 6 | # the depth is not unlimited, `git reset --merge`. 7 | - merge_cmd = [self.bin_command, "reset", "--merge"] 8 | + merge_cmd = [self.bin_command, "reset", "--hard"] 9 | else: 10 | merge_cmd = [self.bin_command, "merge"] 11 | merge_cmd.append("refs/remotes/%s" % remote_branch) 12 | -------------------------------------------------------------------------------- /env/patches/portage-rm-use_local_desc.patch: -------------------------------------------------------------------------------- 1 | --- 1/lib/portage/sync/modules/git/git.py 2 | +++ 1/lib/portage/sync/modules/git/git.py 3 | @@ -121,6 +121,11 @@ 4 | pull_env = dict((k, v) for k, _, v in (assignment.partition('=') for assignment in shlexed_env) if k) 5 | self.spawn_kwargs['env'].update(pull_env) 6 | 7 | + try: 8 | + os.remove(os.path.join(self.repo.location, 'profiles', 'use.local.desc')) 9 | + except OSError: 10 | + pass 11 | + 12 | update_index_cmd = [self.bin_command, 13 | 'update-index', '--refresh', '-q', '--unmerged'] 14 | with open(os.devnull, 'wb') as devnull: 15 | -------------------------------------------------------------------------------- /env/patches/portage-update-index.patch: -------------------------------------------------------------------------------- 1 | --- 1/lib/portage/sync/modules/git/git.py 2 | +++ 1/lib/portage/sync/modules/git/git.py 3 | @@ -79,6 +79,13 @@ 4 | ) 5 | self.spawn_kwargs["env"].update(clone_env) 6 | 7 | + update_index_cmd = [self.bin_command, 8 | + 'update-index', '--refresh', '-q', '--unmerged'] 9 | + with open(os.devnull, 'wb') as devnull: 10 | + subprocess.call(update_index_cmd, stdout=devnull, 11 | + cwd=portage._unicode_encode(self.repo.location) 12 | + ) 13 | + 14 | if self.settings.get("PORTAGE_QUIET") == "1": 15 | git_cmd_opts += " --quiet" 16 | if self.repo.clone_depth is not None: 17 | -------------------------------------------------------------------------------- /env/patches/texinfo-brotli-lz4-zstd.patch: -------------------------------------------------------------------------------- 1 | --- 1/info/filesys.c 2 | +++ 1/info/filesys.c 3 | @@ -66,6 +66,9 @@ 4 | #endif 5 | { ".xz", "unxz" }, 6 | { ".bz2", "bunzip2" }, 7 | + { ".br", "brotli -df" }, 8 | + { ".lz4", "lz4 -d -q" }, 9 | + { ".zst", "zstd -d -f -q --long=31" }, 10 | { ".z", "gunzip" }, 11 | { ".lzma", "unlzma" }, 12 | { ".Z", "uncompress" }, 13 | --- 1/install-info/install-info.c 14 | +++ 1/install-info/install-info.c 15 | @@ -428,6 +428,21 @@ 16 | len -= 3; 17 | ret[len] = 0; 18 | } 19 | + else if (len > 3 && FILENAME_CMP (ret + len - 3, ".br") == 0) 20 | + { 21 | + len -= 3; 22 | + ret[len] = 0; 23 | + } 24 | + else if (len > 4 && FILENAME_CMP (ret + len - 4, ".lz4") == 0) 25 | + { 26 | + len -= 4; 27 | + ret[len] = 0; 28 | + } 29 | + else if (len > 4 && FILENAME_CMP (ret + len - 4, ".zst") == 0) 30 | + { 31 | + len -= 4; 32 | + ret[len] = 0; 33 | + } 34 | else if (len > 4 && FILENAME_CMP (ret + len - 4, ".bz2") == 0) 35 | { 36 | len -= 4; 37 | @@ -715,6 +725,24 @@ 38 | if (!f) 39 | { 40 | free (*opened_filename); 41 | + *opened_filename = concat (filename, ".br", ""); 42 | + f = fopen (*opened_filename, FOPEN_RBIN); 43 | + } 44 | + if (!f) 45 | + { 46 | + free (*opened_filename); 47 | + *opened_filename = concat (filename, ".lz4", ""); 48 | + f = fopen (*opened_filename, FOPEN_RBIN); 49 | + } 50 | + if (!f) 51 | + { 52 | + free (*opened_filename); 53 | + *opened_filename = concat (filename, ".zst", ""); 54 | + f = fopen (*opened_filename, FOPEN_RBIN); 55 | + } 56 | + if (!f) 57 | + { 58 | + free (*opened_filename); 59 | *opened_filename = concat (filename, ".bz2", ""); 60 | f = fopen (*opened_filename, FOPEN_RBIN); 61 | } 62 | @@ -823,6 +845,22 @@ 63 | *compression_program = "bzip2"; 64 | #endif 65 | 66 | + else if (data[0] == '\x04' && data[1] == '\0x22' && 67 | + data[2] == '\x4D' && data[3] == '\x18') 68 | +#ifndef STRIP_DOT_EXE 69 | + *compression_program = "lz4.exe"; 70 | +#else 71 | + *compression_program = "lz4"; 72 | +#endif 73 | + 74 | + else if (data[0] >= '\x22' && data[0] <= '\x28' && 75 | + data[1] == '\xB5' && data[2] == '\x2F' && data[3] == '\xFD') 76 | +#ifndef STRIP_DOT_EXE 77 | + *compression_program = "zstd.exe"; 78 | +#else 79 | + *compression_program = "zstd"; 80 | +#endif 81 | + 82 | else if (data[0] == 'B' && data[1] == 'Z' && data[2] == '0') 83 | #ifndef STRIP_DOT_EXE 84 | *compression_program = "bzip.exe"; 85 | @@ -854,7 +884,17 @@ 86 | #endif 87 | 88 | else 89 | - *compression_program = NULL; 90 | + { 91 | + unsigned len = strlen (*opened_filename); 92 | + if (len > 3 && FILENAME_CMP (*opened_filename + len - 3, ".br") == 0) 93 | +#ifndef STRIP_DOT_EXE 94 | + *compression_program = "brotli.exe"; 95 | +#else 96 | + *compression_program = "brotli"; 97 | +#endif 98 | + else 99 | + *compression_program = NULL; 100 | + } 101 | 102 | /* Seek back over the magic bytes. */ 103 | if (fseek (f, 0, 0) < 0) 104 | -------------------------------------------------------------------------------- /env/patches/texlive-core-mktexlsr.patch: -------------------------------------------------------------------------------- 1 | --- 1/texmf-dist/scripts/texlive/mktexlsr.pl 2 | +++ 2/texmf-dist/scripts/texlive/mktexlsr.pl 3 | @@ -206,13 +206,16 @@ 4 | # add an entry of 1 if it is not a directory, otherwise 5 | # create an empty hash as argument 6 | File::Find::find( { follow_skip => 2, follow_fast => $opt_follow, wanted => sub { 7 | - $node = (pop @s)->[1] while (@s && $File::Find::dir ne $s[-1][0]); 8 | # ignore VCS 9 | - return if ($_ eq ".git"); 10 | - return if ($_ eq ".svn"); 11 | - return if ($_ eq ".hg"); 12 | - return if ($_ eq ".bzr"); 13 | - return if ($_ eq "CVS"); 14 | + if ($_ eq ".git" 15 | + || $_ eq ".svn" 16 | + || $_ eq ".hg" 17 | + || $_ eq ".bzr" 18 | + || $_ eq "CVS") { 19 | + $File::Find::prune = 1 if (-d); 20 | + return; 21 | + } 22 | + $node = (pop @s)->[1] while (@s && $File::Find::dir ne $s[-1][0]); 23 | return $node->{$_} = 1 if (! -d); 24 | push (@s, [ $File::Find::name, $node ]); 25 | $node = $node->{$_} = {}; 26 | -------------------------------------------------------------------------------- /env/patches/tvheadend-4.0.9-gcc-6.patch: -------------------------------------------------------------------------------- 1 | --- 1/Makefile 2 | +++ 1/Makefile 3 | @@ -28,7 +28,7 @@ 4 | # 5 | 6 | CFLAGS += -g -O2 -Wunused-result 7 | -CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations 8 | +CFLAGS += -Wall -Wwrite-strings -Wno-deprecated-declarations 9 | CFLAGS += -Wmissing-prototypes 10 | CFLAGS += -fms-extensions -funsigned-char -fno-strict-aliasing 11 | CFLAGS += -D_FILE_OFFSET_BITS=64 12 | -------------------------------------------------------------------------------- /env/patches/ufed-hidden.patch: -------------------------------------------------------------------------------- 1 | Patch by Martin Vaeth from Apr 5, 2013 2 | --- 1/Portage.pm 3 | +++ 1/Portage.pm 4 | @@ -951,17 +951,17 @@ 5 | 6 | for my $key (map {my $x=lc($_)."_"; $x } keys %$expands) { 7 | for my $flag (keys %$_use_temp) { 8 | - if ($flag =~ /^$key/ ) { 9 | - delete($_use_temp->{$flag}); 10 | - } 11 | +# if ($flag =~ /^$key/ ) { 12 | +# delete($_use_temp->{$flag}); 13 | +# } 14 | } 15 | } ## Done looping USE_EXPAND 16 | 17 | for my $key (map {my $x=lc($_)."_"; $x } keys %$hidden) { 18 | for my $flag (keys %$_use_temp) { 19 | - if ($flag =~ /^$key/ ) { 20 | - delete($_use_temp->{$flag}); 21 | - } 22 | +# if ($flag =~ /^$key/ ) { 23 | +# delete($_use_temp->{$flag}); 24 | +# } 25 | } 26 | } ## Done looping USE_EXPAND_HIDDEN 27 | 28 | -------------------------------------------------------------------------------- /env/patches/ufed-no-backup.patch: -------------------------------------------------------------------------------- 1 | Patch by Martin Vaeth from Sep 11, 2013 2 | --- 1/ufed.pl.in 3 | +++ 1/ufed.pl.in 4 | @@ -171,15 +171,15 @@ 5 | my $contents; 6 | 7 | my $makeconf_name = $Portage::used_make_conf; 8 | - { 9 | - open my $makeconf, '<', $makeconf_name or die "Couldn't open $makeconf_name\n"; 10 | - open my $makeconfold, '>', $makeconf_name . '~' or die "Couldn't open ${makeconf_name}~\n"; 11 | - local $/; 12 | - $_ = <$makeconf>; 13 | - print $makeconfold $_; 14 | - close $makeconfold; 15 | - close $makeconf; 16 | - } 17 | + #{ 18 | + #open my $makeconf, '<', $makeconf_name or die "Couldn't open $makeconf_name\n"; 19 | + #open my $makeconfold, '>', $makeconf_name . '~' or die "Couldn't open ${makeconf_name}~\n"; 20 | + #local $/; 21 | + #$_ = <$makeconf>; 22 | + #print $makeconfold $_; 23 | + #close $makeconfold; 24 | + #close $makeconf; 25 | + #} 26 | 27 | my $sourcing = 0; 28 | eval { 29 | -------------------------------------------------------------------------------- /env/patches/wvstreams-unused-broken-getstatus.patch: -------------------------------------------------------------------------------- 1 | --- 1/wvstreams-4.6.1/include/wvscatterhash.h 2 | +++ 1/wvstreams-4.6.1/include/wvscatterhash.h 3 | @@ -183,8 +183,6 @@ 4 | Iter(WvScatterHash &_table) : IterBase(_table) { } 5 | Iter(const Iter &other) : IterBase(other) { } 6 | 7 | - unsigned char *getstatus() { return &this->xstatus[index-1]; } 8 | - 9 | T *ptr() const 10 | { return (T *)(get()); } 11 | 12 | -------------------------------------------------------------------------------- /env/portage.conf: -------------------------------------------------------------------------------- 1 | CONFIG_PROTECT=/usr/share/portage/config/make.conf.example 2 | FEATURES=-config-protect-if-modified 3 | -------------------------------------------------------------------------------- /env/sci-libs/blas-reference: -------------------------------------------------------------------------------- 1 | 2 | [ "$PV" != 20070226 ] || . /etc/portage/env/scripts/mv_rmstatic 3 | . /etc/portage/env/scripts/mv_patch \ 4 | -e '/\.a$/d' "$T"/eselect.blas.reference 5 | -------------------------------------------------------------------------------- /env/sci-libs/cblas-reference: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_rmstatic 2 | . /etc/portage/env/scripts/mv_patch \ 3 | -e '/\.a$/d' "$T"/eselect.cblas.reference 4 | -------------------------------------------------------------------------------- /env/sci-libs/lapack-reference: -------------------------------------------------------------------------------- 1 | 2 | [ "$PV" != 3.2.1 ] || . /etc/portage/env/scripts/mv_rmstatic 3 | . /etc/portage/env/scripts/mv_patch \ 4 | -e '/\.a$/d' "$T"/eselect.lapack.reference 5 | -------------------------------------------------------------------------------- /env/sci-mathematics/fricas: -------------------------------------------------------------------------------- 1 | ../scripts/mv_paxopen -------------------------------------------------------------------------------- /env/scripts/mv_all_kernel_sources: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | # 5 | # This file is meant to be sourced from 6 | # /etc/portage/env/$CATEGORY/$PACKAGE* 7 | # 8 | # It is similar to /etc/portage/env/scripts/mv_noinst 9 | # but also defines additional hooks needed for kernels. 10 | 11 | . /etc/portage/env/scripts/mv_noinst "$@" 12 | 13 | post_src_prepare() { 14 | mv_kernel_patch 15 | } 16 | 17 | mv_kernel_patch() { 18 | local f g i j k p s 19 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* 20 | g=: 21 | cd -- "$S" >/dev/null 2>&1 22 | 23 | # Make sure that -f is not set 24 | 25 | case $- in 26 | *f*) 27 | set +f 28 | s='set -f';; 29 | *) 30 | s=:;; 31 | esac 32 | 33 | # Apply patches from $MV_PATCHES and /etc/portage/env/patches{,/local} 34 | 35 | for i in "$PN" kernel 36 | do for j in "-$PV-$PR" "-$PV" '' 37 | do for k in patch diff 38 | do for p in \ 39 | ${MV_PATCHES:+"$MV_PATCHES"/$i$j-[a-z][a-z]*.$k} \ 40 | ${PORTAGE_CONFIGROOT%/}/etc/portage/env/patches/local/$i$j-[a-z][a-z]*.$k \ 41 | ${PORTAGE_CONFIGROOT%/}/etc/portage/env/patches/$i$j-[a-z][a-z]*.$k 42 | do if test -r "$p" && \ 43 | patch -p1 --no-backup-if-mismatch \ 44 | --dry-run <"$p" >/dev/null 45 | then if $g 46 | then einfo "mv's hack $f" 47 | g=false 48 | fi 49 | einfo "Applying patch $p" 50 | patch -p1 --no-backup-if-mismatch <"$p" || \ 51 | die "Patching failed" 52 | fi 53 | done 54 | done 55 | done 56 | done 57 | 58 | # For manual grpatches we have localversion-grsec with content "-grsec" 59 | # This causes -grsec to be appended to the modules directory, 60 | # so we remove it 61 | 62 | for i in "$S/localversion"* 63 | do test -f "$i" || continue 64 | if $g 65 | then einfo "mv's hack $f" 66 | g=false 67 | fi 68 | einfo "removing ${i##*/}" 69 | rm -- "$i" 70 | done 71 | 72 | # Possibly set -f again 73 | $s 74 | $g || elog "mv's hack mv_kernel_patch from $f applied" 75 | } 76 | 77 | post_pkg_postinst() { 78 | elog 79 | elog "mv's way of kernel compilation: Use the command" 80 | elog " kernel" 81 | elog 82 | } 83 | 84 | -------------------------------------------------------------------------------- /env/scripts/mv_initremove: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | # 5 | # This file should be sourced from /etc/portage/env/$CATEGORY/$PACKAGE* 6 | # 7 | # It "removes" all /etc/init.d/* scripts of the package by making them 8 | # non-executable. 9 | 10 | mv_initremove() { 11 | local f file found 12 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* 13 | : ${ED:=$D} 14 | found=false 15 | for file in "${ED%/}/etc/init.d/"* 16 | do test -x "$file" || continue 17 | $found || einfo "mv's hack mv_initremove applies" 18 | found=: 19 | einfo "Making /etc/init.d/${file##*/} non-exectuable" 20 | chmod -- a-x "$file" || { 21 | eerror "chmod a-x $file failed" 22 | die "mv's hack mv_initremove from $f failed" 23 | } 24 | done 25 | if $found 26 | then elog "mv's hack mv_initremove applied" 27 | else die "mv's hack mv_initremove from $f is redundant" 28 | fi 29 | } 30 | 31 | post_src_install() { 32 | mv_initremove 33 | } 34 | -------------------------------------------------------------------------------- /env/scripts/mv_ln_libs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | # 5 | # This file should be sourced from /etc/portage/env/$CATEGORY/$PACKAGE* 6 | # 7 | # Its purpose is to replace libraries shipped with binary packages 8 | # by symbolic libs to system libraries 9 | # 10 | # You should give this a quoted list of libraries which should be replaced by 11 | # symbolic links (if possible). A typical for the arguments is 12 | # '"$ED"/opt/googleearth/lib*.so.* "$ED"/opt/googleearth/plugins/*/lib*.so' 13 | # (note the additional quote of the whole list which is need for the argument. 14 | # If you call the auxiliary function mv_ln_libs manually this is not necessary). 15 | 16 | mv_ln_libs() { 17 | case ${MV_NO_LN_LIBS:-no} in 18 | [0fFnN]*) 19 | :;; 20 | *) 21 | return 0;; 22 | esac 23 | local pathlist="/lib /usr/lib" 24 | use amd64 && { 25 | test -d /lib32 || test -d /usr/lib32 26 | } && pathlist="/lib32 /usr/lib32" 27 | local i j k l 28 | l= 29 | for i 30 | do test -f "$i" || continue 31 | j=${i##*/} 32 | for k in $pathlist 33 | do [ -n "`find "$k" -name openoffice -prune -o \ 34 | -name "$j"`" ] || continue 35 | l="$l $j" 36 | find "$k" -name openoffice -prune -o \ 37 | -name "$j" -exec \ 38 | /bin/ln -vsfn -- '{}' "$i" ';' -quit 39 | break 40 | done 41 | done 42 | [ -z "${l:++}" ] && return 43 | elog 44 | elog "mv's hack: ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN*" 45 | elog "The following libs have been linked symbolically:" 46 | elog $l 47 | elog "The package might not depend on these libs, so this may break." 48 | elog "If the libs change, a reemerge of the package might be needed." 49 | elog "Set MV_NO_LN_LIBS=true during emerge to skip this hack." 50 | elog 51 | } 52 | 53 | [ -n "${1:++}" ] && eval 'post_pkg_preinst() { 54 | mv_ln_libs "$*" 55 | }' 56 | 57 | -------------------------------------------------------------------------------- /env/scripts/mv_noinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | # 5 | # This file should be sourced from /etc/portage/env/$CATEGORY/$PACKAGE* 6 | # 7 | # It is passed one parameter: The name of a variable, 8 | # optionally preceeded by + or - 9 | # If this variable is set/unset, then only a "dummy" version of the package 10 | # is emerged (and a corresponding message is displayed). 11 | # Optionally, you can pass strings as further parameters which are used 12 | # as an alternative message. 13 | 14 | mv_define_noinst() { 15 | eval "pre_pkg_preinst() { 16 | pkg_preinst() { local i k 17 | k='$*' 18 | [ -n \"\${k:++}\" ] && while IFS=\" 19 | \" read i 20 | do elog \"\$i\" 21 | done <"$file" || { 26 | eerror "sed failed" 27 | die "mv's hack $f: mv_openrcrun failed" 28 | } 29 | diff -q -- "$temp" "$file" >/dev/null 2>&1 30 | status=$? 31 | rm -f -- "$temp" || { 32 | eerror "cannot remove $temp" 33 | die "mv's hack $f: mv_openrcrun failed" 34 | } 35 | [ $status -eq 0 ] && continue 36 | $found || einfo "mv's hack mv_openrcrun from $f:" 37 | found=: 38 | einfo "Applied mv_openrcrun patch to $file" 39 | done 40 | if $found 41 | then elog "mv's hack mv_openrcrun from $f applied" 42 | else die "mv's hack mv_openrcrun from $f is redundant" 43 | fi 44 | } 45 | 46 | post_src_install() { 47 | mv_openrcrun 48 | } 49 | -------------------------------------------------------------------------------- /env/scripts/mv_patch: -------------------------------------------------------------------------------- 1 | #!/bin/bash (only for editors) 2 | # 3 | # This file should be sourced from /etc/portage/env/$CATEGORY/$PACKAGE* 4 | # 5 | # It provides several functions which are useful to patch packages during 6 | # emerging, in particular mv_patch, see below. 7 | # 8 | # Since the most frequent use is to redefine the post_src_prepare 9 | # (or post_src_unpack in case of EAPI=0 or 1) 10 | # you can pass some arguments when sourcing this script: 11 | # 12 | # In this case, the above mentioned function (or the function $MV_OVERRIDE 13 | # if the latter variable has been set) is defined to call 14 | # "mv_patch" (see below) with your arguments and be somewhat verbose about it. 15 | 16 | # Usage: mv_patch PATCH1 PATCH2 ... [shell [some shell code]] 17 | # 18 | # Applies all PATCHes, being verbose and failing if at least one PATCH fails. 19 | # 20 | # Each PATCH is either a filename (or a part thereof, see below) 21 | # or of the form -e expression FILENAME. 22 | # 23 | # If PATCH is a filename, but not an absolute filename, it is searched 24 | # in the directories /etc/portage/env/patches/, $MV_PATCHES, and $FILESDIR. 25 | # You may omit a leading $PF-/$P-/$PN- or a trailing .patch/.diff 26 | # Only the first matching filename is used for each PATCH. 27 | # 28 | # If PATCH is of the form -e expression FILENAME, then expression is used 29 | # as an sed expression to apply to FILENAME. (Note that by the above mentioned 30 | # eval you might have to quote expression twice) 31 | # If FILE is not an absolute pathname it is assumed to be relative to $S. 32 | # 33 | 34 | mv_epatch() { 35 | local mv_epatch_cmd mv_epatch_file my_epatch_count mv_epatch_error \ 36 | patch P4CONFIG P4PORT P4USER 37 | # Handle aliased patch command #404447 #461568 38 | patch=patch 39 | eval $(alias patch 2>/dev/null | sed 's:^alias ::') 40 | unset P4CONFIG P4PORT P4USER # keep perforce at bay #56402 41 | test -r "$1" || mv_die "cannot find mv's patch $1" 42 | ebegin "mv patch application: $1" 43 | mv_epatch_file=$1 44 | mv_epatch_cmd= 45 | case ${1##*.} in 46 | xz) 47 | mv_epatch_cmd='xz -dc';; 48 | lzma) 49 | mv_epatch_cmd='lzma -dc';; 50 | bz2) 51 | mv_epatch_cmd='bzip2 -dc';; 52 | gz|Z|z) 53 | mv_epatch_cmd='gzip -dc';; 54 | ZIP|zip) 55 | mv_epatch_cmd='unzip -p';; 56 | esac 57 | if [ -n "$mv_epatch_cmd" ] 58 | then mv_epatch_file=$T/mv_epatch.current 59 | $mv_epatch_cmd <"$1" >"$mv_epatch_file" \ 60 | || mv_die "failed to uncompress patch $1" 61 | fi 62 | mv_epatch_count=0 63 | # Skip -p0 if absolute paths are used 64 | [ -z "$(sed -n -e '/^[-+][-+][-+] \//{s!^[-+][-+][-+] /dev/null!!;p}' \ 65 | -- "$mv_epatch_file")" ] || mv_epatch_count=1 66 | # Reject patches with relative paths 67 | grep -Eq '^[-+]{3} [^ ]*[.][.]/' -- "$mv_epatch_file" >/dev/null 2>&1 \ 68 | && mv_die 'patch uses relative paths ../' 69 | mv_epatch_error= 70 | while [ $mv_epatch_count -lt 5 ] 71 | do mv_epatch_cmd="$patch -p$mv_epatch_count -g0 -E --no-backup-if-mismatch" 72 | mv_epatch_error=$mv_epatch_error" 73 | $mv_epatch_cmd 74 | $($mv_epatch_cmd --dry-run -f <"$mv_epatch_file" 2>&1)" && { 75 | mv_epatch_count= 76 | break 77 | } 78 | mv_epatch_count=$(( $mv_epatch_count + 1 )) 79 | done 80 | [ -z "$mv_epatch_count" ] || mv_die "patch $1 cannot be applied:$mv_epatch_error" 81 | mv_epatch_error=" 82 | $mv_epatch_cmd 83 | $($mv_epatch_cmd <"$mv_epatch_file" 2>&1)" \ 84 | || mv_die "application of patch $1 failed:$mv_epatch_error" 85 | eend 0 86 | } 87 | 88 | mv_patch() { 89 | while [ $# -gt 0 ] 90 | do case $1 in 91 | -e) shift 92 | mv_sed "$1" "$2" || return 1 93 | shift 2;; 94 | shell) shift 95 | "$@" 96 | return;; 97 | *) mv_patchfile "$1" || return 1 98 | shift;; 99 | esac 100 | done 101 | return 0 102 | } 103 | 104 | mv_patchfile() { 105 | local mv_n mv_pt mv_pt1 mv_pt2 mv_tl mv_px mv_sx 106 | case $1 in 107 | /*) 108 | unset MV_PATCHES 109 | mv_pt1= 110 | mv_pt2= 111 | mv_pt=${1%/*} 112 | mv_tl=${1##*/};; 113 | *) 114 | mv_pt=${PORTAGE_CONFIGROOT%/}/etc/portage/env 115 | mv_pt1=${mv_pt%/}/local/patches 116 | mv_pt=${mv_pt%/}/patches 117 | mv_pt2=${mv_pt%/}/local 118 | mv_tl=$1;; 119 | esac 120 | for mv_pt in \ 121 | ${MV_PATCHES:+"${MV_PATCHES%/}/"} \ 122 | ${mv_pt1:+"${mv_pt1%/}/"} \ 123 | ${mv_pt2:+"${mv_pt2%/}/"} \ 124 | "${mv_pt%/}/" \ 125 | ${FILESDIR:+"${FILESDIR%/}/"} 126 | do for mv_px in "$PN-$PR-" "$P-" "$PN:$SLOT-" "$PN-" '' 127 | do for mv_sx in '' '.patch' '.diff' 128 | do mv_n=$mv_pt$mv_px$mv_tl$mv_sx 129 | test -e "$mv_n" || continue 130 | mv_epatch "$mv_n" && return 131 | done 132 | done 133 | done 134 | mv_die "Patch $1 not found" 135 | } 136 | 137 | declare -a MV_SED 138 | 139 | mv_sed() { 140 | local mv_n mv_r mv_t 141 | eval mv_n=\${$#} 142 | einfo "Patching $mv_n" 143 | case $mv_n in 144 | /*) 145 | mv_r=$mv_n;; 146 | *) 147 | mv_r=$S/$mv_n;; 148 | esac 149 | test -e "$mv_r" || mv_die "file $mv_r not found" 150 | MV_SED=("$@") 151 | MV_SED[$(( $# - 1 ))]='--' 152 | mv_t=$T/mv_sed 153 | sed -e "${MV_SED[@]}" "$mv_r" >"$mv_t" \ 154 | && chmod --reference="$mv_r" "$mv_t" || mv_die "patching $mv_r failed" 155 | chown --reference="$mv_r" "$mv_t" >/dev/null 2>&1 156 | cmp -s -- "$mv_r" "$mv_t" && mv_die "patching $mv_r had no effect" 157 | mv -- "$mv_t" "$mv_r" || mv_die "cannot move $mv_t -> $mv_r" 158 | } 159 | 160 | # Usage: mv_start [-] 161 | # 162 | # This gives a descriptive message about the file and that a hack is 163 | # going to be applied. 164 | # 165 | # Moreover, unless you pass the argument "-", the directory is changed to 166 | # $S (if it exists) or $WORKDIR (otherwise). 167 | mv_start() { 168 | local cdto f 169 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* 170 | einfo "mv's hack: $f" 171 | [ $# -gt 0 ] && [ "$1" = '-' ] && return 0 172 | test -d "$S" && cdto=$S || cdto=$WORKDIR 173 | cd -- "$cdto" >/dev/null || mv_die "could not cd to $cdto" 174 | } 175 | 176 | # Usage: mv_end 177 | # 178 | # Depending on the error state, this gives either the message that the 179 | # hack was successfully applied or that it had failed. 180 | # In the latter case it dies. 181 | # 182 | mv_end() { 183 | if [ ${1:-$?} -eq 0 ] 184 | then mv_end_ok 185 | else mv_end_die 186 | fi 187 | } 188 | 189 | mv_end_ok() { 190 | local f 191 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* 192 | elog "mv's hack from $f applied" 193 | } 194 | 195 | mv_end_die() { 196 | local f 197 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* 198 | die "mv's hack from $f failed" 199 | } 200 | 201 | mv_die() { 202 | [ $# -eq 0 ] || eerror "$*" 203 | mv_end_die 204 | } 205 | 206 | if [ $# -eq 1 ] && case $1 in 207 | "${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN"*|*profile.bashrc) 208 | false;; 209 | esac || [ $# -gt 1 ] 210 | then [ -z "${MV_OVERRIDE:++}" ] && case ${EAPI:-0} in 211 | [01]) 212 | MV_OVERRIDE='post_src_unpack';; 213 | *) 214 | MV_OVERRIDE='post_src_prepare';; 215 | esac 216 | quoteargs=`printf ' %q' "$@"` 217 | eval "$MV_OVERRIDE() { 218 | mv_start && mv_patch$quoteargs 219 | mv_end 220 | }" 221 | unset quoteargs 222 | fi 223 | -------------------------------------------------------------------------------- /env/scripts/mv_pax: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | # 5 | # This file should be sourced from /etc/portage/env/$CATEGORY/$PACKAGE* 6 | # 7 | # It provides support for pax marking. 8 | # You must write a function mv_pax() which calls pax-mark and returns 9 | # the correct error status. 10 | # 11 | # If you do not want that post_src_install() is redefined, 12 | # pass the argument "-" and call mv_pax_mark() (which in turn calls mv_pax()) 13 | 14 | command -v mv_start >/dev/null 2>&1 || \ 15 | die 'mv_pax must be sourced after mv_patch' 16 | 17 | mv_pax_die() { 18 | eerror "$*" 19 | mv_end_die 20 | } 21 | 22 | mv_pax_init() { 23 | command -v pax-mark || . "$PORTDIR/eclass/pax-utils.eclass" 24 | command -v pax-mark || mv_pax_die 'cannot source pax-utils.eclass' 25 | } 26 | 27 | mv_pax_mark() { 28 | mv_start && mv_pax_init && mv_pax 29 | mv_end 30 | } 31 | 32 | if [ "$1" != '-' ] 33 | then post_src_install() { 34 | mv_pax_mark 35 | } 36 | fi 37 | -------------------------------------------------------------------------------- /env/scripts/mv_paxopen: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | # 5 | # This file should be sourced from /etc/portage/env/$CATEGORY/$PACKAGE* 6 | # 7 | # Its purpose is to warn that the package might require a "paxopen open" 8 | 9 | mv_paxopen() { 10 | ewarn "mv's experience for this package:" 11 | ewarn "If compilation/running fails, try again after" 12 | ewarn " paxopen open" 13 | ewarn "Reset the original safer state afterwards with" 14 | ewarn " paxopen close" 15 | } 16 | 17 | pre_src_prepare() { 18 | mv_paxopen 19 | } 20 | -------------------------------------------------------------------------------- /env/scripts/mv_rmkeep: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | # 5 | # This file should be sourced from /etc/portage/env/$CATEGORY/$PACKAGE* 6 | # 7 | # It removes all installed .keep* files 8 | 9 | mv_rmkeep() { 10 | local f 11 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* 12 | : ${ED:=$D} 13 | if [ -n "`find "$ED" -name '.keep*' -print -quit`" ] 14 | then einfo "mv's hack: $f" 15 | find "$ED" -name '.keep*' -exec rm -v -- '{}' '+' || \ 16 | die "mv's hack mv_rmkeep from $f failed" 17 | elog "mv's hack $f applied" 18 | else die "mv's hack $f is redundant" 19 | fi 20 | } 21 | 22 | post_src_install() { 23 | mv_rmkeep 24 | } 25 | -------------------------------------------------------------------------------- /env/scripts/mv_rmla: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | # 5 | # This file should be sourced from /etc/portage/env/$CATEGORY/$PACKAGE* 6 | # 7 | # It removes all installed *.la files (i.e. all information which is only 8 | # needed to link static archives). 9 | # To remove also the *.a files (i.e. the static archives), 10 | # use mv_rmstaticla, instead. 11 | 12 | mv_rmla() { 13 | local f 14 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* 15 | : ${ED:=$D} 16 | if [ -n "`find "$ED" -name '*.la' -print -quit`" ] 17 | then einfo "mv's hack mv_rmla from $f" 18 | find "$ED" -name '*.la' -exec rm -v -- '{}' '+' || \ 19 | die "mv's hack mv_rmla from $f failed" 20 | elog "mv's hack mv_rmla from $f applied" 21 | else die "mv's hack mv_rmla is redundant in $f" 22 | fi 23 | } 24 | 25 | post_src_install() { 26 | mv_rmla 27 | } 28 | -------------------------------------------------------------------------------- /env/scripts/mv_rmstatic: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | # 5 | # This file should be sourced from /etc/portage/env/$CATEGORY/$PACKAGE* 6 | # 7 | # It removes all installed *.a files (i.e. all static library data) 8 | # To remove also the *.la files (the information needed to link them), 9 | # use mv_rmstaticla, instead. 10 | 11 | mv_rmstatic() { 12 | local f 13 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* 14 | : ${ED:=$D} 15 | if [ -n "`find "$ED" -name '*.a' -print -quit`" ] 16 | then einfo "mv's hack mv_rmstatic from $f" 17 | find "$ED" -name '*.a' -exec rm -v -- '{}' '+' 18 | einfo "mv's hack mv_rmstatic applied" 19 | else die "mv's hack mv_rmstatic is redundant in $f" 20 | fi 21 | } 22 | 23 | post_src_install() { 24 | mv_rmstatic 25 | } 26 | -------------------------------------------------------------------------------- /env/scripts/mv_rmstaticla: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ^^^^^^^^^^ 3 | # This is only to make correct editor highlighting. 4 | # 5 | # This file should be sourced from /etc/portage/env/$CATEGORY/$PACKAGE* 6 | # 7 | # It removes all installed *.a and *.la files (i.e. all static library data 8 | # and all information to link them statically). 9 | # To remove only one of them use mv_rmstatic or mv_rmla instead. 10 | 11 | mv_rmstaticla() { 12 | local f 13 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* 14 | : ${ED:=$D} 15 | if [ -n "`find "$ED" '(' -name '*.a' -o -name '*.la' ')' -print -quit`" ] 16 | then einfo "mv's hack mv_rmstaticla from $f" 17 | find "$ED" '(' -name '*.a' -o -name '*.la' ')' -exec rm -v -- '{}' '+' || \ 18 | die "mv's hack mv_rmstaticla from $f failed" 19 | elog "mv's hack mv_rmstaticla from $f applied" 20 | else die "mv's hack mv_rmstaticla is redundant in $f" 21 | fi 22 | } 23 | 24 | post_src_install() { 25 | mv_rmstaticla 26 | } 27 | -------------------------------------------------------------------------------- /env/sys-apps/baselayout-java: -------------------------------------------------------------------------------- 1 | 2 | . /etc/portage/env/scripts/mv_patch setu 3 | -------------------------------------------------------------------------------- /env/sys-apps/dchroot: -------------------------------------------------------------------------------- 1 | 2 | . /etc/portage/env/scripts/mv_patch \ 3 | -e 's/command_len = 0/command_len = 1/' dchroot.c 4 | -------------------------------------------------------------------------------- /env/sys-apps/man: -------------------------------------------------------------------------------- 1 | 2 | post_src_install () { 3 | einfo "mv's hack: ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN*" 4 | if test -d "$D/var/cache/man" 5 | then rm -rfv -- "$D/var/cache/man" 6 | fi 7 | einfo "mv's hack ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN* applied" 8 | } 9 | -------------------------------------------------------------------------------- /env/sys-apps/openrc: -------------------------------------------------------------------------------- 1 | 2 | . /etc/portage/env/scripts/mv_patch sleep 3 | -------------------------------------------------------------------------------- /env/sys-apps/portage: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch \ 2 | brotli-lz4-zstd \ 3 | update-index \ 4 | reset-hard 5 | # force-shallow # unneeded with >=sys-apps/app-portage-3.0.24 6 | # no-refresh-keys # probably unneeded with >=app-portage/gemato-14.0, see https://bugs.gentoo.org/662636 7 | -------------------------------------------------------------------------------- /env/sys-apps/texinfo: -------------------------------------------------------------------------------- 1 | 2 | . /etc/portage/env/scripts/mv_patch brotli-lz4-zstd 3 | -------------------------------------------------------------------------------- /env/sys-apps/util-linux: -------------------------------------------------------------------------------- 1 | 2 | post_src_install () { 3 | einfo "mv's hack: ${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN*" 4 | ! test -f "${ED}"/bin/su || chmod 4711 -- "${ED}"/bin/su || die 5 | einfo "mv's hack applied" 6 | } 7 | -------------------------------------------------------------------------------- /env/sys-devel/gcc: -------------------------------------------------------------------------------- 1 | 2 | pre_src_unpack() { 3 | case ${BOOTSTRAP-n} in 4 | [nNfF]*|[oO][fF]*|0|-) 5 | ewarn "Disabling bootstrap for sys-devel/gcc. To override: export BOOTSTRAP=yes" 6 | EXTRA_ECONF=${EXTRA_ECONF-}${EXTRA_ECONF:+\ }--disable-bootstrap 7 | ;; 8 | esac 9 | } 10 | -------------------------------------------------------------------------------- /env/sys-fs/cryptsetup: -------------------------------------------------------------------------------- 1 | ../scripts/mv_initremove -------------------------------------------------------------------------------- /env/sys-fs/lvm2: -------------------------------------------------------------------------------- 1 | ../scripts/mv_initremove -------------------------------------------------------------------------------- /env/sys-fs/udisks: -------------------------------------------------------------------------------- 1 | post_src_install () { 2 | local i 3 | : ${ED:=$D} 4 | for i in "$ED"/media/.keep* 5 | do test -e "$i" || continue 6 | ewarn "mv's hack: Removing /media/${i##*/}" 7 | rm -- "$i" 8 | done 9 | : 10 | } 11 | -------------------------------------------------------------------------------- /env/sys-kernel/gentoo-sources: -------------------------------------------------------------------------------- 1 | 2 | . /etc/portage/env/scripts/mv_all_kernel_sources INST_KERNEL 3 | -------------------------------------------------------------------------------- /env/sys-kernel/hardened-sources: -------------------------------------------------------------------------------- 1 | 2 | . /etc/portage/env/scripts/mv_all_kernel_sources -NOINST_KERNEL 3 | -------------------------------------------------------------------------------- /env/sys-kernel/vanilla-sources: -------------------------------------------------------------------------------- 1 | hardened-sources -------------------------------------------------------------------------------- /env/sys-libs/ncurses: -------------------------------------------------------------------------------- 1 | # mv prefers green cursor over of blinking chinese water torture: 2 | # This patch is required for linux terminals and tmux/emacs/vi 3 | # You still have to printf '\033[?17;0;168c' in shell startup and /etc/issue 4 | # Without this patch, see https://www.emacswiki.org/emacs/CursorOnLinuxConsole 5 | # (use locally infocmp linux >1, edit end of cnorm and cvvis and "tic 1") 6 | . /etc/portage/env/scripts/mv_patch \ 7 | -e 's/\(\\E[[]\)[?][80]c,/\1\?17;0;168c,/g' misc/terminfo.src 8 | -------------------------------------------------------------------------------- /env/x11-apps/xinit: -------------------------------------------------------------------------------- 1 | MV_OVERRIDE=post_src_install 2 | . /etc/portage/env/scripts/mv_patch \ 3 | -e 's/-nolisten tcp/-nolisten tcp -iglx/' "$ED/etc/X11/xinit/xserverrc" 4 | -------------------------------------------------------------------------------- /env/x11-drivers/nvidia-drivers: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if masked-packages -q -m '>*/*-300' "$CATEGORY/$PF" 3 | then 4 | # https://github.com/voidlinux/void-packages/tree/master/srcpkgs/nvidia340/files 5 | . /etc/portage/env/scripts/mv_patch linux-4.9 linux-4.10 linux-4.11 linux-4.12 6 | fi 7 | -------------------------------------------------------------------------------- /env/x11-misc/slim: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch 2 | 3 | post_src_install () { 4 | local pic i dest stat 5 | mv_start 6 | dest=$ED/usr/share/slim/themes/default/background.jpg 7 | pic=/etc/portage/env/local/pic 8 | if test -h "$pic" && i=`readlink -f -- "$pic"` && [ -n "$i" ] 9 | then pic=$i/login.jpg 10 | else pic=$pic/login.jpg 11 | if test -h "$pic" && i=`readlink -f -- "$pic"` && [ -n "$i" ] 12 | then pic=$i 13 | fi 14 | fi 15 | stat=0 16 | if test -s "$pic" 17 | then test -s "$dest" && ln -sfn -- "$pic" "$dest" || stat=$? 18 | else eerror "cannot find $pic" 19 | stat=1 20 | fi 21 | mv_end $stat 22 | } 23 | -------------------------------------------------------------------------------- /env/x11-terms/st: -------------------------------------------------------------------------------- 1 | . /etc/portage/env/scripts/mv_patch \ 2 | -e 's/Liberation.*true/Liberation Mono:pixelsize=15:antialias=true:autohint=true/' \ 3 | config.def.h 4 | 5 | -------------------------------------------------------------------------------- /env/x11-themes/fvwm-crystal: -------------------------------------------------------------------------------- 1 | #!/bin/sh (this line is only for editors) 2 | 3 | # Fix various bugs in the fvwm-crystal scripts: 4 | # 1. They are full of bashisms, so use #!/bin/bash 5 | # 2. Avoid some bashisms in fvwm code ([[ ]] == source) 6 | # 3. Remove wrong "break" lines in fvwm-crystal 7 | # 4. Fix some forgotten quoting 8 | 9 | my_bugfixes_3_2_3() { 10 | find "$S" -type d -name Applications -prune \ 11 | -o -type f -exec /bin/sh -c 'Echo() { 12 | printf '\''%s\n'\'' "$*" 13 | } 14 | for i 15 | do if test -x "$i" 16 | then ! head -n1 -- "$i" | grep '\''^#!/bin/sh'\'' >/dev/null || { 17 | if [ "${i##*/}" = fvwm-crystal ] 18 | then Echo "Fixes various in $i" 19 | a='\''-e /break;/d'\'' 20 | else Echo "Fixing #!/bin/sh in $i" 21 | a= 22 | fi 23 | cp -p -- "$i" "$i.patched" && \ 24 | sed -e '\''1s|^#!/bin/sh|#!/bin/bash|'\'' $a -- "$i" >|"$i.patched" && \ 25 | mv -- "$i.patched" "$i" 26 | } 27 | else 28 | if grep -q '\''PipeRead.*\(\[\[\|source\)'\'' -- "$i" >/dev/null 29 | then Echo "Fixing bashisms in $i" 30 | sed -i \ 31 | -e '\''s/\[\[/\[/g'\'' \ 32 | -e '\''s/\]\]/\]/g'\'' \ 33 | -e '\''s/==/=/g'\'' \ 34 | -e '\''s/source /. /g'\'' \ 35 | -- "$i" 36 | fi && if grep -q '\''echo \*'\'' -- "$i" >/dev/null 37 | then Echo "Fixing echo in $i" 38 | sed -i -e '\''s/echo \*/echo \\*/g'\'' -- "$i" 39 | fi 40 | fi && continue 41 | Echo "Failed to patch $i" >&2 42 | exit 1 43 | done' sh '{}' '+' 44 | } 45 | 46 | my_bugfixes_3_2_7() { 47 | find "$S" -type d -name Applications -prune \ 48 | -o -type f -exec /bin/sh -c 'Echo() { 49 | printf '\''%s\n'\'' "$*" 50 | } 51 | Sed() { 52 | text=${1:-bashisms} 53 | shift 54 | cp -p -- "$i" "$i.patched" && \ 55 | sed "$@" \ 56 | -e '\''s/echo -e/echo/'\'' \ 57 | -e '\''s/\[\[ /\[ /g'\'' \ 58 | -e '\''s/ \]\]/ \]/g'\'' \ 59 | -e '\''/\[ | \]/{s/==/=/g}'\'' \ 60 | -e '\''s/source \([^a-z]\)/. \1/g'\'' \ 61 | -- "$i" >|"$i.patched" && \ 62 | if diff -q -- "$i.patched" "$i" >/dev/null 2>&1 63 | then rm -f -- "$i.patched" 64 | else Echo "Fixing $text in $i" 65 | mv -- "$i.patched" "$i" 66 | fi && return 67 | Echo "Failed to patch $i" >&2 68 | exit 1 69 | } 70 | for i 71 | do case $i in 72 | *.html|*.py|*.png|*.gif|*.jpg|*/ChangeLog) 73 | continue;; 74 | */fvwm-crystal) 75 | Sed break -e '\''/break;/d'\'' 76 | continue;; 77 | */DesktopActions) 78 | Sed arrays \ 79 | -e '\''/Execs=/{s/[()]/'\''"'\''/g}" \ 80 | -e '\''s/Execs\[\*\]/Execs/'\'' 81 | continue;; 82 | */fvwm-crystal.videomodeswitch*) 83 | Sed shebang -e '\''s:^#!/bin/sh:#!/bin/bash:'\'' 84 | continue;; 85 | esac 86 | head -n1 -- "$i" | grep bash >/dev/null && continue 87 | if grep -q '\''echo \*'\'' -- "$i" >/dev/null 88 | then Sed quoting -e '\''s/echo \*/echo \\*/g'\'' 89 | else Sed "" 90 | fi 91 | done' sh '{}' '+' 92 | } 93 | 94 | my_bugfixes() { 95 | case $PV in 96 | 3.2.3) 97 | my_bugfixes_3_2_3;; 98 | 3.2.7) 99 | my_bugfixes_3_2_7;; 100 | esac 101 | } 102 | 103 | # We add/modify some menu entries... 104 | 105 | cp_menu() { 106 | local d 107 | [ $# -eq 3 ] || { 108 | eerror "arguments to cp_menu not unique: $*" 109 | return 1 110 | } 111 | einfo "generating menu ${3##*/}" 112 | case $3 in 113 | /*) 114 | d=$3;; 115 | *) 116 | d=${2%/*}/$3;; 117 | esac 118 | cp -p -- "$2" "$d" && sed -e "$1" -- "$2" >|"$d" || { 119 | eerror "failed: cp_menu $2 $3" 120 | return 1 121 | } 122 | } 123 | 124 | cp_menu2() { 125 | local source dest 126 | source=$1 127 | dest=$2 128 | shift 2 129 | einfo "generating menu ${dest##*/}" 130 | cp -p -- "$source" "$dest" && sed "$@" -- "$source" >|"$dest" || { 131 | eerror "failed: cp_menu2 $source $dest" 132 | return 1 133 | } 134 | } 135 | 136 | cp_mwww() { 137 | local i c 138 | c=continue 139 | case $1 in 140 | -*) 141 | c=: 142 | shift;; 143 | esac 144 | for i 145 | do cp_menu2 "$i" "$i.mwww" \ 146 | -e 's/\(exec FvwmCommand .A \)/ \1sudox -x -- mwww exec /' \ 147 | -e 's/^exec/cd ~mwww; ! test -r .deutsch || ! test -r deutsch || export LANG=de_DE.UTF8; exec sudox -T -- mwww exec/' \ 148 | -e 's/ exec/exec/' || return 149 | $c 150 | rm -v -- "$i" || return 151 | done 152 | } 153 | 154 | link_items() { 155 | local name i 156 | name=$1 157 | shift 158 | for i 159 | do ln -snv -- "${i##*/}" "${i%/*}/$name" || { 160 | eerror "failed: link_items $1" 161 | return 1 162 | } 163 | done 164 | } 165 | 166 | var_assign() { 167 | eval $1=\$2 168 | [ $# -eq 2 ] || { 169 | eerror "assignment to $1 is not unique: ${2-}" 170 | return 1 171 | } 172 | } 173 | 174 | rename_file() { 175 | local r f s e 176 | r=: 177 | case $1 in 178 | -*) 179 | r='return 0' 180 | shift;; 181 | esac 182 | test -r "$1" || { 183 | $r 184 | eerror "rename_file: cannot find $1" 185 | return 1 186 | } 187 | [ $# -eq 3 ] || { 188 | eerror "arguments for rename_file not unique: $*" 189 | return 1 190 | } 191 | f=${1##*/} 192 | s=${f%%"$2"*} 193 | e=${f#*"$2"} 194 | [ x"$s" != x"$f" ] && mv -vi -- "$1" "${1%/*}$s$3$e" || { 195 | eerror "failed: rename_file $*" 196 | return 1 197 | } 198 | } 199 | 200 | my_menu() { 201 | local fvwm apps network mixers browsers games icons seamonkey 202 | einfo 'Modifying menu entries' 203 | fvwm=${S}/fvwm/ 204 | apps=${fvwm}Applications/ 205 | var_assign mixers "$apps"*Multimedia/*Audio/*Mixers || return 206 | var_assign network "$apps"*Network/ || return 207 | var_assign games "$apps"*Games/ || return 208 | var_assign browsers "$network"*Web_Browsers/ || return 209 | rename_file -i "$browsers"*flock* flock flock-browser || return 210 | rename_file "$games"*Shooters/*chromium* chromium chromium-game || return 211 | cp_menu 's/exec [^ ]*/exec qasmixer/' \ 212 | "$mixers"/~alsamixer~ALSA_Mixer '~qasmixer~qasmixer' || return 213 | cp_menu 's/exec [^ ]*/exec qashctl/' \ 214 | "$mixers"/~qasmixer~qasmixer '~qashctl~qashctl' || return 215 | cp_menu 's/exec [^ ]*/exec qasconfig/' \ 216 | "$mixers"/~qasmixer~qasmixer '~qasconfig~qasconfig' || return 217 | cp_menu 's/exec [^ ]*/exec adsl-gui/' \ 218 | "$network"*Dial-up/~kppp~kPPP '~adsl-gui~ADSL' || return 219 | cp_menu 's/exec [^ ]*/exec wlan-restart/' \ 220 | "$network"*Dial-up/~kppp~kPPP '~wlan-restart~wlan-restart' || return 221 | cp_menu 's/exec [^ ]*/cd ~mwww; exec sudox -T -- mwww exec download-gui/' \ 222 | "$network"*File_Transfer/~gwget2~Download_Manager '~download-gui~Download.mwww' || return 223 | cp_menu 's/elinks/links/' \ 224 | "$browsers"*elinks* '~links~Links' || return 225 | var_assign seamonkey "$browsers"*seamonkey* || return 226 | cp_menu 's/seamonkey/palemoon/' \ 227 | "$seamonkey" '20~palemoon~Palemoon' || return 228 | cp_menu 's/seamonkey/chromium/' \ 229 | "$seamonkey" '15~chromium~Chromium' || return 230 | cp_menu 's/seamonkey/google-chrome/' \ 231 | "$seamonkey" '15~google-chrome~Google Chrome' || return 232 | cp_menu 's/seamonkey/google-chrome-stable/' \ 233 | "$seamonkey" '15~google-chrome-stable~Chrome' || return 234 | cp_mwww -r "${apps}Network/"*Telephony/* || return 235 | cp_mwww "${apps}System/"*File_Managers/* \ 236 | "${apps}System/"*Terminals/* \ 237 | "${apps}Network/"*Web_Browsers/* || return 238 | cp_menu 's/seamonkey/googleearth/' \ 239 | "$seamonkey".mwww '~googleearth~Googleearth.mwww' || return 240 | einfo 'Modifying icons' 241 | icons=${fvwm}icons/Default/ 242 | rm -rfv -- "$icons"*/apps/chromium.png || return 243 | link_items chromium.png "$icons"*/apps/google-chrome.png || return 244 | link_items google-chrome-stable.png "$icons"*/apps/google-chrome.png || return 245 | link_items palemoon.png "$icons"*/apps/iceweasel.png || return 246 | link_items adsl-gui.png "$icons"*/apps/kppp.png || return 247 | link_items links.png "$icons"*/apps/elinks.png || return 248 | link_items googleearth.png "$icons"*/apps/civserver.png || return 249 | einfo 'Removing wallpapers' 250 | rm -rfv -- "$fvwm/wallpapers" 251 | } 252 | 253 | post_src_prepare() { 254 | local f 255 | f=${PORTAGE_CONFIGROOT%/}/etc/portage/env/$CATEGORY/$PN 256 | einfo "mv's hack: $f" 257 | if my_bugfixes && my_menu 258 | then einfo "mv's hack $f applied" 259 | else die "mv's hack $f failed" 260 | fi 261 | } 262 | -------------------------------------------------------------------------------- /env/xzcompress.conf: -------------------------------------------------------------------------------- 1 | BINPKG_COMPRESS="xz" 2 | BINPKG_COMPRESS_FLAGS="-6e" 3 | 4 | -------------------------------------------------------------------------------- /package.cflags/README: -------------------------------------------------------------------------------- 1 | 2 | # The files in this directory are interpreted by portage-bashrc-mv, see 3 | # https://github.com/vaeth/portage-bashrc-mv/ 4 | # An ebuild for the latter is in the mv overlay (available over layman). 5 | # 6 | # The syntax of the files in this directory is described in 7 | # /etc/portage/bashrc.d/README* 8 | # when you installed the above by the ebuild. Otherwise you might try 9 | # https://github.com/vaeth/portage-bashrc-mv/raw/master/bashrc.d/README 10 | # 11 | # Although in principle anything could go in any file of this directory, 12 | # the files are somewhat ordered: 13 | # 14 | # all-systems 15 | # This is the main file for resetting C*FLAGS which might be set in 16 | # /etc/portage/make.conf/* and which are too aggressive for some packages 17 | # checks 18 | # Packages breaking with -fno-common (without -fcommon in >=gcc-10) or 19 | # -Wl,--no-undefined. These breakages might indicate a hidden bug 20 | # flto 21 | # The same for LTO related flags like e.g. 22 | # -flto -fwhole-program -fuse-linker-plugin -emit-llvm -flto-partition=none 23 | # -flto-odr-type-merging" 24 | # gcc-6 25 | # Some patches which allow compilation with >=gcc-6 26 | # gold 27 | # Some patches which allow compilation with the gold linker 28 | # graphite 29 | # graphite related flags; this file is currently unmaintained 30 | # lowmem 31 | # This file should be only used when you run a system with <200 MB; 32 | # otherwise remove it... 33 | # no-add 34 | # Packages requiring NOLDADD=1 or even MESONDEDUP=1 35 | # no-ninja 36 | # Packages breaking with CMAKE_MAKEFILE_GENERATOR="ninja" 37 | # patches 38 | # Instead of using patches to fix bugs, sometimes it suffices to set 39 | # environment variables or compiler options. If possible this happens in 40 | # this file. 41 | # pie 42 | # For packages which break with -fPIE -pie or without -fno-PIE -no-pie 43 | # spectre 44 | # For packages which break with spectre mitigation flags like 45 | # -fno-plt -mindirect-branch=thunk -mindirect-branch-register 46 | # -mfunction-return=thunk -Wl,-z,retpolineplt -mretpoline 47 | # temporary 48 | # As the name says: entries which are expected to be removed soon but 49 | # which might be currently necessary for some reason or another... 50 | 51 | # In case of compilation/build errors, some of the following usually help 52 | # (The sorting is in decreasing order of probability of causing trouble; 53 | # for "undefined reference" errors, +Wl,--as-needed is the top candidate, 54 | # followed NOLDADD=1 (or MESONDEDUP=1 for packages using meson). 55 | # To make sure, the problem actually stems from flags, you can try first SAFE 56 | # [hack on the command line: FLAG_ADD=SAFE emerge ...] to eliminate everything). 57 | # 58 | # "unset CMAKE_MAKEFILE_GENERATOR" 59 | # e.g. for endless compilation: these are collected in an extra file: 60 | # /etc/portage/package.cflags/no-ninja 61 | # 62 | # +flto* (or the subset +fuse-linker-plugin +fwhole-program -ffat-lto-objects) 63 | # these are collected in an extra file: flto 64 | # Typical error on 32bit: /usr/include/bits/stdio2.h: internal compiler error 65 | # Typical error: syntax error near unexpected token `|' 66 | # Typical error: ... .flto. .... 67 | # Typical error: undefined symbol 68 | # Typical error: reallocation 69 | # +fPIE +pie 70 | # these are collected in an extra file: pie 71 | # Typical error on 32bit: hang with "corrupted double-linked list" 72 | # Typical error: undefined reference to `main' 73 | # Typical error: undefined symbol 74 | # Typical error: recompile with -fPIC 75 | # +fno-common 76 | # Typical error: multiple definition 77 | # +Wl,--no-undefined # Using this might hide starttime/runtime issues 78 | # Typical error: undefined reference to '...' 79 | # +fgraphite* +floop-* 80 | # these are collected in an extra file: /etc/portage/package.cflags/graphite 81 | # Typical error: segfaults 82 | # Typical error: internal compiler error 83 | # +ftree-loop-distribute-patterns 84 | # Typical error: undefined reference to `memset' 85 | # +fno-plt 86 | # +mindirect-branch* 87 | # +mfunction-return* 88 | # +mretpoline # clang only 89 | # +fcf-protection* # gcc-8 90 | # +Wl,-z,retpolineplt # currently clang only 91 | # NOLDADD=1 (or even MESONDEDUP=1) 92 | # NOLDOPT=1 (might be a security risk) 93 | # +fdiagnostics-color=always 94 | # MAKEOPTS-='--no-print-directory' 95 | # +D*FILE* 96 | # +D*DEBUG +D*ASSERT 97 | # +D*FORTIFY* -U_FORTIFY_SOURCE (the latter is sometimes also in the ebuild) 98 | # +Wl,--as-needed LD_AS_NEEDED= 99 | # +frename-registers 100 | # +fvisibility-inlines-hidden 101 | # Typical error: "recompile with -fPIC" on amd64 102 | # +fdirectives-only 103 | # Typical error: __COUNTER__ expanded 104 | # Typical error: /bin/sh: 1: Syntax error: "(" unexpected 105 | # +freorder-functions 106 | # +fdevirtualize-speculatively 107 | # +ftree-partial-pre 108 | # +g0 109 | # +Wl,--relax 110 | # +Wl,--hash-style=gnu -Wl,--hash-style=both 111 | # +Wl,-z,relro # is a security risk 112 | # +finline-functions 113 | # +s +Wl,-S 114 | # +Wl,--enable-new-dtags 115 | # +Wl,--combreloc 116 | # 117 | # Patches like the following go into a separate file "patches": 118 | # EXTRA_EMAKE+='SHELL=/bin/bash' 119 | # 120 | # The following may be related if you specify a restrictive CONFIG_SITE=; 121 | # see also the comments in config.site 122 | # (Patches like the following go into a separate file "patches") 123 | # EXTRA_ECONF-='*disable-static' 'export enable_static=yes' 124 | # EXTRA_ECONF-='*silent-rules' 'export enable_silent_rules=no' 125 | # EXTRA_ECONF-='*dependency-tracking' 'export disable_dependency_tracking=1' 126 | # 'export enable_fast_install=no' 127 | # 128 | # For non-reproducible errors, the usual solution is to disable parallel make: 129 | # MAKEOPTS-='-j*' 130 | # 131 | # In case of runtime errors (e.g. segfaults), try first recompiling with 132 | # SAFE -flifetime-dse=1 -fno-delete-null-pointer-checks -fno-PIE -no-pie 133 | # 134 | # which eliminates everything. (Note however that especially large file support 135 | # should better be *added* if libraries use it, and that not using -Wl,-z,now 136 | # might be insecure, at least for SUID programs.) 137 | # 138 | # If SAFE helps, you can try binary search to find the actual cause 139 | # (by the remarks above you should really do this). 140 | # Here are the candidates in decreasing order of probability by experience: 141 | # 142 | # +ftree-vectorize* +fvect* [or add -mstackrealign] 143 | # +flto* (see above; there is an extra file) 144 | # NOLDADD=1 (or even MESONDEDUP=1) 145 | # NOLDOPT=1 (might be a security risk) 146 | # CONFIG_SITE= 147 | # +D*FILE* 148 | # +D*DEBUG +D*ASSERT 149 | # +*math* 150 | # +fvisibility-inlines-hidden 151 | # +fno-enforce-eh-specs 152 | # +fnothrow-opt 153 | # +Wl,--as-needed LD_AS_NEEDED= 154 | # +D*FORTIFY* -U_FORTIFY_SOURCE (the latter is not always necessary) 155 | # +fstack-protector* 156 | # +fstack-clash-protection +fstack-check 157 | # +fmerge-all-constants 158 | # +fno-semantic-interposition 159 | # +Wl,-z,relro # is a security risk 160 | # +fweb 161 | # +fpredictive-commoning 162 | # +ftree-switch-conversion 163 | # +finline-functions 164 | # +fno-common 165 | # +fgcse-after-reload 166 | # +freorder-functions 167 | # +fdevirtualize-speculatively 168 | # +fgcse-sm 169 | # +fgcse-las 170 | -------------------------------------------------------------------------------- /package.cflags/all-systems: -------------------------------------------------------------------------------- 1 | # General elimination of critical *FLAGS 2 | 3 | app-admin/logrotate +combine 4 | app-admin/metalog +fdirectives-only 5 | app-arch/cpio +fdirectives-only 6 | app-arch/gzip +fdirectives-only 7 | app-arch/sharutils +fdirectives-only 8 | app-arch/tar +fdirectives-only 9 | app-cdr/cdw +Wl,--as-needed LD_AS_NEEDED= 10 | app-cdr/dvdisaster +fdirectives-only # +fdirectives-only fixes broken ./configure 11 | app-crypt/gpgme +D*DEBUG +D*ASSERT 12 | app-crypt/gnupg +D*DEBUG +D*ASSERT 13 | app-editors/emacs +fdirectives-only +*math* 14 | app-emulation/dosemu +finline-functions +fdirectives-only 15 | app-emulation/qemu +D*DEBUG +D*ASSERT 16 | app-emulation/vice +*math* # Segfault with -ffast-math 17 | app-emulation/wine* +D*FILE_OFFSET* +D_LARGEFILE* +fstack-protector* +ftree-loop-distribute-patterns +fweb +finline-functions +frename-registers +freorder-functions +*math* # -ffast-math gives duplicate symbols. -freorder-functions undefined reference to 'memset' 18 | app-mobilephone/heimdall SAFE # No experiments here! 19 | app-misc/mmv +fdirectives-only 20 | app-misc/srm +D*FILE* 21 | app-misc/tmux CONFIG_SITE= 22 | app-office/libreoffice +finline-functions +frename-registers +*math* +fdirectives-only # for crashes check also freetype, zlib 23 | app-portage/portage-utils +fdirectives-only 24 | app-shells/dash +fdirectives-only 25 | app-text/a2ps +Wl,--as-needed +fdirectives-only 26 | app-text/aspell +D*DEBUG +D*ASSERT 27 | app-text/doxygen NOC*OPT=1 +O* -O2 -fomit-frame-pointer -s # see http://forums.gentoo.org/viewtopic-t-495600.html 28 | app-text/dvipng +D*DEBUG +D*ASSERT 29 | app-text/enchant +fdirectives-only 30 | app-text/ghostscript-gpl +D*FILE* 31 | app-text/gv +fdirectives-only 32 | app-text/lcdf-typetools +D*DEBUG +D*ASSERT 33 | app-text/libpaper +fdirectives-only 34 | app-text/pdftk +O* -O2 +finline-functions +D*DEBUG +D*ASSERT +D*FILE* +D*FORTIFY* 35 | app-text/poppler +frepo +ftree-vectorize* # ftree-vectorize reported in http://gentoo-wiki.com/CFLAGS_matrix 36 | app-text/recode +fdirectives-only 37 | app-text/texlive-core +D*DEBUG +D*ASSERT +*math* # lua fails with -ffast-math 38 | app-text/wdiff +fdirectives-only 39 | app-text/xdvik +D*DEBUG +D*ASSERT 40 | app-text/yodl +XXXX # Something is broken here - must check 41 | dev-db/sqlcipher +*math* 42 | dev-db/sqlite +*math* 43 | dev-build/libtool CONFIG_SITE= 44 | dev-build/make +fdirectives-only 45 | dev-debug/gdb CONFIG_SITE= +*math* +fdirectives-only 46 | dev-debug/strace +fdirectives-only 47 | dev-java/openjdk +D*FORTIFY* SAFE # openjdk sets security relevant flags - we do not interfere 48 | dev-lang/lua CONFIG_SITE= +*math* 49 | dev-lang/ruby +ftree-vectorize* 50 | dev-lang/rust +fmerge-all-constants # with -fmerge-all-constants rust does not return from compiling its stdlib 51 | dev-lang/python +*math* # Byte compilation of some .pyc files needs forever with -ffast-math 52 | dev-libs/boost MAKEOPTS-='-j*' 53 | dev-libs/elfutils +D*FILE* 54 | dev-libs/ffcall +fdirectives-only 55 | dev-libs/gmp +*math* +fgraphite* +floop-* +D*FILE* +D*DEBUG +D*ASSERT +frename-registers +freorder-functions +fdevirtualize-speculatively # Just to be on the safe side 56 | dev-libs/kpathsea +D*DEBUG +D*ASSERT 57 | dev-libs/libevent +D*DEBUG +D*ASSERT 58 | dev-libs/libtasn1 +fdirectives-only 59 | dev-libs/libunistring +fdirectives-only 60 | dev-libs/lzo CONFIG_SITE= # sys-power/suspend needs static libs 61 | dev-libs/mpc +*math* 62 | dev-libs/mpfr +*math* 63 | dev-libs/newt +combine 64 | dev-libs/nss -mstackrealign +ftracer # +O* -O2 +ftree-vectorize* might avoid some firefox/openoffice crashes 65 | dev-libs/nspr -mstackrealign +ftracer # +O* -O2 +ftree-vectorize* might avoid some firefox/openoffice crashes 66 | dev-libs/openssl +combine +ftree-vectorize* +*O* +*math* +*model* +*merging* # O, math, model, merging get messed up by sed script 67 | dev-libs/protobuf +*math* 68 | dev-libs/wayland +D*DEBUG +D*ASSERT 69 | dev-libs/weston +D*DEBUG +D*ASSERT 70 | dev-lisp/clisp CONFIG_SITE= +D*DEBUG +D*ASSERT +frename-registers +*math* +fdirectives-only 71 | dev-perl/Clone NOLDOPT=1 NOCOPT=1 CFLAGS= 72 | dev-python/numpy +*math* 73 | dev-qt/* +fdirectives-only +*math* # -ffast-math breaks at least compilation of dev-qt/qtbase on x86 74 | dev-scheme/guile +fdirectives-only +*math* !+D*FILE_OFFSET* !+D_LARGEFILE* # -ffast-math triggers floating exception https://bugs.gentoo.org/show_bug.cgi?id=598986 75 | dev-tex/catdvi +D*DEBUG +D*ASSERT 76 | dev-texlive/texlive-metapost +D*DEBUG +D*ASSERT 77 | dev-util/ccache CONFIG_SITE= 78 | dev-util/gperf +fdirectives-only 79 | dev-util/diffball +D*FILE* 80 | dev-vcs/git +fdirectives-only 81 | dev-vcs/rcs +fdirectives-only 82 | games-arcade/supertux +D*DEBUG +D*ASSERT 83 | games-engines/scummvm +*math* # With -ffast-math compilation fails with colliding options 84 | games-emulation/advancemame +ftree-vectorize* 85 | games-emulation/sdlmame +ftree-vectorize* 86 | games-emulation/xmame +ftree-vectorize* 87 | games-emulation/xmess +ftree-vectorize* 88 | games-rpg/freedroidrpg CONFIG_SITE= 89 | gnome-base/librsvg +ftree-vectorize* # reported in http://gentoo-wiki.com/CFLAGS_matrix 90 | >gnome-base/librsvg-2.56.1 !RUSTFLAGS= # On some i386, the setting lets required sse compilation fail 91 | gui-wm/wayfire +fdirectives-only 92 | gui-wm/sway +fdirectives-only 93 | kde-frameworks/* +*math* 94 | llvm-core/clang +fmerge-all-constants +Wl,--relax # -fmerge-all-constants has always problems with llvm; -Wl,--relax exhausts memory 95 | llvm-core/llvm CONFIG_SITE= +*math* +D*FILE* +fdirectives-only +fmerge-all-constants # -fmerge-all-constants causes clang to segfault on trivial c programs 96 | llvm-runtimes/compiler-rt USE_NONGNU=1 +fmerge-all-constants 97 | llvm-runtimes/compiler-rt-sanitizers USE_NONGNU=1 +fmerge-all-constants +frewrite-includes 98 | mail-client/thunderbird +D*FILE* +*math* +fmerge-all-constants +finline-functions +fdirectives-only 99 | media-gfx/fontforge +fdirectives-only 100 | media-gfx/gimp +D*DEBUG +D*ASSERT 101 | media-libs/harfbuzz +fdirectives-only 102 | media-gfx/ipe +D_GLIBCXX_ASSERTIONS +DNDEBUG 103 | media-gfx/pqiv +finline-functions +D*FORTIFY* -U_FORTIFY_SOURCE 104 | media-gfx/pstoedit +Wl,--as-needed LD_AS_NEEDED= 105 | media-libs/alsa-lib NOC*OPT=1 +O* -O1 # avoid: Inappropriate ioctl for device 106 | media-libs/alsa-oss NOC*OPT=1 +O* -O1 +D*FILE* # avoid: Inappropriate ioctl for device 107 | media-libs/dav1d +fdirectives-only 108 | media-libs/fontconfig +fdirectives-only 109 | media-libs/freetype -mstackrealign +ftracer # +O* -O2 +ftree-vectorize* might avoid some firefox/openoffice crashes 110 | media-libs/gst-plugins-base NOLAFILEREMOVE=1 111 | media-libs/jbigkit +finline-functions 112 | media-libs/kvazaar +mno-sse4 113 | media-libs/lcms -mstackrealign +ftracer # +O* -O2 +ftree-vectorize* might avoid some firefox/openoffice crashes 114 | #media-libs/libdvdread +Wl,--as-needed LD_AS_NEEDED= # use this if vobcopy or dvdbackup do not compile 115 | media-libs/libsidplay NOLAFILEREMOVE=1 116 | media-libs/libv4l +D*FILE* 117 | media-libs/mesa +Wl,-z,now +Wl,--build-id=none +fdirectives-only +*math* 118 | media-libs/mlt +combine 119 | media-libs/opus +*math* 120 | media-libs/plotutils +*math* 121 | media-libs/raptor +*math* 122 | media-plugins/live +Wl,--relax 123 | media-sound/audacity CONFIG_SITE= 124 | media-sound/mpg123 +D*FILE* 125 | media-video/avidemux +ftracer # MAKEOPTS-='-j*' 126 | media-video/cclive +D*DEBUG +D*ASSERT 127 | media-video/ffmpeg +combine +ftracer 128 | media-video/ffmpeg-c* +combine +ftracer 129 | media-video/kaffeine !/-O?/-O2 !+finline-functions 130 | media-video/mplayer +finline-functions # -finline-functions causes encoding errors w/ gcc-8 131 | media-video/mpv +fdirectives-only +fmerge-all-constants +D*DEBUG +D*ASSERT 132 | media-video/pipewire +fno-semantic-interposition 133 | media-video/xanim +O* -O2 134 | net-dns/libidn +fdirectives-only 135 | net-dns/libidn2 +fdirectives-only 136 | net-ftp/lftp +fdirectives-only 137 | net-im/qtox +fdirectives-only 138 | net-libs/gnutls +fdirectives-only 139 | net-libs/libgsasl +fdirectives-only 140 | net-libs/nodejs +*math* # with math optimization casting function miscompiles and www-client/chromium fails to build 141 | net-libs/wvstreams +D*DEBUG +D*ASSERT 142 | net-misc/streamtuner CONFIG_SITE= 143 | net-misc/wget +fdirectives-only 144 | net-print/foo2zjs +combine 145 | net-vpn/tor +D*DEBUG +D*ASSERT 146 | sci-libs/* +*math* 147 | sci-libs/cln +ftracer +fdirectives-only 148 | sci-libs/hdf5 +D*FILE_OFFSET* +D_LARGEFILE* +fdirectives-only 149 | sci-mathematics/* +*math* 150 | sci-mathematics/ginac +fvisibility-inlines-hidden 151 | sci-mathematics/octave +D*DEBUG +D*ASSERT +fdirectives-only +fvisibility-inlines-hidden 152 | sci-visualization/gnuplot +*math* 153 | sys-apps/busybox +Wl,--relax 154 | sys-apps/coreutils +fdirectives-only +*math* 155 | sys-apps/dbus +ftree-vectorize* # reported in http://gentoo-wiki.com/CFLAGS_matrix 156 | sys-apps/diffutils +fdirectives-only 157 | sys-apps/fakeroot +D*FILE* +fno-semantic-interposition 158 | sys-apps/fakechroot +D*FILE* 159 | sys-apps/findutils +fdirectives-only 160 | sys-apps/gawk +D*DEBUG 161 | sys-apps/grep +fdirectives-only 162 | sys-apps/groff +*math* +fdirectives-only 163 | sys-apps/openrc +combine 164 | sys-apps/sandbox +D*DEBUG +D*ASSERT 165 | sys-apps/sed +D*DEBUG +fdirectives-only 166 | sys-apps/systemd +D*DEBUG +D*ASSERT +*math* 167 | sys-apps/texinfo +fstack-protector +fdirectives-only 168 | sys-apps/util-linux +D*DEBUG +D*ASSERT +*math* +fmerge-all-constants +ftracer # without this, script sometimes gets in an endless busy loop 169 | sys-auth/elogind +D*DEBUG +D*ASSERT 170 | sys-block/parted +D*FILE* +fdirectives-only 171 | sys-boot/grub SAFE # No experiments here! Breakage is likely, because grub needs special code, and you must reinstall grub from a rescue CD in case of failures. Moreover, grub provides no suid-binary and no library, so no security issues arise. 172 | sys-devel/bison +fdirectives-only 173 | sys-devel/gcc CONFIG_SITE= +fvisibility-inlines-hidden +combine +D*DEBUG +D*ASSERT +D*FILE* +D*FORTIFY* +D_GLIBCXX_ASSERTIONS 174 | sys-devel/gettext +fdirectives-only 175 | sys-devel/m4 +*math* +fdirectives-only 176 | sys-devel/patch +fdirectives-only +D*DEBUG +D*ASSERT 177 | sys-fs/aufs*-util +D*FILE* 178 | sys-fs/e2fsprogs +D*FILE* 179 | sys-fs/mtools +D*FILE* 180 | sys-fs/squashfuse +Wl,--as-needed 181 | sys-libs/binutils-libs +Wl,-z,combreloc +Wl,--as-needed +Wl,--build-id=none 182 | sys-libs/glibc +Wl,--relax +D*FILE* +fstack-protector +*math* +fdirectives-only +fno-semantic-interposition 183 | sys-libs/gwenhywfar +D*FORTIFY* -U_FORTIFY_SOURCE 184 | sys-libs/libstdc++-v3 +D*DEBUG +D*ASSERT 185 | sys-libs/zlib -mstackrealign +ftracer # +O* -O2 +ftree-vectorize* might avoid some firefox/openoffice crashes 186 | sys-process/criu +Wl,--relax 187 | www-client/chromium +D*FILE* +*math* +fmerge-all-constants +finline-functions +fdirectives-only +fgcse-sm +fgcse-las +fgcse-after-reload +fdiagnostics-color* # "export EXTRA_GN='jumbo_file_merge_limit=20'" MAKEOPTS-=j* 188 | www-client/firefox +D*FILE* +*math* +fmerge-all-constants +finline-functions +fdirectives-only +fomit-frame-pointer +g0 189 | x11-base/xorg-server +Wl,-z,now +fdirectives-only 190 | x11-drivers/xf86-* +Wl,-z,now +fdirectives-only 191 | x11-libs/libXxf86vm CONFIG_SITE= # nvidia-settings needs the static version 192 | x11-libs/gtk+ +fdirectives-only +fmerge-all-constants # With -fmerge-all-constants =3.24.36 segfaults in wayland 193 | x11-libs/pango -mstackrealign +ftracer +fmerge-all-constants # +O* -O2 +ftree-vectorize* avoids some firefox crashes 194 | x11-libs/pixman -mstackrealign +ftracer +fmerge-all-constants +fdirectives-only # +O* -O2 +ftree-vectorize* avoids some firefox crashes 195 | x11-libs/wxGTK +fvisibility-inlines-hidden 196 | x11-misc/redshift +*math* # with -ffast-math fails to recognize options correctly with gcc-7 197 | x11-misc/xscreensaver +D*DEBUG +D*ASSERT 198 | x11-wm/mutter +finline-functions 199 | -------------------------------------------------------------------------------- /package.cflags/checks: -------------------------------------------------------------------------------- 1 | # +fno-common -fcommon 2 | # +Wl,--no-undefined 3 | # 4 | # The options -fno-common -Wl,--no-undefined are essentially testing options: 5 | # If a package is breaking with them but not without them, this might actually 6 | # indicate a real bug. 7 | # For plugins it may be normal that -Wl,--no-undefined fails. 8 | # There are a few packages in which -fno-common causes runtime issues: 9 | # If somebody has an idea why, please write me... 10 | # Note that +fno-common -fcommon has to be specified together for >=gcc-10 11 | # 12 | # The following comments refers only to +no-common -fcommon: 13 | # PO (possibly obsolete) means that I did not check and possibly never will. 14 | # RC (recently checked) means that I checked after May 23 2020. 15 | # NC (needs checking) means that I intend to check with the next recompilation. 16 | 17 | app-arch/zstd +Wl,--no-undefined 18 | app-cdr/dvdisaster +fno-common -fcommon # RC 19 | app-crypt/gpgme +Wl,--no-undefined 20 | app-emulation/dosemu +Wl,--no-undefined 21 | app-emulation/open-vm-tools +Wl,--no-undefined 22 | app-emulation/vice +fno-common -fcommon 23 | #app-emulation/wine* +fno-common -fcommon # NC 24 | app-misc/vcp +fno-common -fcommon # RC 25 | app-shells/zsh +Wl,--no-undefined 26 | app-text/a2ps +Wl,--no-undefined 27 | app-text/ghostscript-gpl +Wl,--no-undefined 28 | app-text/stardict +Wl,--no-undefined 29 | app-text/texlive-core +fno-common -fcommon 30 | app-text/xpdf +Wl,--no-undefined 31 | dev-db/mariadb-connector-c +Wl,--no-undefined 32 | dev-debug/systemtap +Wl,--no-undefined 33 | dev-java/openjdk +Wl,--no-undefined 34 | dev-lang/perl +Wl,--no-undefined 35 | dev-lang/python +Wl,--no-undefined 36 | dev-lang/rust +Wl,--no-undefined 37 | dev-libs/appstream-glib +Wl,--no-undefined 38 | dev-libs/glib +Wl,--no-undefined 39 | dev-libs/gobject-introspection +Wl,--no-undefined 40 | dev-libs/libevent +Wl,--no-undefined 41 | dev-libs/libxml2 +Wl,--no-undefined 42 | dev-libs/libxslt +Wl,--no-undefined 43 | dev-libs/tree-sitter-bash +Wl,--no-undefined 44 | dev-libs/weston +Wl,--no-undefined 45 | dev-perl/* +Wl,--no-undefined 46 | dev-python/* +Wl,--no-undefined 47 | dev-tcltk/tkimg +fno-common -fcommon # PO 48 | dev-util/android-tools +fno-common -fcommon # RC 49 | games-arcade/emilia-pinball +Wl,--no-undefined 50 | games-arcade/primateplunge +fno-common -fcommon # RC 51 | games-arcade/rocksndiamonds +fno-common -fcommon # RC 52 | games-arcade/xrick +fno-common -fcommon # RC 53 | games-emulation/advancemame +fno-common -fcommon # RC 54 | games-engines/frotz +fno-common -fcommon # RC 55 | games-fps/doomsday +fno-common -fcommon # PO 56 | games-fps/prboom-plus +fno-common -fcommon # RC 57 | games-rpg/freedroid +fno-common -fcommon # RC 58 | gui-libs/wayfire-plugins-extra +Wl,--no-undefined 59 | gui-wm/wayfire +Wl,--no-undefined 60 | llvm-core/llvm +fno-common -fcommon +Wl,--no-undefined # NC 61 | mail-client/claws-mail +Wl,--no-undefined 62 | mail-client/mailx +fno-common -fcommon # RC 63 | mail-client/thunderbird +fno-common -fcommon # PO 64 | mail-filter/maildrop +Wl,--no-undefined 65 | media-gfx/fontforge +Wl,--no-undefined 66 | media-gfx/graphviz +Wl,--no-undefined 67 | media-gfx/ipe +Wl,--no-undefined 68 | media-gfx/pqiv +Wl,--no-undefined 69 | media-libs/avidemux-plugins +Wl,--no-undefined 70 | media-libs/freeglut +Wl,--no-undefined 71 | media-libs/giflib +Wl,--no-undefined 72 | media-libs/imlib2 +Wl,--no-undefined 73 | media-libs/kvazaar +Wl,--no-undefined 74 | media-libs/libcanberra +Wl,--no-undefined 75 | media-libs/libcanberra-gtk3 +Wl,--no-undefined 76 | media-libs/libquicktime +Wl,--no-undefined 77 | media-libs/libreplaygain +Wl,--no-undefined 78 | media-libs/libv4l +Wl,--no-undefined 79 | #media-libs/mesa +fno-common -fcommon # NC 80 | media-libs/plotutils +Wl,--no-undefined 81 | media-libs/sg +fno-common -fcommon # PO 82 | media-plugins/live +Wl,--no-undefined 83 | media-sound/audacity +fno-common -fcommon # PO 84 | media-sound/musepack-tools +fno-common -fcommon # RC 85 | media-sound/toolame +fno-common -fcommon # RC 86 | media-tv/linuxtv-dvb-apps +Wl,--no-undefined 87 | media-tv/nvtv +fno-common -fcommon # RC 88 | media-tv/tvheadend +fno-common -fcommon # PO 89 | media-tv/w_scan +fno-common -fcommon # RC 90 | media-video/avidemux +Wl,--no-undefined 91 | media-video/ffmpeg +fno-common -fcommon # -fno-common causes runtime segfaults w/ gcc-8 92 | media-video/ffmpeg-c* +fno-common -fcommon # -fno-common causes runtime segfaults w/ gcc-8 93 | media-video/nvidia-settings +fno-common -fcommon # PO 94 | media-video/vlc +fno-common -fcommon # PO 95 | net-dialup/ppp +Wl,--no-undefined 96 | net-fs/autofs +Wl,--no-undefined 97 | net-libs/libetpan +Wl,--no-undefined # Flags are stored in libetpan-config; breaks compilation of mail-client/claws-mail 98 | net-libs/nghttp2 +Wl,--no-undefined 99 | net-misc/modemmanager +Wl,--no-undefined 100 | net-misc/networkmanager +Wl,--no-undefined 101 | net-misc/nx +fno-common -fcommon # PO 102 | net-misc/streamtuner +Wl,--no-undefined 103 | net-print/libppd +Wl,--no-undefined 104 | net-vpn/networkmanager-openconnect +Wl,--no-undefined 105 | net-vpn/networkmanager-openvpn +Wl,--no-undefined 106 | net-wireless/bluez +Wl,--no-undefined 107 | perl-core/* +Wl,--no-undefined 108 | sci-libs/hdf5 +Wl,--no-undefined 109 | sci-libs/suitesparseconfig +Wl,--no-undefined 110 | sci-mathematics/calc +Wl,--no-undefined 111 | sci-mathematics/octave +Wl,--no-undefined 112 | sci-mathematics/reduce +Wl,--no-undefined 113 | sci-mathematics/scilab +fno-common -fcommon +Wl,--no-undefined # PO 114 | sys-apps/dtc +fno-common -fcommon # PO 115 | sys-apps/portage +Wl,--no-undefined 116 | sys-apps/texinfo +Wl,--no-undefined 117 | sys-apps/the_silver_searcher +fno-common -fcommon # RC 118 | sys-block/parted:0 +Wl,--no-undefined 119 | sys-devel/gcc +Wl,--no-undefined 120 | sys-devel/gettext +Wl,--no-undefined 121 | sys-fs/dd-rescue +Wl,--no-undefined 122 | sys-fs/f2fs-tools +Wl,--no-undefined 123 | sys-fs/lvm2 +Wl,--no-undefined 124 | sys-fs/squashfuse +Wl,--no-undefined 125 | sys-libs/efivar +Wl,--no-undefined 126 | sys-libs/glibc +Wl,--no-undefined 127 | sys-libs/libcap +Wl,--no-undefined # -Wl,--no-undefined breaks with USE=pam 128 | sys-libs/slang +Wl,--no-undefined 129 | sys-power/iasl +fno-common -fcommon # PO 130 | sys-power/nut +Wl,--no-undefined 131 | sys-power/suspend +fno-common -fcommon # PO 132 | www-client/chromium +fno-common -fcommon +Wl,--no-undefined # PO 133 | x11-base/xorg-server +Wl,--no-undefined 134 | x11-drivers/nvidia-drivers +fno-common -fcommon +Wl,--no-undefined # PO 135 | x11-drivers/xf86-* +Wl,--no-undefined 136 | x11-libs/cairo +Wl,--no-undefined 137 | x11-libs/libvdpau +Wl,--no-undefined 138 | x11-misc/slim +Wl,--no-undefined 139 | x11-misc/xfractint +fno-common -fcommon # RC 140 | x11-terms/kitty +Wl,--no-undefined 141 | x11-wm/mutter +fno-common -fcommon # PO 142 | xfce-base/xfce4-settings +Wl,--no-undefined 143 | -------------------------------------------------------------------------------- /package.cflags/flto: -------------------------------------------------------------------------------- 1 | # +flto* 2 | # (implies +fuse-linker-plugin +femit-llvm) or only 3 | # -ffat-lto-objects 4 | # For programs for which -flto-partition=none causes enormous memory usage: 5 | # +flto-partition* 6 | # +flto-odr-type-merging 7 | 8 | # Shortcuts in the comments: 9 | # 10 | # SL means: Package installs static libs (*.a). To avoid problems, we use here 11 | # -ffat-lto-objects 12 | # 13 | # ICE means: Causes the frequent error (usually only on x86, 32 bit): 14 | # /usr/include/bits/stdio2.h:97:10: internal compiler error: Segmentation fault 15 | # It is necessary to add !+flto* 16 | # 17 | # | means: causes the frequent error 18 | # libtool: eval: line ...: syntax error near unexpected token `|' 19 | # 20 | # PIC means: Causes relocation error (usually only on amd64, 64 bit). 21 | # It is necessary to add \~+flto* 22 | # 23 | # PO means: Possibly obsolete line: Package was not emerged since quite a while 24 | 25 | app-arch/brotli \~+flto* # PIC 26 | app-arch/bzip2 +flto* # runtime segfault (PIC relocation) on amd64 and x86 27 | app-arch/lha !+flto* # ICE 28 | app-arch/lz4 +flto* # PIC on amd64 and x86 29 | app-arch/sharutils !+flto* # ICE 30 | app-arch/snappy +flto* 31 | app-arch/tar +flto* # ICE with gcc-7 32 | app-arch/zopfli +flto* 33 | app-backup/dar +flto* # PO 34 | app-crypt/gpgme !+flto* # ICE 35 | app-crypt/p11-kit +flto* # | 36 | app-crypt/pinentry +flto* # segfault with qt6 37 | app-crypt/qca +flto* # PO 38 | app-editors/jed +flto* # PO 39 | app-editors/kile +flto* # PO 40 | app-emulation/bochs +flto* # PO 41 | app-emulation/dosemu !+flto* # ICE 42 | app-emulation/faudio +flto* 43 | app-emulation/vice !+flto* # ICE 44 | app-emulation/wine* +flto* 45 | app-misc/lirc -ffat-lto-objects # PO 46 | app-office/calligra +flto* # PO 47 | app-office/libreoffice +flto-partition* +flto* 48 | app-office/texstudio +flto* 49 | app-portage/portage-utils !+flto* # ICE 50 | app-shells/ksh +flto* # PO 51 | app-shells/zsh +flto* # PIC on amd64 and x86; runtime errors 52 | app-text/a2ps +flto* 53 | app-text/apvlv +flto* # PO 54 | app-text/djview +flto* # runtime segfaults with some versions of qt 55 | app-text/doxygen +flto* # PO 56 | app-text/dvipsk !+flto* # ICE 57 | app-text/ebook-tools +flto* # PIC on amd64 and x86 58 | app-text/enchant +flto* # | 59 | app-text/ghostscript-gpl +flto* 60 | app-text/mupdf \~+flto* # PIC variant 61 | app-text/podofo +flto* # PIC on amd64 and x86 62 | app-text/qpdfview +flto* # runtime segfaults with some versions of qt 63 | app-text/rarian +flto* # PO 64 | app-text/sablotron +flto* # PO 65 | app-text/texlive-core +flto* 66 | app-text/ttf2pk2 !+flto* # ICE 67 | app-text/yodl +flto* # PO 68 | app-text/xpdf +flto* 69 | app-text/zathura* -ffat-lto-objects # PO 70 | dev-build/icmake +flto* # PO 71 | dev-cpp/abseil-cpp +flto* # otherwise users of the library do not link properly 72 | dev-cpp/atkmm +flto* # PO 73 | dev-cpp/cairomm +flto* # PO 74 | dev-cpp/gtkmm +flto* # PO 75 | dev-cpp/libxmlpp +flto* # PO 76 | dev-cpp/pangomm +flto* # PO 77 | dev-db/mariadb-connector-c +flto* 78 | dev-db/sqlcipher !+flto* # ICE 79 | dev-db/sqlite !+flto* # ICE 80 | dev-db/unixODBC !+flto* # ICE 81 | dev-debug/gdb +flto* # duplicate symbol with gcc-7 82 | dev-debug/valgrind -ffat-lto-objects # PO 83 | dev-games/physfs \~+flto* # PIC 84 | dev-java/openjdk +flto* 85 | dev-lang/execline +flto* # PO 86 | dev-lang/mujs -ffat-lto-objects # SL 87 | dev-lang/orc +flto* # PO 88 | dev-lang/perl +flto* 89 | dev-lang/python +flto* # would be enough, but e.g. media-sound/lilypond adds all python flags and then has ICE 90 | dev-lang/ruby +flto* # PO 91 | dev-lang/rust +flto* 92 | dev-lang/spidermonkey +flto* 93 | dev-lang/tcl -ffat-lto-objects # SL 94 | dev-lang/tk -ffat-lto-objects # SL 95 | dev-lang/yasm !+flto* # ICE 96 | dev-libs/appstream-glib +flto* # | 97 | dev-libs/boost -ffat-lto-objects # SL 98 | dev-libs/botan +flto* # PO Needed for monotone to compile 99 | dev-libs/dbus-glib +flto* # | 100 | dev-libs/elfutils +flto* 101 | dev-libs/ffcall +flto* 102 | dev-libs/fribidi +flto* # | 103 | dev-libs/glib !+flto* # ICE 104 | dev-libs/gobject-introspection +flto* # | 105 | dev-libs/jansson +flto* # | 106 | dev-libs/libaio +flto* # PO 107 | dev-libs/libatomic_ops -ffat-lto-objects # SL 108 | dev-libs/libbsd +flto* 109 | dev-libs/libgcrypt +flto* # PIC 110 | dev-libs/libisoburn !+flto* # ICE 111 | dev-libs/libksba !+flto* # ICE 112 | dev-libs/libltdl +flto* # Needed for e.g. media-sound/lilypond, net-libs/gnutls 113 | dev-libs/libpcre !+flto* # ICE 114 | dev-libs/libsigsegv \~+flto* # PIC 115 | dev-libs/libmspack +flto* # | 116 | dev-libs/libxml2 !+flto* # ICE 117 | dev-libs/lzo -ffat-lto-objects # SL 118 | net-libs/mbedtls +flto* 119 | dev-libs/nss -ffat-lto-objects # SL 120 | dev-libs/ppl +flto* # PO 121 | dev-libs/redland +flto* 122 | dev-libs/skalibs +flto* # PO 123 | dev-libs/wayland +flto* 124 | dev-libs/weston +flto* 125 | dev-lisp/clisp +flto* 126 | dev-python/dbus-python +flto* # | 127 | dev-python/pygobject +flto* # | 128 | dev-qt/* +flto* # Various runtime and link issues without these 129 | dev-tcltk/expect +flto* # PO 130 | dev-tex/bibtexu !+flto* # ICE 131 | dev-util/android-tools !+flto* # ICE 132 | dev-util/ccache +flto* 133 | dev-util/dialog -ffat-lto-objects # SL 134 | dev-util/dirdiff +flto* # PIC 135 | dev-util/pkgconf +flto* # | 136 | dev-util/schroot +flto* # PO 137 | dev-vcs/cvs -ffat-lto-objects # PO 138 | dev-vcs/git !+flto* # ICE 139 | dev-vcs/rcs +flto* # ICE with gcc-7 140 | dev-vcs/subversion +flto* # PO 141 | games-arcade/lbreakout +flto* # gcc-8 (and ICE on x86) 142 | games-arcade/supertux +flto* 143 | games-arcade/xboing !+flto* # ICE 144 | games-board/xboard +flto* # PO 145 | games-emulation/advancemame +flto-partition* !+flto* # ICE 146 | games-emulation/sdlmame +flto-partition* +flto* # not necessary, but enormous compile time and memory usage w/ occassional strange crashes 147 | games-emulation/xmame +flto-partition* !+flto* # ICE 148 | games-emulation/xmess !+flto* # ICE 149 | games-engines/freesci +flto* # ICE on x86; undefined reference with gcc-7 150 | games-engines/scummvm +flto* 151 | games-engines/scummvm-tools +flto* # PO 152 | games-fps/doomsday +flto* # PO 153 | games-puzzle/enigma +flto* # PO 154 | games-puzzle/lmarbles !+flto* # ICE 155 | gnome-base/gnome-desktop +flto* # | 156 | gnome-base/libglade +flto* # | 157 | gnome-base/librsvg +flto* # | 158 | kde-apps/k3b +flto* # PO 159 | llvm-core/clang +flto-partition* # -flto needs >3GB here 160 | llvm-core/lld +flto* # emerge =llvm-runtimes/compiler-rt-14.0.6 fails without this: https://bugs.gentoo.org/862798 161 | llvm-core/llvm +flto* # PIC 162 | llvm-runtimes/compiler-rt +flto* 163 | llvm-runtimes/libcxxabi +flto* 164 | mail-client/claws-mail !+flto* # ICE 165 | mail-client/thunderbird +flto-partition* +flto* 166 | media-gfx/fontforge !+flto* # ICE 167 | media-gfx/graphicsmagick +flto* # | 168 | media-gfx/graphviz !+flto* # ICE-type of a different kind 169 | media-gfx/imagemagick +flto* # | 170 | media-gfx/ipe +flto* 171 | media-gfx/transfig !+flto* # ICE 172 | media-gfx/xfig !+flto* # ICE 173 | media-libs/aften +flto* # ICE and strange errors on amd64 174 | media-libs/alsa-lib +flto* 175 | media-libs/avidemux-core +flto* # Needed for media-video/avidemux 176 | media-libs/avidemux-plugins +flto* 177 | media-libs/dav1d +flto* 178 | media-libs/flac +flto* 179 | media-libs/glu +flto* # | 180 | media-libs/gstreamer +flto* # | 181 | media-libs/gst-plugins-base +flto* # | 182 | media-libs/libbluray +flto* # | 183 | media-libs/libdv !+flto* # PIC with gcc-7 184 | media-libs/libdvbpsi +flto* # PO 185 | media-libs/libdvdnav +flto* # | 186 | media-libs/libdvdread +flto* # | 187 | media-libs/liblastfm +flto* # PO 188 | media-libs/libmodplug +flto* # PO 189 | media-libs/libsdl2 -ffat-lto-objects # SL 190 | media-libs/libsfml +flto* # runtime problems, e.g. etr: undefined symbol: __cpu_model 191 | media-libs/libwebp !+flto* # ICE 192 | media-libs/mesa +flto* # ICE for x86, runtime errors for amd64 193 | media-libs/musicbrainz +flto* # PO 194 | media-libs/netpbm !+flto* # ICE 195 | media-libs/phonon +flto* # PO 196 | media-libs/plotutils !+flto* # ICE 197 | media-libs/portaudio +flto* # | 198 | media-libs/speex !+flto* # ICE 199 | media-libs/x264 -ffat-lto-objects 200 | media-sound/apulse \~+flto* # PIC 201 | media-sound/audacity +flto* # PO 202 | media-sound/audex +flto* # PO 203 | media-sound/cdparanoia +flto* # PO 204 | media-sound/gsm \~+flto* # PIC 205 | media-sound/lilypond !+flto* # ICE 206 | media-sound/mpg123 +flto* # | 207 | media-sound/musepack-tools +flto* # PIC; on x86 failure if default pie is enabled 208 | media-sound/pulseaudio +flto* # PO 209 | media-sound/pulseaudio-daemon +flto* # PO 210 | media-sound/qmmp +flto* # PO 211 | media-sound/sox +flto* # | 212 | media-sound/timidity++ !+flto* # ICE 213 | media-sound/wavpack +flto* # | 214 | media-sound/xmms2 +flto* # PO 215 | media-tv/linuxtv-dvb-apps \~+flto* # PIC 216 | media-video/avidemux +flto* 217 | media-video/dirac +flto* # PO 218 | media-video/ffmpeg +flto* 219 | media-video/ffmpeg-c* +flto* 220 | media-video/ffmpegthumbnailer +flto* # PO 221 | media-video/kaffeine +flto* # PO 222 | media-video/mplayer !+flto* # ICE 223 | media-video/nvidia-settings +flto* # PO 224 | media-video/vdr +flto* # PO 225 | media-video/vlc +flto* # PO 226 | media-video/xine-ui !+flto* # ICE 227 | net-analyzer/wireshark +flto* # PO 228 | net-fs/autofs +flto* # runtime error (PIC type) 229 | net-ftp/lftp +flto* # PO 230 | net-im/qtox +flto* # violation of one definition rule 231 | net-libs/glib-networking +flto* # | 232 | net-libs/libmbim +flto* # | 233 | net-libs/libsrtp +flto* # PO 234 | net-libs/libssh2 +flto* # | 235 | net-libs/nodejs +flto* # causes runtime errors w/ gcc-11 and x86 236 | net-misc/curl +flto* # | 237 | net-misc/modemmanager +flto* # | 238 | net-misc/netkit-telnetd !+flto* # ICE 239 | net-misc/nx +flto* # PO 240 | net-misc/nxserver-freenx +flto* # PO 241 | net-nds/openldap !+flto* # ICE 242 | net-p2p/qbittorrent +flto* 243 | net-p2p/ktorrent +flto* # PO 244 | net-print/cups-filters !+flto* # ICE 245 | net-voip/yate +flto* # PO 246 | net-wireless/wireless-tools +flto* # PIC (with gcc-7 also on x86) 247 | sci-libs/gdal !+flto* # ICE 248 | sci-libs/qrupdate +flto* # PO 249 | sci-mathematics/calc +flto* 250 | sci-mathematics/genius +flto* # PO 251 | sci-mathematics/glpk +flto* # PO 252 | sci-mathematics/lpsolve +flto* # linking produces sporadically no lib 253 | sci-mathematics/octave +flto* # __base_dtor not found 254 | sci-mathematics/scilab !+flto* # ICE 255 | sci-mathematics/yacas !+flto* # ICE 256 | sys-apps/busybox !+flto* # ICE 257 | sys-apps/coreutils +flto* # ICE with gcc-7 258 | sys-apps/dchroot +flto* # gcc-8 259 | sys-apps/dtc +flto* # PO 260 | sys-apps/gawk !+flto* # ICE 261 | sys-apps/grep +flto* # ICE with gcc-7 262 | sys-apps/iproute2 -ffat-lto-objects # SL 263 | sys-apps/s6 +flto* # PO 264 | sys-apps/sandbox +flto* 265 | sys-apps/tcp-wrappers -ffat-lto-objects # PO 266 | sys-apps/util-linux !+flto* # ICE 267 | sys-auth/polkit +flto* # PO 268 | sys-auth/polkit-qt +flto* # PO 269 | sys-boot/syslinux +flto* 270 | sys-devel/bison +flto* # ICE with gcc-7 271 | sys-devel/flex -ffat-lto-objects # SL 272 | sys-devel/gcc +flto* 273 | sys-devel/gettext +flto* # with gcc-7 + gold: undefined reference 274 | sys-fs/android-file-transfer-linux +flto* 275 | sys-fs/dd-rescue +flto* 276 | sys-fs/fuse-common +flto* # https://bugs.gentoo.org/show_bug.cgi?id=650874 277 | sys-fs/fuse +flto* # https://bugs.gentoo.org/show_bug.cgi?id=650874 278 | sys-fs/mtools !+flto* # ICE 279 | sys-fs/udisks +flto* # PO 280 | sys-libs/binutils-libs +flto* 281 | sys-libs/efivar +flto* 282 | sys-libs/glibc +flto* 283 | sys-libs/ncurses +flto* 284 | sys-power/iasl +flto* # PO 285 | sys-power/upower +flto* # PO 286 | sys-process/numactl +flto* # PO 287 | www-client/chromium +flto-partition* +flto* 288 | www-client/firefox +flto-partition* +flto* 289 | www-client/lynx !+flto* # ICE 290 | x11-base/xorg-server +flto* 291 | x11-drivers/xf86-video-intel +flto* 292 | x11-drivers/nvidia-drivers +flto* 293 | x11-libs/fltk +flto* # PO 294 | x11-libs/gdk-pixbuf +flto* # | 295 | x11-libs/gtkglext +flto* # PO 296 | x11-libs/libnotify +flto* # | 297 | x11-libs/libwnck +flto* # PO 298 | x11-libs/pango +flto* # | 299 | x11-libs/wxGTK +flto* # PO 300 | x11-libs/xcb-util-cursor +flto* # | 301 | x11-misc/sddm +flto* # does not switch to graphics mode in some settings 302 | x11-misc/slim \~+flto* # PIC 303 | x11-wm/fvwm !+flto* # ICE 304 | x11-wm/mutter +flto* # | 305 | xfce-base/exo +flto* # | 306 | xfce-base/garcon +flto* # PO 307 | xfce-base/libxfce4ui +flto* # | 308 | xfce-base/libxfce4util +flto* # | 309 | xfce-base/thunar +flto* # | 310 | xfce-base/xfconf +flto* # | 311 | xfce-base/xfce4-panel +flto* # | 312 | -------------------------------------------------------------------------------- /package.cflags/gcc: -------------------------------------------------------------------------------- 1 | # Special configurations/patches for current gcc versions 2 | # Typical examples for gcc-6 or newer: 3 | # -flifetime-dse=1 4 | # -fno-delete-null-pointer-checks 5 | # -std=gnu++98 6 | # Or switch to clang_ 7 | # 'export CXX=clang++ CC=clang' 8 | -------------------------------------------------------------------------------- /package.cflags/gold: -------------------------------------------------------------------------------- 1 | # Fix issues with the gold or lld linker 2 | 3 | app-arch/lrzip -fuse-ld=bfd 4 | dev-libs/jansson -fuse-ld=bfd 5 | media-plugins/live -fuse-ld=bfd 6 | media-video/avidemux LDFLAGS+=-lXext 7 | net-libs/nodejs -fuse-ld=bfd 8 | =sci-mathematics/scilab-5.5.2-r1 -fuse-ld=bfd 9 | sys-devel/gcc -fuse-ld=bfd 10 | www-client/firefox +Wl,--relax 11 | -------------------------------------------------------------------------------- /package.cflags/graphite: -------------------------------------------------------------------------------- 1 | # +fgraphite* +floop-* 2 | # 3 | # This file is outdated and currently not maintained: 4 | # mv experienced too many runtime issues with graphite that he decided 5 | # that for running a stable system this is not worth all the trouble 6 | 7 | app-editors/vim +fgraphite* +floop-* 8 | app-emulation/vice +fgraphite* +floop-* 9 | app-office/libreoffice +fgraphite* +floop-* 10 | app-shells/bash +fgraphite* +floop* 11 | app-text/texlive-core +fgraphite* +floop* 12 | dev-java/icedtea* +fgraphite* +floop-* 13 | dev-java/openjdk +fgraphite* +floop-* 14 | dev-lang/python +fgraphite* +floop-* 15 | dev-lang/rust +fgraphite* +floop-* 16 | dev-lang/tcl +fgraphite* +floop-* 17 | dev-libs/icu +fgraphite* +floop* 18 | dev-qt/qtcore +fgraphite* +floop-* 19 | dev-qt/qtscript +fgraphite* +floop-* 20 | games-emulation/dosbox +fgraphite* +floop-* 21 | games-rpg/freedroidrpg +fgraphite* +floop-* 22 | llvm-core/lld +fgraphite* +floop-* 23 | llvm-core/llvm +fgraphite* +floop-* 24 | mail-client/thunderbird +fgraphite* +floop-* 25 | media-gfx/gimp +fgraphite* +floop-* 26 | media-libs/libcaca +fgraphite* +floop-* 27 | media-sound/audacity +fgraphite* +floop-* 28 | media-sound/timidity++ +fgraphite* +floop-* 29 | sci-mathematics/octave +fgraphite* +floop-* 30 | sys-fs/encfs +fgraphite* +floop-* 31 | www-client/firefox +fgraphite* +floop-* 32 | -------------------------------------------------------------------------------- /package.cflags/lowmem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaeth/portage-env-mv/efb452d275367745bb4cef7c98cccd0ab3e16fe4/package.cflags/lowmem -------------------------------------------------------------------------------- /package.cflags/no-add: -------------------------------------------------------------------------------- 1 | # packages requiring NOLDADD=1 or even MESONDEDUP=1 2 | 3 | app-admin/fam NOLDADD=1 4 | app-portage/eix MESONDEDUP=1 5 | app-text/a2ps NOLDADD=1 6 | dev-lisp/clisp NOLDADD=1 7 | dev-vcs/subversion NOLDADD=1 8 | media-gfx/gimp NOLDADD=1 9 | media-gfx/pstoedit NOLDADD=1 10 | media-libs/a52dec NOLDADD=1 11 | media-libs/id3lib NOLDADD=1 12 | media-libs/ladspa-sdk NOLDADD=1 13 | media-libs/libid3tag NOLDADD=1 14 | media-libs/libmad NOLDADD=1 15 | media-libs/libmpeg2 NOLDADD=1 16 | media-libs/xine-lib NOLDADD=1 17 | media-video/mplayer NOLDADD=1 18 | net-ftp/ncftp NOLDADD=1 19 | net-libs/wvstreams NOLDADD=1 20 | sys-block/parted NOLDADD=1 21 | sys-devel/gcc NOLDADD=1 22 | sys-fs/sysfsutils NOLDADD=1 23 | www-client/chromium NOLDADD=1 24 | x11-libs/wxGTK NOLDADD=1 25 | -------------------------------------------------------------------------------- /package.cflags/no-ninja: -------------------------------------------------------------------------------- 1 | # packages not compiling with CMAKE_MAKEFILE_GENERATOR=ninja 2 | # https://bugs.gentoo.org/show_bug.cgi?id=557992 3 | 4 | dev-build/cmake "unset CMAKE_MAKEFILE_GENERATOR" 5 | games-arcade/supertux "unset CMAKE_MAKEFILE_GENERATOR" 6 | kde-apps/kate "unset CMAKE_MAKEFILE_GENERATOR" 7 | kde-apps/gwenview "unset CMAKE_MAKEFILE_GENERATOR" 8 | media-libs/avidemux-core "unset CMAKE_MAKEFILE_GENERATOR" 9 | media-libs/avidemux-plugins "unset CMAKE_MAKEFILE_GENERATOR" 10 | media-video/avidemux "unset CMAKE_MAKEFILE_GENERATOR" 11 | media-video/kaffeine "unset CMAKE_MAKEFILE_GENERATOR" 12 | sci-mathematics/reduce "unset CMAKE_MAKEFILE_GENERATOR" 13 | -------------------------------------------------------------------------------- /package.cflags/patches: -------------------------------------------------------------------------------- 1 | # Special configurations/patches 2 | # Martin sets here variables which are useful or need to be set 3 | # for our configuration (e.g. special printers/arches, EXTRA_* variables, 4 | # also bugfixes which can be made e.g. by adding a library to LDFLAGS). 5 | # 6 | # This file does not include modifications of CFLAGS/variables which 7 | # override our general global settings; those go into all-systems. 8 | 9 | =app-emulation/dosemu-1.4.1_pre20130107* -std=gnu17 10 | #app-misc/lirc "LIRC_OPTS='--with-driver=pctv'" 11 | =app-text/a2ps-4.15.6* -std=gnu17 12 | app-text/pinfo "EXTRA_EMAKE+=WFLAGS=-Wno-error" # undo -Werror which breaks compilation 13 | app-text/u2ps "EXTRA_EMAKE+='SHELL=/bin/bash'" 14 | =app-text/uudeview-0.5.20* -std=gnu17 15 | dev-java/openjdk "ulimit -c unlimited" 16 | dev-lang/rust "export SHELL=/bin/sh" 17 | dev-libs/libpcre2 -mshstk 18 | dev-libs/libsodium !"export enable_pie=no" 19 | =dev-libs/uulib-0.5.20* -std=gnu17 20 | dev-perl/Clone "export mymake='DEFINE=-D_LARGEFILE64_SOURCE'" # -D_LARGEFILE64_SOURCE is filtered by the ebuild but *MUST* be used. 21 | =games-arcade/xgalaga-2.1.1.0* -std=gnu17 22 | =games-emulation/advancemame-3.9* -std=gnu17 23 | =games-rpg/freedroid-1.2.3* -std=gnu17 24 | mail-client/thunderbird "export SHELL=/bin/sh" 25 | media-gfx/gimp "EXTRA_EMAKE+='SHELL=/bin/bash'" 26 | media-gfx/potrace "export CC=gcc" # otherwise clang is used for compilation if available 27 | media-gfx/xfig -std=gnu17 28 | =media-gfx/xsane-0.999* -std=gnu17 29 | #media-libs/freetype -DFT_CONFIG_OPTION_OLD_INTERNALS # needed for nxclient unless ebuild is patched 30 | media-libs/libmikmod "EXTRA_EMAKE+='SHELL=/bin/bash'" 31 | media-libs/libsdl "export CONFIG_SHELL=/bin/bash" # https://bugs.gentoo.org/714094 32 | =media-libs/plotutils-2.6* -std=gnu17 33 | =media-video/nvidia-settings-173.14.37 -ldl 34 | net-libs/c-client -lcrypt 35 | =net-nntp/slrn-1.0.3* -std=gnu17 36 | net-misc/nxserver-freenx "EXTRA_EMAKE+='SHELL=/bin/bash'" 37 | =net-misc/streamtuner-0.99.99* -std=gnu17 38 | net-misc/wget "EXTRA_ECONF+='--disable-xattr'" # disable storing of useless information in xattr 39 | sci-mathematics/fricas EXTRA_ECONF+='--with-gmp= --disable-gmp' # --without-gmp from the ebuild does not work https://bugs.gentoo.org/show_bug.cgi?id=650788 40 | =sys-apps/clrngd-1.0.3* -std=gnu17 41 | www-client/firefox "export SHELL=/bin/sh" 42 | x11-libs/gtk+ "EXTRA_EMAKE+='SHELL=/bin/bash'" 43 | x11-misc/stalonetray "EXTRA_EMAKE+='SHELL=/bin/bash'" 44 | =x11-misc/xlockmore-5.71* -std=gnu17 45 | -------------------------------------------------------------------------------- /package.cflags/pie: -------------------------------------------------------------------------------- 1 | # +fPIE +pie -fno-PIE -no-pie 2 | 3 | *-libs/* +fPIE +pie 4 | *-plugins/* +fPIE +pie 5 | 6 | app-accessibility/at-spi2-atk +fPIE +pie 7 | app-accessibility/at-spi2-core +fPIE +pie 8 | app-admin/sudo !+fPIE !+pie 9 | app-arch/arj +fPIE +pie 10 | app-arch/lrzip +fPIE +pie 11 | app-arch/lz4 +fPIE +pie 12 | app-arch/p7zip +fPIE +pie 13 | app-arch/snappy +fPIE +pie 14 | app-arch/unrar +fPIE +pie 15 | app-arch/xz-utils !+fPIE !+pie 16 | app-arch/zpaq +fPIE +pie 17 | app-arch/zstd +fPIE +pie 18 | app-crypt/argon2 +fPIE +pie 19 | app-crypt/gcr +fPIE +pie 20 | app-crypt/gpgme +fPIE +pie 21 | app-crypt/libsecret +fPIE +pie 22 | app-crypt/p11-kit +fPIE +pie 23 | app-crypt/pinentry +fPIE +pie 24 | app-crypt/rhash +fPIE +pie 25 | app-cdr/cdrtools +fPIE +pie 26 | app-cdr/xcdroast +fPIE +pie 27 | app-cdr/xfburn !+fPIE !+pie 28 | app-emulation/dosemu +fPIE +pie 29 | app-emulation/vice +fPIE +pie 30 | app-emulation/wine* +fPIE +pie 31 | app-forensics/chkrootkit +fPIE +pie 32 | app-misc/lirc +fPIE +pie 33 | app-misc/mc !+fPIE !+pie 34 | app-office/libreoffice +fPIE +pie 35 | app-portage/eix \~+fPIE \~+pie 36 | app-shells/bash +fPIE +pie 37 | app-shells/ksh +fPIE +pie 38 | app-shells/schily-tools +fPIE +pie 39 | app-text/aspell +fPIE +pie 40 | app-text/crengine-ng +fPIE +pie 41 | app-text/djview !+fPIE !+pie 42 | app-text/djvu +fPIE +pie 43 | app-text/doxygen +fPIE +pie 44 | app-text/dvipsk !+fPIE !+pie 45 | app-text/enchant !+fPIE !+pie 46 | app-text/ghostscript-gpl +fPIE +pie 47 | app-text/hunspell +fPIE +pie 48 | app-text/libabw +fPIE +pie 49 | app-text/libebook +fPIE +pie 50 | app-text/libepubgen +fPIE +pie # won't hurt although !+fPIE !+pie might be sufficient 51 | app-text/libetonyek +fPIE +pie 52 | app-text/libmspub +fPIE +pie 53 | app-text/libmwaw +fPIE +pie 54 | app-text/libnumbertext +fPIE +pie 55 | app-text/libodfgen +fPIE +pie 56 | app-text/libqxp +fPIE +pie # won't hurt although !+fPIE !+pie might be sufficient 57 | app-text/libstaroffice +fPIE +pie 58 | app-text/libwpd +fPIE +pie 59 | app-text/libwpg +fPIE +pie 60 | app-text/libwps +fPIE +pie 61 | app-text/mupdf +fPIE +pie 62 | app-text/mythes +fPIE +pie 63 | app-text/poppler +fPIE +pie 64 | app-text/ps2pkm !+fPIE !+pie 65 | app-text/qpdf +fPIE +pie 66 | app-text/qpdfview +fPIE +pie 67 | app-text/rarian +fPIE +pie 68 | app-text/recode !+fPIE !+pie 69 | app-text/sablotron +fPIE +pie 70 | app-text/stardict +fPIE +pie 71 | app-text/teckit +fPIE +pie 72 | app-text/texlive-core +fPIE +pie 73 | app-text/ttf2pk2 !+fPIE !+pie 74 | app-text/xdvik !+fPIE !+pie 75 | app-text/zathura-* +fPIE +pie 76 | dev-build/libtool !+fPIE !+pie 77 | dev-cpp/* +fPIE +pie 78 | dev-db/sqlite +fPIE +pie 79 | dev-db/unixODBC !+fPIE !+pie 80 | dev-debug/gdb +fPIE +pie 81 | dev-debug/systemtap +fPIE +pie 82 | dev-games/flatzebra +fPIE +pie 83 | dev-games/physfs +fPIE +pie 84 | dev-java/openjdk +fPIE +pie 85 | dev-lang/lua +fPIE +pie 86 | dev-lang/mujs +fPIE +pie 87 | dev-lang/orc !+fPIE !+pie 88 | dev-lang/python +fPIE +pie 89 | dev-lang/perl +fPIE +pie 90 | dev-lang/rust +fPIE +pie 91 | dev-lang/spidermonkey +fPIE +pie 92 | dev-lang/tcl +fPIE +pie 93 | dev-lang/tk +fPIE +pie 94 | dev-libs/gmp +fPIE +pie 95 | dev-libs/libtasn1 +fPIE +pie 96 | dev-perl/* +fPIE +pie 97 | dev-python/* +fPIE +pie 98 | dev-qt/qt* +fPIE +pie 99 | dev-tcltk/expect +fPIE +pie 100 | dev-tex/bibtexu !+fPIE !+pie 101 | dev-texlive/texlive-metapost !+fPIE !+pie 102 | dev-util/bdelta +fPIE +pie 103 | dev-util/cbindgen +fPIE +pie 104 | dev-util/cppunit +fPIE +pie 105 | dev-util/glslang +fPIE +pie 106 | dev-util/spirv-llvm-translator +fPIE +pie 107 | dev-util/spirv-tools +fPIE +pie 108 | dev-util/pkgcheck +fPIE +pie 109 | games-action/gltron +fPIE +pie 110 | games-arcade/burgerspace !+fPIE !+pie 111 | games-arcade/xtux +fPIE +pie 112 | games-emulation/sdlmame +fPIE +pie 113 | games-engines/box2d +fPIE +pie 114 | games-rpg/aklabeth +fPIE +pie 115 | gnome-base/dconf +fPIE +pie 116 | gnome-base/gsettings-desktop-schemas +fPIE +pie 117 | gnome-base/libglade !+fPIE !+pie 118 | gnome-base/librsvg +fPIE +pie 119 | gui-wm/wayfire +fPIE +pie 120 | kde-frameworks/* +fPIE +pie 121 | llvm-core/clang +fPIE +pie 122 | llvm-core/lld +fPIE +pie 123 | mail-client/claws-mail +fPIE +pie 124 | mail-client/thunderbird +fPIE +pie 125 | media-gfx/exiv2 +fPIE +pie 126 | media-gfx/fontforge +fPIE +pie 127 | media-gfx/gimp !+fPIE !+pie 128 | media-gfx/graphicsmagick +fPIE +pie 129 | media-gfx/graphviz +fPIE +pie 130 | media-gfx/imagemagick +fPIE +pie 131 | media-gfx/ipe +fPIE +pie 132 | media-gfx/pstoedit !+fPIE !+pie 133 | media-gfx/pqiv +fPIE +pie 134 | media-gfx/sane-backends !+fPIE !+pie 135 | media-sound/gsm !+fPIE !+pie # gcc-7 136 | media-sound/lame !+fPIE !+pie 137 | media-sound/lilypond +fPIE +pie 138 | media-sound/mpg123 !+fPIE !+pie 139 | media-sound/ogmtools +fPIE +pie 140 | media-sound/pulseaudio +fPIE +pie 141 | media-sound/pulseaudio-daemon +fPIE +pie 142 | media-sound/vorbis-tools !+fPIE !+pie 143 | media-sound/wavpack !+fPIE !+pie 144 | media-tv/linuxtv-dvb-apps !+fPIE !+pie # gcc-7 145 | media-tv/nvtv +fPIE +pie 146 | media-video/cclive !+fPIE !+pie 147 | media-video/ffmpeg +fPIE +pie 148 | media-video/ffmpeg-c* +fPIE +pie 149 | media-video/handbrake +fPIE +pie 150 | media-video/mjpegtools +fPIE +pie 151 | media-video/mpv +fPIE +pie 152 | media-video/pipewire +fPIE +pie 153 | media-video/qmplay2 +fPIE +pie 154 | media-video/rtmpdump +fPIE +pie 155 | media-video/vcdimager !+fPIE !+pie 156 | media-video/vlc +fPIE +pie 157 | media-video/wireplumber +fPIE +pie 158 | net-analyzer/wireshark !+fPIE !+pie 159 | net-dialup/ppp +fPIE +pie 160 | net-dns/libidn !+fPIE !+pie 161 | net-dns/host +fPIE +pie 162 | net-dns/unbound !+fPIE !+pie 163 | net-firewall/iptables +fPIE +pie 164 | net-fs/autofs +fPIE +pie 165 | #net-im/utox +fPIE +pie 166 | net-misc/connman !+fPIE !+pie 167 | net-misc/curl !+fPIE !+pie 168 | net-misc/modemmanager +fPIE +pie 169 | net-misc/networkmanager +fPIE +pie 170 | net-misc/nx +fPIE +pie 171 | net-nds/openldap !+fPIE !+pie 172 | net-print/cups +fPIE +pie 173 | net-print/cups-filters !+fPIE !+pie 174 | net-print/libcupsfilters +fPIE +pie 175 | net-print/libppd +fPIE +pie 176 | net-vpn/openvpn +fPIE +pie 177 | perl-core/* +fPIE +pie 178 | sci-mathematics/calc +fPIE +pie 179 | sci-mathematics/ginac +fPIE +pie 180 | sci-mathematics/octave +fPIE +pie 181 | sci-mathematics/pari +fPIE +pie 182 | sci-mathematics/reduce +fPIE +pie 183 | sci-mathematics/scilab +fPIE +pie 184 | sci-mathematics/yacas +fPIE +pie 185 | sci-visualization/gnuplot +fPIE +pie 186 | sys-apps/busybox +fPIE +pie 187 | sys-apps/coreutils +fPIE +pie 188 | sys-apps/dbus +fPIE +pie 189 | sys-apps/elfix !+fPIE !+pie 190 | sys-apps/file !+fPIE !+pie 191 | sys-apps/kmod !+fPIE !+pie 192 | sys-apps/openrc +fPIE +pie 193 | sys-apps/pciutils +fPIE +pie 194 | sys-apps/portage +fPIE +pie 195 | sys-apps/sandbox +fPIE +pie 196 | sys-apps/systemd +fPIE +pie 197 | sys-apps/usbutils !+fPIE !+pie 198 | sys-apps/util-linux !+fPIE !+pie 199 | sys-auth/elogind +fPIE +pie 200 | sys-auth/seatd +fPIE +pie 201 | sys-boot/syslinux +fPIE +pie 202 | sys-devel/autogen !+fPIE !+pie 203 | sys-devel/flex !+fPIE !+pie 204 | sys-devel/gcc +fPIE +pie 205 | sys-devel/gettext !+fPIE !+pie 206 | sys-fs/android-file-transfer-linux +fPIE +pie 207 | sys-fs/cryptsetup !+fPIE !+pie 208 | sys-fs/e2fsprogs +fPIE +pie 209 | sys-fs/encfs +fPIE +pie 210 | sys-fs/ext4magic !+fPIE !+pie 211 | sys-fs/fuse +fPIE +pie 212 | sys-fs/fuse-common +fPIE +pie 213 | sys-fs/lvm2 +fPIE +pie 214 | sys-fs/udftools !+fPIE !+pie 215 | sys-power/cpupower +fPIE +pie 216 | sys-power/nut +fPIE +pie 217 | sys-power/upower +fPIE +pie 218 | sys-process/htop !+fPIE !+pie 219 | sys-process/procps !+fPIE !+pie 220 | sys-process/tiptop !+fPIE !+pie 221 | www-client/chromium +fPIE +pie 222 | www-client/firefox +fPIE +pie 223 | x11-base/xorg-server +fPIE +pie 224 | x11-drivers/* !+fPIE !+pie 225 | x11-misc/slim +fPIE +pie 226 | x11-misc/xfractint +fPIE +pie 227 | x11-terms/kitty +fPIE +pie 228 | x11-wm/fvwm +fPIE +pie 229 | x11-wm/xpra +fPIE +pie 230 | xfce-base/exo !+fPIE !+pie 231 | xfce-base/thunar !+fPIE !+pie 232 | -------------------------------------------------------------------------------- /package.cflags/spectre: -------------------------------------------------------------------------------- 1 | # Packages for which spectre mitigation hurts: 2 | # +fno-plt 3 | # +mindirect-branch* # -mindirect-branch=thunk -mindirect-branch-register 4 | # +mfunction-return* # -mfunction-return=thunk 5 | # +Wl,-z,retpolineplt # currently clang only 6 | # +mretpoline # clang only 7 | # +fcf-protection* # gcc-8 8 | # +mharden-sls* # gcc-11 9 | 10 | app-emulation/wine* +fno-plt # compilation fails with unexpected reloc 43 against global symbol strlen without base register in object file when generating a position-independent output file 11 | dev-lang/rust !+fno-plt # compilation segfaults on x86 12 | dev-qt/qtwidgets +mfunction-return=thunk # multiple definition of '__x86_return_thunk' for gcc-8 13 | llvm-core/clang +fno-plt # causes presumably runtime segfaults 14 | llvm-core/lld +fno-plt # causes runtime segfaults 15 | llvm-core/llvm +fno-plt # causes presumably runtime segfaults 16 | llvm-runtimes/compiler-rt +fno-plt # causes presumably runtime segfaults 17 | llvm-runtimes/compiler-rt-sanitizers +fno-plt # causes presumably runtime segfaults 18 | #media-libs/mesa +fno-plt 19 | sys-boot/syslinux +fcf-protection* 20 | sys-libs/glibc +fcf-protection* 21 | www-client/chromium +fno-plt # compilation segfaults 22 | www-client/firefox !+mindirect-branch* +mfunction-return* # compilation segfaults on x86 with "# Will either crash or return exit code 1 if elfhack is broken" 23 | www-client/firefox +mretpoline +Wl,-z,retpolineplt # configure uses gcc 24 | x11-base/xorg-server +fno-plt # symbols might not be found if compiled with -fno-plt 25 | x11-drivers/xf86-* +fno-plt # X might not start if drivers are compiled with -fno-plt 26 | -------------------------------------------------------------------------------- /package.cflags/temporary: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaeth/portage-env-mv/efb452d275367745bb4cef7c98cccd0ab3e16fe4/package.cflags/temporary -------------------------------------------------------------------------------- /package.cflags/test: -------------------------------------------------------------------------------- 1 | app-portage/eix RUSTFLAGS-='-C foo bar' CXXFLAGS-='-C foo bar' 2 | --------------------------------------------------------------------------------