From: Lemures Lemniscati <lemures.lemniscati@gmail.com>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] Updated: lua-5.3.6-3
Date: Sat, 05 Jun 2021 01:10:19 +0900 [thread overview]
Message-ID: <20210605011016.C206.50F79699@gmail.com> (raw)
In-Reply-To: <3743f4f2-af52-7f12-7a68-f3d036d3dbdb@dronecode.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1668 bytes --]
On Fri, 4 Jun 2021 14:16:16 +0100, Jon Turney
> On 01/06/2021 15:41, Lemures Lemniscati via Cygwin-announce via Cygwin wrote:
> > The following packages have been uploaded to the Cygwin distribution:
> >
> > * lua-5.3.6-3
> > * liblua5.3-5.3.6-3
> > * liblua-devel-5.3.6-3
...
> This breaks building our 'lua-lfs' package, I think because that doesn't use pkgconfig, and assumes that /usr/include/lua.h exists:
>
> > $ cygport lua-lfs.cygport all
> >>>> Preparing lua-lfs-1.7.0.2-1.x86_64
> >>>> Unpacking source luafilesystem-v1_7_0_2.tar.gz
> > *** Info: applying patch 1.7.0.2-cygwin.patch (-p2):
> > patching file Makefile
> > patching file src/lfs.c
> >>>> Preparing working source directory
> >>>> Compiling lua-lfs-1.7.0.2-1.x86_64
> > gcc -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=/wip/cygport-git/lua-lfs/lua-lfs-1.7.0.2-1.x86_64/build=/usr/src/debug/lua-lfs-1.7.0.2-1 -fdebug-prefix-map=/wip/cygport-git/lua-lfs/lua-lfs-1.7.0.2-1.x86_64/src/luafilesystem-1_7_0_2=/usr/src/debug/lua-lfs-1.7.0.2-1 -I/usr/local/include -c -o src/lfs.o src/lfs.c
> > src/lfs.c:66:10: fatal error: lua.h: No such file or directory
> > 66 | #include <lua.h>
> > | ^~~~~~~
> > compilation terminated.
> > make: *** [<builtin>: src/lfs.o] Error 1
> > *** ERROR: make failed
>
> I only noticed this because this is part of the cygport test suite :)
Thank you for the report.
I'll do ITA for lua-lfs with attached cygport files, later.
Current lua-lfs is 1.8.0: https://keplerproject.github.io/luafilesystem/
Regards,
Lem
[-- Attachment #2: lua-lfs.cygport --]
[-- Type: application/octet-stream, Size: 1887 bytes --]
inherit lua
NAME="lua-lfs"
VERSION=1.8.0
RELEASE=1
CATEGORY="Lua"
SUMMARY="Lua file system library"
DESCRIPTION="\
LuaFileSystem is a Lua library developed to complement the set of
functions related to file systems offered by the standard Lua
distribution.
"
HOMEPAGE="https://keplerproject.github.io/luafilesystem/"
GIT_REPO="https://github.com/keplerproject/luafilesystem"
declare -A GIT_DATEHASH_BY_NAME=(
# git log --date=iso-strict --format='%cd/%H' -1
[1.8.0]=2020-04-22T22:16:42-03:00/v1_8_0
)
REV_HASH="${GIT_DATEHASH_BY_NAME[${VERSION}]#*/}"
REV_DATE="${GIT_DATEHASH_BY_NAME[${VERSION}]%%/*}"
REV_DATE_SHORT="${REV_DATE%%T*}"
GIT_BASENAME="${GIT_REPO##*/}"
SRC_URI="${GIT_REPO}/archive/${REV_HASH}/${GIT_BASENAME}-${VERSION}.tar.gz"
SRC_DIR="${GIT_BASENAME}-${REV_HASH#v}"
LUA_PKG_NAME="lfs"
PATCH_URI+="
1.8.0-Makefile.patch
1.8.0-lfs_c.patch
"
BUILD_REQUIRES="\
lua\
liblua-devel\
"
src_compile() {
mkdir -p ${B}/${LUA_VERSION}
cd ${B}/${LUA_VERSION}
inform "[Compile] Lua ${LUA_VERSION}: ${LUA_PKG_NAME}"
lndirs ${S} .
cygmake \
LUA_VERSION="${LUA_VERSION}" \
WARN="${CFLAGS}" \
INCS="-I${LUA_INCLUDEDIR}" \
LIBS="${LUA_LIBS}" \
;
}
src_test() {
cd ${B}/${LUA_VERSION}
inform "[Test] Lua ${LUA_VERSION}: ${LUA_PKG_NAME}"
lua${LUA_VERSION} -v
local TEST_ROOT="./tests"
local TEST_LUA_PATH="./src/?.lua"
local TEST_LUA_CPATH="./src/?.so"
local TEST_LUA_PKGS="-l${LUA_PKG_NAME}"
local f
find "${TEST_ROOT}" -maxdepth 1 -name "test*.lua" -print0 \
| while read -r -d '' f; do
printf "%s\n" "Testing $f"
LUA_PATH="${TEST_LUA_PATH}" \
LUA_CPATH="${TEST_LUA_CPATH}" \
lua${LUA_VERSION} ${TEST_LUA_PKGS} "$f"
done
}
src_install() {
cd ${B}/${LUA_VERSION}
inform "[Install] Lua ${LUA_VERSION}: ${LUA_PKG_NAME}"
exeinto ${LUA_LIBDIR}
doexe src/lfs.so
}
HTMLDOCS="doc/us/*"
[-- Attachment #3: 1.8.0-Makefile.patch --]
[-- Type: application/octet-stream, Size: 461 bytes --]
--- origsrc/luafilesystem-1_8_0/Makefile
+++ src/luafilesystem-1_8_0/Makefile
@@ -12,7 +12,7 @@
lib: src/lfs.so
src/lfs.so: $(OBJS)
- MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET); export MACOSX_DEPLOYMENT_TARGET; $(CC) $(LIB_OPTION) -o src/lfs.so $(OBJS)
+ MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET); export MACOSX_DEPLOYMENT_TARGET; $(CC) $(LIB_OPTION) -o src/lfs.so $(OBJS) $(LIBS)
test: lib
LUA_CPATH=./src/?.so lua tests/test.lua
[-- Attachment #4: 1.8.0-lfs_c.patch --]
[-- Type: application/octet-stream, Size: 512 bytes --]
--- origsrc/luafilesystem-1_8_0/src/lfs.c
+++ src/luafilesystem-1_8_0/src/lfs.c
@@ -163,9 +163,16 @@
#else
+#if defined __CYGWIN__
+#include <io.h>
+#define _O_TEXT O_TEXT
+#define _O_BINARY O_BINARY
+#define lfs_setmode(file, m) (_setmode(fileno(file), m))
+#else
#define _O_TEXT 0
#define _O_BINARY 0
#define lfs_setmode(file, m) ((void)file, (void)m, 0)
+#endif
#define STAT_STRUCT struct stat
#define STAT_FUNC stat
#define LSTAT_FUNC lstat
next prev parent reply other threads:[~2021-06-04 16:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-02 3:20 [ANNOUNCEMENT] lua 5.3.5-1 Yaakov Selkowitz
2021-05-19 22:27 ` [ANNOUNCEMENT] Updated: lua-5.3.6-2 Lemures Lemniscati via Cygwin-announce
2021-05-27 8:49 ` Fergus Daly
2021-05-27 9:52 ` Lemures Lemniscati
2021-05-30 21:38 ` Andrey Repin
2021-05-30 23:30 ` Lemures Lemniscati
2021-05-31 4:12 ` Lemures Lemniscati
2021-05-31 8:54 ` Andrey Repin
2021-05-31 9:26 ` Andrey Repin
2021-05-31 10:41 ` Lemures Lemniscati
2021-06-01 14:39 ` Updated: lua-5.3.6-3 Lemures Lemniscati
2021-06-01 14:41 ` [ANNOUNCEMENT] " Lemures Lemniscati via Cygwin-announce
2021-06-04 13:16 ` Jon Turney
2021-06-04 16:10 ` Lemures Lemniscati [this message]
2021-06-05 22:26 ` [ANNOUNCEMENT] Updated: lua-5.3.6-4 Lemures Lemniscati via Cygwin-announce
2021-05-19 22:47 ` [ANNOUNCEMENT] Test: lua-5.4.3-1 Lemures Lemniscati via Cygwin-announce
2021-06-01 14:46 ` [ANNOUNCEMENT] Test: lua-5.4.3-2 Lemures Lemniscati via Cygwin-announce
2021-06-05 22:36 ` [ANNOUNCEMENT] Test: lua-5.4.3-3 Lemures Lemniscati via Cygwin-announce
2022-03-06 13:29 ` [ANNOUNCEMENT] Test: lua-5.4.4-1 Lemures Lemniscati via Cygwin-announce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210605011016.C206.50F79699@gmail.com \
--to=lemures.lemniscati@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).