Blob Blame Raw
%global openjfxdir %{_jvmdir}/%{name}

Name:           openjfx
Version:        8.0.152
Release:        18.b05%{?dist}
Summary:        Rich client application platform for Java

#fxpackager is BSD
License:        GPL v2 with exceptions and BSD
URL:            http://openjdk.java.net/projects/openjfx/

Source0:        http://hg.openjdk.java.net/openjfx/8u-dev/rt/archive/8u152-b05.tar.bz2
Source1:        README.fedora

Patch0:         0001-Fix-wait-call-in-PosixPlatform.patch
Patch1:         0002-Bulid-in-Gradle-local-mode.patch
Patch2:         0003-Allow-build-to-work-on-newer-gradles.patch
Patch3:         0004-fix-cast-between-incompatible-function-types.patch

ExclusiveArch:  %{ix86} x86_64

Requires:       javapackages-tools
Requires:       java
Requires:       java-1.8.0-openjdk-openjfx

BuildRequires:  gradle-local
BuildRequires:  mvn(antlr:antlr)
BuildRequires:  mvn(junit:junit)
BuildRequires:  mvn(org.antlr:antlr:3.1.3)
BuildRequires:  mvn(org.antlr:stringtemplate)
BuildRequires:  mvn(org.apache.ant:ant)
BuildRequires:  mvn(org.eclipse.swt:swt)

BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(xtst)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(xxf86vm)
BuildRequires:  pkgconfig(gl)

BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  gperf

%description
JavaFX/OpenJFX is a set of graphics and media APIs that enables Java
developers to design, create, test, debug, and deploy rich client
applications that operate consistently across diverse platforms.

The media and web module have been removed due to missing dependencies.

%package devel
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: java-devel
Summary: OpenJFX development tools and libraries

%description devel
%{summary}.

%package src
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: OpenJFX Source Bundle

%description src
%{summary}.

%package javadoc
BuildArch: noarch
Summary: Javadoc for %{name}

%description javadoc
This package contains javadoc for %{name}.


%prep
%setup -q -n rt-8u152-b05
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

cp %{SOURCE1} .

cat > gradle.properties << EOF
COMPILE_WEBKIT = false
COMPILE_MEDIA = false
BUILD_JAVADOC = true
BUILD_SRC_ZIP = true
GRADLE_VERSION_CHECK = false
CONF = DebugNative
EOF

find -name '*.class' -delete
find -name '*.jar' -delete

#Bundled libraries
rm -rf modules/media/src/main/native/gstreamer/3rd_party/glib
rm -rf modules/media/src/main/native/gstreamer/gstreamer-lite
rm -rf modules/graphics/src/main/native-iio/libjpeg*

%build
#Tests do not run by default, tests in web fails and one test in graphics fail:
#UnsatisfiedLinkError: libjavafx_iio.so: undefined symbol: jpeg_resync_to_restart
gradle-local --info --no-daemon --offline


%install
install -d -m 755 %{buildroot}%{openjfxdir}
cp -a build/sdk/{bin,lib,rt} %{buildroot}%{openjfxdir}

install -d -m 755 %{buildroot}%{_mandir}/man1
install -m 644 build/sdk/man/man1/* %{buildroot}%{_mandir}/man1

install -d -m 755 %{buildroot}%{_mandir}/ja_JP/man1
install -m 644 build/sdk/man/ja_JP.UTF-8/man1/* %{buildroot}%{_mandir}/ja_JP/man1

install -m 644 build/sdk/javafx-src.zip %{buildroot}%{openjfxdir}/javafx-src.zip

install -d 755 %{buildroot}%{_javadocdir}/%{name}
cp -a build/sdk/docs/api/. %{buildroot}%{_javadocdir}/%{name}

mkdir -p %{buildroot}%{_bindir}
ln -s %{openjfxdir}/bin/javafxpackager %{buildroot}%{_bindir}
ln -s %{openjfxdir}/bin/javapackager %{buildroot}%{_bindir}

%files
%dir %{openjfxdir}
%{openjfxdir}/rt
%license LICENSE
%doc README
%doc README.fedora

%files devel
%{openjfxdir}/lib
%{openjfxdir}/bin
%{_bindir}/javafxpackager
%{_bindir}/javapackager
%{_mandir}/man1/javafxpackager.1*
%{_mandir}/man1/javapackager.1*
%{_mandir}/ja_JP/man1/javafxpackager.1*
%{_mandir}/ja_JP/man1/javapackager.1*
%license LICENSE
%doc README
%doc README.fedora

%files src
%{openjfxdir}/javafx-src.zip

%files javadoc
%{_javadocdir}/%{name}
%license LICENSE

%changelog
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.152-18.b05
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Jun 21 2018 Mat Booth <mat.booth@redhat.com> - 8.0.152-17.b05
- Fix failure to build from source

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.152-16.b05
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.152-15.b05
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.152-14.b05
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sun Jul 02 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-13.b05
- Update to upstream version 8.0.152b05

* Thu Jun 15 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-12.b04
- Removed BuildArch: noarch for subpackages that requires the parent package

* Thu Jun 15 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-11.b04
- Build on i686 too

* Wed May 31 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-10.b04
- Update to upstream version 8.0.152b04

* Wed May 31 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-9.b03
- Added requires on java and java-devel
- Updated license

* Thu May 18 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-8.b03
- Added requires on javapackages-tools
- Added requires on parent package for subpackages devel and src

* Fri May 12 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-7.b03
- Introduce sub-package devel

* Mon May 08 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-6.b03
- Update to upstream version 8.0.152b03

* Mon May 01 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-5.b02
- Update to upstream version 8.0.152b02

* Wed Apr 05 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-4.b00
- Only build for x86 and x86_64, will fail to build on other platforms

* Thu Jan 19 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-3.b00
- Include javadoc sub-package

* Tue Jan 17 2017 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-2.b00
- Include src sub-package

* Fri Dec 30 2016 Jonny Heggheim <hegjon@gmail.com> - 8.0.152-1.b00
- Update to upstream version 8.0.152b00

* Tue Apr 26 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 8.0.91-1
- Update to upstream version 8.0.91

* Tue Apr 26 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 8.0.60-1
- Update to upstream version 8.0.60

* Mon Jul  6 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 8.0.40-1
- Initial packaging