unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 9d9cc5421b06c85d408975a62927a716620e9c98 12302 bytes (raw)
name: gnu/packages/dotnet.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
 
(define-module (gnu packages dotnet)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages assembly)
  #:use-module (gnu packages bison)
  #:use-module (gnu packages check)
  #:use-module (gnu packages cmake)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages curl)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages gettext)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages base)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages bdw-gc)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages icu4c)
  #:use-module (gnu packages instrumentation)
  #:use-module (gnu packages kerberos)
  #:use-module (gnu packages libffi)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages llvm)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages photo)
  #:use-module (gnu packages texinfo)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages image)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages python)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages)
  #:use-module (guix modules)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system python)
  #:use-module (ice-9 match))

(define-public treecc
  (package
    (name "treecc")
    (version "0.3.10")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-"
                    version ".tar.gz"))
              (sha256
               (base32
                "1rzgnspg2xccdq3qsx0vi3j28h4qkrzbrjnhzvnny34fjfk217ay"))))
    (build-system gnu-build-system)
    (home-page "https://www.gnu.org/software/dotgnu")
    (synopsis "Tree Compiler-Compiler.")
    (description "The treecc program is designed to assist in the development
of compilers and other language-based tools.  It manages the generation of
code to handle abstract syntax trees and operations upon the trees.")
    (license license:gpl2+)))

