lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I am going over the official FreeBSD Lua53 Ports collection files and
wanted to share my thoughts. [groans from the audience] These ports
collections contain the files that are used to patch and build
packages on FreeBSD and are also used to power the binary build
system. Some Ports are better than others and some fall into
disrepair. I have agreed to (attempt) to take on the Lua53 port. The
source files can be found here: [1][2]

My synopsis so far is this: From what I can tell, the default Lua
makefile doesn't work on FreeBSD when the freebsd target is called.
Not surprisingly, the FreeBSD port effectively doesn't use the
makefile from the lua tarball. It is heavily patched and it doesn't
seem to use the FreeBSD target.

To continue, I have some observations about the "port", some of which
I think are worth bringing up here:

 - files/patch-src__Makefile - This patch adds support for *.so files.
Can I ask why there is no built in target for shared objects files in
Lua? I am probably missing something. I checked the tarball and git. I
also tried to look this subject up on the archives but couldn't find
anything. The patch file is here:

- In the main makefile for the port, there are two post-patch
replacements that happen. One is replacing readline with libeditline.
Editline seems to be a default library for FreeBSD if man pages are an
indication: This is
noted more for interest as I think this library plus the patch that
duane provided lends weight to the idea of Lua adding it's own library
and dumping readline altogether.

- The second post patch seems to change rand to random. My question
is: Is this patch necessary, does it affect other platforms, and
should it be pushed upstream?

Also to consider, there are now a number of patches listed for 5.3.4
on the bugs list. My assumption is that those are not in the official
tarball, but ARE in the head revision of the GitHub repo? I'm trying
to find the shortest path to a clean port file so my question is:
would it be easier to manually assemble the patches and continue
including a file and patching the tarball, or is there some merit to
switching over and downloading from GitHub based on a commit?

In conclusion, the failure of the freebsd target in my tests and the
heavy modification to the base makefile leads me to think it might be
worthwhile to switch to GitHub and use the base makefile to
springboard a separate FreeBSD  makefile altogether. Thoughts?

To be pointed, I think the freebsd target in the Lua makefile should
be fixed or removed. However, this is a separate discussion that
should be had around some of the other build change possibilities in
other threads (see the thread titled "Building Lua 5.3 from on

Thanks and goodnight,


[1] *Note, you must click on the "view" link to see the files
[2] There is a reference to an external file which I have
not found, but found (a point for
those trying to trace).