6bf0854
%global commit_ocamllibs ab5be31c6dd1fcd761c2ba16c5d767bcf6792490
6bf0854
%global commit_haxelib a494d8be523e26fcf875e2c33915808dc221e17a
7b809da
7b809da
Name:           haxe
6bf0854
Version:        3.4.7
a837561
Release:        4%{?dist}
7b809da
Summary:        Multi-target universal programming language
7b809da
7b809da
# As described in http://haxe.org/foundation/open-source.html:
7b809da
#   * The Haxe Compiler - GPLv2+
7b809da
#   * The Haxe Standard Library - MIT
7b809da
#
7b809da
# The source files:
65f64ca
#   * All files in the std folder is MIT licensed.
7b809da
#   * Ocamllibs in the libs folder:
7b809da
#     * extc, ilib, javalib, neko, swflib - GPLv2+
65f64ca
#     * pcre - LGPLv2+
7b809da
#     * everything else - LGPLv2.1+
65f64ca
License:        GPLv2+ and MIT and LGPLv2+
7b809da
65f64ca
URL:            https://haxe.org/
7b809da
7b809da
Source0:        https://github.com/HaxeFoundation/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
7b809da
Source1:        https://github.com/HaxeFoundation/ocamllibs/archive/%{commit_ocamllibs}.tar.gz#/ocamllibs-%{commit_ocamllibs}.tar.gz
7b809da
Source2:        https://github.com/HaxeFoundation/haxelib/archive/%{commit_haxelib}.tar.gz#/haxelib-%{commit_haxelib}.tar.gz
7b809da
c36c36b
BuildRequires:  nekovm-devel >= 2.1.0
7b809da
BuildRequires:  ocaml
7b809da
BuildRequires:  ocaml-camlp4-devel
7b809da
BuildRequires:  zlib-devel
65f64ca
BuildRequires:  pcre-devel
c36c36b
BuildRequires:  cmake
7b809da
BuildRequires:  help2man
c36c36b
Requires:       nekovm >= 2.1.0
7b809da
Requires:       %{name}-stdlib = %{version}
7b809da
7b809da
%description
7b809da
Haxe is an open source toolkit based on a modern,
7b809da
high level, strictly typed programming language, a cross-compiler,
7b809da
a complete cross-platform standard library and ways to access each
7b809da
platform's native capabilities.
7b809da
7b809da
%package        stdlib
7b809da
Summary:        The Haxe standard library
7b809da
BuildArch:      noarch
7b809da
7b809da
%description    stdlib
7b809da
The %{name}-stdlib package contains the standard library used
7b809da
by the Haxe compiler.
7b809da
7b809da
%prep
7b809da
%setup -q
7b809da
pushd libs && tar -xf %{SOURCE1} --strip-components=1 && popd
7b809da
pushd extra/haxelib_src && tar -xf %{SOURCE2} --strip-components=1 && popd
7b809da
7b809da
%build
7b809da
# note that the Makefile does not support parallel building
7b809da
d1e5019
# Haxe 3.4.* is not safe-string compatible.
d1e5019
export OCAMLPARAM="safe-string=0,_"
d1e5019
7b809da
# Check to see if ocamlopt exists. If not, bytecompile everything.
7b809da
# It is because ocamlopt may be missing in some architectures.
c36c36b
command -v ocamlopt && make libs haxe || make libs haxe BYTECODE=1
7b809da
7b809da
# Compile haxelib
c36c36b
pushd extra/haxelib_src && %cmake . && %make_build && popd
c36c36b
cp extra/haxelib_src/haxelib haxelib
7b809da
7b809da
chmod 755 haxe haxelib
7b809da
7b809da
%install
7b809da
mkdir -p %{buildroot}%{_bindir}
7b809da
mkdir -p %{buildroot}%{_datadir}/%{name}
7b809da
7b809da
cp -p haxe %{buildroot}%{_bindir}
7b809da
cp -p haxelib %{buildroot}%{_bindir}
7b809da
cp -rfp std %{buildroot}%{_datadir}/%{name}
7b809da
7b809da
# Generate man pages
7b809da
mkdir -p %{buildroot}%{_mandir}/man1
7b809da
help2man ./haxe --version-option=-version --no-discard-stderr --no-info --output=%{buildroot}%{_mandir}/man1/haxe.1
7b809da
help2man ./haxelib --help-option=help --version-option=version --no-info --output=%{buildroot}%{_mandir}/man1/haxelib.1
7b809da
7b809da
%check
7b809da
%{buildroot}%{_bindir}/haxe -version
65f64ca
%{buildroot}%{_bindir}/haxelib version
7b809da
7b809da
%files
7b809da
%doc README.md
7b809da
%license extra/LICENSE.txt
7b809da
%{_bindir}/haxe
7b809da
%{_bindir}/haxelib
7b809da
%{_mandir}/man1/haxe.1*
7b809da
%{_mandir}/man1/haxelib.1*
7b809da
7b809da
%files stdlib
7b809da
%doc README.md
7b809da
%license extra/LICENSE.txt
7b809da
%{_datadir}/%{name}/
7b809da
7b809da
%changelog
a837561
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.7-4
a837561
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
a837561
60f81a7
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.7-3
60f81a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
60f81a7
f64780b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.7-2
f64780b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f64780b
6bf0854
* Fri Feb 23 2018 Andy Li <andy@onthewings.net> - 3.4.7-1
6bf0854
- New upstream version 3.4.7. (RHBZ#1544583)
6bf0854
99fbdbb
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.5-2
99fbdbb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
99fbdbb
d1e5019
* Mon Feb 05 2018 Andy Li <andy@onthewings.net> - 3.4.5-1
d1e5019
- New upstream version 3.4.5. (RHBZ#1540771)
d1e5019
3ba1324
* Sat Oct 14 2017 Andy Li <andy@onthewings.net> - 3.4.4-1
3ba1324
- New upstream version 3.4.4.
c36c36b
- Compile haxelib as a proper binary instead of `nekotools boot`.
c36c36b
7ed599d
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-3
7ed599d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
7ed599d
e4c1058
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-2
e4c1058
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e4c1058
a6e6b26
* Thu Mar 23 2017 Andy Li <andy@onthewings.net> - 3.4.2-1
a6e6b26
- New upstream version 3.4.2.
a6e6b26
fab6f15
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-2
fab6f15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
fab6f15
65f64ca
* Thu Feb 02 2017 Andy Li <andy@onthewings.net> - 3.4.0-1
65f64ca
- New upstream version 3.4.0.
65f64ca
- Fixed license info.
65f64ca
8df288d
* Sat Nov 05 2016 Richard W.M. Jones <rjones@redhat.com> - 3.2.1-4
8df288d
- Rebuild for OCaml 4.04.0.
8df288d
b7169fd
* Thu Jun 09 2016 Andy Li <andy@onthewings.net> - 3.2.1-3
b7169fd
- Rebuilt against nekovm 2.1.0
b7169fd
cb4317a
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-2
cb4317a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
cb4317a
7b809da
* Wed Oct 07 2015 Andy Li <andy@onthewings.net> - 3.2.1-1
7b809da
- Initial RPM release
7b809da