commit:     1746310d1b8c0bdfcafe73a37bac7ac373499078
Author:     Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Tue May 13 19:12:40 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 14 02:17:14 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1746310d

net-misc/onedrive: new package, add 2.5.5

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

 net-misc/onedrive/Manifest                         |   1 +
 ...drive-2.5.5-fix-DC-basename-check-pr-3273.patch | 155 ++++++++++
 .../onedrive-2.5.5-fix-as-needed-pr-3272.patch     |  16 +
 .../onedrive-2.5.5-fix-gdc-build-pr-3213.patch     | 331 +++++++++++++++++++++
 net-misc/onedrive/metadata.xml                     |  17 ++
 net-misc/onedrive/onedrive-2.5.5.ebuild            | 116 ++++++++
 6 files changed, 636 insertions(+)

diff --git a/net-misc/onedrive/Manifest b/net-misc/onedrive/Manifest
new file mode 100644
index 000000000000..289fd88e1769
--- /dev/null
+++ b/net-misc/onedrive/Manifest
@@ -0,0 +1 @@
+DIST onedrive-2.5.5.tar.gz 4177426 BLAKE2B 
26d5b681cb74e0bd11aaffbcbb717c181aa9b4eee3970e0c224f5fbbc1a630688e095bf777a5b8a898f3f90cd764e915bf6daab3ea303347fed40ae7fd60f6e6
 SHA512 
fb727ba5204513b3b925e701c1f0e1626c9f4bf2b8900f3e9c0777f49f277d07e242593e302d2c5cd1a59b4718a860113c3b1c00b731814b6d722a496eae147d

