[arch-commits] Commit in haxe/repos (2 files)

Alexander Rødseth arodseth at gemini.archlinux.org
Sat Jul 10 09:01:36 UTC 2021


    Date: Saturday, July 10, 2021 @ 09:01:36
  Author: arodseth
Revision: 976459

archrelease: copy trunk to community-staging-x86_64

Added:
  haxe/repos/community-staging-x86_64/
  haxe/repos/community-staging-x86_64/PKGBUILD
    (from rev 976458, haxe/trunk/PKGBUILD)

----------+
 PKGBUILD |   70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

Copied: haxe/repos/community-staging-x86_64/PKGBUILD (from rev 976458, haxe/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-07-10 09:01:36 UTC (rev 976459)
@@ -0,0 +1,70 @@
+# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
+# Contributor: Daichi Shinozaki <dsdseg at gmail.com>
+# Contributor: Andy Li <andy at onthewings.net>
+# Contributor: Kyle Brady  <kyle at spark-gap dot com>
+# Contributor: Patrick Hof <courts at offensivethinking.org>
+# Contributor: Michael Fellinger <mf at rubyists.com>
+
+pkgname=haxe
+pkgver=4.2.3
+pkgrel=2
+pkgdesc='Cross-platform toolkit and programming language'
+arch=(x86_64)
+url='https://haxe.org/'
+license=(GPL LGPL MIT)
+depends=(neko mbedtls)
+optdepends=(java-environment mono php python)
+makedepends=(camlp4 git neko ocaml opam zlib perl-string-shellquote perl-ipc-system-simple)
+options=(!makeflags !strip)
+source=("$pkgname-$pkgver::git+https://github.com/HaxeFoundation/haxe#commit=1385eda48e60387e349282d26347b28d0b2768ca") # tag: 4.2.3
+b2sums=(SKIP)
+
+prepare() {
+  cd $pkgname-$pkgver
+  git submodule update --init
+
+  # Prepare opam and ocamlfind before building
+  export HOME="$srcdir"
+  opam init -a
+  eval $(opam env)
+
+  # Install required OCaml packages
+  opam install -y camlp5 dune extlib jbuilder luv ocamlfind \
+    ppx_tools_versioned ptmap sedlex sha xml-light
+
+  # Create the script that will be placed in /etc/profile.d
+  echo 'export HAXE_STD_PATH=/usr/share/haxe/std' > haxe.sh
+}
+
+build() {
+  # Needed to make Haxe build with OCaml 4.06 and 4.07
+  # For more info, see: https://github.com/HaxeFoundation/haxe/issues/6883#issuecomment-370142073
+  export OCAMLPARAM='safe-string=0,_'
+
+  # Prepare opam and ocamlfind before building
+  eval $(opam env)
+
+  cd $pkgname-$pkgver
+  make libs haxe
+
+  # "make tools" did not work. These are the replacement commands:
+  cd "$srcdir/$pkgname-$pkgver/extra/haxelib_src"
+  ../../haxe client.hxml || true
+  nekotools boot run.n
+  mv run ../../haxelib
+}
+
+check() {
+  $pkgname-$pkgver/haxe -version
+  $pkgname-$pkgver/haxelib version
+}
+
+package() {
+  cd $pkgname-$pkgver
+  install -d "$pkgdir/usr/"{bin/,share/haxe/}
+  install -m 755 haxe{,lib} "$pkgdir"/usr/bin/
+  cp -rf std "$pkgdir/usr/share/$pkgname/"
+  install -Dm 644 haxe.sh "$pkgdir/etc/profile.d/haxe.sh"
+  install -Dm 644 extra/LICENSE.txt \
+    "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+}




More information about the arch-commits mailing list