Thorium browser ebuild

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
blackteahamburger
n00b
n00b
Posts: 4
Joined: Sat Feb 17, 2024 11:00 am

Thorium browser ebuild

Post by blackteahamburger »

I can't find an ebuild for Thorium browser, can someone provide one?
Related: https://github.com/Alex313031/thorium/issues/357.
CarDGee
n00b
n00b
Posts: 1
Joined: Thu Mar 14, 2024 9:21 pm

Post by CarDGee »

This is a absolute mess and its not working but if anyone want to work on it here it is

Code: Select all

EAPI=8
inherit desktop xdg unpacker

DESCRIPTION="Thorium Browser: A fast and secure browser for the modern web."
HOMEPAGE="https://github.com/Alex313031/thorium"
SRC_URI="https://github.com/Alex313031/thorium/releases/download/M${PV}/thorium-browser_${PV}_AVX2.deb"

LICENSE="BSD-3-Clause"
SLOT="0"
KEYWORDS="~amd64"

DEPEND="
    dev-libs/nss
    dev-libs/icu
"
RDEPEND="${DEPEND}"

S="${WORKDIR}"

src_unpack() {
    unpack_deb "${A}" || die "Failed to unpack deb file"
    mv "${WORKDIR}/opt/chromium.org/thorium" "${S}" || die "Failed to move files to ${S}"
}

src_install() {
    local install_dir="/opt/chromium.org/thorium"

    # Ensure that the directory exists
    dodir "${install_dir}"

    # Install Thorium resources
    insinto "${install_dir}"
    doins -r "${S}/opt/chromium.org/thorium/*" || die "Failed to install Thorium resources"

    # Install Thorium binaries
    exeinto "${install_dir}"
    doexe "${install_dir}/thorium" \
          "${install_dir}/thorium-browser" \
          "${install_dir}/thorium_shell" || die "Failed to install Thorium binaries"

    # Create symbolic links to binaries in /usr/bin
    dosym "${install_dir}/thorium-browser" "/usr/bin/thorium-browser" || die "Failed to create symbolic link for thorium-browser"
    dosym "${install_dir}/thorium" "/usr/bin/thorium" || die "Failed to create symbolic link for thorium"

    # Check if the icon file exists before trying to install it
    if [ -e "${install_dir}/thorium-browser.png" ]; then
        newicon "${install_dir}/thorium-browser.png" thorium-browser.png || die "Failed to install icon"
    else
        eerror "Icon file thorium-browser.png not found. Skipping installation."
    fi

    # Create desktop entry
    make_desktop_entry thorium-browser "Thorium Browser" thorium-browser.png "Network;WebBrowser;" || die "Failed to create desktop entry"
}


# Add multilib-strict-skip flag before any phases
export PORTAGE_EBUILD_PHASES="multilib-strict-skip ${PORTAGE_EBUILD_PHASES}"
[Moderator edit: added [code] tags to preserve output layout. -Hu]
blackteahamburger
n00b
n00b
Posts: 4
Joined: Sat Feb 17, 2024 11:00 am

Post by blackteahamburger »

Made one in gentoo-zh: https://github.com/microcai/gentoo-zh/t ... rowser-bin

I dislike the complicated process to submit ebuilds to GURU, so I submitted it to a repository that I'm familiar with.
User avatar
pjp
Administrator
Administrator
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

Post by pjp »

Moved from Portage & Programming to Unsupported Software.
Quis separabit? Quo animo?
User avatar
ruby_R53
Tux's lil' helper
Tux's lil' helper
Posts: 94
Joined: Sat Nov 09, 2024 1:33 pm
Location: State of São Paulo, Brazil
Contact:

Post by ruby_R53 »

i would love this for an actual source code version, for some reason i just can't build it with the steps provided in their BUILDING.md and this would facilitate stuff
Post Reply