Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
8493f95
Gentoo: Add initial support for the core target.
Mar 21, 2017
30e634a
Gentoo: Add support for the audio target.
Mar 21, 2017
7a18dbd
Gentoo: Make portage rebuild packages if the use flags have changed.
Mar 21, 2017
48d0585
Gentoo: Add support for the cli-extra target.
Mar 21, 2017
a9d7b84
Gentoo: Add support for the xorg and x11-common targets.
Mar 21, 2017
06f3ccc
Gentoo: Fix sudo duplication and group GID.
Mar 21, 2017
d191fd2
Gentoo: Support the gtk-extra target.
Mar 22, 2017
96cc337
Gentoo: Update the portage tree during a core update.
Mar 22, 2017
5eaeb25
Gentoo: Add support for the xfce and xfce-desktop targets.
Mar 22, 2017
53ce0cb
Gentoo: Don't call install when there's nothing passed to install.
Mar 22, 2017
495a933
Gentoo: Add support for extension target.
Mar 22, 2017
c07cc92
Gentoo: Add support for enlightenment.
Mar 22, 2017
4dcbe08
Gentoo: Add the ability to keyword packages and accept licenses.
Mar 23, 2017
2db07c6
Gentoo: Add support for the chrome targets.
Mar 23, 2017
a6ed7f7
Gentoo: Add support for lxde target.
Mar 23, 2017
835ccde
Gentoo: Add support for the xiwi target.
Mar 23, 2017
40a0601
Gentoo: Remove the suid bit to allow LD_PRELOAD for libcroutonfreon.
Mar 23, 2017
0ba9260
Gentoo: Support use expand variables for simultaneous xiwi and xorg.
Mar 24, 2017
a026730
Gentoo: Add support for RSYNC_PROXY.
Mar 24, 2017
acbc6a2
Gentoo: Add support for MIRROR, remove debugging code.
Mar 25, 2017
28e09e8
Gentoo: Use CHOST from make.conf to determine architecture.
Mar 25, 2017
fd765fb
Gentoo: Simplify prepare functions.
Mar 25, 2017
2051ba1
Gentoo: Simplify changes to prepare.sh.
Mar 25, 2017
70a8ce7
Gentoo: Simplify packages for core target. Add dbus to global use flags.
Mar 25, 2017
a875747
Gentoo: Clean up audio target changes, remove redundant check.
Mar 25, 2017
ddabc68
Gentoo: Remove extra dbus use flag setting from cli-extra.
Mar 25, 2017
27cce46
Gentoo: Remove unused X utils from extension target.
Mar 25, 2017
8f71234
Gentoo: Simplify the gtk-extra target's install logic.
Mar 25, 2017
9bc8bef
Gentoo: Fix lxde-desktop target, remove lightdm.
Mar 25, 2017
fafe25e
Gentoo: Fix use flags, clean up package installation for X targets.
Mar 25, 2017
d9b3507
Gentoo: Update cpu flag code for cpuid2cflags >=2.
Mar 26, 2017
c9379bd
Gentoo: Add ability to turn off use flags in prepare.
Mar 26, 2017
6b58f4f
Gentoo: Make sure to trigger a world update in core.
Mar 26, 2017
4d0b883
Gentoo: Add support for other arches, remove temporary files.
Mar 31, 2017
f90cc28
Gentoo: Patch xf86-video-dummy and xf86-video-intel before the build.
Mar 31, 2017
85f1b94
Gentoo: Change xorg input targets to remove unused targets.
Mar 30, 2017
2ef3ccf
Gentoo: Make Gentoo update chrome using the package manager.
Mar 30, 2017
6f82d65
Let the user change the /tmp directory for low memory devices.
Mar 30, 2017
b430183
Gentoo: Simplify audio dependency code.
Mar 31, 2017
5ef61c3
Gentoo: Simplify creating the sudo group in core.
Mar 31, 2017
69ed164
Gentoo: Add support for extra arm targets, fix ARCH variable usage.
Apr 2, 2017
ec2bbfb
Gentoo: Rework intel and fbdev video_cards use expand.
Apr 2, 2017
821d21d
Gentoo: Add note for users installing *-desktop targets.
Apr 2, 2017
9d5e783
Gentoo: Adjust CPU use expand code to be more reliable.
Apr 2, 2017
a61e162
Gentoo: Set flags earlier to prevent recompiles. Add i915, i965 to VI…
Apr 3, 2017
fb56dff
Gentoo: Support switching profiles. Add support for kde and gnome tar…
Apr 3, 2017
8928954
Gentoo: Add kodi support and make the xbmc package work with kodi.
Apr 3, 2017
723dd74
Gentoo: Update copyright year for all of the files I've touched.
Apr 3, 2017
5655d86
Gentoo: Fix issue where disabled flags would cause prepare script to …
Apr 6, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Gentoo: Add support for the xorg and x11-common targets.
  • Loading branch information
