unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#67846] [PATCH] gnu: Add davmail
@ 2023-12-15 20:09 Lars Rustand
       [not found] ` <708EEA37-21B3-4508-8698-7B61DDD91AEA@housseini.me>
  2024-10-31 14:40 ` [bug#67846] packaging davmail Steve George
  0 siblings, 2 replies; 9+ messages in thread
From: Lars Rustand @ 2023-12-15 20:09 UTC (permalink / raw)
  To: 67846

Date: Fri, 15 Dec 2023 20:46:13 +0100
User-agent: mu4e 1.10.8; emacs 30.0.50
Change-Id: Iaf8a600e424488b87635cd97e0ea1b0f0efcdb5f
base-commit: 06f25a9a85be1bbe7a709e58ce41c1a834e5f1ae
---
 gnu/packages/mail.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 1676acf2f9..66e12964da 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -116,6 +116,7 @@ (define-module (gnu packages mail)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages icu4c)
+  #:use-module (gnu packages java)
   #:use-module (gnu packages kerberos)
   #:use-module (gnu packages language)
   #:use-module (gnu packages libbsd)
@@ -174,6 +175,7 @@ (define-module (gnu packages mail)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system glib-or-gtk)
@@ -4999,3 +5001,32 @@ (define-public aerc
     ;; <https://lists.sr.ht/~rjarry/aerc-devel/%3Cb5cb213a7d0c699a886971658c2476
     ;; 1073eb2391%40disroot.org%3E>
     (license license:gpl3+)))
