diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-04-01 01:20:55 +0200 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-05-03 02:30:28 +0200 |
| commit | 853d0baf9c1b852efe9d081d2e3bcc0c2f1fe946 (patch) | |
| tree | d8f35002a9005ce66a79f2a5b2a6978831fe0ccd /gnu/packages | |
| parent | df638e5639c94db1f24f228bfe2f9470875dbb53 (diff) | |
gnu: Add netbeans.
* gnu/packages/netbeans.scm (netbeans): New variable.
* gnu/packages/patches/netbeans-25-nativeexecution-paths.patch: New file.
* gnu/packages/patches/netbeans-25-source-only-build.patch: New file.
* gnu/packages/patches/netbeans-25-terminal-no-login-shell.patch: New file.
* gnu/packages/patches/netbeans-25-wayland-font-rendering.patch: New file.
* gnu/local.mk (GNU_SYSTEM_MODULELS): Add reference to them.
(dist_patch_DATA): Add reference to them.
Change-Id: I184398afeeb4f2bcdfbaf8f2e849afe665c7c6b7
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/java.scm | 11 | ||||
| -rw-r--r-- | gnu/packages/netbeans.scm | 1026 | ||||
| -rw-r--r-- | gnu/packages/patches/netbeans-25-nativeexecution-paths.patch | 73 | ||||
| -rw-r--r-- | gnu/packages/patches/netbeans-25-source-only-build.patch | 95 | ||||
| -rw-r--r-- | gnu/packages/patches/netbeans-25-terminal-no-login-shell.patch | 17 | ||||
| -rw-r--r-- | gnu/packages/patches/netbeans-25-wayland-font-rendering.patch | 94 |
6 files changed, 1316 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index f6dbf9a248a..5abc15cab77 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm | |||
| @@ -2160,6 +2160,17 @@ and is best suited to building Java projects. Ant uses XML to describe the | |||
| 2160 | build process and its dependencies, whereas Make uses Makefile format.") | 2160 | build process and its dependencies, whereas Make uses Makefile format.") |
| 2161 | (license license:asl2.0))) | 2161 | (license license:asl2.0))) |
| 2162 | 2162 | ||
| 2163 | (define-public ant/java8-empty-etc | ||
| 2164 | (package | ||
| 2165 | (inherit ant/java8) | ||
| 2166 | (arguments | ||
| 2167 | (substitute-keyword-arguments (package-arguments ant/java8) | ||
| 2168 | ((#:phases phases) | ||
| 2169 | #~(modify-phases #$phases | ||
| 2170 | (add-after 'build 'add-empty-etc-directory | ||
| 2171 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 2172 | (mkdir-p (string-append (assoc-ref outputs "out") "/etc")))))))))) | ||
| 2173 | |||
| 2163 | (define-public ant-1.10.14 | 2174 | (define-public ant-1.10.14 |
| 2164 | (package | 2175 | (package |
| 2165 | (inherit ant/java8) | 2176 | (inherit ant/java8) |
diff --git a/gnu/packages/netbeans.scm b/gnu/packages/netbeans.scm index b2fd9943737..eb7b6dfc433 100644 --- a/gnu/packages/netbeans.scm +++ b/gnu/packages/netbeans.scm | |||
| @@ -120,3 +120,1029 @@ interfaces.") | |||
| 120 | (search-patches | 120 | (search-patches |
| 121 | "java-apache-xml-commons-resolver-1.2-netbeans.patch")))))) | 121 | "java-apache-xml-commons-resolver-1.2-netbeans.patch")))))) |
| 122 | 122 | ||
| 123 | (define-public netbeans | ||
| 124 | (package | ||
| 125 | (name "netbeans") | ||
| 126 | (version "25") | ||
| 127 | (source | ||
| 128 | (origin | ||
| 129 | (method url-fetch) | ||
| 130 | (uri "https://archive.apache.org/dist/netbeans/netbeans/25/netbeans-25-source.zip") | ||
| 131 | (sha256 | ||
| 132 | (base32 "10w1jjg722k7y4dqcazi7q07zykqhs8rzbvdrnlm0b1cpf5qr0m1")) | ||
| 133 | (patches | ||
| 134 | (search-patches "netbeans-25-source-only-build.patch" | ||
| 135 | "netbeans-25-nativeexecution-paths.patch" | ||
| 136 | "netbeans-25-terminal-no-login-shell.patch" | ||
| 137 | "netbeans-25-wayland-font-rendering.patch")) | ||
| 138 | (modules '((guix build utils))) | ||
| 139 | (snippet | ||
| 140 | '(begin | ||
| 141 | ;; The official source archive is clean apart from source-adjacent | ||
| 142 | ;; build payloads; remove them and rebuild what NetBeans needs. | ||
| 143 | (for-each delete-file | ||
| 144 | (append (find-files "." "\\.jar$") | ||
| 145 | (find-files "." "\\.class$") | ||
| 146 | (find-files "." "\\.zip$") | ||
| 147 | (find-files "." "\\.exe$") | ||
| 148 | (find-files "." "\\.dll$") | ||
| 149 | (find-files "." "\\.so$") | ||
| 150 | (find-files "." "\\.so\\.") | ||
| 151 | (find-files "." "\\.dylib$") | ||
| 152 | (find-files "." "\\.jnilib$"))) | ||
| 153 | #t)))) | ||
| 154 | (build-system ant-build-system) | ||
| 155 | (arguments | ||
| 156 | (list | ||
| 157 | #:jdk openjdk17 | ||
| 158 | #:ant ant/java8-empty-etc | ||
| 159 | #:tests? #f | ||
| 160 | #:modules | ||
| 161 | '((guix build utils) | ||
| 162 | (guix build ant-build-system) | ||
| 163 | (ice-9 match) | ||
| 164 | (ice-9 rdelim) | ||
| 165 | (srfi srfi-1) | ||
| 166 | (srfi srfi-13)) | ||
| 167 | #:phases | ||
| 168 | #~(modify-phases %standard-phases | ||
| 169 | (add-after 'unpack 'prepare-build | ||
| 170 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 171 | (define platform-modules | ||
| 172 | '("api.htmlui" | ||
| 173 | "applemenu" | ||
| 174 | "autoupdate.cli" | ||
| 175 | "autoupdate.services" | ||
| 176 | "autoupdate.ui" | ||
| 177 | "core.nativeaccess" | ||
| 178 | "core.network" | ||
| 179 | "htmlui" | ||
| 180 | "javahelp" | ||
| 181 | "junitlib" | ||
| 182 | "libs.batik.read" | ||
| 183 | "libs.javafx" | ||
| 184 | "libs.javax.inject" | ||
| 185 | "libs.junit4" | ||
| 186 | "libs.junit5" | ||
| 187 | "libs.testng" | ||
| 188 | "masterfs.macosx" | ||
| 189 | "masterfs.windows" | ||
| 190 | "net.java.html" | ||
| 191 | "net.java.html.boot" | ||
| 192 | "net.java.html.boot.fx" | ||
| 193 | "net.java.html.boot.script" | ||
| 194 | "net.java.html.geo" | ||
| 195 | "net.java.html.json" | ||
| 196 | "net.java.html.sound" | ||
| 197 | "netbinox" | ||
| 198 | "o.apache.commons.commons_io" | ||
| 199 | "o.apache.commons.lang3" | ||
| 200 | "o.apache.commons.logging" | ||
| 201 | "o.n.html.ko4j" | ||
| 202 | "o.n.html.presenters.spi" | ||
| 203 | "o.n.html.xhr4j" | ||
| 204 | "templatesui")) | ||
| 205 | (define ide-modules | ||
| 206 | '("bugtracking" | ||
| 207 | "bugtracking.bridge" | ||
| 208 | "bugtracking.commons" | ||
| 209 | "bugzilla" | ||
| 210 | "c.google.gson" | ||
| 211 | "c.google.guava" | ||
| 212 | "c.google.guava.failureaccess" | ||
| 213 | "core.browser.webview" | ||
| 214 | "css.editor" | ||
| 215 | "css.lib" | ||
| 216 | "css.model" | ||
| 217 | "css.prep" | ||
| 218 | "css.visual" | ||
| 219 | "db" | ||
| 220 | "db.core" | ||
| 221 | "db.dataview" | ||
| 222 | "db.drivers" | ||
| 223 | "db.kit" | ||
| 224 | "db.metadata.model" | ||
| 225 | "db.mysql" | ||
| 226 | "db.sql.editor" | ||
| 227 | "db.sql.visualeditor" | ||
| 228 | "dbapi" | ||
| 229 | "derby" | ||
| 230 | "docker.api" | ||
| 231 | "docker.editor" | ||
| 232 | "docker.ui" | ||
| 233 | "go.lang" | ||
| 234 | "html" | ||
| 235 | "html.custom" | ||
| 236 | "html.editor" | ||
| 237 | "html.editor.lib" | ||
| 238 | "html.indexing" | ||
| 239 | "html.lexer" | ||
| 240 | "html.parser" | ||
| 241 | "html.validation" | ||
| 242 | "httpserver" | ||
| 243 | "hudson" | ||
| 244 | "hudson.git" | ||
| 245 | "hudson.mercurial" | ||
| 246 | "hudson.subversion" | ||
| 247 | "hudson.tasklist" | ||
| 248 | "hudson.ui" | ||
| 249 | "javascript2.debug" | ||
| 250 | "javascript2.debug.ui" | ||
| 251 | "languages.go" | ||
| 252 | "languages.hcl" | ||
| 253 | "languages.toml" | ||
| 254 | "languages.yaml" | ||
| 255 | "lexer.antlr4" | ||
| 256 | "libs.antlr3.runtime" | ||
| 257 | "libs.antlr4.runtime" | ||
| 258 | "libs.commons_compress" | ||
| 259 | "libs.commons_net" | ||
| 260 | "libs.flexmark" | ||
| 261 | "libs.freemarker" | ||
| 262 | "libs.graalsdk" | ||
| 263 | "libs.graalsdk.system" | ||
| 264 | "libs.ini4j" | ||
| 265 | "libs.jaxb" | ||
| 266 | "libs.jcodings" | ||
| 267 | "libs.json_simple" | ||
| 268 | "libs.snakeyaml_engine" | ||
| 269 | "libs.svnClientAdapter" | ||
| 270 | "libs.svnClientAdapter.javahl" | ||
| 271 | "libs.tomlj" | ||
| 272 | "libs.tomljava" | ||
| 273 | "libs.truffleapi" | ||
| 274 | "libs.xerces" | ||
| 275 | "localtasks" | ||
| 276 | "lsp.client" | ||
| 277 | "markdown" | ||
| 278 | "mercurial" | ||
| 279 | "mylyn.util" | ||
| 280 | "o.apache.commons.httpclient" | ||
| 281 | "o.apache.commons.lang" | ||
| 282 | "o.apache.ws.commons.util" | ||
| 283 | "o.apache.xmlrpc" | ||
| 284 | "o.eclipse.core.contenttype" | ||
| 285 | "o.eclipse.core.jobs" | ||
| 286 | "o.eclipse.core.net" | ||
| 287 | "o.eclipse.core.runtime" | ||
| 288 | "o.eclipse.core.runtime.compatibility.auth" | ||
| 289 | "o.eclipse.equinox.app" | ||
| 290 | "o.eclipse.equinox.common" | ||
| 291 | "o.eclipse.equinox.preferences" | ||
| 292 | "o.eclipse.equinox.registry" | ||
| 293 | "o.eclipse.equinox.security" | ||
| 294 | "o.eclipse.jgit.lfs" | ||
| 295 | "o.eclipse.mylyn.bugzilla.core" | ||
| 296 | "o.eclipse.mylyn.commons.core" | ||
| 297 | "o.eclipse.mylyn.commons.net" | ||
| 298 | "o.eclipse.mylyn.commons.repositories.core" | ||
| 299 | "o.eclipse.mylyn.commons.xmlrpc" | ||
| 300 | "o.eclipse.mylyn.tasks.core" | ||
| 301 | "o.eclipse.mylyn.wikitext.confluence.core" | ||
| 302 | "o.eclipse.mylyn.wikitext.core" | ||
| 303 | "o.eclipse.mylyn.wikitext.markdown.core" | ||
| 304 | "o.eclipse.mylyn.wikitext.textile.core" | ||
| 305 | "selenium2" | ||
| 306 | "selenium2.server" | ||
| 307 | "servletapi" | ||
| 308 | "spellchecker" | ||
| 309 | "spellchecker.bindings.htmlxml" | ||
| 310 | "spellchecker.bindings.properties" | ||
| 311 | "spellchecker.dictionary_en" | ||
| 312 | "spellchecker.kit" | ||
| 313 | "subversion" | ||
| 314 | "team.ide" | ||
| 315 | "textmate.lexer" | ||
| 316 | "usersguide" | ||
| 317 | "versioning.system.cvss.installer" | ||
| 318 | "web.browser.api" | ||
| 319 | "web.common" | ||
| 320 | "web.common.ui" | ||
| 321 | "web.indent" | ||
| 322 | "web.webkit.debugging" | ||
| 323 | "xml.jaxb.api" | ||
| 324 | "xml.tax" | ||
| 325 | "xml.text.obsolete90" | ||
| 326 | "xml.tools" | ||
| 327 | "xml.wsdl.model" | ||
| 328 | "xsl")) | ||
| 329 | (define extide-modules | ||
| 330 | '("gradle" | ||
| 331 | "gradle.dists" | ||
| 332 | "gradle.editor" | ||
| 333 | "libs.gradle")) | ||
| 334 | (define thirdparty-modules | ||
| 335 | '("libs.javafx.linux" | ||
| 336 | "libs.javafx.linux.aarch64" | ||
| 337 | "libs.javafx.macosx" | ||
| 338 | "libs.javafx.macosx.aarch64" | ||
| 339 | "libs.javafx.win")) | ||
| 340 | (define harness-modules | ||
| 341 | '("jellytools.platform" | ||
| 342 | "jemmy" | ||
| 343 | "libs.nbi.ant" | ||
| 344 | "libs.nbi.engine" | ||
| 345 | "nbjunit" | ||
| 346 | "o.n.insane")) | ||
| 347 | (define nb-modules | ||
| 348 | '("autoupdate.pluginimporter" | ||
| 349 | "bugzilla.exceptionreporter" | ||
| 350 | "updatecenters")) | ||
| 351 | (define cluster-references | ||
| 352 | '("nb.cluster.3rdparty" | ||
| 353 | "nb.cluster.javafx")) | ||
| 354 | (define (read-lines file) | ||
| 355 | (call-with-input-file file | ||
| 356 | (lambda (port) | ||
| 357 | (let loop ((lines '())) | ||
| 358 | (let ((line (read-line port))) | ||
| 359 | (if (eof-object? line) | ||
| 360 | (reverse lines) | ||
| 361 | (loop (cons line lines)))))))) | ||
| 362 | (define (write-lines file lines) | ||
| 363 | (call-with-output-file file | ||
| 364 | (lambda (port) | ||
| 365 | (for-each | ||
| 366 | (lambda (line) | ||
| 367 | (display line port) | ||
| 368 | (newline port)) | ||
| 369 | lines)))) | ||
| 370 | (define (filter-lines file pred) | ||
| 371 | (write-lines file (filter pred (read-lines file)))) | ||
| 372 | (define (drop-lines-containing file patterns) | ||
| 373 | (filter-lines | ||
| 374 | file | ||
| 375 | (lambda (line) | ||
| 376 | (not (any (lambda (pattern) | ||
| 377 | (string-contains line pattern)) | ||
| 378 | patterns))))) | ||
| 379 | (define (append-string file text) | ||
| 380 | (let ((port (open-file file "a"))) | ||
| 381 | (display text port) | ||
| 382 | (close-port port))) | ||
| 383 | (define (module-line? line module) | ||
| 384 | (let ((trimmed (string-trim-both line))) | ||
| 385 | (or (string=? trimmed module) | ||
| 386 | (string=? trimmed (string-append module ",\\"))))) | ||
| 387 | (define (drop-module-lines file modules) | ||
| 388 | (filter-lines | ||
| 389 | file | ||
| 390 | (lambda (line) | ||
| 391 | (not (any (lambda (module) (module-line? line module)) | ||
| 392 | modules))))) | ||
| 393 | (define (indented-line? line) | ||
| 394 | (and (not (string-null? line)) | ||
| 395 | (let ((c (string-ref line 0))) | ||
| 396 | (or (char=? c #\space) | ||
| 397 | (char=? c #\tab))))) | ||
| 398 | (define (strip-list-terminator line) | ||
| 399 | (cond | ||
| 400 | ((string-suffix? ",\\" line) | ||
| 401 | (substring line 0 (- (string-length line) 2))) | ||
| 402 | ((string-suffix? "," line) | ||
| 403 | (substring line 0 (- (string-length line) 1))) | ||
| 404 | (else line))) | ||
| 405 | (define (trim-trailing-list-commas file) | ||
| 406 | (write-lines | ||
| 407 | file | ||
| 408 | (let loop ((rest (read-lines file)) | ||
| 409 | (out '())) | ||
| 410 | (if (null? rest) | ||
| 411 | (reverse out) | ||
| 412 | (let* ((line (car rest)) | ||
| 413 | (next (and (pair? (cdr rest)) | ||
| 414 | (cadr rest))) | ||
| 415 | (fixed | ||
| 416 | (if (and (indented-line? line) | ||
| 417 | (or (string-suffix? ",\\" line) | ||
| 418 | (string-suffix? "," line)) | ||
| 419 | (or (not next) | ||
| 420 | (string-null? next) | ||
| 421 | (not (indented-line? next)))) | ||
| 422 | (strip-list-terminator line) | ||
| 423 | line))) | ||
| 424 | (loop (cdr rest) (cons fixed out))))))) | ||
| 425 | (define (remove-dependency-blocks file modules) | ||
| 426 | (let loop ((rest (read-lines file)) | ||
| 427 | (out '())) | ||
| 428 | (if (null? rest) | ||
| 429 | (write-lines file out) | ||
| 430 | (let ((line (car rest))) | ||
| 431 | (if (string-contains line "<dependency>") | ||
| 432 | (let dep-loop ((rest (cdr rest)) | ||
| 433 | (block (list line))) | ||
| 434 | (if (null? rest) | ||
| 435 | (error "unterminated dependency block" file) | ||
| 436 | (let ((next (car rest)) | ||
| 437 | (tail (cdr rest))) | ||
| 438 | (if (string-contains next "</dependency>") | ||
| 439 | (let* ((full-block (append block (list next))) | ||
| 440 | (drop? | ||
| 441 | (any (lambda (module) | ||
| 442 | (any (lambda (entry) | ||
| 443 | (string-contains | ||
| 444 | entry | ||
| 445 | (string-append | ||
| 446 | "<code-name-base>" | ||
| 447 | module | ||
| 448 | "</code-name-base>"))) | ||
| 449 | full-block)) | ||
| 450 | modules))) | ||
| 451 | (loop tail | ||
| 452 | (if drop? | ||
| 453 | out | ||
| 454 | (append out full-block)))) | ||
| 455 | (dep-loop tail | ||
| 456 | (append block (list next))))))) | ||
| 457 | (loop (cdr rest) (append out (list line)))))))) | ||
| 458 | (define (symlink-input-file input pattern destination) | ||
| 459 | (match (find-files (assoc-ref inputs input) pattern) | ||
| 460 | ((file) | ||
| 461 | (mkdir-p (dirname destination)) | ||
| 462 | (symlink file destination)) | ||
| 463 | (() | ||
| 464 | (error "symlink-input-file: no match for" pattern | ||
| 465 | "in input" input)) | ||
| 466 | (files | ||
| 467 | (error "symlink-input-file: multiple matches for" pattern | ||
| 468 | "in input" input files)))) | ||
| 469 | (define (make-ant-binary-zip) | ||
| 470 | (let* ((ant-root (assoc-ref inputs "ant")) | ||
| 471 | (source-root (getcwd)) | ||
| 472 | (work-dir (string-append (getcwd) "/build-support")) | ||
| 473 | (dist-dir (string-append work-dir "/apache-ant-1.10.14")) | ||
| 474 | (zip-file (string-append source-root | ||
| 475 | "/extide/o.apache.tools.ant.module/external/apache-ant-1.10.14-bin.zip"))) | ||
| 476 | (mkdir-p work-dir) | ||
| 477 | (for-each | ||
| 478 | (lambda (subdir) | ||
| 479 | (let ((source (string-append ant-root "/" subdir))) | ||
| 480 | (when (file-exists? source) | ||
| 481 | (copy-recursively source | ||
| 482 | (string-append dist-dir "/" subdir))))) | ||
| 483 | '("bin" "etc" "lib")) | ||
| 484 | (mkdir-p (dirname zip-file)) | ||
| 485 | (with-directory-excursion work-dir | ||
| 486 | (invoke "zip" "-qrX" zip-file | ||
| 487 | "apache-ant-1.10.14")))) | ||
| 488 | (define (make-nativeexecution-binary-zip) | ||
| 489 | (let* ((source-root (getcwd)) | ||
| 490 | (tools-root (string-append source-root | ||
| 491 | "/ide/dlight.nativeexecution/tools")) | ||
| 492 | (binary-root (string-append source-root | ||
| 493 | "/ide/dlight.nativeexecution/release/bin/nativeexecution")) | ||
| 494 | (zip-root (string-append source-root | ||
| 495 | "/build-support/nativeexecution")) | ||
| 496 | (platform-root (string-append zip-root "/Linux-x86_64")) | ||
| 497 | (zip-file (string-append source-root | ||
| 498 | "/ide/dlight.nativeexecution/external/exechlp-1.2.zip")) | ||
| 499 | (make (or (which "gmake") (which "make")))) | ||
| 500 | (mkdir-p platform-root) | ||
| 501 | (with-directory-excursion tools-root | ||
| 502 | (for-each | ||
| 503 | (lambda (dir) | ||
| 504 | (with-directory-excursion dir | ||
| 505 | (invoke make "CONF=Linux-x86_64" "clean") | ||
| 506 | (invoke make "CONF=Linux-x86_64" "all"))) | ||
| 507 | '("." "pty" "killall" "unbuffer"))) | ||
| 508 | (for-each | ||
| 509 | (lambda (spec) | ||
| 510 | (copy-file (car spec) (cdr spec))) | ||
| 511 | `((,(string-append binary-root "/Linux-x86_64/process_start") | ||
| 512 | . ,(string-append platform-root "/process_start")) | ||
| 513 | (,(string-append binary-root "/Linux-x86_64/pty_open") | ||
| 514 | . ,(string-append platform-root "/pty_open")) | ||
| 515 | (,(string-append binary-root "/Linux-x86_64/sigqueue") | ||
| 516 | . ,(string-append platform-root "/sigqueue")) | ||
| 517 | (,(string-append binary-root "/Linux-x86_64/stat") | ||
| 518 | . ,(string-append platform-root "/stat")) | ||
| 519 | (,(string-append tools-root | ||
| 520 | "/pty/dist/Linux-x86_64/pty") | ||
| 521 | . ,(string-append platform-root "/pty")) | ||
| 522 | (,(string-append tools-root | ||
| 523 | "/killall/dist/Linux-x86_64/killall") | ||
| 524 | . ,(string-append platform-root "/killall")) | ||
| 525 | (,(string-append tools-root | ||
| 526 | "/unbuffer/dist/Linux-x86_64/unbuffer.so") | ||
| 527 | . ,(string-append platform-root "/unbuffer.so")))) | ||
| 528 | (mkdir-p (dirname zip-file)) | ||
| 529 | (with-directory-excursion zip-root | ||
| 530 | (invoke "zip" "-qrX" zip-file "Linux-x86_64")))) | ||
| 531 | (let* ((cluster-properties | ||
| 532 | (find file-exists? | ||
| 533 | '("nbbuild/cluster.properties" | ||
| 534 | "../nbbuild/cluster.properties" | ||
| 535 | "../../nbbuild/cluster.properties" | ||
| 536 | "source/nbbuild/cluster.properties" | ||
| 537 | "../source/nbbuild/cluster.properties" | ||
| 538 | "source/source/nbbuild/cluster.properties"))) | ||
| 539 | (source-root | ||
| 540 | (and cluster-properties | ||
| 541 | (dirname (dirname cluster-properties))))) | ||
| 542 | (unless source-root | ||
| 543 | (error "unable to locate NetBeans source root")) | ||
| 544 | (chdir source-root)) | ||
| 545 | (setenv "HOME" (getcwd)) | ||
| 546 | (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) | ||
| 547 | (setenv "PATH" | ||
| 548 | (string-append (assoc-ref inputs "ant") "/bin:" | ||
| 549 | (assoc-ref inputs "jdk") "/bin:" | ||
| 550 | (assoc-ref inputs "zip") "/bin:" | ||
| 551 | (getenv "PATH"))) | ||
| 552 | |||
| 553 | ;; Never download or rely on upstream-prebuilt payloads. | ||
| 554 | (for-each | ||
| 555 | (lambda (file) | ||
| 556 | (call-with-output-file file | ||
| 557 | (lambda (port) | ||
| 558 | (display "" port)))) | ||
| 559 | (append (find-files "." "binaries-list$") | ||
| 560 | (find-files "." "binariesembedded-list$"))) | ||
| 561 | |||
| 562 | ;; The git module declares a hard requirement on javahelp, | ||
| 563 | ;; which needs an external binary (jhall-2.0_05.jar). | ||
| 564 | ;; Remove the requirement so git loads without help support. | ||
| 565 | (substitute* "ide/git/manifest.mf" | ||
| 566 | (("OpenIDE-Module-Requires: org\\.netbeans\\.api\\.javahelp\\.Help") | ||
| 567 | "OpenIDE-Module-Requires: ")) | ||
| 568 | |||
| 569 | ;; The extbrowser module references Windows DDE DLLs from | ||
| 570 | ;; an external zip. Remove those lines so the build does | ||
| 571 | ;; not try to extract the zip. | ||
| 572 | (substitute* "ide/extbrowser/nbproject/project.properties" | ||
| 573 | (("(release\\.external/extbrowser-dlls-[^!]*!/extbrowser\\.dll)=modules/lib/extbrowser\\.dll" _ p) | ||
| 574 | (string-append "#" p)) | ||
| 575 | (("(release\\.external/extbrowser-dlls-[^!]*!/extbrowser64\\.dll)=modules/lib/extbrowser64\\.dll" _ p) | ||
| 576 | (string-append "#" p))) | ||
| 577 | |||
| 578 | ;; JNA maps Native.load("c", ...) to dlopen("libc.so"), | ||
| 579 | ;; but on Guix libc.so is a linker script that dlopen | ||
| 580 | ;; cannot handle. Use "libc.so.6" which dlopen finds | ||
| 581 | ;; directly since the JVM is linked against it. | ||
| 582 | (substitute* "platform/masterfs.linux/src/org/netbeans/modules/masterfs/watcher/linux/LinuxNotifier.java" | ||
| 583 | (("Native\\.load\\(\"c\"") | ||
| 584 | "Native.load(\"libc.so.6\"") | ||
| 585 | (("NativeLibrary\\.getInstance\\(\"c\"\\)") | ||
| 586 | "NativeLibrary.getInstance(\"libc.so.6\")")) | ||
| 587 | |||
| 588 | ;; Patch libsecret backend to use absolute library paths | ||
| 589 | ;; so JNA can find them on Guix without ld.so.cache. | ||
| 590 | (let ((libsecret (assoc-ref inputs "libsecret")) | ||
| 591 | (glib (assoc-ref inputs "glib"))) | ||
| 592 | (substitute* "platform/keyring.impl/src/org/netbeans/modules/keyring/gnome/libsecret/LibSecret.java" | ||
| 593 | (("Native\\.load\\(\"secret-1\"") | ||
| 594 | (string-append "Native.load(\"" libsecret "/lib/libsecret-1.so\""))) | ||
| 595 | (substitute* "platform/keyring.impl/src/org/netbeans/modules/keyring/gnome/libsecret/Glib.java" | ||
| 596 | (("Native\\.load\\(\"glib-2.0\"") | ||
| 597 | (string-append "Native.load(\"" glib "/lib/libglib-2.0.so\""))) | ||
| 598 | (substitute* "platform/keyring.impl/src/org/netbeans/modules/keyring/gnome/libsecret/Gio.java" | ||
| 599 | (("Native\\.load\\(\"gio-2.0\"") | ||
| 600 | (string-append "Native.load(\"" glib "/lib/libgio-2.0.so\"")))) | ||
| 601 | |||
| 602 | (drop-module-lines "nbbuild/cluster.properties" platform-modules) | ||
| 603 | (drop-module-lines "nbbuild/cluster.properties" ide-modules) | ||
| 604 | (drop-module-lines "nbbuild/cluster.properties" extide-modules) | ||
| 605 | (drop-module-lines "nbbuild/cluster.properties" thirdparty-modules) | ||
| 606 | (drop-module-lines "nbbuild/cluster.properties" harness-modules) | ||
| 607 | (drop-module-lines "nbbuild/cluster.properties" nb-modules) | ||
| 608 | (drop-module-lines "nbbuild/cluster.properties" cluster-references) | ||
| 609 | (append-string | ||
| 610 | "nbbuild/cluster.properties" | ||
| 611 | " | ||
| 612 | clusters.config.guix.list=\\ | ||
| 613 | ${clusters.config.platform.list},\\ | ||
| 614 | nb.cluster.ide,\\ | ||
| 615 | nb.cluster.extide,\\ | ||
| 616 | nb.cluster.nb | ||
| 617 | ") | ||
| 618 | (trim-trailing-list-commas "nbbuild/cluster.properties") | ||
| 619 | (drop-module-lines "nbbuild/build.properties" platform-modules) | ||
| 620 | (drop-module-lines "nbbuild/build.properties" ide-modules) | ||
| 621 | (drop-module-lines "nbbuild/build.properties" extide-modules) | ||
| 622 | (drop-module-lines "nbbuild/build.properties" thirdparty-modules) | ||
| 623 | (drop-module-lines "nbbuild/build.properties" harness-modules) | ||
| 624 | (drop-module-lines "nbbuild/build.properties" nb-modules) | ||
| 625 | (drop-module-lines "nbbuild/build.properties" cluster-references) | ||
| 626 | (trim-trailing-list-commas "nbbuild/build.properties") | ||
| 627 | |||
| 628 | (remove-dependency-blocks | ||
| 629 | "platform/core.kit/nbproject/project.xml" | ||
| 630 | '("org.netbeans.modules.autoupdate.cli" | ||
| 631 | "org.netbeans.modules.autoupdate.services" | ||
| 632 | "org.netbeans.modules.autoupdate.ui")) | ||
| 633 | (remove-dependency-blocks | ||
| 634 | "ide/ide.kit/nbproject/project.xml" | ||
| 635 | '("org.netbeans.modules.httpserver" | ||
| 636 | "org.netbeans.modules.usersguide")) | ||
| 637 | (remove-dependency-blocks | ||
| 638 | "ide/editor.kit/nbproject/project.xml" | ||
| 639 | '("org.netbeans.modules.css.visual" | ||
| 640 | "org.netbeans.modules.html" | ||
| 641 | "org.netbeans.modules.html.parser" | ||
| 642 | "org.netbeans.modules.html.validation" | ||
| 643 | "org.netbeans.modules.languages.go" | ||
| 644 | "org.netbeans.modules.languages.hcl" | ||
| 645 | "org.netbeans.modules.languages.toml" | ||
| 646 | "org.netbeans.modules.languages.yaml" | ||
| 647 | "org.netbeans.modules.xml.tools" | ||
| 648 | "org.netbeans.modules.xsl")) | ||
| 649 | (remove-dependency-blocks | ||
| 650 | "nb/ide.branding.kit/nbproject/project.xml" | ||
| 651 | '("org.netbeans.modules.autoupdate.pluginimporter")) | ||
| 652 | |||
| 653 | (filter-lines | ||
| 654 | "platform/o.n.bootstrap/nbproject/project.properties" | ||
| 655 | (lambda (line) | ||
| 656 | (not (string-contains line "launcher-external-binaries-2-6c17cc6.zip!/")))) | ||
| 657 | (filter-lines | ||
| 658 | "harness/apisupport.harness/nbproject/project.properties" | ||
| 659 | (lambda (line) | ||
| 660 | (and (not (string-contains line "release.external/bindex-2.2.jar")) | ||
| 661 | (not (string-contains line "release.external/launcher-external-binaries-2-6c17cc6.zip!/")) | ||
| 662 | (not (string-contains line "release.external/harness-launchers-8.2.zip!/"))))) | ||
| 663 | |||
| 664 | (filter-lines | ||
| 665 | "nbbuild/build.xml" | ||
| 666 | (lambda (line) | ||
| 667 | (and (not (string-contains line "platform/libs.junit4/external/binaries-list")) | ||
| 668 | (not (string-contains line "platform/javahelp/external/binaries-list")) | ||
| 669 | (not (string-contains line "platform/javahelp/external/jhall"))))) | ||
| 670 | (filter-lines | ||
| 671 | "ide/ide.kit/manifest.mf" | ||
| 672 | (lambda (line) | ||
| 673 | (not (string-contains line "OpenIDE-Module-Needs: org.netbeans.Netbinox")))) | ||
| 674 | (drop-lines-containing | ||
| 675 | "platform/libs.jna/nbproject/project.properties" | ||
| 676 | '("darwin-x86-64" | ||
| 677 | "darwin-aarch64" | ||
| 678 | "linux-x86/" | ||
| 679 | "linux-aarch64" | ||
| 680 | "linux-riscv64" | ||
| 681 | "win32-x86-64" | ||
| 682 | "win32-x86/" | ||
| 683 | "win32-aarch64" | ||
| 684 | "modules/lib/amd64/jnidispatch-nb.dll" | ||
| 685 | "modules/lib/x86/jnidispatch-nb.dll" | ||
| 686 | "modules/lib/aarch64/jnidispatch-nb.dll" | ||
| 687 | "modules/lib/i386/linux/libjnidispatch-nb.so" | ||
| 688 | "modules/lib/riscv64/linux/libjnidispatch-nb.so" | ||
| 689 | "modules/lib/aarch64/linux/libjnidispatch-nb.so" | ||
| 690 | "modules/lib/x86_64/libjnidispatch-nb.jnilib" | ||
| 691 | "modules/lib/aarch64/libjnidispatch-nb.jnilib")) | ||
| 692 | (trim-trailing-list-commas | ||
| 693 | "platform/libs.jna/nbproject/project.properties") | ||
| 694 | (drop-lines-containing | ||
| 695 | "ide/dlight.nativeexecution/nbproject/project.properties" | ||
| 696 | '("Linux-aarch64/" | ||
| 697 | "Linux-x86/" | ||
| 698 | "Linux-sparc_64/" | ||
| 699 | "Windows-x86/" | ||
| 700 | "Windows-x86_64/" | ||
| 701 | "MacOSX-x86/" | ||
| 702 | "MacOSX-x86_64/" | ||
| 703 | "MacOSX-arm_64/" | ||
| 704 | "SunOS-sparc_64/" | ||
| 705 | "SunOS-x86/" | ||
| 706 | "SunOS-x86_64/" | ||
| 707 | "nativeexecution-external-binaries-1-24aefa9.zip")) | ||
| 708 | (trim-trailing-list-commas | ||
| 709 | "ide/dlight.nativeexecution/nbproject/project.properties") | ||
| 710 | |||
| 711 | ;; Strip non-Linux junixsocket native library entries. | ||
| 712 | (drop-lines-containing | ||
| 713 | "ide/libs.c.kohlschutter.junixsocket/nbproject/project.properties" | ||
| 714 | '("MacOSX-" | ||
| 715 | "x86_64-MacOSX" | ||
| 716 | "aarch64-MacOSX" | ||
| 717 | "Windows" | ||
| 718 | "SunOS" | ||
| 719 | "FreeBSD" | ||
| 720 | "DragonFly" | ||
| 721 | "NetBSD" | ||
| 722 | "OpenBSD" | ||
| 723 | "AIX" | ||
| 724 | "OS400" | ||
| 725 | "arm-Linux" | ||
| 726 | "aarch64-Linux" | ||
| 727 | "ppc64" | ||
| 728 | "s390x" | ||
| 729 | "riscv64" | ||
| 730 | "nodeps")) | ||
| 731 | (trim-trailing-list-commas | ||
| 732 | "ide/libs.c.kohlschutter.junixsocket/nbproject/project.properties") | ||
| 733 | |||
| 734 | ;; Strip non-Linux FlatLaf native libraries; keep | ||
| 735 | ;; libflatlaf-linux-x86_64.so for custom window decorations. | ||
| 736 | (drop-lines-containing | ||
| 737 | "platform/libs.flatlaf/nbproject/project.properties" | ||
| 738 | '("flatlaf-windows-" | ||
| 739 | "libflatlaf-macos-")) | ||
| 740 | |||
| 741 | (symlink-input-file "java-flatlaf" | ||
| 742 | "flatlaf-[0-9.]*\\.jar$" | ||
| 743 | "platform/libs.flatlaf/external/flatlaf-3.5.2.jar") | ||
| 744 | (symlink-input-file "java-jsvg" | ||
| 745 | "jsvg-[0-9.]*\\.jar$" | ||
| 746 | "platform/libs.jsvg/external/jsvg-1.6.1.jar") | ||
| 747 | (symlink-input-file "java-json-simple" | ||
| 748 | "json-simple-[0-9.]*\\.jar$" | ||
| 749 | "nbbuild/external/json-simple-1.1.1.jar") | ||
| 750 | (symlink-input-file "java-jsoup" | ||
| 751 | "jsoup-[0-9.]*\\.jar$" | ||
| 752 | "nbbuild/external/jsoup-1.15.3.jar") | ||
| 753 | (symlink-input-file "java-junit" | ||
| 754 | "junit-[0-9.]*\\.jar$" | ||
| 755 | "platform/libs.junit4/external/junit-4.13.2.jar") | ||
| 756 | (symlink-input-file "java-hamcrest-core" | ||
| 757 | "hamcrest-core-[0-9.]*\\.jar$" | ||
| 758 | "platform/libs.junit4/external/hamcrest-core-1.3.jar") | ||
| 759 | (symlink-input-file "java-lucene-core" | ||
| 760 | "lucene-core-[0-9.]*\\.jar$" | ||
| 761 | "ide/libs.lucene/external/lucene-core-3.6.2.jar") | ||
| 762 | (symlink-input-file "java-junixsocket-common" | ||
| 763 | "junixsocket-common-[0-9.]*\\.jar$" | ||
| 764 | "ide/libs.c.kohlschutter.junixsocket/external/junixsocket-common-2.5.1.jar") | ||
| 765 | (symlink-input-file "java-junixsocket-native-common" | ||
| 766 | "junixsocket-native-common-[0-9.]*\\.jar$" | ||
| 767 | "ide/libs.c.kohlschutter.junixsocket/external/junixsocket-native-common-2.5.1.jar") | ||
| 768 | (symlink-input-file "java-osgi-core" | ||
| 769 | "osgi\\.core-[0-9.]*\\.jar$" | ||
| 770 | "platform/libs.osgi/external/osgi.core-8.0.0.jar") | ||
| 771 | (symlink-input-file "java-osgi-cmpn" | ||
| 772 | "osgi\\.cmpn-[0-9.]*\\.jar$" | ||
| 773 | "platform/libs.osgi/external/osgi.cmpn-7.0.0.jar") | ||
| 774 | (symlink-input-file "java-bouncycastle" | ||
| 775 | "bcprov-jdk18on-[0-9.]*\\.jar$" | ||
| 776 | "ide/bcprov/external/bcprov-jdk18on-1.77.jar") | ||
| 777 | (symlink-input-file "java-bouncycastle" | ||
| 778 | "bcpg-jdk18on-[0-9.]*\\.jar$" | ||
| 779 | "ide/bcpg/external/bcpg-jdk18on-1.77.jar") | ||
| 780 | (symlink-input-file "java-bouncycastle" | ||
| 781 | "bcpkix-jdk18on-[0-9.]*\\.jar$" | ||
| 782 | "ide/bcpkix/external/bcpkix-jdk18on-1.77.jar") | ||
| 783 | (symlink-input-file "java-bouncycastle" | ||
| 784 | "bcutil-jdk18on-[0-9.]*\\.jar$" | ||
| 785 | "ide/bcutil/external/bcutil-jdk18on-1.77.jar") | ||
| 786 | (symlink-input-file "java-jgit-gpg-bc" | ||
| 787 | "org\\.eclipse\\.jgit\\.gpg\\.bc-[0-9.].*\\.jar$" | ||
| 788 | "ide/o.eclipse.jgit.gpg.bc/external/org.eclipse.jgit.gpg.bc-7.0.0.202409031743-r.jar") | ||
| 789 | (symlink-input-file "java-commons-codec" | ||
| 790 | "commons-codec-[0-9.]*\\.jar$" | ||
| 791 | "platform/o.apache.commons.codec/external/commons-codec-1.17.1.jar") | ||
| 792 | (symlink-input-file "java-felix-main" | ||
| 793 | "org\\.apache\\.felix\\.main-[0-9.]*\\.jar$" | ||
| 794 | "platform/libs.felix/external/org.apache.felix.main-7.0.5.jar") | ||
| 795 | (symlink-input-file "java-jna" | ||
| 796 | "jna-jpms-[0-9.]*\\.jar$" | ||
| 797 | "platform/libs.jna/external/jna-5.14.0.jar") | ||
| 798 | (symlink-input-file "java-jna-platform" | ||
| 799 | "jna-platform-jpms-[0-9.]*\\.jar$" | ||
| 800 | "platform/libs.jna.platform/external/jna-platform-5.14.0.jar") | ||
| 801 | (symlink-input-file "java-jsch" | ||
| 802 | "jsch-[0-9.]*\\.jar$" | ||
| 803 | "ide/c.jcraft.jsch/external/jsch-0.1.72.jar") | ||
| 804 | (symlink-input-file "java-asm" | ||
| 805 | "asm9\\.jar$" | ||
| 806 | "platform/libs.asm/external/asm-9.7.1.jar") | ||
| 807 | (symlink-input-file "java-asm-tree" | ||
| 808 | "asm-tree\\.jar$" | ||
| 809 | "platform/libs.asm/external/asm-tree-9.7.1.jar") | ||
| 810 | (symlink-input-file "java-asm-commons" | ||
| 811 | "asm-commons8\\.jar$" | ||
| 812 | "platform/libs.asm/external/asm-commons-9.7.1.jar") | ||
| 813 | (symlink-input-file "java-jemmy" | ||
| 814 | "jemmy-[0-9.]*.jar$" | ||
| 815 | "harness/jemmy/external/jemmy-2.3.1.1.jar") | ||
| 816 | (symlink-input-file "java-jemmy" | ||
| 817 | "jemmy-[0-9.]*-doc\\.zip$" | ||
| 818 | "harness/jemmy/external/jemmy-2.3.1.1-doc.zip") | ||
| 819 | (symlink-input-file "java-jemmy" | ||
| 820 | "jemmy-.*-src\\.zip$" | ||
| 821 | "harness/jemmy/external/jemmy-2.3.1.1-src.zip") | ||
| 822 | (symlink-input-file "java-apache-xml-commons-resolver-netbeans" | ||
| 823 | "xml-resolver\\.jar$" | ||
| 824 | "ide/o.apache.xml.resolver/external/resolver-1.2.jar") | ||
| 825 | (symlink-input-file "java-simplevalidation" | ||
| 826 | "simplevalidation-[0-9.]*\\.jar$" | ||
| 827 | "ide/swing.validation/external/simplevalidation-1.14.1.jar") | ||
| 828 | (symlink-input-file "java-simplevalidation" | ||
| 829 | "simplevalidation-swing-[0-9.]*\\.jar$" | ||
| 830 | "ide/swing.validation/external/simplevalidation-swing-1.14.1.jar") | ||
| 831 | (symlink-input-file "java-jgit" | ||
| 832 | "org\\.eclipse\\.jgit-[0-9.].*\\.jar$" | ||
| 833 | "ide/o.eclipse.jgit/external/org.eclipse.jgit-7.0.0.202409031743-r.jar") | ||
| 834 | (symlink-input-file "java-jgit-ssh-jsch" | ||
| 835 | "org\\.eclipse\\.jgit\\.ssh\\.jsch-[0-9.].*\\.jar$" | ||
| 836 | "ide/o.eclipse.jgit.ssh.jsch/external/org.eclipse.jgit.ssh.jsch-7.0.0.202409031743-r.jar") | ||
| 837 | (symlink-input-file "java-jzlib" | ||
| 838 | "jzlib-[0-9.]*\\.jar$" | ||
| 839 | "ide/c.jcraft.jzlib/external/jzlib-1.1.3.jar") | ||
| 840 | (symlink-input-file "java-javaewah" | ||
| 841 | "JavaEWAH-[0-9.]*\\.jar$" | ||
| 842 | "ide/c.googlecode.javaewah.JavaEWAH/external/JavaEWAH-1.2.3.jar") | ||
| 843 | (symlink-input-file "java-slf4j-api" | ||
| 844 | "slf4j-api-[0-9.]*\\.jar$" | ||
| 845 | "ide/slf4j.api/external/slf4j-api-1.7.36.jar") | ||
| 846 | (symlink-input-file "java-slf4j-jdk14" | ||
| 847 | "slf4j-jdk14-[0-9.]*\\.jar$" | ||
| 848 | "ide/slf4j.jdk14/external/slf4j-jdk14-1.7.36.jar") | ||
| 849 | (make-nativeexecution-binary-zip) | ||
| 850 | (make-ant-binary-zip))) | ||
| 851 | (replace 'build | ||
| 852 | (lambda _ | ||
| 853 | ;; FIXME: Why are tests disabled? | ||
| 854 | (invoke "ant" | ||
| 855 | "-Dcluster.config=guix" ; use our config file | ||
| 856 | "-Ddisable.unit.tests=true" | ||
| 857 | "-Ddisable.qa-functional.tests=true" | ||
| 858 | "-Dext.binaries.downloaded=true" ; so it doesn't download | ||
| 859 | ; "-Dverify.checkout=false" ; FIXME why is this there | ||
| 860 | "-f" "nbbuild/build.xml" | ||
| 861 | "build-nozip"))) | ||
| 862 | (replace 'install | ||
| 863 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 864 | (let* ((out (assoc-ref outputs "out")) | ||
| 865 | (jdk (assoc-ref inputs "jdk")) | ||
| 866 | (runtime-path | ||
| 867 | (string-join | ||
| 868 | (map (lambda (input) | ||
| 869 | (string-append (assoc-ref inputs input) "/bin")) | ||
| 870 | '("bash-minimal" | ||
| 871 | "coreutils" | ||
| 872 | "grep" | ||
| 873 | "sed" | ||
| 874 | "gawk")) | ||
| 875 | ":")) | ||
| 876 | (share (string-append out "/share/netbeans")) | ||
| 877 | (bin (string-append out "/bin"))) | ||
| 878 | (mkdir-p bin) | ||
| 879 | (copy-recursively "nbbuild/netbeans" share) | ||
| 880 | ;; Set JVM options for proper rendering in etc/netbeans.conf. | ||
| 881 | (let ((conf (string-append share "/etc/netbeans.conf"))) | ||
| 882 | (when (file-exists? conf) | ||
| 883 | (substitute* conf | ||
| 884 | (("netbeans_default_options=\"") | ||
| 885 | (string-append | ||
| 886 | "netbeans_default_options=\"" | ||
| 887 | "-J-Dawt.toolkit.name=auto " | ||
| 888 | "-J-Dsun.java2d.uiScale.enabled=true " | ||
| 889 | "-J-Dorg.netbeans.editor.aa.text=hbgr " | ||
| 890 | "-J-Dorg.netbeans.editor.aa.contrast=140 " | ||
| 891 | "-J--enable-native-access=ALL-UNNAMED "))))) | ||
| 892 | (call-with-output-file (string-append bin "/netbeans") | ||
| 893 | (lambda (port) | ||
| 894 | (format port "#!/bin/sh~%export PATH=\"~a${PATH:+:$PATH}\"~%exec ~a/share/netbeans/bin/netbeans --jdkhome ~a \"$@\"~%" | ||
| 895 | runtime-path | ||
| 896 | out | ||
| 897 | (assoc-ref inputs "jbr")))) | ||
| 898 | (chmod (string-append bin "/netbeans") #o755))))))) | ||
| 899 | (inputs | ||
| 900 | `(("jbr" ,jbr25 "jdk") | ||
| 901 | ("bash-minimal" ,bash-minimal) | ||
| 902 | ("coreutils" ,coreutils) | ||
| 903 | ("gawk" ,gawk) | ||
| 904 | ("glib" ,glib) | ||
| 905 | ("grep" ,grep) | ||
| 906 | ("libsecret" ,libsecret) | ||
| 907 | ("sed" ,sed))) | ||
| 908 | (native-inputs | ||
| 909 | `(("java-json-simple" ,java-json-simple-1.1.1) | ||
| 910 | ("java-jsoup" ,java-jsoup-1.15.3) | ||
| 911 | ("java-osgi-core" ,java-osgi-core-8.0.0) | ||
| 912 | ("java-osgi-cmpn" ,java-osgi-cmpn-7.0.0) | ||
| 913 | ("java-bouncycastle" ,java-bouncycastle-1.77) | ||
| 914 | ("java-commons-codec" ,java-commons-codec-1.17.1) | ||
| 915 | ("java-felix-main" ,java-felix-main-7.0.5) | ||
| 916 | ("java-junixsocket-common" ,java-junixsocket-common-2) | ||
| 917 | ("java-junixsocket-native-common" ,java-junixsocket-native-common-2.5.1) | ||
| 918 | ("java-jna" ,java-native-access-5.14.0) | ||
| 919 | ("java-jna-platform" ,java-native-access-platform-5.14.0) | ||
| 920 | ("java-jsch" ,java-jsch-0.1.72) | ||
| 921 | ("java-junit" ,java-junit-4.13.2) | ||
| 922 | ("java-hamcrest-core" ,java-hamcrest-core) | ||
| 923 | ("java-lucene-core" ,java-lucene-core-3.6.2) | ||
| 924 | ("java-asm" ,java-asm-9.7.1) | ||
| 925 | ("java-asm-tree" ,java-asm-tree-9.7.1) | ||
| 926 | ("java-asm-commons" ,java-asm-commons-9.7.1) | ||
| 927 | ("java-apache-xml-commons-resolver-netbeans" | ||
| 928 | ,java-apache-xml-commons-resolver-netbeans-1.2) | ||
| 929 | ("java-simplevalidation" ,java-simplevalidation-1.14.1) | ||
| 930 | ("java-jemmy" ,java-jemmy-2.3.1.1) | ||
| 931 | ("java-flatlaf" ,java-flatlaf) | ||
| 932 | ("java-jsvg" ,java-jsvg-1.6.1) | ||
| 933 | ("java-jgit" ,java-jgit-7) | ||
| 934 | ("java-jgit-gpg-bc" ,java-jgit-gpg-bc-7) | ||
| 935 | ("java-jgit-ssh-jsch" ,java-jgit-ssh-jsch-7) | ||
| 936 | ("java-jzlib" ,java-jzlib-1.1.3) | ||
| 937 | ("java-javaewah" ,java-javaewah-1.2.3) | ||
| 938 | ("java-slf4j-api" ,java-slf4j-api) | ||
| 939 | ("java-slf4j-jdk14" ,java-slf4j-jdk14) | ||
| 940 | ("unzip" ,unzip))) | ||
| 941 | (home-page "https://netbeans.apache.org/") | ||
| 942 | (synopsis "Source-only build of Apache NetBeans 25") | ||
| 943 | (description | ||
| 944 | "This package builds Apache NetBeans 25 from source only. | ||
| 945 | |||
| 946 | The build disables the following platform modules: | ||
| 947 | @itemize | ||
| 948 | @item api.htmlui | ||
| 949 | @item applemenu | ||
| 950 | @item autoupdate.cli | ||
| 951 | @item autoupdate.services | ||
| 952 | @item autoupdate.ui | ||
| 953 | @item core.nativeaccess | ||
| 954 | @item core.network | ||
| 955 | @item htmlui | ||
| 956 | @item javahelp | ||
| 957 | @item junitlib | ||
| 958 | @item libs.batik.read | ||
| 959 | @item libs.javafx | ||
| 960 | @item libs.javax.inject | ||
| 961 | @item libs.junit4 | ||
| 962 | @item libs.junit5 | ||
| 963 | @item libs.testng | ||
| 964 | @item masterfs.macosx | ||
| 965 | @item masterfs.windows | ||
| 966 | @item net.java.html | ||
| 967 | @item net.java.html.boot | ||
| 968 | @item net.java.html.boot.fx | ||
| 969 | @item net.java.html.boot.script | ||
| 970 | @item net.java.html.geo | ||
| 971 | @item net.java.html.json | ||
| 972 | @item net.java.html.sound | ||
| 973 | @item netbinox | ||
| 974 | @item o.apache.commons.commons_io | ||
| 975 | @item o.apache.commons.lang3 | ||
| 976 | @item o.apache.commons.logging | ||
| 977 | @item o.n.html.ko4j | ||
| 978 | @item o.n.html.presenters.spi | ||
| 979 | @item o.n.html.xhr4j | ||
| 980 | @item templatesui | ||
| 981 | @end itemize | ||
| 982 | |||
| 983 | The build disables the following IDE modules: | ||
| 984 | @itemize | ||
| 985 | @item bugtracking | ||
| 986 | @item bugtracking.bridge | ||
| 987 | @item bugtracking.commons | ||
| 988 | @item bugzilla | ||
| 989 | @item c.google.gson | ||
| 990 | @item c.google.guava | ||
| 991 | @item c.google.guava.failureaccess | ||
| 992 | @item core.browser.webview | ||
| 993 | @item css.editor | ||
| 994 | @item css.lib | ||
| 995 | @item css.model | ||
| 996 | @item css.prep | ||
| 997 | @item css.visual | ||
| 998 | @item db | ||
| 999 | @item db.core | ||
| 1000 | @item db.dataview | ||
| 1001 | @item db.drivers | ||
| 1002 | @item db.kit | ||
| 1003 | @item db.metadata.model | ||
| 1004 | @item db.mysql | ||
| 1005 | @item db.sql.editor | ||
| 1006 | @item db.sql.visualeditor | ||
| 1007 | @item dbapi | ||
| 1008 | @item derby | ||
| 1009 | @item docker.api | ||
| 1010 | @item docker.editor | ||
| 1011 | @item docker.ui | ||
| 1012 | @item go.lang | ||
| 1013 | @item html | ||
| 1014 | @item html.custom | ||
| 1015 | @item html.editor | ||
| 1016 | @item html.editor.lib | ||
| 1017 | @item html.indexing | ||
| 1018 | @item html.lexer | ||
| 1019 | @item html.parser | ||
| 1020 | @item html.validation | ||
| 1021 | @item httpserver | ||
| 1022 | @item hudson | ||
| 1023 | @item hudson.git | ||
| 1024 | @item hudson.mercurial | ||
| 1025 | @item hudson.subversion | ||
| 1026 | @item hudson.tasklist | ||
| 1027 | @item hudson.ui | ||
| 1028 | @item javascript2.debug | ||
| 1029 | @item javascript2.debug.ui | ||
| 1030 | @item languages.go | ||
| 1031 | @item languages.hcl | ||
| 1032 | @item languages.toml | ||
| 1033 | @item languages.yaml | ||
| 1034 | @item lexer.antlr4 | ||
| 1035 | @item libs.antlr3.runtime | ||
| 1036 | @item libs.antlr4.runtime | ||
| 1037 | @item libs.commons_compress | ||
| 1038 | @item libs.commons_net | ||
| 1039 | @item libs.flexmark | ||
| 1040 | @item libs.freemarker | ||
| 1041 | @item libs.graalsdk | ||
| 1042 | @item libs.graalsdk.system | ||
| 1043 | @item libs.ini4j | ||
| 1044 | @item libs.jaxb | ||
| 1045 | @item libs.jcodings | ||
| 1046 | @item libs.json_simple | ||
| 1047 | @item libs.snakeyaml_engine | ||
| 1048 | @item libs.svnClientAdapter | ||
| 1049 | @item libs.svnClientAdapter.javahl | ||
| 1050 | @item libs.tomlj | ||
| 1051 | @item libs.tomljava | ||
| 1052 | @item libs.truffleapi | ||
| 1053 | @item libs.xerces | ||
| 1054 | @item localtasks | ||
| 1055 | @item lsp.client | ||
| 1056 | @item markdown | ||
| 1057 | @item mercurial | ||
| 1058 | @item mylyn.util | ||
| 1059 | @item o.apache.commons.httpclient | ||
| 1060 | @item o.apache.commons.lang | ||
| 1061 | @item o.apache.ws.commons.util | ||
| 1062 | @item o.apache.xmlrpc | ||
| 1063 | @item o.eclipse.core.contenttype | ||
| 1064 | @item o.eclipse.core.jobs | ||
| 1065 | @item o.eclipse.core.net | ||
| 1066 | @item o.eclipse.core.runtime | ||
| 1067 | @item o.eclipse.core.runtime.compatibility.auth | ||
| 1068 | @item o.eclipse.equinox.app | ||
| 1069 | @item o.eclipse.equinox.common | ||
| 1070 | @item o.eclipse.equinox.preferences | ||
| 1071 | @item o.eclipse.equinox.registry | ||
| 1072 | @item o.eclipse.equinox.security | ||
| 1073 | @item o.eclipse.jgit.lfs | ||
| 1074 | @item o.eclipse.mylyn.bugzilla.core | ||
| 1075 | @item o.eclipse.mylyn.commons.core | ||
| 1076 | @item o.eclipse.mylyn.commons.net | ||
| 1077 | @item o.eclipse.mylyn.commons.repositories.core | ||
| 1078 | @item o.eclipse.mylyn.commons.xmlrpc | ||
| 1079 | @item o.eclipse.mylyn.tasks.core | ||
| 1080 | @item o.eclipse.mylyn.wikitext.confluence.core | ||
| 1081 | @item o.eclipse.mylyn.wikitext.core | ||
| 1082 | @item o.eclipse.mylyn.wikitext.markdown.core | ||
| 1083 | @item o.eclipse.mylyn.wikitext.textile.core | ||
| 1084 | @item selenium2 | ||
| 1085 | @item selenium2.server | ||
| 1086 | @item servletapi | ||
| 1087 | @item spellchecker | ||
| 1088 | @item spellchecker.bindings.htmlxml | ||
| 1089 | @item spellchecker.bindings.properties | ||
| 1090 | @item spellchecker.dictionary_en | ||
| 1091 | @item spellchecker.kit | ||
| 1092 | @item subversion | ||
| 1093 | @item team.ide | ||
| 1094 | @item textmate.lexer | ||
| 1095 | @item usersguide | ||
| 1096 | @item versioning.system.cvss.installer | ||
| 1097 | @item web.browser.api | ||
| 1098 | @item web.common | ||
| 1099 | @item web.common.ui | ||
| 1100 | @item web.indent | ||
| 1101 | @item web.webkit.debugging | ||
| 1102 | @item xml.jaxb.api | ||
| 1103 | @item xml.tax | ||
| 1104 | @item xml.text.obsolete90 | ||
| 1105 | @item xml.tools | ||
| 1106 | @item xml.wsdl.model | ||
| 1107 | @item xsl | ||
| 1108 | @end itemize | ||
| 1109 | |||
| 1110 | The build disables the following extide modules: | ||
| 1111 | @itemize | ||
| 1112 | @item gradle | ||
| 1113 | @item gradle.dists | ||
| 1114 | @item gradle.editor | ||
| 1115 | @item libs.gradle | ||
| 1116 | @end itemize | ||
| 1117 | |||
| 1118 | The build disables the following third-party modules: | ||
| 1119 | @itemize | ||
| 1120 | @item libs.javafx.linux | ||
| 1121 | @item libs.javafx.linux.aarch64 | ||
| 1122 | @item libs.javafx.macosx | ||
| 1123 | @item libs.javafx.macosx.aarch64 | ||
| 1124 | @item libs.javafx.win | ||
| 1125 | @end itemize | ||
| 1126 | |||
| 1127 | The build disables the following NB modules: | ||
| 1128 | @itemize | ||
| 1129 | @item autoupdate.pluginimporter | ||
| 1130 | @item bugzilla.exceptionreporter | ||
| 1131 | @item updatecenters | ||
| 1132 | @end itemize | ||
| 1133 | |||
| 1134 | The build disables the following cluster references: | ||
| 1135 | @itemize | ||
| 1136 | @item nb.cluster.3rdparty | ||
| 1137 | @item nb.cluster.javafx | ||
| 1138 | @end itemize | ||
| 1139 | |||
| 1140 | The build also disables the JavaHelp bootstrap checks and the Windows | ||
| 1141 | launcher download target so the resulting IDE remains fully | ||
| 1142 | source-built. | ||
| 1143 | |||
| 1144 | This package is built with Wayland support and HiDPI support.") | ||
| 1145 | (license (list license:asl2.0 | ||
| 1146 | license:bsd-3 | ||
| 1147 | license:cddl1.0 | ||
| 1148 | license:expat)))) | ||
diff --git a/gnu/packages/patches/netbeans-25-nativeexecution-paths.patch b/gnu/packages/patches/netbeans-25-nativeexecution-paths.patch new file mode 100644 index 00000000000..ecb7d6a616c --- /dev/null +++ b/gnu/packages/patches/netbeans-25-nativeexecution-paths.patch | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | Author: Danny Milosavljevic <dannym@friendly-machines.com> | ||
| 2 | Date: 2026-03-31 | ||
| 3 | Subject: Make nativeexecution helper work with Guix | ||
| 4 | |||
| 5 | diff -urN orig/ide/dlight.nativeexecution/release/bin/nativeexecution/dorun.sh mod/ide/dlight.nativeexecution/release/bin/nativeexecution/dorun.sh | ||
| 6 | --- orig/ide/dlight.nativeexecution/release/bin/nativeexecution/dorun.sh 2026-03-19 00:00:00.000000000 +0000 | ||
| 7 | +++ mod/ide/dlight.nativeexecution/release/bin/nativeexecution/dorun.sh 2026-03-19 00:00:00.000000000 +0000 | ||
| 8 | @@ -16,8 +16,8 @@ | ||
| 9 | # specific language governing permissions and limitations | ||
| 10 | # under the License. | ||
| 11 | |||
| 12 | -PATH=/bin:/usr/bin | ||
| 13 | -PROG=`basename "$0"` | ||
| 14 | +PATH="${PATH:+$PATH:}/bin:/usr/bin" | ||
| 15 | +PROG="${0##*/}" | ||
| 16 | USAGE="usage: ${PROG} [-p prompt] -x execScript" | ||
| 17 | PROMPT=NO | ||
| 18 | STATUS=-1 | ||
| 19 | @@ -43,7 +43,7 @@ | ||
| 20 | esac | ||
| 21 | done | ||
| 22 | |||
| 23 | -shift `expr $OPTIND - 1` | ||
| 24 | +shift "$((OPTIND - 1))" | ||
| 25 | |||
| 26 | trap "doExit" 1 2 15 EXIT | ||
| 27 | |||
| 28 | diff -urN orig/ide/dlight.nativeexecution/release/bin/nativeexecution/hostinfo.sh mod/ide/dlight.nativeexecution/release/bin/nativeexecution/hostinfo.sh | ||
| 29 | --- orig/ide/dlight.nativeexecution/release/bin/nativeexecution/hostinfo.sh 2026-03-19 00:00:00.000000000 +0000 | ||
| 30 | +++ mod/ide/dlight.nativeexecution/release/bin/nativeexecution/hostinfo.sh 2026-03-19 00:00:00.000000000 +0000 | ||
| 31 | @@ -16,13 +16,13 @@ | ||
| 32 | # specific language governing permissions and limitations | ||
| 33 | # under the License. | ||
| 34 | |||
| 35 | -PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin | ||
| 36 | +PATH="${PATH:+$PATH:}/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" | ||
| 37 | HOSTNAME=`uname -n` | ||
| 38 | OS=`uname -s` | ||
| 39 | CPUTYPE=`uname -p` | ||
| 40 | BITNESS=32 | ||
| 41 | |||
| 42 | -LS=/bin/ls | ||
| 43 | +LS=ls | ||
| 44 | OSFAMILY= | ||
| 45 | DATETIME=`date -u +'%Y-%m-%d %H:%M:%S'` | ||
| 46 | |||
| 47 | @@ -139,7 +139,7 @@ | ||
| 48 | echo "Warning: TMPDIRBASE is not writable: ${TMPDIRBASE}">&2 | ||
| 49 | SUFFIX=`expr 1 + ${SUFFIX}` | ||
| 50 | TMPDIRBASE=${TMPBASE}/dlight_${USER_D}_${SUFFIX} | ||
| 51 | - /bin/mkdir -p ${TMPDIRBASE} 2>/dev/null | ||
| 52 | + mkdir -p ${TMPDIRBASE} 2>/dev/null | ||
| 53 | else | ||
| 54 | break | ||
| 55 | fi | ||
| 56 | @@ -157,7 +157,7 @@ | ||
| 57 | echo "Warning: TMPDIRBASE is not writable: ${TMPDIRBASE}">&2 | ||
| 58 | SUFFIX=`expr 1 + ${SUFFIX}` | ||
| 59 | TMPDIRBASE=${TMPBASE}/${NB_KEY}_${SUFFIX} | ||
| 60 | - /bin/mkdir -p ${TMPDIRBASE} 2>/dev/null | ||
| 61 | + mkdir -p ${TMPDIRBASE} 2>/dev/null | ||
| 62 | else | ||
| 63 | break | ||
| 64 | fi | ||
| 65 | @@ -174,7 +174,7 @@ | ||
| 66 | |||
| 67 | ENVFILE="${TMPDIRBASE}/env" | ||
| 68 | |||
| 69 | -ID=`LC_MESSAGES=C /usr/bin/id` | ||
| 70 | +ID=`LC_MESSAGES=C id` | ||
| 71 | |||
| 72 | echo BITNESS=${BITNESS} | ||
| 73 | echo CPUFAMILY=${CPUFAMILY} | ||
diff --git a/gnu/packages/patches/netbeans-25-source-only-build.patch b/gnu/packages/patches/netbeans-25-source-only-build.patch new file mode 100644 index 00000000000..95fbd737cb1 --- /dev/null +++ b/gnu/packages/patches/netbeans-25-source-only-build.patch | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | Author: Danny Milosavljevic <dannym@friendly-machines.com> | ||
| 2 | Date: 2026-03-31 | ||
| 3 | Subject: Disable build-time (test-time) downloaders. | ||
| 4 | |||
| 5 | diff -urN orig/harness/apisupport.harness/build.xml mod/harness/apisupport.harness/build.xml | ||
| 6 | --- orig/harness/apisupport.harness/build.xml 2026-03-17 23:30:32.335913224 +0000 | ||
| 7 | +++ mod/harness/apisupport.harness/build.xml 2026-03-17 23:30:51.503442261 +0000 | ||
| 8 | @@ -33,19 +33,6 @@ | ||
| 9 | <zipfileset file="taskdefs.properties" fullpath="org/netbeans/nbbuild/taskdefs.properties"/> | ||
| 10 | </nb-ext-jar> | ||
| 11 | |||
| 12 | - <!-- verify that the DownloadBinaries task is properly functional --> | ||
| 13 | - <taskdef name="TestDownload" classname="org.netbeans.nbbuild.extlibs.DownloadBinaries"> | ||
| 14 | - <classpath> | ||
| 15 | - <pathelement location="${cluster}/tasks.jar"></pathelement> | ||
| 16 | - </classpath> | ||
| 17 | - </taskdef> | ||
| 18 | - <echo file="build/binaries-list">F0ED132A49244B042CD0E15702AB9F2CE3CC8436 org.ow2.asm:asm:9.7.1</echo> | ||
| 19 | - <TestDownload> | ||
| 20 | - <manifest dir="build"> | ||
| 21 | - <include name="binaries-list"/> | ||
| 22 | - </manifest> | ||
| 23 | - </TestDownload> | ||
| 24 | - <delete file="build/asm-9.7.1.jar"/> | ||
| 25 | </target> | ||
| 26 | |||
| 27 | <target name="compile-jnlp-launcher" depends="init,compile"> | ||
| 28 | diff -urN orig/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java mod/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java | ||
| 29 | --- orig/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java 2026-03-18 07:25:25.497125691 +0000 | ||
| 30 | +++ mod/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java 2026-03-18 07:25:35.587014287 +0000 | ||
| 31 | @@ -467,6 +467,9 @@ | ||
| 32 | if (testtype == null) { | ||
| 33 | throw new IOException("Must declare <name>unit</name> (e.g.) in <test-type> in " + projectxml); | ||
| 34 | } | ||
| 35 | + if (Boolean.parseBoolean((String) properties.get("disable." + testtype + ".tests"))) { | ||
| 36 | + continue; | ||
| 37 | + } | ||
| 38 | List<String> compileDepsList = new ArrayList<>(); | ||
| 39 | for (Element dep : XMLUtil.findSubElements(depssEl)) { | ||
| 40 | if (dep.getTagName().equals("test-dependency")) { | ||
| 41 | diff -urN orig/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java mod/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java | ||
| 42 | --- orig/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java 2026-03-17 23:30:32.338404995 +0000 | ||
| 43 | +++ mod/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java 2026-03-18 07:16:44.662227912 +0000 | ||
| 44 | @@ -1574,6 +1574,9 @@ | ||
| 45 | } else if (testType.equals(TestDeps.QA_FUNCTIONAL)) { | ||
| 46 | existsQaFunctionalTests = true; | ||
| 47 | } | ||
| 48 | + if (Boolean.parseBoolean(getProject().getProperty("disable." + testType + ".tests"))) { | ||
| 49 | + continue; | ||
| 50 | + } | ||
| 51 | TestDeps testDeps = new TestDeps(testType,testCnb,modules); | ||
| 52 | testDepsList.add(testDeps); | ||
| 53 | for (Element el : XMLUtil.findSubElements(depssEl)) { | ||
| 54 | @@ -1619,6 +1622,9 @@ | ||
| 55 | if (testDeps.fullySpecified) { | ||
| 56 | continue; | ||
| 57 | } | ||
| 58 | + if (Boolean.parseBoolean(getProject().getProperty("disable." + testDeps.testtype + ".tests"))) { | ||
| 59 | + continue; | ||
| 60 | + } | ||
| 61 | if (new File(moduleProject, "test/" + testDeps.testtype + "/src").isDirectory()) { | ||
| 62 | log("Warning: " + testCnb + " lacks a " + testDeps.testtype + | ||
| 63 | " test dependency on org.netbeans.libs.junit4; using default dependencies for compatibility", Project.MSG_WARN); | ||
| 64 | diff -urN orig/nbbuild/build.xml mod/nbbuild/build.xml | ||
| 65 | --- orig/nbbuild/build.xml 2026-03-17 23:30:32.340737929 +0000 | ||
| 66 | +++ mod/nbbuild/build.xml 2026-03-17 23:30:51.503442261 +0000 | ||
| 67 | @@ -101,6 +101,8 @@ | ||
| 68 | </path> | ||
| 69 | <javac srcdir="antsrc" destdir="${build.ant.classes.dir}" deprecation="true" debug="${build.compiler.debug}" source="1.8" target="1.8"> | ||
| 70 | <classpath refid="bootstrap-cp"/> | ||
| 71 | + <exclude name="org/netbeans/nbbuild/CheckHelpSets.java"/> | ||
| 72 | + <exclude name="org/netbeans/nbbuild/CheckHelpSetsBin.java"/> | ||
| 73 | <compilerarg line="-Xlint -Xlint:-serial"/> | ||
| 74 | </javac> | ||
| 75 | <jar jarfile="${nbantext.jar}"> | ||
| 76 | @@ -461,18 +463,7 @@ | ||
| 77 | </fixcrlf> | ||
| 78 | </target> | ||
| 79 | |||
| 80 | - <target name="-download-nb-windows-launchers" depends="init,-check-nb-cluster" if="has.nb.cluster"> | ||
| 81 | - <downloadbinaries cache="${binaries.cache}" server="${binaries.server}" repos="${binaries.repos}"> | ||
| 82 | - <manifest dir="${nb_all}" includes="nb/ide.launcher/external/binaries-list"/> | ||
| 83 | - </downloadbinaries> | ||
| 84 | - | ||
| 85 | - <mkdir dir="${netbeans.dest.dir}/bin" /> | ||
| 86 | - <unzip src="../nb/ide.launcher/external/launcher-external-binaries-2-6c17cc6.zip" dest="${netbeans.dest.dir}/bin"> | ||
| 87 | - <patternset> | ||
| 88 | - <include name="netbeans*.exe"/> | ||
| 89 | - </patternset> | ||
| 90 | - </unzip> | ||
| 91 | - </target> | ||
| 92 | + <target name="-download-nb-windows-launchers" depends="init,-check-nb-cluster" if="has.nb.cluster"/> | ||
| 93 | |||
| 94 | <target name="finish-build-nb" depends="init,-check-nb-cluster,-download-nb-windows-launchers,-load-module-flags" if="has.nb.cluster"> | ||
| 95 | <loadproperties srcFile="${clusters.list.file}" /> | ||
diff --git a/gnu/packages/patches/netbeans-25-terminal-no-login-shell.patch b/gnu/packages/patches/netbeans-25-terminal-no-login-shell.patch new file mode 100644 index 00000000000..b7473b676ba --- /dev/null +++ b/gnu/packages/patches/netbeans-25-terminal-no-login-shell.patch | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | Author: Danny Milosavljevic <dannym@friendly-machines.com> | ||
| 2 | Date: 2026-03-31 | ||
| 3 | Subject: Remove forced login shell | ||
| 4 | |||
| 5 | diff -urN orig/ide/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalSupportImpl.java mod/ide/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalSupportImpl.java | ||
| 6 | --- orig/ide/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalSupportImpl.java 2026-03-19 00:00:00.000000000 +0000 | ||
| 7 | +++ mod/ide/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalSupportImpl.java 2026-03-19 00:00:00.000000000 +0000 | ||
| 8 | @@ -320,9 +320,6 @@ | ||
| 9 | } | ||
| 10 | // npb.setWorkingDirectory("${HOME}"); | ||
| 11 | npb.setExecutable(shell); | ||
| 12 | - if (shell.endsWith("bash") || shell.endsWith("bash.exe")) { // NOI18N | ||
| 13 | - npb.setArguments("--login"); // NOI18N | ||
| 14 | - } | ||
| 15 | |||
| 16 | NativeExecutionDescriptor descr; | ||
| 17 | descr = new NativeExecutionDescriptor().controllable(true).frontWindow(true).inputVisible(true).inputOutput(ioRef.get()); | ||
diff --git a/gnu/packages/patches/netbeans-25-wayland-font-rendering.patch b/gnu/packages/patches/netbeans-25-wayland-font-rendering.patch new file mode 100644 index 00000000000..2690377762d --- /dev/null +++ b/gnu/packages/patches/netbeans-25-wayland-font-rendering.patch | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | Author: Danny Milosavljevic <dannym@friendly-machines.com> | ||
| 2 | Date: 2026-03-31 | ||
| 3 | Subject: Add font hints (for Wayland). | ||
| 4 | |||
| 5 | --- a/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/Startup.java 2026-03-20 03:13:28.788555561 +0000 | ||
| 6 | +++ b/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/Startup.java 2026-03-20 03:15:03.827463921 +0000 | ||
| 7 | @@ -19,6 +19,7 @@ | ||
| 8 | |||
| 9 | package org.netbeans.swing.plaf; | ||
| 10 | |||
| 11 | +import java.awt.RenderingHints; | ||
| 12 | import java.awt.Toolkit; | ||
| 13 | import java.util.logging.Logger; | ||
| 14 | import org.netbeans.swing.plaf.aqua.AquaLFCustoms; | ||
| 15 | @@ -228,6 +229,20 @@ | ||
| 16 | installPerLFDefaults(); | ||
| 17 | installTheme(UIManager.getLookAndFeel()); | ||
| 18 | |||
| 19 | + // WLToolkit (JBR's native Wayland backend) does not provide font | ||
| 20 | + // rendering hints via awt.font.desktophints, so Swing components | ||
| 21 | + // render text without antialiasing. Set LCD subpixel hints in | ||
| 22 | + // UIManager so JComponent.setUI() picks them up. | ||
| 23 | + if (System.getenv("WAYLAND_DISPLAY") != null | ||
| 24 | + && Toolkit.getDefaultToolkit().getDesktopProperty( | ||
| 25 | + "awt.font.desktophints") == null) { | ||
| 26 | + UIManager.getDefaults().put( | ||
| 27 | + RenderingHints.KEY_TEXT_ANTIALIASING, | ||
| 28 | + RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR); | ||
| 29 | + UIManager.getDefaults().put( | ||
| 30 | + RenderingHints.KEY_TEXT_LCD_CONTRAST, 140); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | runPostInstall(); | ||
| 34 | |||
| 35 | attachListener(); | ||
| 36 | |||
| 37 | --- a/platform/openide.awt/src/org/openide/awt/GraphicsUtils.java 2026-03-20 03:13:28.792998877 +0000 | ||
| 38 | +++ b/platform/openide.awt/src/org/openide/awt/GraphicsUtils.java 2026-03-20 03:16:15.622974599 +0000 | ||
| 39 | @@ -37,7 +37,8 @@ | ||
| 40 | Boolean.getBoolean("nb.cellrenderer.antialiasing") // NOI18N | ||
| 41 | ||Boolean.getBoolean("swing.aatext") // NOI18N | ||
| 42 | ||(isGTK() && gtkShouldAntialias()) // NOI18N | ||
| 43 | - || isAqua(); | ||
| 44 | + || isAqua() | ||
| 45 | + || isWayland(); | ||
| 46 | private static Boolean gtkAA; | ||
| 47 | private static Map<Object,Object> hintsMap; | ||
| 48 | |||
| 49 | @@ -49,6 +50,10 @@ | ||
| 50 | return "GTK".equals(UIManager.getLookAndFeel().getID()); | ||
| 51 | } | ||
| 52 | |||
| 53 | + private static boolean isWayland() { | ||
| 54 | + return System.getenv("WAYLAND_DISPLAY") != null; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | private static final boolean gtkShouldAntialias() { | ||
| 58 | if (gtkAA == null) { | ||
| 59 | Object o = Toolkit.getDefaultToolkit().getDesktopProperty("gnome.Xft/Antialias"); //NOI18N | ||
| 60 | @@ -84,7 +89,14 @@ | ||
| 61 | if (ret == null) { | ||
| 62 | ret = new HashMap<Object,Object>(); | ||
| 63 | if (antialias) { | ||
| 64 | - ret.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); | ||
| 65 | + if (isWayland()) { | ||
| 66 | + ret.put(RenderingHints.KEY_TEXT_ANTIALIASING, | ||
| 67 | + RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR); | ||
| 68 | + ret.put(RenderingHints.KEY_TEXT_LCD_CONTRAST, 140); | ||
| 69 | + } else { | ||
| 70 | + ret.put(RenderingHints.KEY_TEXT_ANTIALIASING, | ||
| 71 | + RenderingHints.VALUE_TEXT_ANTIALIAS_ON); | ||
| 72 | + } | ||
| 73 | } | ||
| 74 | } | ||
| 75 | if (antialias || | ||
| 76 | |||
| 77 | --- a/ide/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalSupportImpl.java 2026-03-20 03:01:46.421416137 +0000 | ||
| 78 | +++ b/ide/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/TerminalSupportImpl.java 2026-03-20 03:02:11.284626650 +0000 | ||
| 79 | @@ -266,6 +266,15 @@ | ||
| 80 | // | ||
| 81 | term.setEmulation("xterm"); // NOI18N | ||
| 82 | |||
| 83 | + // WLToolkit (Wayland) doesn't provide desktop font hints, | ||
| 84 | + // so term.drawGlyphVector() renders without antialiasing. | ||
| 85 | + // Set LCD subpixel hints explicitly. | ||
| 86 | + java.util.Map<java.awt.RenderingHints.Key, Object> fontHints = new java.util.HashMap<>(); | ||
| 87 | + fontHints.put(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, | ||
| 88 | + java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR); | ||
| 89 | + fontHints.put(java.awt.RenderingHints.KEY_TEXT_LCD_CONTRAST, 140); | ||
| 90 | + term.setRenderingHints(fontHints); | ||
| 91 | + | ||
| 92 | NativeProcessBuilder npb = NativeProcessBuilder.newProcessBuilder(env); | ||
| 93 | // clear env modified by NB. Let it be initialized by started shell process | ||
| 94 | npb.getEnvironment().put("LD_LIBRARY_PATH", "");// NOI18N | ||
