pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/58427: improve Lua module lpeg on Darwin (macOS)
>Number: 58427
>Category: pkg
>Synopsis: improve Lua module lpeg on Darwin (macOS)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Jul 14 03:55:00 +0000 2024
>Originator: jonathan buschmann
>Release:
>Organization:
>Environment:
>Description:
Currently the module `lpeg` for macOS is built as a _bundle_ and this limits its usage to only be loaded within Lua interpreter. And forbids another library to link with it directly.
AFAIK building a dynamiclib works correctly on both Lua interpreter and for usage as a shared lib to link against.
For a _correct_ library on macOS its install_name is a key element so I only fix this part of the build it would be beneficial maybe to also create the ELF shared library name but not sure if it's requested/wished so I did not do this part.
See the patch below (it's mostly important for latest Neovim 0.10 see editors/neovim to work correctly)
>How-To-Repeat:
>Fix:
commit 303b3bdbaa6fb755f0c83ca9f41224701d37a8b6
Author: jonathan 'jonthn' buschmann <jonthn++pkgsrc%pinacea.com@localhost>
Date: Sun Jul 14 10:08:05 2024 +0800
diff --git a/devel/lua-lpeg/Makefile b/devel/lua-lpeg/Makefile
index a45a8c1f596b..fbb3d9cb30ab 100644
--- a/devel/lua-lpeg/Makefile
+++ b/devel/lua-lpeg/Makefile
@@ -15,6 +15,10 @@ USE_TOOLS+= gmake
MAKE_FILE= makefile
TEST_TARGET= test
+LUA_LINKER_MAGIC= no
+
+MAKE_ENV+= PATH_MODULE_LUA=${PREFIX:Q}/${LUA_CDIR}
+
BUILD_TARGET.Darwin= macosx
BUILD_TARGET.*= linux
diff --git a/devel/lua-lpeg/distinfo b/devel/lua-lpeg/distinfo
index cb9085b0e61d..e41dd6ad1007 100644
--- a/devel/lua-lpeg/distinfo
+++ b/devel/lua-lpeg/distinfo
@@ -3,4 +3,4 @@ $NetBSD: distinfo,v 1.12 2023/07/05 22:03:44 wiz Exp $
BLAKE2s (lpeg-1.1.0.tar.gz) = d3681bbc523cb81bc921bb22ce5a4ccaae8ce593916ba17b573b788b05651e75
SHA512 (lpeg-1.1.0.tar.gz) = 01b2a4ceb2d110e143603bc63c84a59736ea735dd0ed9866286ba115d41be48d09c9ff21c8e2327974d2296944f6508d50a5c3a18f26ac1d81b8b2fc41f61222
Size (lpeg-1.1.0.tar.gz) = 78042 bytes
-SHA1 (patch-makefile) = e229f3278a5dde00a4ef6736459caca4deeacea6
+SHA1 (patch-makefile) = 5decdd02d1516a1ab5bb4cdcd853ea96320ebd53
diff --git a/devel/lua-lpeg/patches/patch-makefile b/devel/lua-lpeg/patches/patch-makefile
index 23ef0109fb5a..67e43329d302 100644
--- a/devel/lua-lpeg/patches/patch-makefile
+++ b/devel/lua-lpeg/patches/patch-makefile
@@ -1,11 +1,16 @@
$NetBSD: patch-makefile,v 1.2 2019/03/25 22:55:18 wiz Exp $
-Honor LDFLAGS for RELRO builds.
+- Honor LDFLAGS for RELRO builds.
+- Darwin changed from Bundle to Dynamic Library
---- makefile.orig 2019-03-11 14:08:29.000000000 +0000
-+++ makefile
-@@ -36,7 +36,7 @@ macosx:
- $(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
+--- makefile 2023-06-27 00:30:55
++++ makefile 2024-07-14 11:26:33
+@@ -36,10 +36,10 @@
+
+ # For Mac OS
+ macosx:
+- $(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
++ $(MAKE) lpeg.so "DLLFLAGS = -shared -undefined dynamic_lookup -compatibility_version 1.0.0 -current_version 1.1.0 -install_name $(PATH_MODULE_LUA)/lpeg.so"
lpeg.so: $(FILES)
- env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so
Home |
Main Index |
Thread Index |
Old Index