commit:     3dcb4e461a02e810e0f62c0519e3153c7a5cf0d0
Author:     Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Fri Sep 26 18:59:10 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct  3 00:28:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dcb4e46

net-misc/onedrive: add 2.5.7

Signed-off-by: Andrei Horodniceanu <a.horodniceanu <AT> proton.me>
Part-of: https://github.com/gentoo/gentoo/pull/43942
Closes: https://github.com/gentoo/gentoo/pull/43942
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/onedrive/Manifest              |   1 +
 net-misc/onedrive/onedrive-2.5.7.ebuild | 122 ++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+)

diff --git a/net-misc/onedrive/Manifest b/net-misc/onedrive/Manifest
index e6e97382a0d1..2624dbe965c7 100644
--- a/net-misc/onedrive/Manifest
+++ b/net-misc/onedrive/Manifest
@@ -1,2 +1,3 @@
 DIST onedrive-2.5.5.tar.gz 4177426 BLAKE2B 
26d5b681cb74e0bd11aaffbcbb717c181aa9b4eee3970e0c224f5fbbc1a630688e095bf777a5b8a898f3f90cd764e915bf6daab3ea303347fed40ae7fd60f6e6
 SHA512 
fb727ba5204513b3b925e701c1f0e1626c9f4bf2b8900f3e9c0777f49f277d07e242593e302d2c5cd1a59b4718a860113c3b1c00b731814b6d722a496eae147d
 DIST onedrive-2.5.6.tar.gz 4284403 BLAKE2B 
0c9e9ddca88ec3766bb7c575f594d99a7565da49c26e4f0b740efb19896fa718100b866a2fbc148c284b498e833d892fd1ae5517abf7f682d3c1595153a31a57
 SHA512 
0d67318978b08057bb2dab28bd66914bed4fcc6b967c5c833c381af09a03b9de340369cb5c5117a8c3c6795347a96ed661e0c14cb4e112fcf73a3318fb3c713e
+DIST onedrive-2.5.7.tar.gz 8269826 BLAKE2B 
5ea04cb4c42fe53efc660121d8c8d477bcf00e9786a131e781a4c3679810fb55dbe02557cb4feff287210c6bf10d241303de0e1e57418d8048faced8fa1efd99
 SHA512 
b08d54df9505690cb62aba43afa1f23bb31fa2dff5301446dfacbc3025c9ac0d459e5008d3b32942dd0468f1a264a220c9096ba0fec46462ce73aedf89b082d2

diff --git a/net-misc/onedrive/onedrive-2.5.7.ebuild 
b/net-misc/onedrive/onedrive-2.5.7.ebuild
new file mode 100644
index 000000000000..f604b6dc3155
--- /dev/null
+++ b/net-misc/onedrive/onedrive-2.5.7.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit shell-completion optfeature prefix systemd toolchain-funcs
+
+DESCRIPTION="Free Client for OneDrive on Linux"
+HOMEPAGE="https://abraunegg.github.io/";
+SRC_URI="https://codeload.github.com/abraunegg/onedrive/tar.gz/v${PV} -> 
${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="libnotify"
+# Barely any tests that require manually building.
+# Manual testing seems to be the best approach
+RESTRICT="test"
+
+RDEPEND="
+       >=dev-db/sqlite-3.7.15:3
+       net-misc/curl
+       sys-apps/dbus
+       libnotify? ( x11-libs/libnotify )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       virtual/pkgconfig
+       || (
+          sys-devel/gcc:15[d]
+          sys-devel/gcc:16[d]
+       )
+"
+MIN_GCC_SLOT=15
+MAX_GCC_SLOT=16
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} != binary ]] && _setup_gdc
+}
+
+src_prepare() {
+       hprefixify contrib/init.d/onedrive.init
+       # Add EPREFIX to the system config path (/etc)
+       hprefixify -w '/string systemConfigDirBase/' src/config.d
+       default
+}
+
+src_configure() {
+       # GDCFLAGS are meant to be specified in make.conf. Avoid the DFLAGS
+       # name to support ::dlang which needs separate variables for each
+       # compiler's flags
+       DCFLAGS="${GDCFLAGS}"
+       # libphobos does not provide any backwards compatibility guarantees.
+       # Until the gcc dependency is properly slotted and a USE-expand flag
+       # is added, use static linking.
+       DCFLAGS+=" -static-libphobos ${LDFLAGS}"
+       export DCFLAGS
+
+       myeconfargs=(
+               $(use_enable libnotify notifications)
+               --with-bash-completion-dir="$(get_bashcompdir)"
+               --with-zsh-completion-dir="$(get_zshcompdir)"
+               --with-fish-completion-dir="$(get_fishcompdir)"
+               --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+               --with-systemduserunitdir="$(systemd_get_userunitdir)"
+               --enable-completions
+               --disable-version-check
+               # Adds -g and -debug. There are only a few instructions guarded 
by debug
+               --disable-debug
+       )
+       econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+       # Avoid overwriting user flags
+       emake DCFLAGS="${DCFLAGS}"
+}
+
+src_install() {
+       emake DESTDIR="${D}" docdir="${EPREFIX}"/usr/share/doc/${PF} install
+       # log directory
+       keepdir /var/log/onedrive
+       fperms 775 /var/log/onedrive
+       fowners root:users /var/log/onedrive
+       # init script
+       dobin contrib/init.d/onedrive_service.sh
+       newinitd contrib/init.d/onedrive.init onedrive
+}
+
+pkg_postinst() {
+       optfeature "Single Sign-On via Intune" sys-apps/intune-portal
+}
+
+# Set DC to point to a compatible gcc[d], similar to python-any-r1
+_setup_gdc() {
+       local gcc_pkg gcc_bin_root
+       if tc-is-cross-compiler; then
+               gcc_pkg="cross-${CHOST}/gcc"
+               gcc_bin_root="${BROOT}/usr/${CBUILD}/${CHOST}/gcc-bin"
+       else
+               gcc_pkg="sys-devel/gcc"
+               gcc_bin_root="${BROOT}/usr/${CHOST}/gcc-bin"
+       fi
+
+       for ((i="${MAX_GCC_SLOT}"; i>="${MIN_GCC_SLOT}"; --i)); do
+               local gcc_dep="${gcc_pkg}:${i}[d]"
+               einfo "Checking whether GCC ${i} is suitable ..."
+               ebegin "  ${gcc_dep}"
+               has_version -b "${gcc_dep}"
+               eend ${?} || continue
+
+               # Is it better to to DC="${CHOST}-gdc-${i}"?
+               export DC="${gcc_bin_root}/${i}/${CHOST}-gdc"
+               return
+       done
+
+       eerror "No gcc[d] implementation found for the build"
+       if tc-is-cross-compiler; then
+               eerror "For cross-compilation make sure ${gcc_pkg}[d] is 
installed"
+       fi
+       die "No supported GDC implementation installed."
+}

Reply via email to