+
+(define-public davmail
+  (let ((revision "3464"))
+    (package
+      (name "davmail")
+      (version "6.2.0")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (string-append
+               "https://downloads.sourceforge.net/project/davmail/davmail/"
+               version "/davmail-" version "-" revision ".zip"))
+         (sha256
+          (base32 "075yip53z29jnf4bi1iw6j60cdicz6hd017nl56991f1vz943aqm"))))
+      (build-system copy-build-system)
+      (arguments
+       `(#:install-plan '((".." "share/davmail"))))
+      (native-inputs (list unzip))
+      (propagated-inputs (list openjdk))
+      (home-page "https://davmail.sourceforge.net/")
+      (synopsis
+       "POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway")
+      (description
+       "Ever wanted to get rid of Outlook? DavMail is a
+POP/IMAP/SMTP/Caldav/Carddav/LDAP exchange gateway allowing users to use any
+mail/calendar client (e.g. Thunderbird with Lightning or Apple iCal) with an
+Exchange server, even from the internet or behind a firewall through Outlook
+Web Access.")
+      (license license:gpl2))))

--
2.41.0




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#67846] [PATCH] gnu: Add davmail
       [not found] ` <708EEA37-21B3-4508-8698-7B61DDD91AEA@housseini.me>
@ 2023-12-16  7:42   ` reza via Guix-patches via
  2023-12-16  7:52     ` Lars Rustand
  0 siblings, 1 reply; 9+ messages in thread
From: reza via Guix-patches via @ 2023-12-16  7:42 UTC (permalink / raw)
  To: 67846, rustand.lars

On December 15, 2023 8:09:37 PM UTC, Lars Rustand <rustand.lars@gmail.com> wrote:
>Date: Fri, 15 Dec 2023 20:46:13 +0100
>User-agent: mu4e 1.10.8; emacs 30.0.50
>Change-Id: Iaf8a600e424488b87635cd97e0ea1b0f0efcdb5f
>base-commit: 06f25a9a85be1bbe7a709e58ce41c1a834e5f1ae
>---
> gnu/packages/mail.scm | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
>diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
>index 1676acf2f9..66e12964da 100644
>--- a/gnu/packages/mail.scm
>+++ b/gnu/packages/mail.scm
>@@ -116,6 +116,7 @@ (define-module (gnu packages mail)
>   #:use-module (gnu packages guile-xyz)
>   #:use-module (gnu packages haskell-xyz)
>   #:use-module (gnu packages icu4c)
>+  #:use-module (gnu packages java)
>   #:use-module (gnu packages kerberos)
>   #:use-module (gnu packages language)
>   #:use-module (gnu packages libbsd)
>@@ -174,6 +175,7 @@ (define-module (gnu packages mail)
>   #:use-module (gnu packages xml)
>   #:use-module (gnu packages xorg)
>   #:use-module (gnu packages)
>+  #:use-module (guix build-system copy)
>   #:use-module (guix build-system cmake)
>   #:use-module (guix build-system emacs)
>   #:use-module (guix build-system glib-or-gtk)
>@@ -4999,3 +5001,32 @@ (define-public aerc
>     ;; <https://lists.sr.ht/~rjarry/aerc-devel/%3Cb5cb213a7d0c699a886971658c2476
>     ;; 1073eb2391%40disroot.org%3E>
>     (license license:gpl3+)))
>+
>+(define-public davmail
>+  (let ((revision "3464"))
>+    (package
>+      (name "davmail")
>+      (version "6.2.0")
>+      (source
>+       (origin
>+         (method url-fetch)
>+         (uri (string-append
>+               "https://downloads.sourceforge.net/project/davmail/davmail/"
>+               version "/davmail-" version "-" revision ".zip"))
>+         (sha256
>+          (base32 "075yip53z29jnf4bi1iw6j60cdicz6hd017nl56991f1vz943aqm"))))
>+      (build-system copy-build-system)

Did you try to build it from source?

>+      (arguments
>+       `(#:install-plan '((".." "share/davmail"))))
>+      (native-inputs (list unzip))
>+      (propagated-inputs (list openjdk))

Building it from source would require to package quite a few new java packages, but I could give you a hand: https://davmail.sourceforge.net/dependencies.html

>+      (home-page "https://davmail.sourceforge.net/")
>+      (synopsis
>+       "POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway")
>+      (description
>+       "Ever wanted to get rid of Outlook? DavMail is a
>+POP/IMAP/SMTP/Caldav/Carddav/LDAP exchange gateway allowing users to use any
>+mail/calendar client (e.g. Thunderbird with Lightning or Apple iCal) with an
>+Exchange server, even from the internet or behind a firewall through Outlook
>+Web Access.")
>+      (license license:gpl2))))
>
>--
>2.41.0
>
>
>

Great! I was looking into packaging this software. 





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#67846] [PATCH] gnu: Add davmail
  2023-12-16  7:42   ` reza via Guix-patches via
@ 2023-12-16  7:52     ` Lars Rustand
       [not found]       ` <962301ff-995f-0ea8-aae9-83ac9eccf288@housseini.me>
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Rustand @ 2023-12-16  7:52 UTC (permalink / raw)
  To: 67846; +Cc: reza


reza <reza@housseini.me> writes:

> Did you try to build it from source?

Oh, sorry. For some reason I didn't think of the jar as a binary, but
obviously it is.

> Building it from source would require to package quite a few new java
> packages, but I could give you a hand:
> https://davmail.sourceforge.net/dependencies.html

That would be great, any help is greatly appreciated! 

It's been a few years since I touched anything Java, and I have no
experience in building Java libraries, but I could certainly try. If you
have any pointers for packaging Java libraries please let me know.

So, based on the dependency tree from your link, this should be the full
list of dependencies needed. Some of which are already packaged.

 [x] junit:junit:jar:4.13.1 (test) 
 [x] org.hamcrest:hamcrest-core:jar:1.3 (test) 
 [ ] org.apache.jackrabbit:jackrabbit-webdav:jar:2.14.6 (compile) 
 [x] org.slf4j:slf4j-api:jar:1.7.25 (compile) 
 [x] org.apache.httpcomponents:httpclient:jar:4.5.6 (compile) 
 [x] org.apache.httpcomponents:httpcore:jar:4.4.10 (compile) 
 [x] commons-logging:commons-logging:jar:1.2 (compile) 
 [x] commons-httpclient:commons-httpclient:jar:3.1 (compile) 
 [ ] org.slf4j:jcl-over-slf4j:jar:1.7.25 (compile) 
 [ ] org.slf4j:slf4j-log4j12:jar:1.7.25 (compile) 
 [x] commons-codec:commons-codec:jar:1.11 (compile) 
 [x] log4j:log4j:jar:1.2.17 (compile) 
 [x] com.sun.mail:javax.mail:jar:1.5.6 (compile) 
 [ ] javax.activation:activation:jar:1.1.1 (compile) 
 [x] org.eclipse:swt:jar:4.9 (system) 
 [x] javax.servlet:servlet-api:jar:2.4 (compile) 
 [ ] net.sourceforge.htmlcleaner:htmlcleaner:jar:2.29 (compile) 
 [x] org.jdom:jdom2:jar:2.0.6.1 (compile) 
 [x] com.fasterxml.woodstox:woodstox-core:jar:6.4.0 (compile) 
 [x] org.codehaus.woodstox:stax2-api:jar:4.2.1 (compile) 
 [ ] org.samba.jcifs:jcifs:jar:1.3.14 (system) 
 [ ] net.freeutils:jcharset:jar:2.0 (compile) 
 [?] org.boris.winrun4j:winrun4j:jar:0.4.5 (system) 
 [x] org.codehaus.jettison:jettison:jar:1.5.4 (compile) 

I didn't check the versions of the stuff that is already packaged, only
if it is packaged or not. Hopefully davmail will work with whatever
version is already packaged for these dependencies.

I think winrun4j cannot possibly be needed, since that is a Windows
thing. And I'm also not sure why jcifs would be needed for an email gateway.

> Great! I was looking into packaging this software.

I also wrote a Shepherd services for davmail and offlineimap. I will
submit these services also, but they need some cleanup first. If you are
interested you can find them in a thread on bug-guix [1], or in my
channel [2].

[1] https://issues.guix.gnu.org/67802
[2] https://github.com/lrustand/guix-config




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#67846] [PATCH] gnu: Add davmail
       [not found]       ` <962301ff-995f-0ea8-aae9-83ac9eccf288@housseini.me>
@ 2023-12-16 11:02         ` reza via Guix-patches via
  2023-12-16 11:50           ` Lars Rustand
  0 siblings, 1 reply; 9+ messages in thread
From: reza via Guix-patches via @ 2023-12-16 11:02 UTC (permalink / raw)
  To: rustand.lars, 67846

[-- Attachment #1: Type: text/plain, Size: 2591 bytes --]

> It's been a few years since I touched anything Java, and I have no
> experience in building Java libraries, but I could certainly try. If you
> have any pointers for packaging Java libraries please let me know.

I'm no expert either but I have started packaging jackrabbit-webdav (see 
attachement). It is by all means very WIP, at some point I stopped 
working on it but would like to get it packaged!

> So, based on the dependency tree from your link, this should be the full
> list of dependencies needed. Some of which are already packaged.
> 
>   [x] junit:junit:jar:4.13.1 (test)
>   [x] org.hamcrest:hamcrest-core:jar:1.3 (test)
>   [ ] org.apache.jackrabbit:jackrabbit-webdav:jar:2.14.6 (compile)
>   [x] org.slf4j:slf4j-api:jar:1.7.25 (compile)
>   [x] org.apache.httpcomponents:httpclient:jar:4.5.6 (compile)
>   [x] org.apache.httpcomponents:httpcore:jar:4.4.10 (compile)
>   [x] commons-logging:commons-logging:jar:1.2 (compile)
>   [x] commons-httpclient:commons-httpclient:jar:3.1 (compile)
>   [ ] org.slf4j:jcl-over-slf4j:jar:1.7.25 (compile)
>   [ ] org.slf4j:slf4j-log4j12:jar:1.7.25 (compile)
>   [x] commons-codec:commons-codec:jar:1.11 (compile)
>   [x] log4j:log4j:jar:1.2.17 (compile)
>   [x] com.sun.mail:javax.mail:jar:1.5.6 (compile)
>   [ ] javax.activation:activation:jar:1.1.1 (compile)
>   [x] org.eclipse:swt:jar:4.9 (system)
>   [x] javax.servlet:servlet-api:jar:2.4 (compile)
>   [ ] net.sourceforge.htmlcleaner:htmlcleaner:jar:2.29 (compile)
>   [x] org.jdom:jdom2:jar:2.0.6.1 (compile)
>   [x] com.fasterxml.woodstox:woodstox-core:jar:6.4.0 (compile)
>   [x] org.codehaus.woodstox:stax2-api:jar:4.2.1 (compile)
>   [ ] org.samba.jcifs:jcifs:jar:1.3.14 (system)
>   [ ] net.freeutils:jcharset:jar:2.0 (compile)
>   [?] org.boris.winrun4j:winrun4j:jar:0.4.5 (system)
>   [x] org.codehaus.jettison:jettison:jar:1.5.4 (compile)
> 
> I didn't check the versions of the stuff that is already packaged, only
> if it is packaged or not. Hopefully davmail will work with whatever
> version is already packaged for these dependencies.
> 
> I think winrun4j cannot possibly be needed, since that is a Windows
> thing. And I'm also not sure why jcifs would be needed for an email gateway.

Yes I think we can assume winrun4j is not needed.

> I also wrote a Shepherd services for davmail and offlineimap. I will
> submit these services also, but they need some cleanup first. If you are
> interested you can find them in a thread on bug-guix [1], or in my
> channel [2].

This sounds great, will check them out!


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: julia-additions.scm --]
[-- Type: text/x-scheme; name=julia-additions.scm, Size: 26327 bytes --]

(define-module (gnu packages julia-additions)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system julia)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages julia-jll)
  #:use-module (gnu packages julia-xyz)
  #:use-module (gnu packages maths)  
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages version-control))

(define-public julia-densityinterface
  (package
    (name "julia-densityinterface")
    (version "0.4.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaMath/DensityInterface.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "10yr69lndh4jdyhjnpm421zvbw8v48bimxjawz05lqkd7k4w4lw6"))))
    (build-system julia-build-system)
    (native-inputs
     (list julia-documenter)) ;; required for tests
    (propagated-inputs
     (list julia-inversefunctions))
    (home-page "https://github.com/JuliaMath/DensityInterface.jl")
    (synopsis "Interface for mathematical/statistical densities in Julia")
    (description "This package defines an interface for mathematical/statistical densities and objects associated with a density in Julia. See the documentation for details.")
    (license license:expat)))

(define-public julia-hypergeometricfunctions
  (package
    (name "julia-hypergeomtericfunctions")
    (version "0.3.10")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaMath/HypergeometricFunctions.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "191ma6jdizba4263924hs3vm9g0mhpnj63jsjnr5qb86sy0viwxx"))))
    (build-system julia-build-system)
    (propagated-inputs
     (list julia-dualnumbers
	   julia-specialfunctions))
    (home-page "https://github.com/JuliaMath/HypergeometricFunctions.jl")
    (synopsis "A Julia package for calculating hypergeometric functions")
    (description "This package implements the generalized hypergeometric function pFq([a1,…,am], [b1,…,bn], z). In particular, the Gauss hypergeometric function is available as _₂F₁(a, b, c, z), confluent hypergeometric function is available as _₁F₁(a, b, z) ≡ HypergeometricFunctions.M(a, b, z) and HypergeometricFunctions.U(a, b, z), as well as _₃F₂([a1, a2, a3], [b1, b2], z).")
    (license license:expat)))

(define-public rmath-julia
  (package
    (name "rmath-julia")
    (version "0.4.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaStats/Rmath-julia")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0fkdc59ajpsbpk0p4h2q617r1nx71x0cc091rybx5glcrz9c3iy6"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
	 ;; no configure script
	 (delete 'configure)
	 ;; no install target
	 (replace 'install
	   (lambda _
             (let ((lib (string-append %output "/lib"))
		   (inc (string-append %output "/include")))
               (mkdir-p lib)
	       (mkdir-p inc)
               (copy-file "src/libRmath-julia.so"
			  (string-append lib "/libRmath-julia.so"))
	       (copy-file "include/Rmath.h"
			  (string-append inc "/Rmath.h")))
	     #t))
	 (add-after 'install 'create-pkg-config-file
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((pkgconfig (string-append %output "/lib/pkgconfig")))
               (mkdir-p pkgconfig)
               (with-output-to-file (string-append pkgconfig "/libRmath-julia.pc")
		 (lambda _
                   (format #t "includedir=~a/include~@
                           libdir=~a/lib~@
                           ~@
                           Name: libRmath-julia~@
                           Version: ~a~@
                           Description: The Rmath function library for julia~@
                           Libs: -L${libdir} -lRmath-julia -lm~@
                           Cflags: -I${includedir}~%"
                           %output %output ,version)))
               #t))))
       #:tests? #f)) ;no tests
    (home-page "https://github.com/JuliaStats/Rmath-julia")
    (synopsis "The Rmath library from R")
    (description "This is a slightly modified version of the standalone Rmath library from R, built to be used with the Rmath.jl Julia package.

The main difference is that it is built to allow defining custom random number generating functions via C function pointers (see include/callback.h). When using the library, these should be defined before calling any of the random functions.")
    (license license:gpl2)))

(define-public julia-rmath-jll
  (package
    (name "julia-rmath-jll")
    (version "0.4.0+0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaBinaryWrappers/Rmath_jll.jl")
             (commit (string-append "Rmath-v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "034qxhvxnb2hjl8zk2qjwz8wsl2jxcm0lzi1424gkc25xd5issia"))))
    (build-system julia-build-system)
    (arguments
     '(#:tests? #f  ; no runtests
       #:phases
       (modify-phases %standard-phases
         (add-after 'link-depot 'override-binary-path
           (lambda* (#:key inputs #:allow-other-keys)
             (map
              (lambda (wrapper)
                (substitute* wrapper
		  (("generate_wrapper_header.*")
                   (string-append
                    "generate_wrapper_header(\"Rmath\", \""
                    (assoc-ref inputs "rmath-julia") "\")\n"))))
              ;; There's a Julia file for each platform, override them all
              (find-files "src/wrappers/" "\\.jl$")))))))
    (inputs
     (list rmath-julia))
    (propagated-inputs
     (list julia-jllwrappers))
    (home-page "https://github.com/JuliaBinaryWrappers/Rmath_jll.jl")
    (synopsis "Rmath-julia library wrappers")
    (description "This package provides a wrapper for the rmath-julia library.")
    (license license:expat)))

(define-public julia-rmath
  (package
    (name "julia-rmath")
    (version "0.7.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaStats/Rmath.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0sg768a98lkrzrnj2qbbgch6f5xhgd8q4c7jkvixy07xrp84wfdb"))))
    (build-system julia-build-system)
    (propagated-inputs
     (list julia-rmath-jll))
    (home-page "https://github.com/JuliaStats/Rmath.jl")
    (synopsis "Archive of functions that emulate R's d-p-q-r functions for probability distributions")
    (description "Archive of functions that emulate R's d-p-q-r functions for probability distributions.")
    (license license:expat)))

(define-public julia-statsfuns
  (package
    (name "julia-statsfuns")
    (version "1.3.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaStats/StatsFuns.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1vx5vjr97in9qbss9bdaw109mc6h82wavkmyv0hf95mijprvvlav"))))
    (build-system julia-build-system)
    (native-inputs
     (list julia-forwarddiff
	   julia-chainrulestestutils))
    (propagated-inputs
     (list julia-chainrulescore
	   julia-hypergeometricfunctions
	   julia-inversefunctions
	   julia-irrationalconstants
	   julia-logexpfunctions
	   julia-reexport
	   julia-rmath
	   julia-specialfunctions))
    (home-page "https://github.com/JuliaStats/StatsFuns.jl")
    (synopsis "Mathematical functions related to statistics.")
    (description "This package provides a collection of mathematical constants and numerical functions for statistical computing.")
    (license license:expat)))

(define-public julia-distributions
  (package
    (name "julia-distributions")
    (version "0.25.86")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaStats/Distributions.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "0icmxka445kqfc6p073fc9l0s4l56frxshhd95f31k0plrfla56s"))))
    (build-system julia-build-system)
    (arguments (list #:tests? #f)) ;; some tests failing
    (native-inputs
     (list julia-json
	   julia-forwarddiff
	   julia-finitedifferences
	   julia-chainrulestestutils
	   julia-stablerngs
	   julia-calculus
	   julia-densityinterface
	   julia-staticarrays
	   julia-offsetarrays))
    (propagated-inputs
     (list julia-chainrulescore
	   julia-densityinterface
	   julia-fillarrays
	   julia-pdmats
	   julia-quadgk
	   julia-specialfunctions
	   julia-statsbase
	   julia-statsfuns))
    (home-page "https://github.com/JuliaStats/Distributions.jl")
    (synopsis "A Julia package for probability distributions and associated functions.")
    (description "A Julia package for probability distributions and associated functions. Particularly, Distributions implements:

Moments (e.g mean, variance, skewness, and kurtosis), entropy, and other properties
Probability density/mass functions (pdf) and their logarithm (logpdf)
Moment generating functions and characteristic functions
Sampling from a population or from a distribution
Maximum likelihood estimation")
    (license license:expat)))

(define-public julia-compositetypes
  (package
    (name "julia-compositetypes")
    (version "0.1.3")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaApproximation/CompositeTypes.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "0m4gsxk2b1v6r4i89f95s5hmn8zijwk4dmzw74wwnlqs25g17vcc"))))
    (build-system julia-build-system)
    (home-page "https://github.com/JuliaApproximation/CompositeTypes.jl")
    (synopsis "A common interface for composite types, which may consist of several components")
    (description "CompositeTypes.jl defines an interface for types that consist of multiple components.")
    (license license:expat)))

(define-public julia-domainsets
  (package
    (name "julia-domainsets")
    (version "0.6.6")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaApproximation/DomainSets.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "0dpp3awhr67bhr0n7iwxir1jd8r6wvw8nwnmr9vhd1za8y6rpid2"))))
    (build-system julia-build-system)
    (arguments (list #:tests? #f)) ;; some tests failing
    (native-inputs (list
		    julia-stablerngs))
    (propagated-inputs
     (list julia-compositetypes
	   julia-intervalsets
	   julia-staticarrays))
    (home-page "https://github.com/JuliaApproximation/DomainSets.jl")
    (synopsis "A Julia package for describing domains in Euclidean space")
    (description "DomainSets.jl is a package designed to represent simple infinite sets. The package makes it easy to represent sets, verify membership of the set, compare sets and construct new sets from existing ones. Domains are considered equivalent if they describe the same set, regardless of their type.")
    (license license:expat)))

(define-public julia-functionwrapperswrappers
  (package
    (name "julia-functionwrapperswrappers")
    (version "0.1.2")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/chriselrod/FunctionWrappersWrappers.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "1jmx0dywwvjsz2474yk8b2d1n0dlbs2zjqvb3avhc4avzymm1y65"))))
    (build-system julia-build-system)
    (propagated-inputs
     (list julia-functionwrappers))
    (home-page "https://github.com/chriselrod/FunctionWrappersWrappers.jl")
    (synopsis "If wrapping your functions once makes them better, why not try wrapping them twice?")
    (description "If wrapping your functions once makes them better, why not try wrapping them twice?")
    (license license:expat)))

(define-public julia-snoopprecompile
  (package
    (name "julia-snoopprecompile")
    (version "2.10.3")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/timholy/SnoopCompile.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "1dxxiv4jd91mj2xrjldd76r7xvibxa6mj2ff61ynpvqamkl0phai"))))
    (build-system julia-build-system)
    (propagated-inputs
     (list julia-preferences))
    (home-page "https://timholy.github.io/SnoopCompile.jl/dev/")
    (synopsis "Making packages work faster with more extensive precompilation")
    (description "SnoopPrecompile is a small dependency used to effectively precompile code needed by your package, particularly on Julia 1.8 and higher.")
    (license license:expat)))

(define-public julia-formatter
  (package
    (name "julia-formatter")
    (version "1.0.25")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/domluna/JuliaFormatter.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "1jmx0dywwvjsz2474yk8b2d1n0dlbs2zjqvb3avhc4avzymm1y65"))))
    (build-system julia-build-system)
    (propagated-inputs
     (list julia-functionwrappers))
    (home-page "https://domluna.github.io/JuliaFormatter.jl/dev/")
    (synopsis "An opinionated code formatter for Julia. Plot twist - the opinion is your own.")
    (description "Width-sensitive formatter for Julia code. Inspired by gofmt, refmt, and black.")
    (license license:expat)))

(define-public julia-graphs
  (package
    (name "julia-graphs")
    (version "1.8.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaGraphs/Graphs.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "010h4llvlqmcrdv9yp6ynjfzi9fym2b4igcq7mjbkrrc8nk710zx"))))
    (build-system julia-build-system)
    (native-inputs
     (list julia-aqua
	   julia-documenter
	   julia-formatter))
    (propagated-inputs
     (list julia-arnoldimethod
	   julia-compat
	   julia-datastructures
	   julia-inflate
	   julia-simpletraits))
    (home-page "https://juliagraphs.org/Graphs.jl/dev/")
    (synopsis "An optimized graphs package for the Julia programming language")
    (description "The goal of Graphs.jl is to offer a performant platform for network and graph analysis in Julia, following the example of libraries such as NetworkX in Python. To this end, Graphs.jl offers:

a set of simple, concrete graph implementations -- SimpleGraph (for undirected graphs) and SimpleDiGraph (for directed graphs)
an API for the development of more sophisticated graph implementations under the AbstractGraph type
a large collection of graph algorithms with the same requirements as this API.")
    (license license:expat)))

(define-public julia-performancetesttools
  (package
    (name "julia-performancetesttools")
    (version "0.1.3")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaTesting/PerformanceTestTools.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "0v5b8vnnhavra18h0136gahiyl7nc6r3rm3hm359ic3da8yzrnhn"))))
    (build-system julia-build-system)
    (home-page "https://juliatesting.github.io/PerformanceTestTools.jl/stable/")
    (synopsis "Test generated IRs inside CI with efficient code generation.")
    (description "Testing generated IRs inside CI is useful for avoiding performance regression. However, test suites are normally run under flags like --check-bounds=yes and --code-coverage=user which block julia compiler to generate efficient code. PerformanceTestTools.@include(script) automatically detects such flags and run the script in a separate julia process started without these flags.")
    (license license:expat)))

(define-public julia-staticarrayscore
  (package
    (name "julia-staticarrayscore")
    (version "1.4.2")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaArrays/StaticArraysCore.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "0m573mxvf0y9h7y8rxrk35haphhqisplx159r77g30qvw7zwpgar"))))
    (build-system julia-build-system)
    (home-page "https://github.com/JuliaArrays/StaticArraysCore.jl")
    (synopsis "Interface package for StaticArrays.jl")
    (description "Interface package for StaticArrays.jl")
    (license license:expat)))

(define-public julia-staticnumbers
  (package
    (name "julia-staticnumbers")
    (version "0.4.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/perrutquist/StaticNumbers.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "1m6drdyxgizc6d5qak9l6c2dv8nb6x5kj7sgfxkgwnfxf6ran257"))))
    (build-system julia-build-system)
    (native-inputs
     (list julia-staticarrays
	   julia-simd))
    (home-page "https://github.com/perrutquist/StaticNumbers.jl")
    (synopsis "Static numbers in Julia")
    (description "Static numbers in Julia")
    (license license:expat)))

(define-public julia-quicktypes
  (package
    (name "julia-quicktypes")
    (version "1.8.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/cstjean/QuickTypes.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "1ndx6bnv4lic6m2iss9s18ip3dg1a8dkgx0qj0vjgij5n1999r33"))))
    (build-system julia-build-system)
    (native-inputs (list julia-macrotools
			 julia-constructionbase))
    (home-page "https://github.com/cstjean/QuickTypes.jl")
    (synopsis "Concise type definitions")
    (description "Concise type definitions")
    (license license:expat)))

(define-public julia-setfield
  (package
    (name "julia-setfield")
    (version "1.1.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/jw3126/Setfield.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "0vdn9s639f120560599m4lhqkk0nsx7qa87fv2mixs1faaihsf6l"))))
    (build-system julia-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
    	  (add-after 'unpack 'fix-test-examples-path
    	    (lambda _
    	      (substitute* "test/test_examples.jl"
    		(("\"..\"") "\".\"")
		(("joinpath\\(dir, filename\\)")
		 "joinpath(\"..\", \"examples\", filename)"))))
	  (add-after 'unpack 'disable-failing-tests
	    (lambda _
	      (substitute* "test/test_setmacro.jl"
		(("\\@test m2 === \\@SMatrix \\[0 1; 0 0\\]" all)
		 (string-append "#" all))
		(("\\@test m3 === \\@SMatrix\\[1 0; 0 0\\]" all)
		 (string-append "#" all)))
	      (substitute* "test/test_staticarrays.jl"
		(("\\@test \\(\\@set v\\[1\\] = 10\\) === \\@SVector \\[10,2,3\\]" all)
		 (string-append "#" all))
		(("\\@test set\\(obj, l1, 3000\\) === set\\(obj, l2, 3000\\) === \\(a=m_mod, b=4\\)" all)
		 (string-append "#" all)))
	      (substitute* "test/perf.jl"
		(("\\@test te_lens\\.memory == te_hand\\.memory" all)
		 (string-append "#" all))
		(("@test te_lens.allocs == te_hand.allocs" all)
		 (string-append "#" all))
		(("\\@test uniquecounts\\(heads_lens\\) == uniquecounts\\(heads_hand\\)" all)
		 (string-append "#" all))
		(("\\@test Set\\(heads_lens\\) == Set\\(heads_hand\\)" all)
		 (string-append "#" all))))))))
    (native-inputs
     (list julia-performancetesttools
	   julia-documenter
	   julia-staticarrays
	   julia-staticnumbers
	   julia-quicktypes
	   julia-benchmarktools))
    (propagated-inputs
     (list julia-macrotools
	   julia-staticarrayscore
	   julia-constructionbase))
    (home-page "https://jw3126.github.io/Setfield.jl/latest/intro/")
    (synopsis "Update deeply nested immutable structs.")
    (description "Update deeply nested immutable structs.")
    (license license:expat)))

(define-public julia-argcheck
  (package
    (name "julia-arcgheck")
    (version "2.1.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/jw3126/ArgCheck.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "13mkcq4ln1vm9hxk3rxs6gcrddbs01bapvp3wb39xqvpb6q3fv6h"))))
    (build-system julia-build-system)
    (native-inputs (list julia-benchmarktools))
    (home-page "https://github.com/jw3126/ArgCheck.jl")
    (synopsis "Package for checking function arguments")
    (description "Package for checking function arguments")
    (license license:expat)))

(define-public julia-initialvalues
  (package
    (name "julia-initialvalues")
    (version "0.3.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaFolds/InitialValues.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "13gihn824c3vxrpm6vg06vr6zmmy43j1qyya48jig8rdkjp820n6"))
       (modules '((guix build utils)))
       (snippet
    	'(begin
    	   ;; delete tests to break cyclic dependency
	   (delete-file "test/test_aqua.jl")
	   (delete-file "test/interop/test_bangbang.jl")))))
    (build-system julia-build-system)
    (native-inputs (list julia-setfield))
    (home-page "https://github.com/JuliaFolds/InitialValues.jl")
    (synopsis "Canonical default initial values and identity elements for Julia")
    (description "Canonical default initial values and identity elements for Julia")
    (license license:expat)))

(define-public julia-bangbang
  (package
    (name "julia-bangbang")
    (version "0.3.37")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaFolds/BangBang.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "0zclsibwmxk47mjlflp6zrnzqnazi04qclpcgvabwga8x351qscw"))
       (modules '((guix build utils)))
       (snippet
    	'(begin
    	   ;; delete failing tests
	   (delete-file "test/test_staticarrays.jl")))))
    (build-system julia-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
	  (add-after 'unpack 'disable-failing-tests
	    (lambda _
	      (substitute* "test/__test_ir.jl"
		(("\\@test nmatches\\(r\"fmul <\\[0\\-9\\]\\+ x double>\", ir_noinbounds\\) == 0" all)
		 (string-append "#" all))))))))
    (native-inputs (list julia-compat
			 julia-constructionbase
			 julia-initialvalues
			 julia-requires
			 julia-tables
			 julia-zygoterules
			 julia-setfield
			 julia-staticarrays
			 julia-structarrays
			 julia-adapt
			 julia-aqua
			 julia-categoricalarrays
			 julia-dataframes
			 julia-performancetesttools
			 julia-typedtables))
    (home-page "https://github.com/JuliaFolds/BangBang.jl")
    (synopsis "Immutables as mutables, mutables as immutables.")
    (description "BangBang.jl implements functions whose name ends with !!. Those functions provide a uniform interface for mutable and immutable data structures. Furthermore, those functions implement the \"widening\" fallback for the case when the usual mutating function does not work (e.g., push!!(Int[], 1.5) creates a new array Float64[1.5]).")
    (license license:expat)))

(define-public julia-transducers
  (package
    (name "julia-transducers")
    (version "0.4.76")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/JuliaFolds/Transducers.jl")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
	(base32 "1rgpp8pba2wa8abb6cgi45axs3ppfxv7sxlhx463k4mpa98s5rxq"))))
    (build-system julia-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
	  (add-after 'unpack 'remove-imports
    	    (lambda _
	      (substitute* "test/runtests.jl"
		(("import LoadAllPackages") "")))))))
    (native-inputs
     (list julia-performancetesttools
	   julia-adapt
	   julia-setfield
	   julia-tables
	   julia-argcheck
	   julia-bangbang))
    ;;(propagated-inputs
    ;; (list julia-arnoldimethod
    ;;	   julia-compat
    ;;	   julia-datastructures
    ;;	   julia-inflate
    ;;	   julia-simpletraits))
    (home-page "https://juliafolds.github.io/Transducers.jl/dev/")
    (synopsis "Efficient transducers for Julia")
    (description "Transducers are transformations of \"sequence\" of input that can be composed very efficiently. The interface used by transducers naturally describes a wide range of processes that is expressible as a succession of steps. Furthermore, transducers can be defined without specifying the details of the input and output (collections, streams, channels, etc.) and therefore achieves a full reusabilIty. Transducers are introduced by Rich Hickey, the creator of the Clojure language. His Strange Loop talk is a great introduction to the idea of transducers.")
    (license license:expat)))

julia-transducers

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#67846] [PATCH] gnu: Add davmail
  2023-12-16 11:02         ` reza via Guix-patches via
@ 2023-12-16 11:50           ` Lars Rustand
       [not found]             ` <558e189e-1819-c38b-2aba-051571260174@housseini.me>
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Rustand @ 2023-12-16 11:50 UTC (permalink / raw)
  To: 67846; +Cc: reza


reza <reza@housseini.me> writes:

> I'm no expert either but I have started packaging jackrabbit-webdav (see 
> attachement). It is by all means very WIP, at some point I stopped 
> working on it but would like to get it packaged!

> [2. text/x-scheme; julia-additions.scm]...

Did you attach the correct file? This seems to be just a bunch of julia
packages, I don't see anything that looks related to jackrabbit.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#67846] [PATCH] gnu: Add davmail
       [not found]             ` <558e189e-1819-c38b-2aba-051571260174@housseini.me>
@ 2023-12-16 20:50               ` reza via Guix-patches via
  2023-12-17 10:06                 ` Lars Rustand
  0 siblings, 1 reply; 9+ messages in thread
From: reza via Guix-patches via @ 2023-12-16 20:50 UTC (permalink / raw)
  To: rustand.lars, 67846

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

> Did you attach the correct file? This seems to be just a bunch of julia
> packages, I don't see anything that looks related to jackrabbit.

Sorry, this was of course the wrong file...

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: java-additions.scm --]
[-- Type: text/x-scheme; name=java-additions.scm, Size: 11157 bytes --]

(define-module (gnu packages java-additions)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix utils)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix gexp)  
  #:use-module (guix git-download)
  #:use-module (guix build-system ant)
  #:use-module (guix build-system maven)
  #:use-module (gnu packages)
  #:use-module (gnu packages java)
  #:use-module (gnu packages compression))

(define-public java-javax-jcr
  (package
    (name "java-javax-jcr")
    (version "2.0")
    (source (origin
              (method url-fetch)
	      (uri (string-append "https://repo1.maven.org/maven2/"
				  "javax/jcr/jcr/"
				  version "/jcr-"
				  version "-sources.jar"))
              (sha256
               (base32
                "163c9y71rm31mgazzxar28r3k4fb9vzk7a1dfs1cgf7d9rnx4i33"))))
    (build-system ant-build-system)
    (arguments
     `(#:tests? #f ; no tests
       #:jar-name "javax-jcr.jar"))
    (home-page "https://jcp.org/aboutJava/communityprocess/final/jsr283/index.html")
    (synopsis "Specifies a standard API to access content repositories in Java independently of implementation")
    (description "
The API should be a standard, implementation independent, way to access content bi-directionally on a 
granular level within a content repository. A Content Repository is a high-level information management 
system that is a superset of traditional data repositories. A content repository implements 
\"content services\" such as: author based versioning, full textual searching, fine grained access control, 
content categorization and content event monitoring. It is these \"content services\" that differentiate a 
Content Repository from a Data Repository.

Many of today's (web)applications are interacting with a content repository in various ways.

This API proposes that content repositories have a dedicated, standard way of interaction with applications 
that deal with content. This API will focus on transactional read/write access, binary content 
(stream operations), textual content, full-text searching, filtering, observation, versioning, handling of 
hard and soft structured content.")
    ;; Day Specification License
    (license license:gpl2)))

(define-public java-oak-jackrabbit-api
  (package
    (name "java-oak-jackrabbit-api")
    (version "1.42.0")
    (source (origin
              (method url-fetch)
	      (uri (string-append "https://dlcdn.apache.org/jackrabbit/oak/"
				  version "/jackrabbit-oak-" version "-src.zip"))
	      (sha256
	       (base32
		"17ra69nn4fl7ja2m23d3995570j5j5ni3fi4kfvfsp82jdmryy6r"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "oak-jackrabbit-api.jar"
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'chdir
           (lambda _ (chdir "oak-jackrabbit-api") #t))
	 (add-before 'build 'prepare
           (lambda _
             (with-directory-excursion
		 "src/test/java/org/apache/jackrabbit/api/"
	       ;; remove test which has build error
               (delete-file "JackrabbitSessionTest.java"))
             #t)))))
    (inputs
     (list unzip
	   java-commons-logging-minimal
           java-mockito-1
           java-junit
	   java-jetbrains-annotations
	   java-javax-jcr
	   java-osgi-annotation))
    (home-page "https://jackrabbit.apache.org/oak/docs/index.html")
    (synopsis "Jackrabbit Oak - the next generation content repository")
    (description "This component contains the interface extensions that Apache Jackrabbit and
Jackrabbit Oak support in addition to the standard JCR API. You can
use these interfaces to access implementation-specific functionality.")
    (license license:asl2.0)))

(define-public java-jackrabbit-oak
  (package
    (name "java-jackrabbit-oak")
    (version "1.42.0")
    (source (origin
              (method url-fetch)
	      (uri (string-append "https://dlcdn.apache.org/jackrabbit/oak/"
				  version "/jackrabbit-oak-" version "-src.zip"))
	      (sha256
	       (base32
		"17ra69nn4fl7ja2m23d3995570j5j5ni3fi4kfvfsp82jdmryy6r"))))
    (build-system maven-build-system)
    (arguments
     `(#:exclude
       (
					;   ("org.apache.maven.plugins" .
					;	 ("maven-deploy-plugin" "maven-javadoc-plugin" "maven-idea-plugin"
					;	  "maven-eclipse-plugin" "maven-release-plugin"))
	("org.apache.rat" . ("apache-rat-plugin"))
	("org.codehaus.mojo" . ("animal-sniffer-maven-plugin"))
	("org.jacoco" . ("jacoco-maven-plugin"))
	("org.apache.felix" . ("maven-bundle-plugin")))
       #:local-packages (("javax.jcr" . (("jcr" . "2.0")))
			 ("org.osgi" . (("org.osgi.annotation" . "6.0.0")))
			 ("org.jetbrains" . (("annotations". "19.0.0")))
			 ("org.mockito" . (("mockito-core" . "1.10.19"))))))
    (native-inputs (list unzip java-javax-jcr))
    (synopsis "Jackrabbit Oak - the next generation content repository")
    (description
     "Jackrabbit Oak is an effort to implement a scalable and performant hierarchical 
content repository for use as the foundation of modern world-class web sites and other 
demanding content applications. The Oak effort is a part of the Apache Jackrabbit 
project. Apache Jackrabbit is a project of the Apache Software Foundation.
")
    (home-page "https://jackrabbit.apache.org/oak/docs/index.html")
    (license license:asl2.0)))

(define-public java-jackrabbit
  (package
    (name "java-jackrabbit")
    (version "2.21.10")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://dlcdn.apache.org/jackrabbit/"
				  version "/jackrabbit-" version "-src.zip"))
              (sha256
               (base32
		"1g902qacdpn4hm6mi560bbxjjrrrsja4yddv8cp8bg2naf4jivic"))))
    (build-system maven-build-system)
    (arguments
     `(#:exclude
       (("org.apache.maven.plugins" .
	 ("maven-deploy-plugin" "maven-javadoc-plugin" "maven-idea-plugin"
	  "maven-eclipse-plugin" "maven-release-plugin"))
	("org.apache.rat" . ("apache-rat-plugin"))
	("org.codehaus.mojo" . ("animal-sniffer-maven-plugin"))
	("org.jacoco" . ("jacoco-maven-plugin"))
	("org.apache.felix" . ("maven-bundle-plugin")))
       #:local-packages (("javax.jcr" . (("jcr" . "2.0")))
			 ("org.apache.jackrabbit" . (("oak-jackrabbit-api" . "1.42.0")))
			 ("org.osgi" . (("org.osgi.annotation" . "6.0.0")))
			 ("cglib" . (("cglib" . "3.2.4"))))))
    (native-inputs (list unzip java-junit java-javax-jcr))
    (synopsis "This is the WebDAV Library component of the Apache Jackrabbit project")
    (description
     "This component provides interfaces and common utility classes used for
building a WebDAV server or client. The following RFC have been integrated:

    * RFC 2518 (WebDAV - HTTP Extensions for Distributed Authoring)
    * RFC 3253 (DeltaV - Versioning Extensions to WebDAV)
    * RFC 3648 (Ordered Collections Protocol)
    * RFC 3744 (Access Control Protocol)
    * DAV Searching and Locating  (DASL)
    * Binding Extensions to Web Distributed Authoring and Versioning (WebDAV) (experimental)

In addition this library defines (unspecified)

    * Observation
    * Bundling multiple request with extensions to locking")
    (home-page "https://jackrabbit.apache.org/jcr/index.html")
    (license license:asl2.0)))

(define-public java-jackrabbit-webdav
  (package
    (name "java-jackrabbit-webdav")
    (version "2.21.10")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://dlcdn.apache.org/jackrabbit/"
				  version "/jackrabbit-" version "-src.zip"))
              (sha256
               (base32
		"1g902qacdpn4hm6mi560bbxjjrrrsja4yddv8cp8bg2naf4jivic"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "jackrabbit-webdav.jar"
       #:test-exclude (list "**/ParserTest.java") ;; fails unexpected
       #:phases
       (modify-phases %standard-phases
	 (add-after 'unpack 'chdir
           (lambda _ (chdir "jackrabbit-webdav") #t)))))
    (native-inputs (list
		    unzip
		    java-junit
		    java-slf4j-simple
		    java-httpcomponents-httpcore
		    java-httpcomponents-httpclient
		    java-javaee-servletapi
		    java-osgi-annotation))
    (synopsis "This is the WebDAV Library component of the Apache Jackrabbit project")
    (description
     "This component provides interfaces and common utility classes used for
building a WebDAV server or client. The following RFC have been integrated:

    * RFC 2518 (WebDAV - HTTP Extensions for Distributed Authoring)
    * RFC 3253 (DeltaV - Versioning Extensions to WebDAV)
    * RFC 3648 (Ordered Collections Protocol)
    * RFC 3744 (Access Control Protocol)
    * DAV Searching and Locating  (DASL)
    * Binding Extensions to Web Distributed Authoring and Versioning (WebDAV) (experimental)

In addition this library defines (unspecified)

    * Observation
    * Bundling multiple request with extensions to locking")
    (home-page "https://jackrabbit.apache.org")
    (license license:asl2.0)))

(define-public java-davmail
  (package
    (name "java-davmail")
    (version "6.0.1")
    (source (origin
              (method url-fetch)
	      (uri (string-append "https://sourceforge.net/projects/davmail/files/davmail/"
				  version "/davmail-srconly-" version "-3390.tgz"))
	      (sha256
	       (base32
		"0q5yix25i253w9kpqc8wiryvzpfrbqalky8byf5bz66v13c07y7p"))))
    (build-system ant-build-system)
    (arguments
     `(#:modules ((guix build ant-build-system)
                  (guix build java-utils)
                  (guix build utils)
                  (srfi srfi-1)
                  (ice-9 match))
					;#:build-target "jar"
       #:jar-name "davmail.jar"
       #:build-target "jar"))
					;#:phases
					;(modify-phases %standard-phases
					;	 (add-after 'unpack 'create-libdir
					;	   (lambda* (#:key inputs #:allow-other-keys)
					;	     (mkdir-p "lib")
					;					;(for-each
					;					; (lambda (file)
					;					;	(let ((target (string-append "lib/" (basename file))))
					;					;	  (unless (file-exists? target)
					;					;	    (symlink file target))))
					;					; (append-map (match-lambda
					;					;		    (dir
					;					;		     (find-files dir "\\.jar$")))
					;					;		  inputs))
					;	     #t)))))
    (inputs (list
					;java-junit
	     java-log4j-core
	     java-javax-mail
	     ;java-slf4j-simple
	     java-httpcomponents-httpcore
	     java-httpcomponents-httpclient
					;java-javaee-servletapi
					;java-osgi-annotation
	     ))
    (synopsis "DavMail POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway")
    (description
     "Ever wanted to get rid of Outlook ? DavMail is a POP/IMAP/SMTP/Caldav/Carddav/LDAP 
exchange gateway allowing users to use any mail/calendar client (e.g. Thunderbird with 
Lightning or Apple iCal) with an Exchange server, even from the internet or behind a firewall 
through Outlook Web Access. DavMail now includes an LDAP gateway to Exchange global address 
book and user personal contacts to allow recipient address completion in mail compose window 
and full calendar support with attendees free/busy display.")
    (home-page "http://davmail.sourceforge.net/index.html")
    (license license:gpl2)))

java-davmail

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#67846] [PATCH] gnu: Add davmail
  2023-12-16 20:50               ` reza via Guix-patches via
@ 2023-12-17 10:06                 ` Lars Rustand
       [not found]                   ` <3436D069-41B2-45A3-A8BF-9F883D83F224@housseini.me>
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Rustand @ 2023-12-17 10:06 UTC (permalink / raw)
  To: 67846; +Cc: reza


I've made a little progress here, added packages for three of the
packages we were missing:

- java-htmlcleaner
- java-jcharset
- java-jcifs


I also added a couple of packages that were not listed as dependencies
but were needed:

- java-openjfx-swing
- java-openjfx-web

java-openjfx-swing needs to have the patch
java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch from
https://issues.guix.gnu.org/41360 applied to java-openjfx-build.

Your jackrabbit-webdav package built without problems. So the only
packages we are missing now seems to be:

- java-javax-activation
- java-sfl4j-log4j12
- java-winrun4j

I added a packaged definition for java-sfl4j-log4j12 but it is currently
failing to build with some undefined reference to
`org.apache.log4j.helpers.ThreadLocalMap`.

javax.activation has been taken over by Eclipse and moved to
jakarta.activation. I haven't yet tried to package this one since I
don't know what is the best way to handle this and if it is possible to
use the new jakarta.activation directly in place of javax.activation.

It also seems that winrun4j is needed after all, since I get some build
error related to winrun4j when trying to build davmail. Unless we are
able to remove references to it we might need to package winrun4j also.

Attaching the java-additions file with my changes added.

--8<---------------cut here---------------start------------->8---
(define-module (gnu packages java-additions)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix utils)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix gexp)  
  #:use-module (guix git-download)
  #:use-module (guix build-system ant)
  #:use-module (guix build-system maven)
  #:use-module (gnu packages)
  #:use-module (gnu packages cmake)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages java)
  #:use-module (gnu packages java-bootstrap)
  #:use-module (gnu packages java-compression)
  #:use-module (gnu packages java-xml)
  #:use-module (gnu packages gperf)
  #:use-module (gnu packages python)
  #:use-module (gnu packages ruby))


(define-public java-javax-jcr
  (package
    (name "java-javax-jcr")
    (version "2.0")
    (source (origin
              (method url-fetch)
	      (uri (string-append "https://repo1.maven.org/maven2/"
				  "javax/jcr/jcr/"
				  version "/jcr-"
				  version "-sources.jar"))
              (sha256
               (base32
                "163c9y71rm31mgazzxar28r3k4fb9vzk7a1dfs1cgf7d9rnx4i33"))))
    (build-system ant-build-system)
    (arguments
     `(#:tests? #f ; no tests
       #:jar-name "javax-jcr.jar"))
    (home-page "https://jcp.org/aboutJava/communityprocess/final/jsr283/index.html")
    (synopsis "Specifies a standard API to access content repositories in Java independently of implementation")
    (description "
The API should be a standard, implementation independent, way to access content bi-directionally on a 
granular level within a content repository. A Content Repository is a high-level information management 
system that is a superset of traditional data repositories. A content repository implements 
\"content services\" such as: author based versioning, full textual searching, fine grained access control, 
content categorization and content event monitoring. It is these \"content services\" that differentiate a 
Content Repository from a Data Repository.

Many of today's (web)applications are interacting with a content repository in various ways.

This API proposes that content repositories have a dedicated, standard way of interaction with applications 
that deal with content. This API will focus on transactional read/write access, binary content 
(stream operations), textual content, full-text searching, filtering, observation, versioning, handling of 
hard and soft structured content.")
    ;; Day Specification License
    (license license:gpl2)))

(define-public java-oak-jackrabbit-api
  (package
    (name "java-oak-jackrabbit-api")
    (version "1.42.0")
    (source (origin
              (method url-fetch)
	      (uri (string-append "https://dlcdn.apache.org/jackrabbit/oak/"
				  version "/jackrabbit-oak-" version "-src.zip"))
	      (sha256
	       (base32
		"17ra69nn4fl7ja2m23d3995570j5j5ni3fi4kfvfsp82jdmryy6r"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "oak-jackrabbit-api.jar"
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'chdir
           (lambda _ (chdir "oak-jackrabbit-api") #t))
	 (add-before 'build 'prepare
           (lambda _
             (with-directory-excursion
		 "src/test/java/org/apache/jackrabbit/api/"
	       ;; remove test which has build error
               (delete-file "JackrabbitSessionTest.java"))
             #t)))))
    (inputs
     (list unzip
	   java-commons-logging-minimal
           java-mockito-1
           java-junit
	   java-jetbrains-annotations
	   java-javax-jcr
	   java-osgi-annotation))
    (home-page "https://jackrabbit.apache.org/oak/docs/index.html")
    (synopsis "Jackrabbit Oak - the next generation content repository")
    (description "This component contains the interface extensions that Apache Jackrabbit and
Jackrabbit Oak support in addition to the standard JCR API. You can
use these interfaces to access implementation-specific functionality.")
    (license license:asl2.0)))

(define-public java-jackrabbit-oak
  (package
    (name "java-jackrabbit-oak")
    (version "1.42.0")
    (source (origin
              (method url-fetch)
	      (uri (string-append "https://dlcdn.apache.org/jackrabbit/oak/"
				  version "/jackrabbit-oak-" version "-src.zip"))
	      (sha256
	       (base32
		"17ra69nn4fl7ja2m23d3995570j5j5ni3fi4kfvfsp82jdmryy6r"))))
    (build-system maven-build-system)
    (arguments
     `(#:exclude
       (
					;   ("org.apache.maven.plugins" .
					;	 ("maven-deploy-plugin" "maven-javadoc-plugin" "maven-idea-plugin"
					;	  "maven-eclipse-plugin" "maven-release-plugin"))
	("org.apache.rat" . ("apache-rat-plugin"))
	("org.codehaus.mojo" . ("animal-sniffer-maven-plugin"))
	("org.jacoco" . ("jacoco-maven-plugin"))
	("org.apache.felix" . ("maven-bundle-plugin")))
       #:local-packages (("javax.jcr" . (("jcr" . "2.0")))
			 ("org.osgi" . (("org.osgi.annotation" . "6.0.0")))
			 ("org.jetbrains" . (("annotations". "19.0.0")))
			 ("org.mockito" . (("mockito-core" . "1.10.19"))))))
    (native-inputs (list unzip java-javax-jcr))
    (synopsis "Jackrabbit Oak - the next generation content repository")
    (description
     "Jackrabbit Oak is an effort to implement a scalable and performant hierarchical 
content repository for use as the foundation of modern world-class web sites and other 
demanding content applications. The Oak effort is a part of the Apache Jackrabbit 
project. Apache Jackrabbit is a project of the Apache Software Foundation.
")
    (home-page "https://jackrabbit.apache.org/oak/docs/index.html")
    (license license:asl2.0)))

(define-public java-jackrabbit
  (package
    (name "java-jackrabbit")
    (version "2.21.21")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://dlcdn.apache.org/jackrabbit/"
				  version "/jackrabbit-" version "-src.zip"))
              (sha256
               (base32
		"0i2m0zmbb7xcvg2zwkdj16xjr9jhv5a0rxf75r2vad7jpkym99sz"))))
    (build-system maven-build-system)
    (arguments
     `(#:exclude
       (("org.apache.maven.plugins" .
	 ("maven-deploy-plugin" "maven-javadoc-plugin" "maven-idea-plugin"
	  "maven-eclipse-plugin" "maven-release-plugin"))
	("org.apache.rat" . ("apache-rat-plugin"))
	("org.codehaus.mojo" . ("animal-sniffer-maven-plugin"))
	("org.jacoco" . ("jacoco-maven-plugin"))
	("org.apache.felix" . ("maven-bundle-plugin")))
       #:local-packages (("javax.jcr" . (("jcr" . "2.0")))
			 ("org.apache.jackrabbit" . (("oak-jackrabbit-api" . "1.42.0")))
			 ("org.osgi" . (("org.osgi.annotation" . "6.0.0")))
			 ("cglib" . (("cglib" . "3.2.4"))))))
    (native-inputs (list unzip java-junit java-javax-jcr))
    (synopsis "This is the WebDAV Library component of the Apache Jackrabbit project")
    (description
     "This component provides interfaces and common utility classes used for
building a WebDAV server or client. The following RFC have been integrated:

    * RFC 2518 (WebDAV - HTTP Extensions for Distributed Authoring)
    * RFC 3253 (DeltaV - Versioning Extensions to WebDAV)
    * RFC 3648 (Ordered Collections Protocol)
    * RFC 3744 (Access Control Protocol)
    * DAV Searching and Locating  (DASL)
    * Binding Extensions to Web Distributed Authoring and Versioning (WebDAV) (experimental)

In addition this library defines (unspecified)

    * Observation
    * Bundling multiple request with extensions to locking")
    (home-page "https://jackrabbit.apache.org/jcr/index.html")
    (license license:asl2.0)))

(define-public java-jackrabbit-webdav
  (package
    (name "java-jackrabbit-webdav")
    (version "2.21.21")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://dlcdn.apache.org/jackrabbit/"
				  version "/jackrabbit-" version "-src.zip"))
              (sha256
               (base32
		"0i2m0zmbb7xcvg2zwkdj16xjr9jhv5a0rxf75r2vad7jpkym99sz"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "jackrabbit-webdav.jar"
       #:test-exclude (list "**/ParserTest.java") ;; fails unexpected
       #:phases
       (modify-phases %standard-phases
	 (add-after 'unpack 'chdir
           (lambda _ (chdir "jackrabbit-webdav") #t)))))
    (native-inputs (list
		    unzip
		    java-junit
		    java-slf4j-simple
		    java-httpcomponents-httpcore
		    java-httpcomponents-httpclient
		    java-javaee-servletapi
		    java-osgi-annotation))
    (synopsis "This is the WebDAV Library component of the Apache Jackrabbit project")
    (description
     "This component provides interfaces and common utility classes used for
building a WebDAV server or client. The following RFC have been integrated:

    * RFC 2518 (WebDAV - HTTP Extensions for Distributed Authoring)
    * RFC 3253 (DeltaV - Versioning Extensions to WebDAV)
    * RFC 3648 (Ordered Collections Protocol)
    * RFC 3744 (Access Control Protocol)
    * DAV Searching and Locating  (DASL)
    * Binding Extensions to Web Distributed Authoring and Versioning (WebDAV) (experimental)

In addition this library defines (unspecified)

    * Observation
    * Bundling multiple request with extensions to locking")
    (home-page "https://jackrabbit.apache.org")
    (license license:asl2.0)))

(define-public java-davmail
  (package
    (name "java-davmail")
    (version "6.0.1")
    (source (origin
              (method url-fetch)
	      (uri (string-append "https://sourceforge.net/projects/davmail/files/davmail/"
				  version "/davmail-srconly-" version "-3390.tgz"))
	      (sha256
	       (base32
		"0q5yix25i253w9kpqc8wiryvzpfrbqalky8byf5bz66v13c07y7p"))))
    (build-system ant-build-system)
    (arguments
     `(#:modules ((guix build ant-build-system)
                  (guix build java-utils)
                  (guix build utils)
                  (srfi srfi-1)
                  (ice-9 match))
					;#:build-target "jar"
       #:source-dir "src/"
       #:test-dir "src/test"
       #:tests? #false
       #:jar-name "davmail.jar"
       #:build-target "jar"))
					;#:phases
					;(modify-phases %standard-phases
					;	 (add-after 'unpack 'create-libdir
					;	   (lambda* (#:key inputs #:allow-other-keys)
					;	     (mkdir-p "lib")
					;					;(for-each
					;					; (lambda (file)
					;					;	(let ((target (string-append "lib/" (basename file))))
					;					;	  (unless (file-exists? target)
					;					;	    (symlink file target))))
					;					; (append-map (match-lambda
					;					;		    (dir
					;					;		     (find-files dir "\\.jar$")))
					;					;		  inputs))
					;	     #t)))))
    (inputs (list
					;java-junit
	     ;;java-log4j-core
	     ;;java-log4j-api
	     java-slf4j-api
	     java-log4j-1.2-api
	     ;;java-slf4j-log4j12
             java-jcl-over-slf4j
             java-openjfx-base
             java-openjfx-build
             java-openjfx-controls
             java-openjfx-graphics
             java-openjfx-media
             java-openjfx-web
             java-openjfx-swing ;; Maybe not all of these are needed
	     java-javax-mail
             java-htmlcleaner
             java-jackrabbit-webdav
             java-junit
	     ;;java-slf4j-simple
             java-jcifs
             java-swt
             java-woodstox-core
             java-stax
             java-stax2-api
             java-jcharset
	     java-httpcomponents-httpcore
	     java-httpcomponents-httpclient
             java-commons-httpclient
             java-commons-codec
             java-jettison
             java-javaee-servletapi
					;java-osgi-annotation
	     ))
    (synopsis "POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway")
    (description
     "Ever wanted to get rid of Outlook? DavMail is a POP/IMAP/SMTP/Caldav/Carddav/LDAP 
exchange gateway allowing users to use any mail/calendar client (e.g. Thunderbird with 
Lightning or Apple iCal) with an Exchange server, even from the internet or behind a firewall 
through Outlook Web Access. DavMail now includes an LDAP gateway to Exchange global address 
book and user personal contacts to allow recipient address completion in mail compose window 
and full calendar support with attendees free/busy display.")
    (home-page "http://davmail.sourceforge.net/index.html")
    (license license:gpl2)))

(define-public java-htmlcleaner
  (package
    (name "java-htmlcleaner")
    (version "0.0")
    (source (origin
              (method url-fetch)
              (uri (string-append
               "https://downloads.sourceforge.net/project/htmlcleaner/htmlcleaner/htmlcleaner%20v2.29/htmlcleaner-src-2.29.zip"))
              (sha256 (base32 "0l2k94rklbhxbcqqzn46y4l089jdi5ivy2g1h7vk8vxyc5qqvilz"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "htmlcleaner.jar"
       #:tests? #false
       #:source-dir "../src/main"
       #:test-dir "../src/test"))
    (native-inputs
     (list java-jdom2
           unzip
           java-junit))
    (home-page "")
    (synopsis "")
    (description "")
    ;; GPLv2 only
    (license license:bsd-3)))

(define-public java-jcharset
  (package
    (name "java-jcharset")
    (version "0.0")
    (source (origin
              (method url-fetch)
              (uri (string-append
               "https://www.freeutils.net/source/jcharset/jcharset-2.1-distribution.zip"))
              (sha256 (base32 "1k1fqwgrpxp81r93n2irw4lhsnx217jky7lz8h3wbic14iycz8v9"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "jcharset.jar"
       #:tests? #false
       #:source-dir "src/main"
       #:test-dir "src/test"))
    (native-inputs
     (list unzip
           java-junit))
    (home-page "")
    (synopsis "")
    (description "")
    ;; GPLv2 only
    (license license:bsd-3)))

(define-public java-slf4j-log4j12
  (package
    (name "java-slf4j-log4j12")
    (version "0.0.0")
    (source (package-source java-slf4j-api))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "slf4j-log4j12.jar"
       #:source-dir "slf4j-log4j12/src/main"
       #:test-dir "slf4j-log4j12/src/test"
       #:phases
       (modify-phases %standard-phases
         ;; The tests need some test classes from slf4j-api
         (add-before 'check 'build-slf4j-api-test-helpers
           (lambda _
             ;; Add current dir to CLASSPATH ...
             (setenv "CLASSPATH"
                     (string-append (getcwd) ":" (getenv "CLASSPATH")))
             ;; ... and build test helper classes here:
             (apply invoke
                    `("javac" "-d" "."
                      ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
         (replace 'install
           (install-from-pom "slf4j-log4j12/pom.xml")))))
    (propagated-inputs
     (list java-slf4j-api
           java-log4j-1.2-api))
           ;;java-log4j-core))
    (native-inputs
     (list java-junit
           java-logback-core
           java-logback-classic
           java-log4j-1.2-api
           java-hamcrest-core))
    (home-page "https://www.slf4j.org/")
    (synopsis "")
    (description "")
    (license license:expat)))


;; This might not be needed at all. It was listed as a dependency for jacrabbit,
;; but I don't think jackrabbit uses it
(define-public java-jcl-over-slf4j
  (package
    (name "java-jcl-over-slf4j")
    (version "0.0.0")
    (source (package-source java-slf4j-api))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "jcl-over-slf4j.jar"
       #:source-dir "jcl-over-slf4j/src/main"
       #:tests? #false
       #:test-dir "jcl-over-slf4j/src/test"
       ;;#:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java")
       #:phases
       (modify-phases %standard-phases
         ;; The tests need some test classes from slf4j-api
         (add-before 'check 'build-slf4j-api-test-helpers
           (lambda _
             ;; Add current dir to CLASSPATH ...
             (setenv "CLASSPATH"
                     (string-append (getcwd) ":" (getenv "CLASSPATH")))
             ;; ... and build test helper classes here:
             (apply invoke
                    `("javac" "-d" "."
                      ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
         (replace 'install
           (install-from-pom "jcl-over-slf4j/pom.xml")))))
    (propagated-inputs
     (list java-slf4j-api
           java-log4j-1.2-api
           java-log4j-core))
    (native-inputs
     (list java-junit)) ;java-hamcrest-core))
    (home-page "https://www.slf4j.org/")
    (synopsis "")
    (description "")
    (license license:expat)))

(define-public java-jcifs
  (package
    (name "java-jcifs")
    (version "0.0.0")
    (source (origin
              (method url-fetch)
              (uri (string-append
               "https://www.jcifs.org/src/jcifs-1.3.19.zip"))
              (sha256 (base32 "06pj5qi8giplsxdp5y4l4j55pj13n13k8lrqpk96jvm7xjhqc7m3"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "jcifs.jar"
       #:source-dir "src/jcifs"
       #:tests? #false
       #:test-dir "src/test"))
    (propagated-inputs
     (list ))
    (native-inputs
     (list java-junit
	   java-javaee-servletapi
           unzip)) ;java-hamcrest-core))
    (home-page "")
    (synopsis "")
    (description "")
    (license license:expat)))

(define-public java-openjfx-swing
  (package (inherit java-openjfx-build)
    (name "java-openjfx-swing")
    (arguments
     `(#:jar-name "java-openjfx-swing.jar"
       #:source-dir "modules/swing/src/main/java"
       #:tests? #f
       #:test-dir "modules/swing/src/test"))
    (propagated-inputs
     (list java-openjfx-base  
           java-openjfx-graphics
           java-openjfx-controls
           java-openjfx-build
           java-openjfx-media))
    (description "OpenJFX is a client application platform for desktop,
mobile and embedded systems built on Java.  Its goal is to produce a
modern, efficient, and fully featured toolkit for developing rich client
applications.  This package contains base classes for the OpenJFX
distribution.")))



(define-public java-openjfx-web
  (package (inherit java-openjfx-build)
    (name "java-openjfx-web")
    (arguments
     `(#:jar-name "java-openjfx-web.jar"
       #:source-dir (string-join '("modules/web/src/main/java"
                                   "modules/web/src/main/native/Source/WebCore/bindings/java/dom3")
                                 ";")
       #:tests? #f
       #:modules ((ice-9 match)
                  (guix build ant-build-system)
                  (guix build utils))
       #:phases
       (modify-phases %standard-phases
         (replace 'build
           (lambda* (#:key inputs #:allow-other-keys)
             (let* ((module (string-append (getcwd) "/modules/web"))
                    (classes (string-append module "/build/classes/java/main")))
               (invoke "ant" "compile" (string-append "-Dclasses.dir=" classes)))
             #t))
         (add-after 'build 'generate-headers
           (lambda* (#:key inputs #:allow-other-keys)
             (let* ((module (string-append (getcwd) "/modules/web"))
                    (classes (string-append module "/build/classes/java/main"))
                    (web-generated-headers (string-append module "/build/generated-src/headers"))
                    (web-generated-classes '("com.sun.webkit.ContextMenu"
                                             "com.sun.webkit.ContextMenuItem"
                                             "com.sun.webkit.CursorManager"
                                             "com.sun.webkit.PageCache"
                                             "com.sun.webkit.PopupMenu"
                                             "com.sun.webkit.SharedBuffer"
                                             "com.sun.webkit.WebPage"
                                             "com.sun.webkit.LoadListenerClient"
                                             "com.sun.webkit.event.WCFocusEvent"
                                             "com.sun.webkit.event.WCKeyEvent"
                                             "com.sun.webkit.event.WCMouseEvent"
                                             "com.sun.webkit.event.WCMouseWheelEvent"
                                             "com.sun.webkit.graphics.GraphicsDecoder"
                                             "com.sun.webkit.graphics.RenderMediaControls"
                                             "com.sun.webkit.graphics.RenderTheme"
                                             "com.sun.webkit.graphics.ScrollBarTheme"
                                             "com.sun.webkit.graphics.WCMediaPlayer"
                                             "com.sun.webkit.graphics.WCGraphicsManager"
                                             "com.sun.webkit.graphics.WCRenderQueue"
                                             "com.sun.webkit.graphics.WCPath"
                                             "com.sun.webkit.graphics.WCPathIterator"
                                             "com.sun.webkit.Timer"
                                             "com.sun.webkit.WCFrameView"
                                             "com.sun.webkit.WCPasteboard"
                                             "com.sun.webkit.WCPluginWidget"
                                             "com.sun.webkit.dom.CharacterDataImpl"
                                             "com.sun.webkit.dom.JSObject"
                                             "com.sun.webkit.network.SocketStreamHandle"
                                             "com.sun.webkit.network.URLLoader"
                                             "com.sun.webkit.text.TextBreakIterator"
                                             "com.sun.webkit.text.TextNormalizer"))
                    (graphics (assoc-ref inputs "java-openjfx-graphics")))
               (mkdir-p web-generated-headers)
               (apply invoke
                      "javah"
                      "-Djava.ext.dirs="
                      "-XDignore.symbol.file"
                      "-XDuseUnsharedTable=true"
                      "-d" web-generated-headers
                      "-cp" (string-join (cons* classes (find-files graphics ".jar$")) ":")
                      web-generated-classes))
             #t))

         (add-after 'generate-headers 'compile-native-linux
           (lambda* (#:key inputs system outputs #:allow-other-keys)
             (let*  ((module (string-append (getcwd) "/modules/web"))
                     ;;
                     (webkit-native-dest (string-append module "/build/linux"))
                     (webkit-native-src (string-append module "/src/main/native"))
                     ;;
                     (lib (string-append (assoc-ref outputs "out") "/lib"))
                     ;; uname -m
                     (machine (match system
                                ("x86_64-linux"   "x86_64")
                                ("i686-linux"     "i686")
                                ;; Prevent errors when querying this
                                ;; package on unsupported platforms,
                                ;; e.g. when running "guix package
                                ;; --search="
                                (_                "UNSUPPORTED"))))

               (mkdir-p webkit-native-dest)
               (setenv "PYTHONDONTWRITEBYTECODE" "1")
               (setenv "WEBKIT_OUTPUTDIR" webkit-native-dest)
               (apply invoke `("perl"
                               ,(string-append webkit-native-src "/Tools/Scripts/set-webkit-configuration")
                               ,(if ,(target-64bit?) "--64-bit" "--32-bit")
                               "--release"))

               (substitute* (find-files "." "xsltlocale\\.h")
                 (("#include <xlocale.h>") "#include <locale.h>"))
               (invoke "perl"
                       (string-append webkit-native-src "/Tools/Scripts/build-webkit")
                       "--java" ; webkit port
                       "--skip-library-update"
                       "--verbose"
                       (string-append
                        "--cmakeargs="
                        (string-join
                         (list "-DCMAKE_SYSTEM_NAME=Linux"
                               ;; ensure that the libraries are installed into /lib
                               (string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
                               ;; add input libraries to rpath
                               "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
                               ;; enable verbose output from builds
                               "-DCMAKE_VERBOSE_MAKEFILE=ON"
                               (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
                                              "\"-Wl,-rpath=" lib "\"")
                               (string-append "-DCMAKE_SYSTEM_PROCESSOR=" machine)

                               "-DJAVAFX_RELEASE_VERSION=8.0"
                               ;;"-W"
                               "-Wall"
                               "-Werror=implicit-function-declaration"
                               "-Wl,--gc-sections"
                               "-Wno-parentheses"
                               "-Wno-unused")))))
                               ;;"-fPIC"
                               ;;"-fno-omit-frame-pointer"
                               ;;"-fno-strict-aliasing"
                               ;;"-fstack-protector")))))
             #t))

         (add-after 'compile-native-linux 'install-native
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
               (for-each (lambda (file)
                           (install-file file lib))
                         (find-files "." "\\.so$")))))

         (add-before 'install 'build-jar
           (lambda _
             (let* ((module (string-append (getcwd) "/modules/web"))
                    (resources (string-append module "/src/main/resources"))
                    (classes (string-append module "/build/classes/java/main")))
               (copy-recursively resources classes)
               (invoke "ant" "jar" (string-append "-Dclasses.dir=" classes)))
             #t)))))
    (inputs
     `(("antlr3" ,antlr3)
       ("java-stringtemplate" ,java-stringtemplate)))
    (native-inputs
     `(("java-junit" ,java-junit)
       ("java-hamcrest-core" ,java-hamcrest-core)
       ("cmake" ,cmake)
       ("gcc" ,gcc)
       ("gtk" ,gtk+-2)
       ("gtk3" ,gtk+)
       ("ruby" ,ruby)
       ("perl" ,perl)
       ("gperf" ,gperf)
       ("python-2" ,python-2)
       ("pkg-config" ,pkg-config)))
    (propagated-inputs
     `(("java-openjfx-controls" ,java-openjfx-controls)
       ("java-openjfx-media" ,java-openjfx-media)
       ("java-openjfx-graphics" ,java-openjfx-graphics)))))


java-davmail
--8<---------------cut here---------------end--------------->8---




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#67846] [PATCH] gnu: Add davmail
       [not found]                   ` <3436D069-41B2-45A3-A8BF-9F883D83F224@housseini.me>
@ 2023-12-18  7:01                     ` reza via Guix-patches via
  0 siblings, 0 replies; 9+ messages in thread
From: reza via Guix-patches via @ 2023-12-18  7:01 UTC (permalink / raw)
  To: rustand.lars, 67846

On December 17, 2023 10:06:14 AM UTC, Lars Rustand <rustand.lars@gmail.com> wrote:
>
>I've made a little progress here, added packages for three of the
>packages we were missing:
>
>- java-htmlcleaner
>- java-jcharset
>- java-jcifs
>
>
>I also added a couple of packages that were not listed as dependencies
>but were needed:
>
>- java-openjfx-swing
>- java-openjfx-web
>
>java-openjfx-swing needs to have the patch
>java-openjfx-build-swing-compile-JFXPanel-with-JDK-8.patch from
>https://issues.guix.gnu.org/41360 applied to java-openjfx-build.
>
>Your jackrabbit-webdav package built without problems. So the only
>packages we are missing now seems to be:
>
>- java-javax-activation
>- java-sfl4j-log4j12
>- java-winrun4j
>
>I added a packaged definition for java-sfl4j-log4j12 but it is currently
>failing to build with some undefined reference to
>`org.apache.log4j.helpers.ThreadLocalMap`.
>
>javax.activation has been taken over by Eclipse and moved to
>jakarta.activation. I haven't yet tried to package this one since I
>don't know what is the best way to handle this and if it is possible to
>use the new jakarta.activation directly in place of javax.activation.
>
>It also seems that winrun4j is needed after all, since I get some build
>error related to winrun4j when trying to build davmail. Unless we are
>able to remove references to it we might need to package winrun4j also.
>
>Attaching the java-additions file with my changes added.
>
>--8<---------------cut here---------------start------------->8---
>(define-module (gnu packages java-additions)
>  #:use-module ((guix licenses) #:prefix license:)
>  #:use-module (guix utils)
>  #:use-module (guix packages)
>  #:use-module (guix download)
>  #:use-module (guix gexp)  
>  #:use-module (guix git-download)
>  #:use-module (guix build-system ant)
>  #:use-module (guix build-system maven)
>  #:use-module (gnu packages)
>  #:use-module (gnu packages cmake)
>  #:use-module (gnu packages compression)
>  #:use-module (gnu packages java)
>  #:use-module (gnu packages java-bootstrap)
>  #:use-module (gnu packages java-compression)
>  #:use-module (gnu packages java-xml)
>  #:use-module (gnu packages gperf)
>  #:use-module (gnu packages python)
>  #:use-module (gnu packages ruby))
>
>
>(define-public java-javax-jcr
>  (package
>    (name "java-javax-jcr")
>    (version "2.0")
>    (source (origin
>              (method url-fetch)
>	      (uri (string-append "https://repo1.maven.org/maven2/"
>				  "javax/jcr/jcr/"
>				  version "/jcr-"
>				  version "-sources.jar"))
>              (sha256
>               (base32
>                "163c9y71rm31mgazzxar28r3k4fb9vzk7a1dfs1cgf7d9rnx4i33"))))
>    (build-system ant-build-system)
>    (arguments
>     `(#:tests? #f ; no tests
>       #:jar-name "javax-jcr.jar"))
>    (home-page "https://jcp.org/aboutJava/communityprocess/final/jsr283/index.html")
>    (synopsis "Specifies a standard API to access content repositories in Java independently of implementation")
>    (description "
>The API should be a standard, implementation independent, way to access content bi-directionally on a 
>granular level within a content repository. A Content Repository is a high-level information management 
>system that is a superset of traditional data repositories. A content repository implements 
>\"content services\" such as: author based versioning, full textual searching, fine grained access control, 
>content categorization and content event monitoring. It is these \"content services\" that differentiate a 
>Content Repository from a Data Repository.
>
>Many of today's (web)applications are interacting with a content repository in various ways.
>
>This API proposes that content repositories have a dedicated, standard way of interaction with applications 
>that deal with content. This API will focus on transactional read/write access, binary content 
>(stream operations), textual content, full-text searching, filtering, observation, versioning, handling of 
>hard and soft structured content.")
>    ;; Day Specification License
>    (license license:gpl2)))
>
>(define-public java-oak-jackrabbit-api
>  (package
>    (name "java-oak-jackrabbit-api")
>    (version "1.42.0")
>    (source (origin
>              (method url-fetch)
>	      (uri (string-append "https://dlcdn.apache.org/jackrabbit/oak/"
>				  version "/jackrabbit-oak-" version "-src.zip"))
>	      (sha256
>	       (base32
>		"17ra69nn4fl7ja2m23d3995570j5j5ni3fi4kfvfsp82jdmryy6r"))))
>    (build-system ant-build-system)
>    (arguments
>     `(#:jar-name "oak-jackrabbit-api.jar"
>       #:phases
>       (modify-phases %standard-phases
>         (add-after 'unpack 'chdir
>           (lambda _ (chdir "oak-jackrabbit-api") #t))
>	 (add-before 'build 'prepare
>           (lambda _
>             (with-directory-excursion
>		 "src/test/java/org/apache/jackrabbit/api/"
>	       ;; remove test which has build error
>               (delete-file "JackrabbitSessionTest.java"))
>             #t)))))
>    (inputs
>     (list unzip
>	   java-commons-logging-minimal
>           java-mockito-1
>           java-junit
>	   java-jetbrains-annotations
>	   java-javax-jcr
>	   java-osgi-annotation))
>    (home-page "https://jackrabbit.apache.org/oak/docs/index.html")
>    (synopsis "Jackrabbit Oak - the next generation content repository")
>    (description "This component contains the interface extensions that Apache Jackrabbit and
>Jackrabbit Oak support in addition to the standard JCR API. You can
>use these interfaces to access implementation-specific functionality.")
>    (license license:asl2.0)))
>
>(define-public java-jackrabbit-oak
>  (package
>    (name "java-jackrabbit-oak")
>    (version "1.42.0")
>    (source (origin
>              (method url-fetch)
>	      (uri (string-append "https://dlcdn.apache.org/jackrabbit/oak/"
>				  version "/jackrabbit-oak-" version "-src.zip"))
>	      (sha256
>	       (base32
>		"17ra69nn4fl7ja2m23d3995570j5j5ni3fi4kfvfsp82jdmryy6r"))))
>    (build-system maven-build-system)
>    (arguments
>     `(#:exclude
>       (
>					;   ("org.apache.maven.plugins" .
>					;	 ("maven-deploy-plugin" "maven-javadoc-plugin" "maven-idea-plugin"
>					;	  "maven-eclipse-plugin" "maven-release-plugin"))
>	("org.apache.rat" . ("apache-rat-plugin"))
>	("org.codehaus.mojo" . ("animal-sniffer-maven-plugin"))
>	("org.jacoco" . ("jacoco-maven-plugin"))
>	("org.apache.felix" . ("maven-bundle-plugin")))
>       #:local-packages (("javax.jcr" . (("jcr" . "2.0")))
>			 ("org.osgi" . (("org.osgi.annotation" . "6.0.0")))
>			 ("org.jetbrains" . (("annotations". "19.0.0")))
>			 ("org.mockito" . (("mockito-core" . "1.10.19"))))))
>    (native-inputs (list unzip java-javax-jcr))
>    (synopsis "Jackrabbit Oak - the next generation content repository")
>    (description
>     "Jackrabbit Oak is an effort to implement a scalable and performant hierarchical 
>content repository for use as the foundation of modern world-class web sites and other 
>demanding content applications. The Oak effort is a part of the Apache Jackrabbit 
>project. Apache Jackrabbit is a project of the Apache Software Foundation.
>")
>    (home-page "https://jackrabbit.apache.org/oak/docs/index.html")
>    (license license:asl2.0)))
>
>(define-public java-jackrabbit
>  (package
>    (name "java-jackrabbit")
>    (version "2.21.21")
>    (source (origin
>              (method url-fetch)
>              (uri (string-append "https://dlcdn.apache.org/jackrabbit/"
>				  version "/jackrabbit-" version "-src.zip"))
>              (sha256
>               (base32
>		"0i2m0zmbb7xcvg2zwkdj16xjr9jhv5a0rxf75r2vad7jpkym99sz"))))
>    (build-system maven-build-system)
>    (arguments
>     `(#:exclude
>       (("org.apache.maven.plugins" .
>	 ("maven-deploy-plugin" "maven-javadoc-plugin" "maven-idea-plugin"
>	  "maven-eclipse-plugin" "maven-release-plugin"))
>	("org.apache.rat" . ("apache-rat-plugin"))
>	("org.codehaus.mojo" . ("animal-sniffer-maven-plugin"))
>	("org.jacoco" . ("jacoco-maven-plugin"))
>	("org.apache.felix" . ("maven-bundle-plugin")))
>       #:local-packages (("javax.jcr" . (("jcr" . "2.0")))
>			 ("org.apache.jackrabbit" . (("oak-jackrabbit-api" . "1.42.0")))
>			 ("org.osgi" . (("org.osgi.annotation" . "6.0.0")))
>			 ("cglib" . (("cglib" . "3.2.4"))))))
>    (native-inputs (list unzip java-junit java-javax-jcr))
>    (synopsis "This is the WebDAV Library component of the Apache Jackrabbit project")
>    (description
>     "This component provides interfaces and common utility classes used for
>building a WebDAV server or client. The following RFC have been integrated:
>
>    * RFC 2518 (WebDAV - HTTP Extensions for Distributed Authoring)
>    * RFC 3253 (DeltaV - Versioning Extensions to WebDAV)
>    * RFC 3648 (Ordered Collections Protocol)
>    * RFC 3744 (Access Control Protocol)
>    * DAV Searching and Locating  (DASL)
>    * Binding Extensions to Web Distributed Authoring and Versioning (WebDAV) (experimental)
>
>In addition this library defines (unspecified)
>
>    * Observation
>    * Bundling multiple request with extensions to locking")
>    (home-page "https://jackrabbit.apache.org/jcr/index.html")
>    (license license:asl2.0)))
>
>(define-public java-jackrabbit-webdav
>  (package
>    (name "java-jackrabbit-webdav")
>    (version "2.21.21")
>    (source (origin
>              (method url-fetch)
>              (uri (string-append "https://dlcdn.apache.org/jackrabbit/"
>				  version "/jackrabbit-" version "-src.zip"))
>              (sha256
>               (base32
>		"0i2m0zmbb7xcvg2zwkdj16xjr9jhv5a0rxf75r2vad7jpkym99sz"))))
>    (build-system ant-build-system)
>    (arguments
>     `(#:jar-name "jackrabbit-webdav.jar"
>       #:test-exclude (list "**/ParserTest.java") ;; fails unexpected
>       #:phases
>       (modify-phases %standard-phases
>	 (add-after 'unpack 'chdir
>           (lambda _ (chdir "jackrabbit-webdav") #t)))))
>    (native-inputs (list
>		    unzip
>		    java-junit
>		    java-slf4j-simple
>		    java-httpcomponents-httpcore
>		    java-httpcomponents-httpclient
>		    java-javaee-servletapi
>		    java-osgi-annotation))
>    (synopsis "This is the WebDAV Library component of the Apache Jackrabbit project")
>    (description
>     "This component provides interfaces and common utility classes used for
>building a WebDAV server or client. The following RFC have been integrated:
>
>    * RFC 2518 (WebDAV - HTTP Extensions for Distributed Authoring)
>    * RFC 3253 (DeltaV - Versioning Extensions to WebDAV)
>    * RFC 3648 (Ordered Collections Protocol)
>    * RFC 3744 (Access Control Protocol)
>    * DAV Searching and Locating  (DASL)
>    * Binding Extensions to Web Distributed Authoring and Versioning (WebDAV) (experimental)
>
>In addition this library defines (unspecified)
>
>    * Observation
>    * Bundling multiple request with extensions to locking")
>    (home-page "https://jackrabbit.apache.org")
>    (license license:asl2.0)))
>
>(define-public java-davmail
>  (package
>    (name "java-davmail")
>    (version "6.0.1")
>    (source (origin
>              (method url-fetch)
>	      (uri (string-append "https://sourceforge.net/projects/davmail/files/davmail/"
>				  version "/davmail-srconly-" version "-3390.tgz"))
>	      (sha256
>	       (base32
>		"0q5yix25i253w9kpqc8wiryvzpfrbqalky8byf5bz66v13c07y7p"))))
>    (build-system ant-build-system)
>    (arguments
>     `(#:modules ((guix build ant-build-system)
>                  (guix build java-utils)
>                  (guix build utils)
>                  (srfi srfi-1)
>                  (ice-9 match))
>					;#:build-target "jar"
>       #:source-dir "src/"
>       #:test-dir "src/test"
>       #:tests? #false
>       #:jar-name "davmail.jar"
>       #:build-target "jar"))
>					;#:phases
>					;(modify-phases %standard-phases
>					;	 (add-after 'unpack 'create-libdir
>					;	   (lambda* (#:key inputs #:allow-other-keys)
>					;	     (mkdir-p "lib")
>					;					;(for-each
>					;					; (lambda (file)
>					;					;	(let ((target (string-append "lib/" (basename file))))
>					;					;	  (unless (file-exists? target)
>					;					;	    (symlink file target))))
>					;					; (append-map (match-lambda
>					;					;		    (dir
>					;					;		     (find-files dir "\\.jar$")))
>					;					;		  inputs))
>					;	     #t)))))
>    (inputs (list
>					;java-junit
>	     ;;java-log4j-core
>	     ;;java-log4j-api
>	     java-slf4j-api
>	     java-log4j-1.2-api
>	     ;;java-slf4j-log4j12
>             java-jcl-over-slf4j
>             java-openjfx-base
>             java-openjfx-build
>             java-openjfx-controls
>             java-openjfx-graphics
>             java-openjfx-media
>             java-openjfx-web
>             java-openjfx-swing ;; Maybe not all of these are needed
>	     java-javax-mail
>             java-htmlcleaner
>             java-jackrabbit-webdav
>             java-junit
>	     ;;java-slf4j-simple
>             java-jcifs
>             java-swt
>             java-woodstox-core
>             java-stax
>             java-stax2-api
>             java-jcharset
>	     java-httpcomponents-httpcore
>	     java-httpcomponents-httpclient
>             java-commons-httpclient
>             java-commons-codec
>             java-jettison
>             java-javaee-servletapi
>					;java-osgi-annotation
>	     ))
>    (synopsis "POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway")
>    (description
>     "Ever wanted to get rid of Outlook? DavMail is a POP/IMAP/SMTP/Caldav/Carddav/LDAP 
>exchange gateway allowing users to use any mail/calendar client (e.g. Thunderbird with 
>Lightning or Apple iCal) with an Exchange server, even from the internet or behind a firewall 
>through Outlook Web Access. DavMail now includes an LDAP gateway to Exchange global address 
>book and user personal contacts to allow recipient address completion in mail compose window 
>and full calendar support with attendees free/busy display.")
>    (home-page "http://davmail.sourceforge.net/index.html")
>    (license license:gpl2)))
>
>(define-public java-htmlcleaner
>  (package
>    (name "java-htmlcleaner")
>    (version "0.0")
>    (source (origin
>              (method url-fetch)
>              (uri (string-append
>               "https://downloads.sourceforge.net/project/htmlcleaner/htmlcleaner/htmlcleaner%20v2.29/htmlcleaner-src-2.29.zip"))
>              (sha256 (base32 "0l2k94rklbhxbcqqzn46y4l089jdi5ivy2g1h7vk8vxyc5qqvilz"))))
>    (build-system ant-build-system)
>    (arguments
>     `(#:jar-name "htmlcleaner.jar"
>       #:tests? #false
>       #:source-dir "../src/main"
>       #:test-dir "../src/test"))
>    (native-inputs
>     (list java-jdom2
>           unzip
>           java-junit))
>    (home-page "")
>    (synopsis "")
>    (description "")
>    ;; GPLv2 only
>    (license license:bsd-3)))
>
>(define-public java-jcharset
>  (package
>    (name "java-jcharset")
>    (version "0.0")
>    (source (origin
>              (method url-fetch)
>              (uri (string-append
>               "https://www.freeutils.net/source/jcharset/jcharset-2.1-distribution.zip"))
>              (sha256 (base32 "1k1fqwgrpxp81r93n2irw4lhsnx217jky7lz8h3wbic14iycz8v9"))))
>    (build-system ant-build-system)
>    (arguments
>     `(#:jar-name "jcharset.jar"
>       #:tests? #false
>       #:source-dir "src/main"
>       #:test-dir "src/test"))
>    (native-inputs
>     (list unzip
>           java-junit))
>    (home-page "")
>    (synopsis "")
>    (description "")
>    ;; GPLv2 only
>    (license license:bsd-3)))
>
>(define-public java-slf4j-log4j12
>  (package
>    (name "java-slf4j-log4j12")
>    (version "0.0.0")
>    (source (package-source java-slf4j-api))
>    (build-system ant-build-system)
>    (arguments
>     `(#:jar-name "slf4j-log4j12.jar"
>       #:source-dir "slf4j-log4j12/src/main"
>       #:test-dir "slf4j-log4j12/src/test"
>       #:phases
>       (modify-phases %standard-phases
>         ;; The tests need some test classes from slf4j-api
>         (add-before 'check 'build-slf4j-api-test-helpers
>           (lambda _
>             ;; Add current dir to CLASSPATH ...
>             (setenv "CLASSPATH"
>                     (string-append (getcwd) ":" (getenv "CLASSPATH")))
>             ;; ... and build test helper classes here:
>             (apply invoke
>                    `("javac" "-d" "."
>                      ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
>         (replace 'install
>           (install-from-pom "slf4j-log4j12/pom.xml")))))
>    (propagated-inputs
>     (list java-slf4j-api
>           java-log4j-1.2-api))
>           ;;java-log4j-core))
>    (native-inputs
>     (list java-junit
>           java-logback-core
>           java-logback-classic
>           java-log4j-1.2-api
>           java-hamcrest-core))
>    (home-page "https://www.slf4j.org/")
>    (synopsis "")
>    (description "")
>    (license license:expat)))
>
>
>;; This might not be needed at all. It was listed as a dependency for jacrabbit,
>;; but I don't think jackrabbit uses it
>(define-public java-jcl-over-slf4j
>  (package
>    (name "java-jcl-over-slf4j")
>    (version "0.0.0")
>    (source (package-source java-slf4j-api))
>    (build-system ant-build-system)
>    (arguments
>     `(#:jar-name "jcl-over-slf4j.jar"
>       #:source-dir "jcl-over-slf4j/src/main"
>       #:tests? #false
>       #:test-dir "jcl-over-slf4j/src/test"
>       ;;#:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java")
>       #:phases
>       (modify-phases %standard-phases
>         ;; The tests need some test classes from slf4j-api
>         (add-before 'check 'build-slf4j-api-test-helpers
>           (lambda _
>             ;; Add current dir to CLASSPATH ...
>             (setenv "CLASSPATH"
>                     (string-append (getcwd) ":" (getenv "CLASSPATH")))
>             ;; ... and build test helper classes here:
>             (apply invoke
>                    `("javac" "-d" "."
>                      ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
>         (replace 'install
>           (install-from-pom "jcl-over-slf4j/pom.xml")))))
>    (propagated-inputs
>     (list java-slf4j-api
>           java-log4j-1.2-api
>           java-log4j-core))
>    (native-inputs
>     (list java-junit)) ;java-hamcrest-core))
>    (home-page "https://www.slf4j.org/")
>    (synopsis "")
>    (description "")
>    (license license:expat)))
>
>(define-public java-jcifs
>  (package
>    (name "java-jcifs")
>    (version "0.0.0")
>    (source (origin
>              (method url-fetch)
>              (uri (string-append
>               "https://www.jcifs.org/src/jcifs-1.3.19.zip"))
>              (sha256 (base32 "06pj5qi8giplsxdp5y4l4j55pj13n13k8lrqpk96jvm7xjhqc7m3"))))
>    (build-system ant-build-system)
>    (arguments
>     `(#:jar-name "jcifs.jar"
>       #:source-dir "src/jcifs"
>       #:tests? #false
>       #:test-dir "src/test"))
>    (propagated-inputs
>     (list ))
>    (native-inputs
>     (list java-junit
>	   java-javaee-servletapi
>           unzip)) ;java-hamcrest-core))
>    (home-page "")
>    (synopsis "")
>    (description "")
>    (license license:expat)))
>
>(define-public java-openjfx-swing
>  (package (inherit java-openjfx-build)
>    (name "java-openjfx-swing")
>    (arguments
>     `(#:jar-name "java-openjfx-swing.jar"
>       #:source-dir "modules/swing/src/main/java"
>       #:tests? #f
>       #:test-dir "modules/swing/src/test"))
>    (propagated-inputs
>     (list java-openjfx-base  
>           java-openjfx-graphics
>           java-openjfx-controls
>           java-openjfx-build
>           java-openjfx-media))
>    (description "OpenJFX is a client application platform for desktop,
>mobile and embedded systems built on Java.  Its goal is to produce a
>modern, efficient, and fully featured toolkit for developing rich client
>applications.  This package contains base classes for the OpenJFX
>distribution.")))
>
>
>
>(define-public java-openjfx-web
>  (package (inherit java-openjfx-build)
>    (name "java-openjfx-web")
>    (arguments
>     `(#:jar-name "java-openjfx-web.jar"
>       #:source-dir (string-join '("modules/web/src/main/java"
>                                   "modules/web/src/main/native/Source/WebCore/bindings/java/dom3")
>                                 ";")
>       #:tests? #f
>       #:modules ((ice-9 match)
>                  (guix build ant-build-system)
>                  (guix build utils))
>       #:phases
>       (modify-phases %standard-phases
>         (replace 'build
>           (lambda* (#:key inputs #:allow-other-keys)
>             (let* ((module (string-append (getcwd) "/modules/web"))
>                    (classes (string-append module "/build/classes/java/main")))
>               (invoke "ant" "compile" (string-append "-Dclasses.dir=" classes)))
>             #t))
>         (add-after 'build 'generate-headers
>           (lambda* (#:key inputs #:allow-other-keys)
>             (let* ((module (string-append (getcwd) "/modules/web"))
>                    (classes (string-append module "/build/classes/java/main"))
>                    (web-generated-headers (string-append module "/build/generated-src/headers"))
>                    (web-generated-classes '("com.sun.webkit.ContextMenu"
>                                             "com.sun.webkit.ContextMenuItem"
>                                             "com.sun.webkit.CursorManager"
>                                             "com.sun.webkit.PageCache"
>                                             "com.sun.webkit.PopupMenu"
>                                             "com.sun.webkit.SharedBuffer"
>                                             "com.sun.webkit.WebPage"
>                                             "com.sun.webkit.LoadListenerClient"
>                                             "com.sun.webkit.event.WCFocusEvent"
>                                             "com.sun.webkit.event.WCKeyEvent"
>                                             "com.sun.webkit.event.WCMouseEvent"
>                                             "com.sun.webkit.event.WCMouseWheelEvent"
>                                             "com.sun.webkit.graphics.GraphicsDecoder"
>                                             "com.sun.webkit.graphics.RenderMediaControls"
>                                             "com.sun.webkit.graphics.RenderTheme"
>                                             "com.sun.webkit.graphics.ScrollBarTheme"
>                                             "com.sun.webkit.graphics.WCMediaPlayer"
>                                             "com.sun.webkit.graphics.WCGraphicsManager"
>                                             "com.sun.webkit.graphics.WCRenderQueue"
>                                             "com.sun.webkit.graphics.WCPath"
>                                             "com.sun.webkit.graphics.WCPathIterator"
>                                             "com.sun.webkit.Timer"
>                                             "com.sun.webkit.WCFrameView"
>                                             "com.sun.webkit.WCPasteboard"
>                                             "com.sun.webkit.WCPluginWidget"
>                                             "com.sun.webkit.dom.CharacterDataImpl"
>                                             "com.sun.webkit.dom.JSObject"
>                                             "com.sun.webkit.network.SocketStreamHandle"
>                                             "com.sun.webkit.network.URLLoader"
>                                             "com.sun.webkit.text.TextBreakIterator"
>                                             "com.sun.webkit.text.TextNormalizer"))
>                    (graphics (assoc-ref inputs "java-openjfx-graphics")))
>               (mkdir-p web-generated-headers)
>               (apply invoke
>                      "javah"
>                      "-Djava.ext.dirs="
>                      "-XDignore.symbol.file"
>                      "-XDuseUnsharedTable=true"
>                      "-d" web-generated-headers
>                      "-cp" (string-join (cons* classes (find-files graphics ".jar$")) ":")
>                      web-generated-classes))
>             #t))
>
>         (add-after 'generate-headers 'compile-native-linux
>           (lambda* (#:key inputs system outputs #:allow-other-keys)
>             (let*  ((module (string-append (getcwd) "/modules/web"))
>                     ;;
>                     (webkit-native-dest (string-append module "/build/linux"))
>                     (webkit-native-src (string-append module "/src/main/native"))
>                     ;;
>                     (lib (string-append (assoc-ref outputs "out") "/lib"))
>                     ;; uname -m
>                     (machine (match system
>                                ("x86_64-linux"   "x86_64")
>                                ("i686-linux"     "i686")
>                                ;; Prevent errors when querying this
>                                ;; package on unsupported platforms,
>                                ;; e.g. when running "guix package
>                                ;; --search="
>                                (_                "UNSUPPORTED"))))
>
>               (mkdir-p webkit-native-dest)
>               (setenv "PYTHONDONTWRITEBYTECODE" "1")
>               (setenv "WEBKIT_OUTPUTDIR" webkit-native-dest)
>               (apply invoke `("perl"
>                               ,(string-append webkit-native-src "/Tools/Scripts/set-webkit-configuration")
>                               ,(if ,(target-64bit?) "--64-bit" "--32-bit")
>                               "--release"))
>
>               (substitute* (find-files "." "xsltlocale\\.h")
>                 (("#include <xlocale.h>") "#include <locale.h>"))
>               (invoke "perl"
>                       (string-append webkit-native-src "/Tools/Scripts/build-webkit")
>                       "--java" ; webkit port
>                       "--skip-library-update"
>                       "--verbose"
>                       (string-append
>                        "--cmakeargs="
>                        (string-join
>                         (list "-DCMAKE_SYSTEM_NAME=Linux"
>                               ;; ensure that the libraries are installed into /lib
>                               (string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
>                               ;; add input libraries to rpath
>                               "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
>                               ;; enable verbose output from builds
>                               "-DCMAKE_VERBOSE_MAKEFILE=ON"
>                               (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
>                                              "\"-Wl,-rpath=" lib "\"")
>                               (string-append "-DCMAKE_SYSTEM_PROCESSOR=" machine)
>
>                               "-DJAVAFX_RELEASE_VERSION=8.0"
>                               ;;"-W"
>                               "-Wall"
>                               "-Werror=implicit-function-declaration"
>                               "-Wl,--gc-sections"
>                               "-Wno-parentheses"
>                               "-Wno-unused")))))
>                               ;;"-fPIC"
>                               ;;"-fno-omit-frame-pointer"
>                               ;;"-fno-strict-aliasing"
>                               ;;"-fstack-protector")))))
>             #t))
>
>         (add-after 'compile-native-linux 'install-native
>           (lambda* (#:key outputs #:allow-other-keys)
>             (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
>               (for-each (lambda (file)
>                           (install-file file lib))
>                         (find-files "." "\\.so$")))))
>
>         (add-before 'install 'build-jar
>           (lambda _
>             (let* ((module (string-append (getcwd) "/modules/web"))
>                    (resources (string-append module "/src/main/resources"))
>                    (classes (string-append module "/build/classes/java/main")))
>               (copy-recursively resources classes)
>               (invoke "ant" "jar" (string-append "-Dclasses.dir=" classes)))
>             #t)))))
>    (inputs
>     `(("antlr3" ,antlr3)
>       ("java-stringtemplate" ,java-stringtemplate)))
>    (native-inputs
>     `(("java-junit" ,java-junit)
>       ("java-hamcrest-core" ,java-hamcrest-core)
>       ("cmake" ,cmake)
>       ("gcc" ,gcc)
>       ("gtk" ,gtk+-2)
>       ("gtk3" ,gtk+)
>       ("ruby" ,ruby)
>       ("perl" ,perl)
>       ("gperf" ,gperf)
>       ("python-2" ,python-2)
>       ("pkg-config" ,pkg-config)))
>    (propagated-inputs
>     `(("java-openjfx-controls" ,java-openjfx-controls)
>       ("java-openjfx-media" ,java-openjfx-media)
>       ("java-openjfx-graphics" ,java-openjfx-graphics)))))
>
>
>java-davmail
>--8<---------------cut here---------------end--------------->8---

Great, I'am in the process of packaging jcl-over-sfl4j but tests are failing due to missing dependencies. What about com.sun.mail?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#67846] packaging davmail
  2023-12-15 20:09 [bug#67846] [PATCH] gnu: Add davmail Lars Rustand
       [not found] ` <708EEA37-21B3-4508-8698-7B61DDD91AEA@housseini.me>
@ 2024-10-31 14:40 ` Steve George
  1 sibling, 0 replies; 9+ messages in thread
From: Steve George @ 2024-10-31 14:40 UTC (permalink / raw)
  To: 67846

Hi,

This started as packaging davmail, giving it a bump in case there's something
we can save from the efforts ...

Futurile




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-10-31 14:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15 20:09 [bug#67846] [PATCH] gnu: Add davmail Lars Rustand
     [not found] ` <708EEA37-21B3-4508-8698-7B61DDD91AEA@housseini.me>
2023-12-16  7:42   ` reza via Guix-patches via
2023-12-16  7:52     ` Lars Rustand
     [not found]       ` <962301ff-995f-0ea8-aae9-83ac9eccf288@housseini.me>
2023-12-16 11:02         ` reza via Guix-patches via
2023-12-16 11:50           ` Lars Rustand
     [not found]             ` <558e189e-1819-c38b-2aba-051571260174@housseini.me>
2023-12-16 20:50               ` reza via Guix-patches via
2023-12-17 10:06                 ` Lars Rustand
     [not found]                   ` <3436D069-41B2-45A3-A8BF-9F883D83F224@housseini.me>
2023-12-18  7:01                     ` reza via Guix-patches via
2024-10-31 14:40 ` [bug#67846] packaging davmail Steve George

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).