diff --git 
a/net-misc/onedrive/files/onedrive-2.5.5-fix-DC-basename-check-pr-3273.patch 
b/net-misc/onedrive/files/onedrive-2.5.5-fix-DC-basename-check-pr-3273.patch
new file mode 100644
index 000000000000..31d5ee96ef85
--- /dev/null
+++ b/net-misc/onedrive/files/onedrive-2.5.5-fix-DC-basename-check-pr-3273.patch
@@ -0,0 +1,155 @@
+# https://github.com/abraunegg/onedrive/pull/3273
+From: Andrei Horodniceanu <[email protected]>
+Don't restrict the basename of DC to only be dmd, ldc2, or, gdc. This
+adds support for values like:
+- ldc2-1.40
+- dmd-2.110
+- x86_64-pc-linux-gnu-gdc
+Signed-off-by: Andrei Horodniceanu <[email protected]>
+--- a/configure
++++ b/configure
+@@ -605,13 +605,13 @@ sqlite_LIBS
+ sqlite_CFLAGS
+ curl_LIBS
+ curl_CFLAGS
+-PACKAGE_DATE
+ WERROR_DCFLAG
+ OUTPUT_DCFLAG
+ LINKER_DCFLAG
+ VERSION_DCFLAG
+ RELEASE_DCFLAGS
+ DEBUG_DCFLAGS
++PACKAGE_DATE
+ PKG_CONFIG_LIBDIR
+ PKG_CONFIG_PATH
+ PKG_CONFIG
+@@ -2014,6 +2014,9 @@ $as_echo "no" >&6; }
+       fi
+ fi
+ 
++PACKAGE_DATE="April 2025"
++
++
+ for ac_prog in dmd ldmd2 ldc2 gdmd gdc
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with 
args.
+@@ -2059,9 +2062,9 @@ test -n "$DC" || DC="NOT_FOUND"
+ 
+ DC_TYPE=
+ case $(basename $DC) in
+-        dmd|ldmd2|gdmd) DC_TYPE=dmd ;;
+-        ldc2) DC_TYPE=ldc ;;
+-        gdc) DC_TYPE=gdc ;;
++        *ldc2*) DC_TYPE=ldc ;;
++        *gdc*) DC_TYPE=gdc ;;
++        *dmd*) DC_TYPE=dmd ;;
+         NOT_FOUND) as_fn_error 1 "Could not find any compatible D compiler" 
"$LINENO" 5
+ esac
+ 
+@@ -2132,7 +2135,7 @@ if test "$DO_VERSION_CHECK" = "1"; then :
+ $as_echo_n "checking version of D compiler... " >&6; }
+ # check for valid versions
+ case $(basename $DC) in
+-      ldmd2|ldc2)
++      *ldmd2*|*ldc2*)
+               # LDC - the LLVM D compiler (1.12.0): ...
+               VERSION=`$DC --version`
+               # remove  everything up to first (
+@@ -2142,15 +2145,7 @@ case $(basename $DC) in
+               # now version should be something like L.M.N
+               MINVERSION=1.18.0
+               ;;
+-      dmd)
+-              # DMD64 D Compiler v2.085.1\n...
+-              VERSION=`$DC --version | tr '\n' ' '`
+-              VERSION=${VERSION#*Compiler v}
+-              VERSION=${VERSION%% *}
+-              # now version should be something like L.M.N
+-              MINVERSION=2.088.0
+-              ;;
+-      gdmd|gdc)
++      *gdmd*|*gdc*)
+               # Both gdmd and gdc print the same version information
+               VERSION=`${DC} --version | head -n1`
+               # Some examples of output:
+@@ -2165,6 +2160,14 @@ case $(basename $DC) in
+               VERSION=${VERSION%% *}
+               MINVERSION=15
+               ;;
++      *dmd*)
++              # DMD64 D Compiler v2.085.1\n...
++              VERSION=`$DC --version | tr '\n' ' '`
++              VERSION=${VERSION#*Compiler v}
++              VERSION=${VERSION%% *}
++              # now version should be something like L.M.N
++              MINVERSION=2.088.0
++              ;;
+ esac
+ 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION" >&5
+@@ -2216,9 +2219,6 @@ esac
+ 
+ 
+ 
+-PACKAGE_DATE="April 2025"
+-
+-
+ 
+ pkg_failed=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl" >&5
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,9 +31,9 @@ dnl Makefile so that we can adjust command line arguments
+ AC_CHECK_PROGS([DC], [dmd ldmd2 ldc2 gdmd gdc], NOT_FOUND)
+ DC_TYPE=
+ case $(basename $DC) in
+-        dmd|ldmd2|gdmd) DC_TYPE=dmd ;;
+-        ldc2) DC_TYPE=ldc ;;
+-        gdc) DC_TYPE=gdc ;;
++        *ldc2*) DC_TYPE=ldc ;;
++        *gdc*) DC_TYPE=gdc ;;
++        *dmd*) DC_TYPE=dmd ;;
+         NOT_FOUND) AC_MSG_ERROR(Could not find any compatible D compiler, 1)
+ esac
+ 
+@@ -100,7 +100,7 @@ AS_IF([test "$DO_VERSION_CHECK" = "1"],
+ AC_MSG_CHECKING([version of D compiler])
+ # check for valid versions
+ case $(basename $DC) in
+-      ldmd2|ldc2)
++      *ldmd2*|*ldc2*)
+               # LDC - the LLVM D compiler (1.12.0): ...
+               VERSION=`$DC --version`
+               # remove  everything up to first (
+@@ -110,15 +110,7 @@ case $(basename $DC) in
+               # now version should be something like L.M.N
+               MINVERSION=1.18.0
+               ;;
+-      dmd)
+-              # DMD64 D Compiler v2.085.1\n...
+-              VERSION=`$DC --version | tr '\n' ' '`
+-              VERSION=${VERSION#*Compiler v}
+-              VERSION=${VERSION%% *}
+-              # now version should be something like L.M.N
+-              MINVERSION=2.088.0
+-              ;;
+-      gdmd|gdc)
++      *gdmd*|*gdc*)
+               # Both gdmd and gdc print the same version information
+               VERSION=`${DC} --version | head -n1`
+               # Some examples of output:
+@@ -133,6 +125,14 @@ case $(basename $DC) in
+               VERSION=${VERSION%% *}
+               MINVERSION=15
+               ;;
++      *dmd*)
++              # DMD64 D Compiler v2.085.1\n...
++              VERSION=`$DC --version | tr '\n' ' '`
++              VERSION=${VERSION#*Compiler v}
++              VERSION=${VERSION%% *}
++              # now version should be something like L.M.N
++              MINVERSION=2.088.0
++              ;;
+ esac
+ 
+ AC_MSG_RESULT([$VERSION])

diff --git a/net-misc/onedrive/files/onedrive-2.5.5-fix-as-needed-pr-3272.patch 
b/net-misc/onedrive/files/onedrive-2.5.5-fix-as-needed-pr-3272.patch
new file mode 100644
index 000000000000..b8446899cfeb
--- /dev/null
+++ b/net-misc/onedrive/files/onedrive-2.5.5-fix-as-needed-pr-3272.patch
@@ -0,0 +1,16 @@
+# https://github.com/abraunegg/onedrive/pull/3272
+Makefile.in: Pass libraries after source files in compiler invocation
+
+Signed-off-by: Andrei Horodniceanu <[email protected]>
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -100,7 +100,7 @@ onedrive: $(SOURCES)
+       else \
+               echo $(version) > version ; \
+       fi
+-      $(DC) -J. $(NOTIF_VERSIONS) $(DCFLAGS) $(addprefix 
$(LINKER_DCFLAG),$(all_libs)) $^ $(OUTPUT_DCFLAG)$@
++      $(DC) -J. $(NOTIF_VERSIONS) $(DCFLAGS) $^ $(addprefix 
$(LINKER_DCFLAG),$(all_libs)) $(OUTPUT_DCFLAG)$@
+ 
+ install: all
+       mkdir -p $(DESTDIR)$(bindir)
+

diff --git a/net-misc/onedrive/files/onedrive-2.5.5-fix-gdc-build-pr-3213.patch 
b/net-misc/onedrive/files/onedrive-2.5.5-fix-gdc-build-pr-3213.patch
new file mode 100644
index 000000000000..aa5b6d3e79f6
--- /dev/null
+++ b/net-misc/onedrive/files/onedrive-2.5.5-fix-gdc-build-pr-3213.patch
@@ -0,0 +1,331 @@
+# These changes fix gdc support and out-of-source builds.
+# They have been merged upstream at: 
https://github.com/abraunegg/onedrive/pull/3213
+
+From: Andrei Horodniceanu <[email protected]>
+Signed-off-by: Andrei Horodniceanu <[email protected]>
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -22,11 +22,7 @@ NOTIFICATIONS = @NOTIFICATIONS@
+ HAVE_SYSTEMD = @HAVE_SYSTEMD@
+ systemduserunitdir = @systemduserunitdir@
+ systemdsystemunitdir = @systemdsystemunitdir@
+-curl_LIBS = @curl_LIBS@
+-sqlite_LIBS = @sqlite_LIBS@
+-notify_LIBS = @notify_LIBS@
+-bsd_inotify_LIBS = @bsd_inotify_LIBS@
+-dynamic_linker_LIBS = @dynamic_linker_LIBS@
++all_libs = @curl_LIBS@ @sqlite_LIBS@ @notify_LIBS@ @bsd_inotify_LIBS@ 
@dynamic_linker_LIBS@
+ COMPLETIONS = @COMPLETIONS@
+ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@
+ ZSH_COMPLETION_DIR = @ZSH_COMPLETION_DIR@
+@@ -34,29 +30,23 @@ FISH_COMPLETION_DIR = @FISH_COMPLETION_DIR@
+ DEBUG = @DEBUG@
+ 
+ DC = @DC@
+-DC_TYPE = @DC_TYPE@
+ DCFLAGS = @DCFLAGS@
+-DCFLAGS += -w -J.
++DEBUG_DCFLAGS = @DEBUG_DCFLAGS@
++RELEASE_DCFLAGS = @RELEASE_DCFLAGS@
++VERSION_DCFLAG = @VERSION_DCFLAG@
++LINKER_DCFLAG = @LINKER_DCFLAG@
++OUTPUT_DCFLAG = @OUTPUT_DCFLAG@
++WERROR_DCFLAG = @WERROR_DCFLAG@
++
++DCFLAGS += $(WERROR_DCFLAG)
+ ifeq ($(DEBUG),yes)
+-ifeq ($(DC_TYPE),dmd)
+-# Add DMD Debugging Flags
+-DCFLAGS += -g -debug -gs
+-else
+-# Add LDC Debugging Flags
+-DCFLAGS += -g -d-debug -gc
+-endif
++DCFLAGS += $(DEBUG_DCFLAGS)
+ else
+-# Only add optimisation flags if debugging is not enabled
+-DCFLAGS += -O
++DCFLAGS += $(RELEASE_DCFLAGS)
+ endif
+ 
+ ifeq ($(NOTIFICATIONS),yes)
+-NOTIF_VERSIONS=-version=NoPragma -version=NoGdk -version=Notifications
+-# support ldc2 which needs -d prefix for version specification
+-ifeq ($(DC_TYPE),ldc)
+-        NOTIF_VERSIONS := $(addprefix -d,$(NOTIF_VERSIONS))
+-endif
+-DCFLAGS += $(NOTIF_VERSIONS)
++NOTIF_VERSIONS = $(addprefix $(VERSION_DCFLAG)=,NoPragma NoGdk Notifications)
+ endif
+ 
+ system_unit_files = contrib/systemd/[email protected]
+@@ -110,7 +100,7 @@ onedrive: $(SOURCES)
+       else \
+               echo $(version) > version ; \
+       fi
+-      $(DC) $(DCFLAGS) $(addprefix -L,$(curl_LIBS)) $(addprefix 
-L,$(sqlite_LIBS)) $(addprefix -L,$(notify_LIBS)) $(addprefix 
-L,$(bsd_inotify_LIBS)) $(addprefix -L,$(dynamic_linker_LIBS)) $(SOURCES) -of$@
++      $(DC) -J. $(NOTIF_VERSIONS) $(DCFLAGS) $(addprefix 
$(LINKER_DCFLAG),$(all_libs)) $^ $(OUTPUT_DCFLAG)$@
+ 
+ install: all
+       mkdir -p $(DESTDIR)$(bindir)
+--- a/configure
++++ b/configure
+@@ -606,7 +606,12 @@ sqlite_CFLAGS
+ curl_LIBS
+ curl_CFLAGS
+ PACKAGE_DATE
+-DC_TYPE
++WERROR_DCFLAG
++OUTPUT_DCFLAG
++LINKER_DCFLAG
++VERSION_DCFLAG
++RELEASE_DCFLAGS
++DEBUG_DCFLAGS
+ PKG_CONFIG_LIBDIR
+ PKG_CONFIG_PATH
+ PKG_CONFIG
+@@ -2009,7 +2014,7 @@ $as_echo "no" >&6; }
+       fi
+ fi
+ 
+-for ac_prog in dmd ldmd2 ldc2
++for ac_prog in dmd ldmd2 ldc2 gdmd gdc
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with 
args.
+ set dummy $ac_prog; ac_word=$2
+@@ -2054,9 +2059,9 @@ test -n "$DC" || DC="NOT_FOUND"
+ 
+ DC_TYPE=
+ case $(basename $DC) in
+-        dmd) DC_TYPE=dmd ;;
+-        ldmd2) DC_TYPE=dmd ;;
++        dmd|ldmd2|gdmd) DC_TYPE=dmd ;;
+         ldc2) DC_TYPE=ldc ;;
++        gdc) DC_TYPE=gdc ;;
+         NOT_FOUND) as_fn_error 1 "Could not find any compatible D compiler" 
"$LINENO" 5
+ esac
+ 
+@@ -2145,6 +2150,21 @@ case $(basename $DC) in
+               # now version should be something like L.M.N
+               MINVERSION=2.088.0
+               ;;
++      gdmd|gdc)
++              # Both gdmd and gdc print the same version information
++              VERSION=`${DC} --version | head -n1`
++              # Some examples of output:
++              # gdc (Gentoo 14.2.1_p20250301 p8) 14.2.1 20250301
++              # gcc (GCC) 14.2.1 20250207 # Arch
++              # gdc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)
++              # gdc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
++              VERSION=${VERSION#gdc }
++              # VERSION=(...) VER DATE ...
++              VERSION=${VERSION#*) }
++              # VERSION=VER DATE ...
++              VERSION=${VERSION%% *}
++              MINVERSION=15
++              ;;
+ esac
+ 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION" >&5
+@@ -2163,8 +2183,40 @@ fi
+ 
+ 
+ 
++case "$DC_TYPE" in
++      dmd)
++              DEBUG_DCFLAGS="-g -debug -gs"
++              RELEASE_DCFLAGS=-O
++              VERSION_DCFLAG=-version
++              LINKER_DCFLAG=-L
++              OUTPUT_DCFLAG=-of
++              WERROR_DCFLAG=-w
++              ;;
++      ldc)
++              DEBUG_DCFLAGS="-g -d-debug -gc"
++              RELEASE_DCFLAGS=-O
++              VERSION_DCFLAG=-d-version
++              LINKER_DCFLAG=-L
++              OUTPUT_DCFLAG=-of
++              WERROR_DCFLAG=-w
++              ;;
++      gdc)
++              DEBUG_DCFLAGS="-g -fdebug"
++              RELEASE_DCFLAGS=-O
++              VERSION_DCFLAG=-fversion
++              LINKER_DCFLAG=-Wl,
++              OUTPUT_DCFLAG=-o
++              WERROR_DCFLAG=-Werror
++              ;;
++esac
++
++
++
++
++
++
+ 
+-PACKAGE_DATE="March 2025"
++PACKAGE_DATE="April 2025"
+ 
+ 
+ 
+--- a/configure.ac
++++ b/configure.ac
+@@ -24,12 +24,12 @@ dnl Determine D compiler
+ dnl we check for dmd, dmd2, and ldc2 in this order
+ dnl furthermore, we set DC_TYPE to either dmd or ldc and export this into the
+ dnl Makefile so that we can adjust command line arguments
+-AC_CHECK_PROGS([DC], [dmd ldmd2 ldc2], NOT_FOUND)
++AC_CHECK_PROGS([DC], [dmd ldmd2 ldc2 gdmd gdc], NOT_FOUND)
+ DC_TYPE=
+ case $(basename $DC) in
+-        dmd) DC_TYPE=dmd ;;
+-        ldmd2) DC_TYPE=dmd ;;
++        dmd|ldmd2|gdmd) DC_TYPE=dmd ;;
+         ldc2) DC_TYPE=ldc ;;
++        gdc) DC_TYPE=gdc ;;
+         NOT_FOUND) AC_MSG_ERROR(Could not find any compatible D compiler, 1)
+ esac
+ 
+@@ -114,6 +114,21 @@ case $(basename $DC) in
+               # now version should be something like L.M.N
+               MINVERSION=2.088.0
+               ;;
++      gdmd|gdc)
++              # Both gdmd and gdc print the same version information
++              VERSION=`${DC} --version | head -n1`
++              # Some examples of output:
++              # gdc (Gentoo 14.2.1_p20250301 p8) 14.2.1 20250301
++              # gcc (GCC) 14.2.1 20250207 # Arch
++              # gdc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)
++              # gdc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
++              VERSION=${VERSION#gdc }
++              # VERSION=(...) VER DATE ...
++              VERSION=${VERSION#*) }
++              # VERSION=VER DATE ...
++              VERSION=${VERSION%% *}
++              MINVERSION=15
++              ;;
+ esac
+ 
+ AC_MSG_RESULT([$VERSION])
+@@ -128,11 +143,44 @@ fi
+ 
+ 
+ 
+-AC_SUBST([DC_TYPE])
+ dnl In case the environment variable DCFLAGS is set, we export it to the
+ dnl generated Makefile at configure run:
+ AC_SUBST([DCFLAGS])
+ 
++dnl Default flags for each compiler
++case "$DC_TYPE" in
++      dmd)
++              DEBUG_DCFLAGS="-g -debug -gs"
++              RELEASE_DCFLAGS=-O
++              VERSION_DCFLAG=-version
++              LINKER_DCFLAG=-L
++              OUTPUT_DCFLAG=-of
++              WERROR_DCFLAG=-w
++              ;;
++      ldc)
++              DEBUG_DCFLAGS="-g -d-debug -gc"
++              RELEASE_DCFLAGS=-O
++              VERSION_DCFLAG=-d-version
++              LINKER_DCFLAG=-L
++              OUTPUT_DCFLAG=-of
++              WERROR_DCFLAG=-w
++              ;;
++      gdc)
++              DEBUG_DCFLAGS="-g -fdebug"
++              RELEASE_DCFLAGS=-O
++              VERSION_DCFLAG=-fversion
++              LINKER_DCFLAG=-Wl,
++              OUTPUT_DCFLAG=-o
++              WERROR_DCFLAG=-Werror
++              ;;
++esac
++AC_SUBST([DEBUG_DCFLAGS])
++AC_SUBST([RELEASE_DCFLAGS])
++AC_SUBST([VERSION_DCFLAG])
++AC_SUBST([LINKER_DCFLAG])
++AC_SUBST([OUTPUT_DCFLAG])
++AC_SUBST([WERROR_DCFLAG])
++
+ dnl The package date is only used in the man page onedrive.1.in
+ dnl we generate onedrive.1 from it during configure run, but we want
+ dnl to have the same date, namely the one when the configure script
+--- a/docs/contributing.md
++++ b/docs/contributing.md
+@@ -122,7 +122,7 @@ For reference, below are the available application logging 
output functions and
+ If the code changes any of the functionality that is documented, it is 
expected that any PR submission will also include updating the respective 
section of user documentation and/or man page as part of the code submission.
+ 
+ ## Development Testing
+-Whilst there are more modern DMD and LDC compilers available, ensuring client 
build compatibility with older platforms is a key requirement.
++Whilst there are more modern D compilers available, ensuring client build 
compatibility with older platforms is a key requirement.
+ 
+ The issue stems from Debian and Ubuntu LTS versions - such as Ubuntu 20.04. 
It's [ldc package](https://packages.ubuntu.com/focal/ldc) is only v1.20.1 , 
thus, this is the minimum version that all compilation needs to be tested 
against.
+ 
+@@ -172,4 +172,4 @@ deactivate
+ ## References
+ 
+ * D Language Official Style Guide: https://dlang.org/dstyle.html
+-* British English spelling conventions: https://www.collinsdictionary.com/
+\ No newline at end of file
++* British English spelling conventions: https://www.collinsdictionary.com/
+--- a/docs/install.md
++++ b/docs/install.md
+@@ -38,10 +38,10 @@ Only the current release version or greater is supported. 
Earlier versions are n
+ ## Building from Source - High Level Requirements
+ *   For successful compilation of this application, it's crucial that the 
build environment is equipped with a minimum of 1GB of memory and an additional 
1GB of swap space.
+ *   Install the required distribution package dependencies covering the 
required development tools and development libraries for curl and sqlite
+-*   Install the [Digital Mars D Compiler 
(DMD)](https://dlang.org/download.html) or [LDC – the LLVM-based D 
Compiler](https://github.com/ldc-developers/ldc)
++*   Install the [Digital Mars D Compiler 
(DMD)](https://dlang.org/download.html), [LDC – the LLVM-based D 
Compiler](https://github.com/ldc-developers/ldc), or, at least version 15 of 
the [GNU D Compiler (GDC)](https://www.gdcproject.org/)
+ 
+ > [!IMPORTANT]
+-> To compile this application successfully, it is essential to use either DMD 
version **2.088.0** or higher, or LDC version **1.18.0** or higher. Ensuring 
compatibility and optimal performance necessitates the use of these specific 
versions or their more recent updates.
++> To compile this application successfully, the minimum supported versions of 
each compiler are: DMD **2.088.0**, LDC **1.18.0**, and, GDC **15**. Ensuring 
compatibility and optimal performance necessitates the use of these specific 
versions or their more recent updates.
+ 
+ ### Example for installing DMD Compiler
+ ```text
+@@ -53,6 +53,9 @@ curl -fsS https://dlang.org/install.sh | bash -s dmd
+ curl -fsS https://dlang.org/install.sh | bash -s ldc
+ ```
+ 
++### Installing GDC
++As stated above, you will need at least GDC version 15. If your 
distribution's repositories include a suitable version, you can install it from 
there. Common names for the GDC package are listed on the [GDC 
website](https://www.gdcproject.org/downloads#linux-distribution-packages). If 
the package is unavailable or its version is too old, you can try building it 
from source following [these 
instructions](https://wiki.dlang.org/GDC/Installation).
++
+ ## Distribution Package Dependencies
+ 
+ ### Dependencies: Arch Linux & Manjaro Linux
+@@ -221,6 +224,28 @@ gmake install
+ > [!NOTE]
+ > Install the application as 'root' unless you have installed 'sudo'
+ 
++### Linux: Building the application with GDC
++First, make sure at least version 15 of GDC is available in your path:
++```text
++$ gdc --version
++gdc (Gentoo Hardened 15.0.1_pre20250413 p54) 15.0.1 20250413 (experimental)
++Copyright (C) 2025 Free Software Foundation, Inc.
++This is free software; see the source for copying conditions.  There is NO
++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++```
++Then, clone the repository and run the build commands:
++```
++git clone https://github.com/abraunegg/onedrive.git
++cd onedrive
++./configure
++make clean; make;
++sudo make install
++```
++If you have another D compiler installed on your system you may need to 
explicitly specify that you want to use GDC to the `configure` script. To do 
this replace the `./configure` step above with:
++```
++./configure DC=gdc
++```
++
+ ### Build options
+ #### GUI Notification Support
+ GUI notification support can be enabled using the `configure` switch 
`--enable-notifications`.
+

diff --git a/net-misc/onedrive/metadata.xml b/net-misc/onedrive/metadata.xml
new file mode 100644
index 000000000000..ad9d6a7dec81
--- /dev/null
+++ b/net-misc/onedrive/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+        <maintainer type="person" proxied="yes">
+                <email>[email protected]</email>
+                <name>Andrei Horodniceanu</name>
+        </maintainer>
+        <maintainer type="project" proxied="proxy">
+                <email>[email protected]</email>
+                <name>Proxy Maintainers</name>
+        </maintainer>
+        <upstream>
+                <remote-id type="github">abraunegg/onedrive</remote-id>
+                <bugs-to>https://github.com/abraunegg/onedrive/issues</bugs-to>
+                
<changelog>https://github.com/abraunegg/onedrive/releases</changelog>
+        </upstream>
+</pkgmetadata>

diff --git a/net-misc/onedrive/onedrive-2.5.5.ebuild 
b/net-misc/onedrive/onedrive-2.5.5.ebuild
new file mode 100644
index 000000000000..501f32824e6e
--- /dev/null
+++ b/net-misc/onedrive/onedrive-2.5.5.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit shell-completion 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
+       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
+
+PATCHES=(
+       "${FILESDIR}/${PN}-2.5.5-fix-gdc-build-pr-3213.patch"
+       "${FILESDIR}/${PN}-2.5.5-fix-as-needed-pr-3272.patch"
+       "${FILESDIR}/${PN}-2.5.5-fix-DC-basename-check-pr-3273.patch"
+)
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} != binary ]] && _setup_gdc
+}
+
+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 in 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 overwritting user flags
+       emake DCFLAGS="${DCFLAGS}"
+}
+
+src_install() {
+       emake DESTDIR="${D}" docdir=/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
+}
+
+# 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