Skip to content

Commit

Permalink
New luaffi, support for aarch64.
Browse files Browse the repository at this point in the history
LuaTeX 1.20.0


git-svn-id: svn://tug.org/texlive/trunk/Build/source@73279 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
luigiScarso committed Jan 2, 2025
1 parent 42cf944 commit 0a3d475
Show file tree
Hide file tree
Showing 52 changed files with 20,546 additions and 8,006 deletions.
2 changes: 2 additions & 0 deletions texk/web2c/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -5311,6 +5311,8 @@ nodist_libluaffi_a_SOURCES = $(libluaffi_sources)
#nodist_liblua53ffi_a_SOURCES = $(libluaffi_sources)
libluaffi_sources = \
luatexdir/luaffi/call_arm.h \
luatexdir/luaffi/call_arm64.h \
luatexdir/luaffi/call_arm_hf.h \
luatexdir/luaffi/call.c \
luatexdir/luaffi/call_x64.h \
luatexdir/luaffi/call_x64win.h \
Expand Down
6 changes: 5 additions & 1 deletion texk/web2c/luatexdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
2025-01-01 Luigi Scarso <luigi.scarso@gmail.com>
* New luaffi, support for aarch64.
* LuaTeX 1.20.0


2024-12-30 Luigi Scarso <luigi.scarso@gmail.com>
* Increment tally in tprint also when doterm is true (thanks to user202729@protonmail.com).
* LuaTeX 1.19.4



2024-12-30 Luigi Scarso <luigi.scarso@gmail.com>
* Avoid useless 0 beginbfrange endbfrange in pdf
* LuaTeX 1.19.3
Expand Down
2 changes: 2 additions & 0 deletions texk/web2c/luatexdir/am/luaffi.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ nodist_libluaffi_a_SOURCES = $(libluaffi_sources)

libluaffi_sources = \
luatexdir/luaffi/call_arm.h \
luatexdir/luaffi/call_arm64.h \
luatexdir/luaffi/call_arm_hf.h \
luatexdir/luaffi/call.c \
luatexdir/luaffi/call_x64.h \
luatexdir/luaffi/call_x64win.h \
Expand Down
30 changes: 0 additions & 30 deletions texk/web2c/luatexdir/luaffi/CONTRIBUTING.md

This file was deleted.

38 changes: 34 additions & 4 deletions texk/web2c/luatexdir/luaffi/LICENSE
Original file line number Diff line number Diff line change
@@ -1,8 +1,39 @@
This product contains portions of third party software provided under this license:

ravi-ffi, based on luaffifb (https://github.com/facebookarchive/luaffifb) by Facebook,
based on luaffi (https://github.com/jmckaskill/luaffi) by James R. McKaskill

Portions Copyright (c) 2018 Dibyendu Majumdar

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.



------------------------------------------------------------------------

This product contains portions of third party software provided under this license:

BSD License

For luaffifb software
For luaffifb software (enhancements done by Facebook)

Copyright (c) 2015, Facebook, Inc. All rights reserved.
Portions Copyright (c) 2015, Facebook, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -35,7 +66,7 @@ This product contains portions of third party software provided under this licen

luaffi software

Copyright (c) 2011 James R. McKaskill
Portions Copyright (c) 2011 James R. McKaskill

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
Expand All @@ -55,4 +86,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Facebook provides this code under the BSD License above.
32 changes: 0 additions & 32 deletions texk/web2c/luatexdir/luaffi/Makefile.orig

This file was deleted.

2 changes: 2 additions & 0 deletions texk/web2c/luatexdir/luaffi/PATENTS
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Following is from third party software luaffifb (https://github.com/facebookarchive/luaffifb)

Additional Grant of Patent Rights Version 2

"Software" means the luaffifb software distributed by Facebook, Inc.
Expand Down
6 changes: 3 additions & 3 deletions texk/web2c/luatexdir/luaffi/README
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ because there is a ffi stub that does nothing:
local info = [[
The ffi module is available for:

archictures : ARCH_X86 and ARCH_X64,
archictures : ARCH_X86, ARCH_X64 and ARM_64,
operating systems : OS_CE, OS_WIN, OS_LINUX, OS_BSD and OS_POSIX

The ARM processor is currently not supported. There are subtle
The ARM 32bit processor is currently not supported. There are subtle
differences between this module and the one in luajitTeX
and we hope to be in sync around TeXLive 2025.
Different OS can have different interfaces,
Expand Down Expand Up @@ -72,7 +72,7 @@ the OS enabled are OS_CE, OS_WIN, OS_LINUX, OS BD and OS_POSIX.
Currently ARM is not supported.

The module is not aligned with luajit-2.1.0.beta2
(the plan is to be in sync for TeXLive 2018) and
(the plan is to be in sync for TeXLive 2025) and
test.lua can fail. Be careful that different OS have different
interfaces (i.e. OS_WIN has not complex.h, for example)
so extra care must be take to ensure code portability.
50 changes: 34 additions & 16 deletions texk/web2c/luatexdir/luaffi/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,54 @@
[![Build Status](https://travis-ci.org/facebook/luaffifb.svg?branch=master)](https://travis-ci.org/facebook/luaffifb)

About
-----
This is a library for calling C function and manipulating C types from lua. It
is designed to be interface compatible with the FFI library in LuaJIT (see
http://luajit.org/ext_ffi.html). It can parse C function declarations and
struct definitions that have been directly copied out of C header files and
This is a library for calling C function and manipulating C types from [Ravi](https://github.com/dibyendumajumdar/ravi). It
is designed to be interface compatible with the FFI library in [LuaJIT's ffi](http://luajit.org/ext_ffi.html).
It can parse C function declarations and struct definitions that have been directly copied out of C header files and
into lua source as a string.

This is a fork of https://github.com/jmckaskill/luaffi
This project is a fork of https://github.com/facebook/luaffifb which is a fork of https://github.com/jmckaskill/luaffi.

Source
------
https://github.com/facebook/luaffifb
https://github.com/dibyendumajumdar/ravi-ffi

Platforms
---------
Currently supported:
- Linux x86/x64
- OS X x86/x64
Currently being developed for:
- Linux x64 - builds and tests pass
- OS X x64 - builds and tests pass
- Windows 10 x64 - builds and tests pass

Runs with Lua 5.1, 5.2, and 5.3
Ravi and Lua 5.3 are supported.

Build
-----
In a terminal:
This project requires:

* CMake installation
* Ravi 5.3 installation

Windows 10
----------
* Note that only Visual Studio 2017 is supported.
* Note that only x86-64 is supported

In the instructions below, we assume that Ravi was installed under `c:/Software/ravi`.

```bash
git clone https://github.com/facebook/luaffifb
cd luaffifb
luarocks make
git clone https://github.com/dibyendumajumdar/ravi-ffi
cd ravi-ffi
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/Software/Ravi -G "Visual Studio 15 2017 Win64" ..
```

Above creates Visual Studio projects which can be used to build and install. Note that the install prefix ensures that the DLL files will be installed under /Software/ravi/bin so that they can be found by the library.

To build for Lua, change above to:
```
cmake -DCMAKE_INSTALL_PREFIX=/Software/lua53 -DUSE_LUA53=ON -G "Visual Studio 15 2017 Win64" ..
```
This assumes Lua 5.3 installation under `/Software/lua53'.

Documentation
-------------
Expand Down
Loading

0 comments on commit 0a3d475

Please sign in to comment.