Joseph Jezak committed Mar 23, 2017
commit a9d7b84691ad395fe803ee32fe938f80fe96a265
8 changes: 5 additions & 3 deletions installer/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,13 @@ compile() {
shift 1
fi
shift 2
local pkgs=""
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set pkgs to "$*" and prefix in the debian branch?

Alternatively, I think you could just debian=gcc, debian=libc6-dev and be done with it.

echo "Installing dependencies for $out..." 1>&2
if [ "${DISTROAKA:-"$DISTRO"}" = 'debian' ]; then
echo "Installing dependencies for $out..." 1>&2
local pkgs="gcc libc6-dev $*"
install --minimal --asdeps $pkgs </dev/null
pkgs="gcc libc6-dev"
fi
pkgs="${pkgs} $*"
install --minimal --asdeps $pkgs </dev/null
echo "Compiling $out..." 1>&2
local tmp="`mktemp crouton.XXXXXX --tmpdir=/tmp`"
addtrap "rm -f '$tmp'"
Expand Down
29 changes: 25 additions & 4 deletions targets/x11-common
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,38 @@ if [ -n "$offset" ]; then
conv=notrunc,nocreat 2>/dev/null
fi

# Make sure the use flags on gentoo are set that we'll need for X
if [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then
set_flags X dbus guile networking
fi

# Install utilities and links for powerd-poking daemon
compile xi2event '-lX11 -lXi' libx11-dev libxi-dev
install --minimal dbus xdg-utils
XILIBS=""
if [ "${DISTROAKA:-"$DISTRO"}" = 'debian' ]; then
XILIBS="libx11-dev libxi-dev"
elif [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then
XILIBS="x11-libs/libXi"
fi
compile xi2event '-lX11 -lXi' ${XILIBS}

# On Gentoo, we need to set the text useflag for xdg-utils
if [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then
echo "app-text/xmlto text" >> /etc/portage/package.use/package.use
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every time you update the chroot, package.use will get longer...

fi

install --minimal gentoo=sys-apps/dbus,dbus xdg-utils
ln -sf croutonpowerd /usr/local/bin/gnome-screensaver-command
ln -sf croutonpowerd /usr/local/bin/xscreensaver-command

# Install nicer cursors
install --minimal dmz-cursor-theme
install --minimal gentoo=vanilla-dmz-xcursors,dmz-cursor-theme

# Install bsdmainutils, xbindkeys and xautomation for shortcuts
install --minimal bsdmainutils xbindkeys xautomation
PKG_SC="xbindkeys xautomation"
if [ "${DISTROAKA:-"$DISTRO"}" = 'debian' ]; then
PKG_SC="${PKG_SC} bsdmainutils"
fi
install --minimal ${PKG_SC}

# We need chvt on freon systems
if [ -f "/sys/class/tty/tty0/active" ]; then
Expand Down
43 changes: 36 additions & 7 deletions targets/xorg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ XMETHOD="${XMETHOD:-xorg}"
# Migration from ambiguous XMETHOD
rm -f '/etc/crouton/xserverrc-x11'

# Set the use flags on gentoo that we'll need for X
if [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then
set_flags libkms uxa dri3 xvmc opengl

# Set VIDEO_CARDS and INPUT_DEVICES
# FIXME: Perhaps make this more flexible, right now just pick all of them
VIDEO_CARDS=`grep VIDEO_CARDS /etc/portage/make.conf | cut -d= -f1`
if [ -z ${VIDEO_CARDS} ]; then
echo "VIDEO_CARDS=\"intel fbdev vesa dummy\"" >> /etc/portage/make.conf
echo "INPUT_DEVICES=\"keyboard libinput mouse evdev\"" >> /etc/portage/make.conf
fi
fi

# Figure out what we need on this system

Expand Down Expand Up @@ -44,7 +56,11 @@ intelhasfbc=''
pinmesa=''
intelfbcsupport='y'
if [ "${ARCH#arm}" = "$ARCH" ]; then
inteldriver="xserver-xorg-video-intel$backport"
if [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then
inteldriver="xf86-video-intel"
else
inteldriver="xserver-xorg-video-intel$backport"
fi

# If the system has an Intel FBC-capable video card but has too old a driver
# to support the chipset, we'll need to disable hardware acceleration.
Expand All @@ -64,11 +80,17 @@ if [ "${ARCH#arm}" = "$ARCH" ]; then
fi

# Unhold xserver-xorg-video-intel, modification will be reapplied later.
apt-mark unhold "$inteldriver" 2>/dev/null || true
if [ "${DISTROAKA:-"$DISTRO"}" = 'debian' ]; then
apt-mark unhold "$inteldriver" 2>/dev/null || true
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are you going to do about the binary hack on the intel driver? In this case, you could probably also make an overlay patch...

fi
fi

# Catalog relevant and irrelevant video drivers
fbdev="xserver-xorg-video-fbdev$backport"
if [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then
fbdev="xf86-video-fbdev"
else
fbdev="xserver-xorg-video-fbdev$backport"
fi

if release -lt sid -lt kali-rolling -lt vivid; then
modesetting="xserver-xorg-video-modesetting$backport"
Expand Down Expand Up @@ -97,7 +119,7 @@ fi

# On Freon, we need crazy xorg hacks
if [ -n "$freon" ]; then
compile freon '-ldl -ldrm -I/usr/include/libdrm' so libdrm-dev
compile freon '-ldl -ldrm -I/usr/include/libdrm' so gentoo=x11-libs/libdrm,libdrm-dev
fi

# Pin precise's version of mesa if necessary
Expand Down Expand Up @@ -197,9 +219,14 @@ if [ -z "$inteldriver" -a -n "$backport" ] && release -eq precise; then
x11-session-utils x11-utils x11-xfs-utils x11-xkb-utils \
x11-xserver-utils xauth xinit xfonts-utils xkb-data xorg-docs-core \
xterm x11-common xinput
elif [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then
install xorg-x11 xorg-server ${installvideodrivers}

# We don't need to remove video drivers
removevideodrivers=""
else
install xorg $installvideodrivers -- xserver-xorg-video-all$backport \
$vmmouse
install xorg $installvideodrivers -- xserver-xorg-video-all$backport \
$vmmouse
fi

# Remove bad video drivers
Expand Down Expand Up @@ -233,7 +260,9 @@ if [ -n "$freon" -a -e "$inteldrv" ]; then
if grep -F -q -a 'getuid0' "$inteldrv" 2>/dev/null; then
# Hold xserver-xorg-video-intel to make sure that the modification
# (which may have been made in a previous update) does not get erased.
apt-mark hold "$inteldriver"
if [ "${DISTROAKA:-"$DISTRO"}" = 'debian' ]; then
apt-mark hold "$inteldriver"
fi
fi
fi

Expand Down