Date: Tuesday, May 16, 2023 @ 11:18:39
Author: arojas
Revision: 1461954
archrelease: copy trunk to community-staging-x86_64
Added:
haxe/repos/community-staging-x86_64/
haxe/repos/community-staging-x86_64/PKGBUILD
(from rev 1461953, haxe/trunk/PKGBUILD)
haxe/repos/community-staging-x86_64/mbedtls2.patch
(from rev 1461953, haxe/trunk/mbedtls2.patch)
----------------+
PKGBUILD | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
mbedtls2.patch | 26 ++++++++++++++++++++
2 files changed, 97 insertions(+)
Copied: haxe/repos/community-staging-x86_64/PKGBUILD (from rev 1461953,
haxe/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-05-16 11:18:39 UTC (rev 1461954)
@@ -0,0 +1,71 @@
+# Maintainer: Alexander F. Rødseth <[email protected]>
+# Contributor: Andy Li <[email protected]>
+# Contributor: Daichi Shinozaki <[email protected]>
+# Contributor: Kyle Brady <kyle at spark-gap dot com>
+# Contributor: Patrick Hof <[email protected]>
+# Contributor: Michael Fellinger <[email protected]>
+
+pkgname=haxe
+pkgver=4.3.1
+pkgrel=2
+pkgdesc='Cross-platform toolkit and programming language'
+arch=(x86_64)
+url='https://haxe.org/'
+license=(GPL LGPL MIT)
+depends=(neko mbedtls2)
+makedepends=(camlp5 git neko ocaml opam zlib perl-string-shellquote
perl-ipc-system-simple)
+optdepends=(java-environment mono php python)
+options=(!strip)
+source=("$pkgname-$pkgver::git+https://github.com/HaxeFoundation/haxe#commit=964c84c817b3a73c49ee35207983d1c8cbca6eb8"
+ mbedtls2.patch) # tag: 4.3.1
+b2sums=('SKIP'
+
'77f5f9c6815934b5cf2aee75ba62ed0e2a4b46f23a5bb689dffa23469b4aa13ca6d0e94623c747af63450b2ea3dc57f54507a924f1d6cec1cab3368d74def211')
+
+prepare() {
+ cd $pkgname-$pkgver
+ git submodule update --init
+
+ # Prepare opam and ocamlfind before building
+ export HOME="$srcdir"
+ opam init -a --disable-sandboxing --compiler=ocaml-system
+ eval $(opam env)
+
+ # Install required OCaml packages
+ opam install -y extlib luv ocamlfind 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 with mbedtls2
+ patch -p1 -i ../mbedtls2.patch
+}
+
+build() {
+ # Prepare opam and ocamlfind before building
+ eval $(opam env --switch=ocaml-system)
+
+ cd $pkgname-$pkgver
+ make 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() {
+ cd $pkgname-$pkgver
+ ./haxe -version
+ ./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
+}
Copied: haxe/repos/community-staging-x86_64/mbedtls2.patch (from rev 1461953,
haxe/trunk/mbedtls2.patch)
===================================================================
--- community-staging-x86_64/mbedtls2.patch (rev 0)
+++ community-staging-x86_64/mbedtls2.patch 2023-05-16 11:18:39 UTC (rev
1461954)
@@ -0,0 +1,26 @@
+diff --git a/Makefile b/Makefile
+index a369415b0..7ae5064ec 100644
+--- a/Makefile
++++ b/Makefile
+@@ -66,7 +66,7 @@ NEKO_VERSION_TAG=v$(shell echo "$(NEKO_VERSION)" | sed
"s/\./-/g")
+ ifneq ($(STATICLINK),0)
+ LIB_PARAMS= -cclib '-Wl,-Bstatic -lpcre2-8 -lz -lmbedtls -lmbedx509
-lmbedcrypto -Wl,-Bdynamic '
+ else
+- LIB_PARAMS?= -cclib -lpcre2-8 -cclib -lz -cclib -lmbedtls -cclib
-lmbedx509 -cclib -lmbedcrypto
++ LIB_PARAMS?= -ccopt -L/usr/lib/mbedtls2 -cclib -lpcre2-8 -cclib -lz
-cclib -lmbedtls -cclib -lmbedx509 -cclib -lmbedcrypto
+ endif
+ ifeq ($(SYSTEM_NAME),Mac)
+ LIB_PARAMS+= -cclib '-framework Security -framework CoreFoundation'
+diff --git a/libs/mbedtls/dune b/libs/mbedtls/dune
+index ca0780ddd..1fc9a5704 100644
+--- a/libs/mbedtls/dune
++++ b/libs/mbedtls/dune
+@@ -4,6 +4,7 @@
+ (name mbedtls)
+ (foreign_stubs
+ (language c)
+- (names mbedtls_stubs))
++ (names mbedtls_stubs)
++ (flags (:standard -I/usr/include/mbedtls2)))
+ (wrapped false)
+ )