archrelease: copy trunk to extra-x86_64
[arch-packages.git] / java-openjfx / trunk / PKGBUILD
blob77276cc8dd56c28556a3908f6456c40c98d62a54
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Frederik Schwan <freswa at archlinux dot org>
3 # Contributor: Maxime Gauduin <alucryd@archlinux.org>
4 # Contributor: Guillaume Alaux <guillaume@archlinux.org>
5 # Contributor: William Gathoye <william + archlinux at gathoye dot be>
6 # Contributor: Emanuel Couto <emanuel dot amaral dot couto at gmail dot com>
7 # Contributor: Richard Jackson <rdjack21 at gmail dot com>
8 # Contributor: Tinx <arch at tinx dot eu>
9 # Contributor: Jens Kapitza <j dot kapitza at schwarze-allianz dot de>
10 # Contributor: Olli <olli at coderkun dot de>
12 pkgbase=java-openjfx
13 pkgname=(
14   java-openjfx
15   java-openjfx-doc
16   java-openjfx-src
18 pkgver=18.0.1.u2
19 pkgrel=1
20 pkgdesc="Java OpenJFX client application platform (open-source implementation of JavaFX) - latest version"
21 arch=(x86_64)
22 url=https://wiki.openjdk.java.net/display/OpenJFX/Main
23 license=(custom)
24 makedepends=(
25   alsa-lib
26   ant
27   cairo
28   cmake
29   ffmpeg4.4
30   freetype2
31   gdk-pixbuf2
32   glib2
33   gperf
34   gradle
35   gtk2
36   gtk3
37   java-environment-openjdk=18
38   libgl
39   libx11
40   libxtst
41   pango
42   python
43   qt5-base
44   ruby
45   unzip
46   webkit2gtk
47   zip
49 source=(
50   https://github.com/openjdk/jfx/archive/refs/tags/${pkgver//.u/+}.tar.gz
51   # ${pkgname}-${pkgver}.tar.gz::https://github.com/openjdk/jfx${pkgver%%.*}u/archive/refs/tags/${pkgver//.u/+}.tar.gz
52   gradle.properties
53   java-openjfx-flags.patch
54   java-openjfx-no-xlocale.patch
55   java-openjfx-gstreamer-lite-gcc10-compat.patch
57 b2sums=('2ae577a5321b982989a1cd41e0a16906147d0620a4b6c33359da58db75bffc6b2e3a263f764036d9b37c492f002eeacf576cdb3740a75da7a4cd699393986fd3'
58         'a77fd8814a5978827de01a652f7b945f3439df04606434ced8998c8d77a82985292490e6965299aeb52f9da3d8069b4091d75519bd4ec8a15f70bc6d28b13498'
59         '2bc0cd6945ac33c882d56beb8abaa26bde038ebf25badb6e8f8af301449e7d56c2f795159d57ef2ccc8f5504bb8466e00445e65ff09519d9c6132e1b7dc6f4b5'
60         '13216615c01b8d48d17889ffa22668c38568870d83ab30c542eb5b5620db305f02efb1acb99d9b5e89eb0a73a134bb336cb301f4de4e8855cae50efb099e384e'
61         '119fa1cc5da2cdefa22bbe9b6f76581faa74e05fa7b6e5576470fc0251c6e257f122fbba03754cc01f7c7251145cfa1cab4ffc2f9d59ff0c175a121e943a0f64')
63 prepare() {
64   cd jfx-${pkgver//.u/-}
65   # cd jfx${pkgver%%.*}u-${pkgver//.u/-}
67   ln -sf ../gradle.properties .
68   patch -Np1 -i ../java-openjfx-flags.patch
69   patch -Np1 -i ../java-openjfx-no-xlocale.patch
70   patch -Np1 -i ../java-openjfx-gstreamer-lite-gcc10-compat.patch
71   sed 's|, "-Werror"||g' -i buildSrc/linux.gradle
74 build() {
75   cd jfx-${pkgver//.u/-}
76   # cd jfx${pkgver%%.*}u-${pkgver//.u/-}
78   # build against ffmpeg4.4
79   export PKG_CONFIG_PATH='/usr/lib/ffmpeg4.4/pkgconfig'
81   gradle zips
84 package_java-openjfx() {
85   depends=(
86     java-runtime-openjdk=${pkgver%%.*}
87     libgl
88     libx11
89     libxtst
90   )
91   optdepends=(
92     'ffmpeg4.4: Media support',
93     'gtk2: GTK2 support',
94     'gtk3: GTK3 support',
95     'webkit2gtk: Web support'
96   )
97   provides=(java-openjfx=${pkgver%%.*})
99   cd jfx-${pkgver//.u/-}
100   # cd jfx${pkgver%%.*}u-${pkgver//.u/-}
102   install -dm 755  "${pkgdir}"/usr/{lib/jvm/java-${pkgver%%.*}-openjdk,share/licenses}
103   cp -dr --no-preserve=ownership build/sdk/lib "${pkgdir}"/usr/lib/jvm/java-${pkgver%%.*}-openjdk/
104   cp -dr --no-preserve=ownership build/jmods "${pkgdir}"/usr/lib/jvm/java-${pkgver%%.*}-openjdk/
105   cp -dr --no-preserve=ownership build/sdk/legal "${pkgdir}"/usr/share/licenses/java-openjfx
108 package_java-openjfx-doc() {
109   cd jfx-${pkgver//.u/-}
110   # cd jfx${pkgver%%.*}u-${pkgver//.u/-}
112   install -dm 755 "${pkgdir}"/usr/share/{doc,licenses}
113   cp -dr --no-preserve=ownership build/javadoc "${pkgdir}"/usr/share/doc/java-openjfx
114   ln -s java-openjfx "${pkgdir}"/usr/share/licenses/java-openjfx-doc
117 package_java-openjfx-src() {
118   cd jfx-${pkgver//.u/-}
119   # cd jfx${pkgver%%.*}u-${pkgver//.u/-}
121   install -dm 755  "${pkgdir}"/usr/{lib/jvm/java-${pkgver%%.*}-openjdk,share/licenses}
122   install -m 644 build/sdk/src.zip "${pkgdir}"/usr/lib/jvm/java-${pkgver%%.*}-openjdk/javafx-src.zip
123   ln -s java-openjfx "${pkgdir}"/usr/share/licenses/java-openjfx-src
126 # vim: ts=2 sw=2 et: