Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions licenses/BSD-3-Clause-Thorium
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
BSD 3-Clause License

Copyright (c) 2021-2024, Alexander Frick

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 2 additions & 0 deletions www-client/thorium-browser-bin/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DIST thorium-browser_124.0.6367.218_AVX2.deb 144684844 BLAKE2B dcac28145cfdec2eb5c872e99607d86d1ba34618f77dc21d1931095d070672538bed5627170b881ca289eaedb9036d880cd368bc51b1d0e5bc1be0454135e3c3 SHA512 606d35a689bbb14581ea513334ce073a09041bf9fe6f08fbb47eca1ce0847c44e600608944cda70e8e516b1ecbff682d8dde632f71d2d859dc04c10d3108030f
DIST thorium-browser_124.0.6367.218_SSE3.deb 144817080 BLAKE2B b91db0261694001ee28da16b2722aeeba3b89fb982272d83acf73bf228e194e276ba7665363e843a1e20357a19764a9e17ecb99db9bd153efbe36b937794b5b1 SHA512 6e945834cd6900f121a50ffa5532d24a2f207db7f69a92620da6f7a64c87072ed5034f41f1d5b1440ea0355db790ad3bd08b9f8805c2a647a8e05028334be515
18 changes: 18 additions & 0 deletions www-client/thorium-browser-bin/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>[email protected]</email>
<name>MF</name>
</maintainer>
<upstream>
<remote-id type="github">Alex313031/thorium</remote-id>
</upstream>
<use>
<flag name="avx2">Support for AVX2 CPU instructions</flag>
<flag name="sse3">Support for SSE3 CPU instructions</flag>
</use>
<longdescription lang="en">
Thorium Browser is a fast and secure browser for the modern web, designed to provide excellent browsing speed and advanced features.
</longdescription>
</pkgmetadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB en-US es es-419 et fa fi fil fr
gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk
sl sr sv sw ta te th tr uk ur vi zh-CN zh-TW"

inherit desktop xdg unpacker

DESCRIPTION="Thorium Browser: A fast and secure browser for the modern web."
HOMEPAGE="https://thorium.rocks"

IUSE="+avx2 sse3"

SRC_URI="avx2? ( https://github.com/Alex313031/thorium/releases/download/M${PV}/thorium-browser_${PV}_AVX2.deb )
sse3? ( https://github.com/Alex313031/thorium/releases/download/M${PV}/thorium-browser_${PV}_SSE3.deb )"

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

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

src_unpack() {
unpack_deb "${A}" || die "Failed to unpack deb file"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is die included in unpack_deb?

mv "${WORKDIR}/opt/chromium.org/thorium" "${S}" || die "Failed to move files to ${S}"
}

src_install() {
local install_dir="/opt/thorium-browser-bin" # Target installation directory
dodir "${install_dir}"
cp -r "${S}/thorium/." "${D}${install_dir}" || die "Failed to copy Thorium files to destination directory"
fperms 0755 "${install_dir}/thorium" \
"${install_dir}/thorium-browser" \
"${install_dir}/thorium_shell" \
"${install_dir}/chrome-sandbox"
dosym "${install_dir}/thorium-browser" "/usr/bin/thorium-browser"
dosym "${install_dir}/thorium" "/usr/bin/thorium"

local sizes=(16 24 32 48 64 128 256)
for size in "${sizes[@]}"; do
local icon_path="${install_dir}/product_logo_${size}.png"
local icon_name="thorium-browser.png"
if [[ -e "${D}${icon_path}" ]]; then
newicon -s ${size} "${D}${icon_path}" "${icon_name}"
else
eerror "Icon file ${icon_path} not found. Skipping installation."
fi
done

# Create desktop entry without the file extension for the icon
make_desktop_entry "thorium-browser" "Thorium Browser" "thorium-browser" "Network;WebBrowser;"
}

export PORTAGE_EBUILD_PHASES="multilib-strict-skip ${PORTAGE_EBUILD_PHASES}"