etc-gentoo/paludis/bashrc

203 lines
6.3 KiB
Bash

# bashrc
## global settings
CC=x86_64-pc-linux-gnu-gcc
CXX=x86_64-pc-linux-gnu-g++
CFLAGS="-march=core-avx2 -O2 -pipe -Wall"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j8"
EPATCH_USER_SOURCE=/etc/paludis/patches
I_KNOW_WHAT_I_AM_DOING="yes"
I_PROMISE_TO_SUPPLY_PATCHES_WITH_BUGS=1
# git-r3
EGIT_CLONE_TYPE=shallow
GAMES_PREFIX=/usr
GAMES_PREFIX_OPT=/opt
GAMES_DATADIR=/usr/share
GAMES_DATADIR_BASE=/usr/share
GAMES_SYSCONFDIR=/etc
GAMES_STATEDIR=/var/lib
GAMES_LOGDIR=/var/log
GAMES_BINDIR=${GAMES_PREFIX}/bin
GAMES_GROUP=users
# hack to disable actual building of multilib stuff
#MULTILIB_ABIS=amd64
## per-package settings
# no as-needed
if [[ "${CATEGORY}/${PN}" == "net-libs/libeXosip" ||
"${CATEGORY}/${PN}" == "net-libs/libnetfilter_queue" ]]
then
LDFLAGS="${LDFLAGS/-Wl,--as-needed/}"
fi
# laptop-compat, keep this at the top
if [[ "${CATEGORY}/${PN}" == "x11-libs/wxGTK" ||
"${CATEGORY}/${PN}" == "www-client/firefox" ||
"${CATEGORY}/${PN}" == "www-client/torbrowser" ||
"${CATEGORY}/${PN}" == "mail-client/thunderbird" ||
"${CATEGORY}/${PN}" == "app-office/libreoffice" ||
"${CATEGORY}/${PN}" == "net-libs/webkit-gtk" ||
"${CATEGORY}/${PN}" == "dev-qt/qtwebkit" ||
"${CATEGORY}/${PN}" == "app-emulation/wine" ||
"${CATEGORY}/${PN}" == "sys-devel/llvm" ]]
then
CFLAGS="-march=core-avx-i -O2 -pipe"
CXXFLAGS="-march=core-avx-i -O2 -pipe"
fi
# clang incompatible or safety or missing openmp, also see #408963
if [[
"${CATEGORY}/${PN}" != "app-admin/haskell-updater" &&
"${CATEGORY}/${PN}" != "app-crypt/gnupg" &&
"${CATEGORY}/${PN}" != "app-crypt/johntheripper" &&
"${CATEGORY}/${PN}" != "app-emulation/aqemu" &&
"${CATEGORY}/${PN}" != "app-emulation/virtualbox" &&
"${CATEGORY}/${PN}" != "app-emulation/virtualbox-modules" &&
"${CATEGORY}/${PN}" != "app-emulation/wine" &&
"${CATEGORY}/${PN}" != "app-text/pandoc" &&
"${CATEGORY}/${PN}" != "app-text/recode" &&
"${CATEGORY}/${PN}" != "dev-games/cegui" &&
"${CATEGORY}/${PN}" != "dev-games/goatee" &&
"${CATEGORY}" != "dev-haskell" &&
"${CATEGORY}/${PN}" != "dev-lang/gprolog" &&
"${CATEGORY}/${PN}" != "dev-lang/luajit" &&
"${CATEGORY}/${PN}" != "dev-lang/ruby" &&
"${CATEGORY}/${PN}" != "dev-lang/spidermonkey" &&
"${CATEGORY}/${PN}" != "dev-libs/crypto++" &&
"${CATEGORY}/${PN}" != "dev-libs/elfutils" &&
"${CATEGORY}/${PN}" != "dev-libs/libev" &&
"${CATEGORY}/${PN}" != "dev-libs/libixion" &&
"${CATEGORY}/${PN}" != "dev-libs/openssl" &&
"${CATEGORY}/${PN}:${SLOT%/*}" != "dev-qt/qtcore:5" &&
"${CATEGORY}/${PN}:${SLOT%/*}" != "dev-qt/qtnetwork:5" &&
"${CATEGORY}/${PN}" != "dev-scheme/guile" &&
"${CATEGORY}/${PN}" != "dev-util/nemiver" &&
"${CATEGORY}/${PN}" != "games-board/goatee-gtk" &&
"${CATEGORY}/${PN}" != "games-engines/gemrb" &&
"${CATEGORY}/${PN}" != "games-engines/OpenJK" &&
"${CATEGORY}/${PN}" != "games-engines/openmw" &&
"${CATEGORY}/${PN}" != "games-fps/unvanquished" &&
"${CATEGORY}/${PN}" != "games-strategy/0ad" &&
"${CATEGORY}/${PN}" != "games-strategy/freeorion" &&
"${CATEGORY}/${PN}" != "games-strategy/liquidwar6" &&
"${CATEGORY}/${PN}" != "mail-client/thunderbird" &&
"${CATEGORY}/${PN}" != "media-gfx/blender" &&
"${CATEGORY}/${PN}" != "media-libs/devil" &&
"${CATEGORY}/${PN}" != "media-libs/gd" &&
"${CATEGORY}/${PN}" != "media-libs/gstreamer" &&
"${CATEGORY}/${PN}" != "media-libs/id3lib" &&
"${CATEGORY}/${PN}" != "media-libs/libraw" &&
"${CATEGORY}/${PN}" != "media-libs/libvorbis" &&
"${CATEGORY}/${PN}" != "media-libs/mesa" &&
"${CATEGORY}/${PN}" != "media-libs/sdl2-gfx" &&
"${CATEGORY}/${PN}" != "media-video/ffmpeg" &&
"${CATEGORY}/${PN}" != "media-video/guvcview" &&
"${CATEGORY}/${PN}" != "net-firewall/pglinux" &&
"${CATEGORY}/${PN}" != "net-libs/libmnl" &&
"${CATEGORY}/${PN}" != "net-libs/opal" &&
"${CATEGORY}/${PN}" != "net-p2p/retroshare" &&
"${CATEGORY}/${PN}" != "sci-mathematics/z3" &&
"${CATEGORY}/${PN}" != "sys-apps/coreutils" &&
"${CATEGORY}/${PN}" != "sys-apps/memtest86+" &&
"${CATEGORY}/${PN}" != "sys-apps/paludis" &&
"${CATEGORY}/${PN}" != "sys-block/thin-provisioning-tools" &&
"${CATEGORY}/${PN}" != "sys-devel/autogen" &&
"${CATEGORY}/${PN}" != "sys-devel/binutils" &&
"${CATEGORY}/${PN}" != "sys-devel/gcc" &&
"${CATEGORY}/${PN}" != "sys-libs/glibc" &&
"${CATEGORY}/${PN}" != "sys-power/iasl" &&
"${CATEGORY}/${PN}" != "www-client/firefox" &&
"${CATEGORY}/${PN}" != "www-client/torbrowser" &&
"${CATEGORY}/${PN}" != "x11-base/xorg-server" &&
"${CATEGORY}/${PN}" != "x11-drivers/nvidia-drivers" &&
"${CATEGORY}/${PN}" != "x11-libs/cairo" &&
"${CATEGORY}/${PN}" != "x11-libs/motif" &&
"${CATEGORY}/${PN}" != "x11-libs/pixman"
]]
then
CC="clang"
BUILD_CC="clang"
CFLAGS+=" -Qunused-arguments -fcolor-diagnostics"
CXX="clang++"
BUILD_CXX="clang++"
CXXFLAGS+=" -Qunused-arguments -fcolor-diagnostics"
fi
# missing fpic
# if [[ "${CATEGORY}/${PN}" == "games-emulation/dosbox" ]]
# then
# CFLAGS+=" -fPIC"
# CXXFLAGS+=" -fPIC"
# fi
# O3
if [[ "${CATEGORY}" == "games-"* &&
"${CATEGORY}/${PN}" != "games-engines/OpenJK" ]]
then
CFLAGS="${CFLAGS} -O3"
CXXFLAGS="${CXXFLAGS} -O3"
fi
# debug
if [[ "${CATEGORY}/${PN}" == "x11-libs/gtk+" ||
"${CATEGORY}/${PN}" == "dev-util/glade" ||
"${CATEGORY}/${PN}" == "dev-libs/libntru" ||
"${CATEGORY}/${PN}" == "net-misc/curl" ||
"${CATEGORY}/${PN}" == "games-engines/OpenJK" ||
"${CATEGORY}/${PN}" == "net-libs/mbedtls" ||
"${CATEGORY}/${PN}" == "x11-misc/spacefm"
]]
then
CFLAGS="${CFLAGS} -Wall -g"
CXXFLAGS="${CXXFLAGS} -Wall -g"
fi
# full debug
if [[ "${CATEGORY}/${PN}" == "games-fps/doomsday"
]]
then
CFLAGS="${CFLAGS} -Wall -g -O0"
CXXFLAGS="${CXXFLAGS} -Wall -g -O0"
fi
# nodebug
if [[ "${CATEGORY}/${PN}" == "dev-python/pypy" ||
"${CATEGORY}/${PN}" == "games-strategy/freeorion" ||
"${CATEGORY}/${PN}" == "www-client/chromium" ||
"${CATEGORY}/${PN}" == "sys-devel/clang" ||
"${CATEGORY}/${PN}" == "sys-devel/llvm" ||
"${CATEGORY}/${PN}" == "www-client/firefox" ||
"${CATEGORY}/${PN}" == "www-client/torbrowser" ||
"${CATEGORY}/${PN}" == "mail-client/thunderbird" ||
"${CATEGORY}/${PN}" == "app-office/libreoffice" ||
"${CATEGORY}/${PN}" == "net-libs/webkit-gtk" ||
"${CATEGORY}/${PN}" == "dev-qt/qtwebkit" ]]
then
CFLAGS="${CFLAGS} -g0"
CXXFLAGS="${CXXFLAGS} -g0"
fi
# parallel build broken
if [[ "${CATEGORY}/${PN}" == "dev-libs/openssl" ]]
then
MAKEOPTS="-j1"
fi