diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2022-04-08 14:01:08 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2022-04-13 10:51:23 +0300 |
commit | 8c28f5c1f5c7f24e010dae0bae7bed15120a48f0 (patch) | |
tree | e4a07703412fc18f7d45372f0f1f74e876ec65b2 | |
parent | bc1da340963d8ccbc01c2846b16ba1c356f0800c (diff) | |
download | rpm-8c28f5c1f5c7f24e010dae0bae7bed15120a48f0.tar.gz |
Merge Lua posix extension into librpmio
Once upon a time there may have been a point to having the extension in a
separate convenience library, but nowdays with Lua being mandatory there's
not a whole lot of point in complicating the build with all this fubar.
As a nice little bonus, we can now hide luaopen_posix() symbol.
(cherry picked from commit eaf359f35c6433cfe80fc8814795081b92171be8)
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | luaext/Makefile.am | 12 | ||||
-rw-r--r-- | rpmio/Makefile.am | 6 | ||||
-rw-r--r-- | rpmio/lposix.c (renamed from luaext/lposix.c) | 0 | ||||
-rw-r--r-- | rpmio/lposix.h (renamed from luaext/lposix.h) | 3 | ||||
-rw-r--r-- | rpmio/modemuncher.c (renamed from luaext/modemuncher.c) | 0 | ||||
-rw-r--r-- | rpmio/rpmlua.c | 2 |
8 files changed, 8 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am index 72ad4b36b..f7b07560a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,7 +26,6 @@ EXTRA_DIST = ChangeLog CREDITS INSTALL \ BUILT_SOURCES = SUBDIRS = po misc -SUBDIRS += luaext SUBDIRS += rpmio lib sign build scripts fileattrs docs . if ENABLE_PYTHON @@ -41,7 +40,7 @@ if HAVE_FAKECHROOT SUBDIRS += tests endif -DIST_SUBDIRS = po misc luaext rpmio lib sign build python scripts fileattrs docs tests plugins +DIST_SUBDIRS = po misc rpmio lib sign build python scripts fileattrs docs tests plugins pkgconfigdir = $(libdir)/pkgconfig diff --git a/configure.ac b/configure.ac index c44f3b763..a852b49df 100644 --- a/configure.ac +++ b/configure.ac @@ -937,7 +937,6 @@ AC_CONFIG_FILES([Makefile docs/Makefile docs/man/Makefile python/Makefile - luaext/Makefile tests/Makefile plugins/Makefile python/setup.py diff --git a/luaext/Makefile.am b/luaext/Makefile.am deleted file mode 100644 index e7f564e15..000000000 --- a/luaext/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -noinst_LTLIBRARIES = libluaext.la - -EXTRA_DIST = \ - modemuncher.c - -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/include -I. - -libluaext_la_CPPFLAGS = $(AM_CPPFLAGS) -DWITH_POSIX @LUA_CFLAGS@ -libluaext_la_LIBADD = @LUA_LIBS@ -libluaext_la_SOURCES = \ - lposix.h \ - lposix.c diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am index f8ff2e0f3..6ff64fa1d 100644 --- a/rpmio/Makefile.am +++ b/rpmio/Makefile.am @@ -3,6 +3,8 @@ include $(top_srcdir)/rpm.am AM_CFLAGS = @RPMCFLAGS@ +EXTRA_DIST = modemuncher.c + AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/include/ AM_CPPFLAGS += @WITH_OPENSSL_INCLUDE@ AM_CPPFLAGS += @WITH_LIBGCRYPT_INCLUDE@ @@ -10,7 +12,6 @@ AM_CPPFLAGS += @WITH_POPT_INCLUDE@ AM_CPPFLAGS += $(ZSTD_CFLAGS) AM_CPPFLAGS += @LUA_CFLAGS@ AM_CPPFLAGS += -I$(top_srcdir)/misc -AM_CPPFLAGS += -I$(top_srcdir)/luaext/ AM_CPPFLAGS += -DRPMCONFIGDIR="\"@RPMCONFIGDIR@\"" AM_CPPFLAGS += -DLOCALSTATEDIR="\"$(localstatedir)\"" @@ -23,7 +24,7 @@ librpmio_la_SOURCES = \ rpmio_internal.h rpmhook.h rpmvercmp.c rpmver.c \ rpmstring.c rpmfileutil.c rpmglob.c \ rpmkeyring.c rpmstrpool.c rpmmacro_internal.h \ - rpmlua.c rpmlua.h + rpmlua.c rpmlua.h lposix.c lposix.h if WITH_OPENSSL librpmio_la_SOURCES += digest_openssl.c @@ -43,7 +44,6 @@ librpmio_la_LIBADD = \ @WITH_POPT_LIB@ \ @WITH_LZMA_LIB@ \ @LUA_LIBS@ \ - ../luaext/libluaext.la \ $(ZSTD_LIBS) \ -lpthread diff --git a/luaext/lposix.c b/rpmio/lposix.c index a3f4852cf..a3f4852cf 100644 --- a/luaext/lposix.c +++ b/rpmio/lposix.c diff --git a/luaext/lposix.h b/rpmio/lposix.h index e1e819cb3..e7a35990f 100644 --- a/luaext/lposix.h +++ b/rpmio/lposix.h @@ -1,6 +1,9 @@ #ifndef LPOSIX_H #define LPOSIX_H +#include <rpm/rpmutil.h> + +RPM_GNUC_INTERNAL int luaopen_posix (lua_State *L); #endif diff --git a/luaext/modemuncher.c b/rpmio/modemuncher.c index 3c46e2d4f..3c46e2d4f 100644 --- a/luaext/modemuncher.c +++ b/rpmio/modemuncher.c diff --git a/rpmio/rpmlua.c b/rpmio/rpmlua.c index 8dcde66f5..3f0bdeb3f 100644 --- a/rpmio/rpmlua.c +++ b/rpmio/rpmlua.c @@ -3,7 +3,7 @@ #include <lua.h> #include <lualib.h> #include <lauxlib.h> -#include <lposix.h> +#include "lposix.h" #ifndef LUA_LOADED_TABLE /* feature introduced in Lua 5.3.4 */ |