;; several improvements occurred past the 0.8.0 release that make it easier to
;; bootstrap mono
(define-public pnet-git
  (let ((commit "3baf94734d8dc3fdabba68a8891e67a43ed6c4bd")
        (version "0.8.0")
        (revision "0")
        (libjit-supported?
         (lambda ()
           ;; TODO: accurately determine which platforms are
           ;; and aren't supported by libjit, then use:
           ;;
           ;; (supported-package? libjit
           ;;                     (or (%current-target-system)
           ;;                         (%current-system)))
           (target-x86?))))
    (package
      (name "pnet-git")
      (version (git-version version revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.savannah.gnu.org/git/dotgnu-pnet/pnet.git")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0vznvrgz8l0mpib1rz5v3clr7cn570vyp80f7f1jvzivnc1imzn6"))
                (modules '((guix build utils)))
                (snippet
                 #~(begin
                     (for-each delete-file-recursively '("libffi" "libgc"))
                     (for-each delete-file (filter file-exists?
                                                   '("compile"
                                                     "configure"
                                                     "config.guess"
                                                     "config.sub"
                                                     "depcomp"
                                                     "install-sh"
                                                     "ltconfig"
                                                     "ltcf-c.sh"
                                                     "ltmain.sh")))
                     (for-each delete-file (find-files "." "Makefile(\\.in)?$"))
                     (for-each delete-file (find-files "." "_grammar\\.(c|h)$"))
                     (for-each delete-file (find-files "." "_scanner\\.(c|h)$"))
                     ;; Fix to not require bundled dependencies
                     (substitute* "configure.in"
                       (("GCLIBS='.*libgc.a'") "GCLIBS='-lgc'")
                       ;; AC_SEARCH_LIBJIT checks hardcoded header locations
                       (("search_libjit=true")
                        (string-append "search_libjit=false\n"
                                       "JIT_LIBS=-ljit")))
                     (substitute* "Makefile.am"
                       (("OPT_SUBDIRS \\+= lib.*") ""))
                     (substitute* "support/hb_gc.c"
                       (("#include .*/libgc/include/gc.h.")
                        "#include <gc.h>")
                       (("#include .*/libgc/include/gc_typed.h.")
                        "#include <gc/gc_typed.h>"))
                     (substitute* (list "codegen/Makefile.am"
                                        "cscc/bf/Makefile.am"
                                        "cscc/csharp/Makefile.am"
                                        "cscc/c/Makefile.am"
                                        "cscc/java/Makefile.am")
                       ;; Generated files aren't prerequisites
                       (("TREECC_OUTPUT =.*") ""))
                     (substitute* "cscc/csharp/cs_grammar.y"
                       (("YYLEX") "yylex()"))
                     (substitute* "cscc/common/cc_main.h"
                       (("CCPreProc CCPreProcessorStream;" all)
                        (string-append "extern " all)))
                     (substitute* "csdoc/scanner.c"
                       (("int\ttoken;" all)
                        (string-append "extern " all)))
                     (substitute* "doc/cvmdoc.py"
                       (("python1.5")
                        "python3"))
                     (substitute* "profiles/full"
                       ;; If this is left unmodified, it causes a segfault in
                       ;; pnetlib's tests.  Unrollers are somewhat
                       ;; architecture-specific anyway, and it will fall back
                       ;; to using GNU C's labels-as-values feature (it can be
                       ;; made to further fall back to fully
                       ;; standards-portable interpreter implementations).
                       (("IL_CONFIG_UNROLL=y")
                        "IL_CONFIG_UNROLL=n"))))
                (patches
                 (search-patches "pnet-newer-libgc-fix.patch"
                                 "pnet-newer-texinfo-fix.patch"
                                 "pnet-fix-line-number-info.patch"
                                 "pnet-fix-off-by-one.patch"))))
      (build-system gnu-build-system)
      (native-inputs
       (list autoconf
             automake
             bison
             flex
             libtool
             libatomic-ops
             (default-python) ;; for cvmdoc.py
             texinfo
             treecc))
      (inputs
       (cons* libgc
              libffi
              (if (libjit-supported?)
                  (list libjit)
                  '())))
      (arguments
       (append (if (libjit-supported?)
                   (list #:configure-flags #~(list "--with-jit"))
                   '())
               (list #:make-flags #~(list "CFLAGS+=-Wno-pointer-to-int-cast"))))
      (native-search-paths
       (list (search-path-specification
              (variable "CSCC_LIB_PATH")
              (files (list "lib/cscc/lib")))))
      (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html")
      (synopsis "Compiler for the C# programming language")
      (description
       "The goal of this project is to build a suite of free software tools
to build and execute .NET applications, including a C# compiler,
assembler, disassembler, and runtime engine.")
      (license license:gpl2+))))

(define-public pnetlib-git
  (let ((version "0.8.0")
        (commit "c3c12b8b0c65f5482d03d6a4865f7670e98baf4c")
        (revision "0"))
    (package
      (name "pnetlib-git")
      (version (git-version version revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url
                       "https://git.savannah.gnu.org/git/dotgnu-pnet/pnetlib.git")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "04dikki3lr3m1cacirld90rpi95656b2y2mc5rkycb7s0yfdz1nk"))
                (modules '((guix build utils)))
                (snippet
                 #~(begin
                     (for-each delete-file (filter file-exists?
                                                   '("configure"
                                                     "config.guess"
                                                     "config.sub"
                                                     "install-sh"
                                                     "ltmain.sh")))
                     (for-each delete-file (find-files "." "Makefile(\\.in)?$"))
                     (substitute* (find-files "tests" "^Makefile\\.am$")
                       (("TESTS_ENVIRONMENT.*")
                        (string-append
                         "LOG_COMPILER = $(SHELL)\n"
                         "AM_LOG_FLAGS = $(top_builddir)/tools/run_test.sh"
                         " $(top_builddir)")))
                     (substitute* "tools/run_test.sh.in"
                       (("en_US") "en_US.utf8"))
                     (substitute* "tools/wrapper.sh.in"
                       (("exec .LN_S clrwrap ..1." all)
                        (string-append
                         "echo '#!@SHELL@' >> $1\n"
                         "echo exec $CLRWRAP"
                         " $(dirname $(dirname $1))"
                         "/lib/cscc/lib/$(basename $1).exe >> $1\n"
                         "chmod +x $1")))))))
      (build-system gnu-build-system)
      (arguments
       (list
        #:make-flags #~(list "CFLAGS+=-Wno-pointer-to-int-cast")
        #:phases
        #~(modify-phases %standard-phases
            (add-after 'unpack 'disable-x11-tests
              (lambda _
                (substitute* "tests/Makefile.am"
                  ;; This actually always fails, for a number of
                  ;; reasons:
                  ;; 1. We have no libx11 present, nor do we have an X display
                  ;;    present.  This will cause libXsharpSupport.so to be
                  ;;    built with only shims that fail at runtime.
                  ;; 2. No mechanism is provided for
                  ;;    tests/System.Windows.Forms/TestForms.dll to find
                  ;;    libXsharpSupport.so, which seems to sit at
                  ;;    Xsharp/.libs/libXsharpSupport.so.
                  ;; With a libjit pnet,
                  ;; System.Drawing.Toolkit.ToolkitHandler.CreateDefaultToolkit
                  ;; throws ArgumentNullException when invoking Assembly.Load,
                  ;; while a cvm pnet instead succeeds temporarily, but then
                  ;; fails when invoking
                  ;; System.Drawing.Toolkit.DrawingToolkit..ctor.  For some
                  ;; reason this results in csunit passing the former and
                  ;; failing the latter.
                  (("System\\.Windows\\.Forms") "")))))))
      (native-inputs
       (list autoconf automake libtool treecc))
      (inputs
       (list pnet-git))
      (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html")
      (synopsis "Libraries for the C# programming language")
      (description
       "DotGNU Portable.NET Library contains an implementation of the C# library,
for use with .NET-capable runtime engines and applications.")
      (license license:gpl2+))))

debug log:

solving 9d9cc5421b0 ...
found 9d9cc5421b0 in https://yhetil.org/guix-patches/2Zx39DgdkCBWdzQR1QSV4eAxPs98sBBj43GTHCUKL3lvKNunS5hQwqkEpvrKSg1W-hlzxdx5RNwlrn5_ILHPHYidzwx_8oCkmzzXxyk6y8M=@proton.me/
found fd0d71bfe69 in https://yhetil.org/guix-patches/2Zx39DgdkCBWdzQR1QSV4eAxPs98sBBj43GTHCUKL3lvKNunS5hQwqkEpvrKSg1W-hlzxdx5RNwlrn5_ILHPHYidzwx_8oCkmzzXxyk6y8M=@proton.me/
found 3084e1cf3a5 in https://yhetil.org/guix-patches/2Zx39DgdkCBWdzQR1QSV4eAxPs98sBBj43GTHCUKL3lvKNunS5hQwqkEpvrKSg1W-hlzxdx5RNwlrn5_ILHPHYidzwx_8oCkmzzXxyk6y8M=@proton.me/

applying [1/3] https://yhetil.org/guix-patches/2Zx39DgdkCBWdzQR1QSV4eAxPs98sBBj43GTHCUKL3lvKNunS5hQwqkEpvrKSg1W-hlzxdx5RNwlrn5_ILHPHYidzwx_8oCkmzzXxyk6y8M=@proton.me/
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
new file mode 100644
index 00000000000..3084e1cf3a5


applying [2/3] https://yhetil.org/guix-patches/2Zx39DgdkCBWdzQR1QSV4eAxPs98sBBj43GTHCUKL3lvKNunS5hQwqkEpvrKSg1W-hlzxdx5RNwlrn5_ILHPHYidzwx_8oCkmzzXxyk6y8M=@proton.me/
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 3084e1cf3a5..fd0d71bfe69 100644


applying [3/3] https://yhetil.org/guix-patches/2Zx39DgdkCBWdzQR1QSV4eAxPs98sBBj43GTHCUKL3lvKNunS5hQwqkEpvrKSg1W-hlzxdx5RNwlrn5_ILHPHYidzwx_8oCkmzzXxyk6y8M=@proton.me/
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index fd0d71bfe69..9d9cc5421b0 100644

Checking patch gnu/packages/dotnet.scm...
Applied patch gnu/packages/dotnet.scm cleanly.
Checking patch gnu/packages/dotnet.scm...
Applied patch gnu/packages/dotnet.scm cleanly.
Checking patch gnu/packages/dotnet.scm...
Applied patch gnu/packages/dotnet.scm cleanly.

index at:
100644 9d9cc5421b06c85d408975a62927a716620e9c98	gnu/packages/dotnet.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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).