summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 45443fe862f1b66981251a3f75ff508a38b4d312 (plain)
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
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Guillaume Alaux <guillaume@archlinux.org>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: William Gathoye <william + archlinux at gathoye dot be>
# Contributor: Emanuel Couto <emanuel dot amaral dot couto at gmail dot com>
# Contributor: Richard Jackson <rdjack21 at gmail dot com>
# Contributor: Tinx <arch at tinx dot eu>
# Contributor: Jens Kapitza <j dot kapitza at schwarze-allianz dot de>
# Contributor: Olli <olli at coderkun dot de>

pkgbase=java8-openjfx
pkgname=(
  java8-openjfx
  java8-openjfx-doc
  java8-openjfx-src
)
pkgver=8.u202
pkgrel=10
pkgdesc='Java OpenJFX 8 client application platform (open-source implementation of JavaFX)'
arch=(x86_64)
url=https://wiki.openjdk.java.net/display/OpenJFX/Main
license=(GPL)
makedepends=(
  alsa-lib
  cairo
  cmake
  ffmpeg4.4
  freetype2
  gdk-pixbuf2
  glib2
  gperf
  gtk2
  gtk3
  jdk8-openjdk
  libgl
  libx11
  libxtst
  pango
  python2
  qt5-base
  ruby
  unzip
  webkit2gtk
)
DLAGENTS=("https::/usr/bin/curl --user-agent 'Mozilla' -fLC - -o %o %u")
source=(
  https://hg.openjdk.java.net/openjfx/8u-dev/rt/archive/${pkgver//./}-ga.tar.bz2
  gradle.properties
  https://services.gradle.org/distributions/gradle-4.8-bin.zip
  java8-openjfx-flags.patch
  java8-openjfx-no-xlocale.patch
  java8-openjfx-no-sys-sysctl.patch
  java8-openjfx-CVE-2021-3517-fix.patch::https://gitlab.gnome.org/GNOME/libxml2/-/commit/bf22713507fe1fc3a2c4b525cf0a88c2dc87a3a2.patch
  java8-openjfx-CVE-2021-3522-fix.patch::https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/8a88e5c1db05ebadfd4569955f6f47c23cdca3c4.patch
  java8-openjfx-include-iterator.patch
  java8-openjfx-no-check-jfxrt-jar.patch
  java8-openjfx-fix-java-version-check.patch
)
sha256sums=('813ed6bbe7669b5acae7908720b9e353771e854be75c57a323310d0b9271daff'
            'd1c2255893e5ec6268d7c92bb6539cde629d325872f26cffb5f1f616c9d5f30d'
            'f3e29692a8faa94eb0b02ebf36fa263a642b3ae8694ef806c45c345b8683f1ba'
            'a2e0d5ac5cdb83958d2886aef7f5a419f460e103959f65aaadd69cb26cc6adec'
            'b21f6b254acc7aa2124521b6521d3bdfdfcfd9b062624a84ef73608120957d0d'
            'cd1a2bd60f636662e4f3334217b3e14f1d51cf30b77b9ca3eff8d030312fd26a'
            '4db6e995d46f5ab29c4169dab5dbbe367ebd01dee66ef1750abe5cf0c8364d42'
            '3487eb180fff9866c8b8b08be45f13fa9e8edd04e5719bc867e59b09b81954b4'
            'bd69e8a3363f9b3ade50fb29d4c9e3d7e59b42472ae00d425d20ddcda720b919'
            '47822da975832551bc3b20b3d75891135314f89cfcb75f7212eece148902aea3'
            '88ecba988b6e05580cecc09c37add8e375097619d9fa106d65c09edd993c3bc7')

prepare() {
  cd rt-${pkgver//./}-ga

  ln -sf ../gradle.properties .
  patch -Np1 -i ../java8-openjfx-flags.patch
  patch -Np1 -i ../java8-openjfx-no-xlocale.patch
  patch -Np1 -i ../java8-openjfx-no-sys-sysctl.patch
  # loose match the following patch due to whitespace differences
  patch -Np1 -l -i "$srcdir"/java8-openjfx-CVE-2021-3517-fix.patch -d modules/web/src/main/native/Source/ThirdParty/libxml/src
  patch -Np1 -i "$srcdir"/java8-openjfx-CVE-2021-3522-fix.patch -d modules/media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-base
  patch -Np1 -i ../java8-openjfx-include-iterator.patch
  patch -Np1 -i ../java8-openjfx-no-check-jfxrt-jar.patch
  patch -Np1 -i ../java8-openjfx-fix-java-version-check.patch
}

build() {
  cd rt-${pkgver//./}-ga

  # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
  CFLAGS+=' -fcommon'
  # fix errors when compiling gstreamer-lite
  CFLAGS+=' -Wno-incompatible-pointer-types -Wno-int-conversion'
  # build against ffmpeg4.4
  export PKG_CONFIG_PATH='/usr/lib/ffmpeg4.4/pkgconfig'
  # ensure jdk 8 is used when building
  export JAVA_HOME=/usr/lib/jvm/java-8-openjdk

  ../gradle-4.8/bin/gradle
}

package_java8-openjfx() {
  depends=(
    jre8-openjdk
    libgl
    libx11
    libxtst
  )
  optdepends=(
    'ffmpeg4.4: Media support',
    'gtk2: GTK2 support',
    'gtk3: GTK3 support',
    'webkit2gtk: Web support'
  )
  provides=('java-openjfx=8')

  cd rt-${pkgver//./}-ga

  install -dm 755  "${pkgdir}"/usr/lib/jvm/java-8-openjdk/jre
  cp -dr --no-preserve=ownership build/sdk/{bin,lib} "${pkgdir}"/usr/lib/jvm/java-8-openjdk/
  cp -dr --no-preserve=ownership build/sdk/rt/lib "${pkgdir}"/usr/lib/jvm/java-8-openjdk/jre/
}

package_java8-openjfx-doc() {
  cd rt-${pkgver//./}-ga

  install -dm 755 "${pkgdir}"/usr/share/doc
  cp -dr --no-preserve=ownership build/javadoc "${pkgdir}"/usr/share/doc/java8-openjfx
}

package_java8-openjfx-src() {
  cd rt-${pkgver//./}-ga

  install -Dm 644 build/javafx-src.zip -t "${pkgdir}"/usr/lib/jvm/java-8-openjdk/
}

# vim: ts=2 sw=2 et: