diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2022-03-27 17:13:47 +0200 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2022-03-27 17:15:24 +0200 |
commit | c2dd3b753ecc9377ce4e21d30f6175e8f9ee46be (patch) | |
tree | 81512aba9e37af5d86fb3a26b3e72e0b2cd14771 /dev-lua/luasocket | |
parent | media-libs/gmmlib: add 22.1.2 (diff) | |
download | gentoo-c2dd3b753ecc9377ce4e21d30f6175e8f9ee46be.tar.gz gentoo-c2dd3b753ecc9377ce4e21d30f6175e8f9ee46be.tar.bz2 gentoo-c2dd3b753ecc9377ce4e21d30f6175e8f9ee46be.zip |
dev-lua/luasocket: add 3.0.0
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua/luasocket')
-rw-r--r-- | dev-lua/luasocket/Manifest | 1 | ||||
-rw-r--r-- | dev-lua/luasocket/files/luasocket-3.0.0_makefile.patch | 73 | ||||
-rw-r--r-- | dev-lua/luasocket/luasocket-3.0.0.ebuild | 88 |
3 files changed, 162 insertions, 0 deletions
diff --git a/dev-lua/luasocket/Manifest b/dev-lua/luasocket/Manifest index 8e11fe11f0a8..9c1c2992f0e5 100644 --- a/dev-lua/luasocket/Manifest +++ b/dev-lua/luasocket/Manifest @@ -1 +1,2 @@ +DIST luasocket-3.0.0.tar.gz 336231 BLAKE2B 71b87041a1edb2616ba269160382ac5cea6ba9b623281e8069e8adf97b6898d7836add7eff949010a1bc890bff8d2e4797a2ff5c619b45f8ee3adee5d6633843 SHA512 4f93d6c0b602333df50ee4f939cd0419243f6de333472ffebf99334e301143e8cdee3bc1655c29f81608622d6e7850a9bcf6929a6d4748210a70cdb8218a1ec6 DIST luasocket-3.0_rc1_p20200328.tar.gz 335628 BLAKE2B 9e5d3e415337903b689705669b586c4481179a319b4e3428823c8f442d04f26db86bfeca66db7e58d157e31431c31e4f687403f7163b75f57d6f87cdb934717f SHA512 bdf7086a0504b0072b9cfd1266fc4ae89504053801722859a426f567fca00ed76f4c295c2a3a968e93f0036d9b792cf97561e9baa82c09ea23999cfd473227eb diff --git a/dev-lua/luasocket/files/luasocket-3.0.0_makefile.patch b/dev-lua/luasocket/files/luasocket-3.0.0_makefile.patch new file mode 100644 index 000000000000..8f6c9de42697 --- /dev/null +++ b/dev-lua/luasocket/files/luasocket-3.0.0_makefile.patch @@ -0,0 +1,73 @@ +--- a/src/makefile ++++ b/src/makefile +@@ -162,7 +162,7 @@ + O_macosx=o + CC_macosx=gcc + DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN +-CFLAGS_macosx=$(LUAINC:%=-I%) $(DEF) -Wall -O2 -fno-common ++CFLAGS_macosx=$(LUAINC:%=-I%) $(DEF) -Wall -fno-common + LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o + LD_macosx=gcc + SOCKET_macosx=usocket.o +@@ -174,8 +174,7 @@ + O_linux=o + CC_linux=gcc + DEF_linux=-DLUASOCKET_$(DEBUG) +-CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \ +- -Wimplicit -O2 -ggdb3 -fpic ++CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra -Wimplicit -fpic + LDFLAGS_linux=-O -shared -fpic -o + LD_linux=gcc + SOCKET_linux=usocket.o +@@ -187,8 +186,7 @@ + O_freebsd=o + CC_freebsd=gcc + DEF_freebsd=-DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN +-CFLAGS_freebsd=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \ +- -Wimplicit -O2 -ggdb3 -fpic ++CFLAGS_freebsd=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra -Wimplicit -fpic + LDFLAGS_freebsd=-O -shared -fpic -o + LD_freebsd=gcc + SOCKET_freebsd=usocket.o +@@ -200,8 +198,7 @@ + O_solaris=o + CC_solaris=gcc + DEF_solaris=-DLUASOCKET_$(DEBUG) +-CFLAGS_solaris=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \ +- -Wimplicit -O2 -ggdb3 -fpic ++CFLAGS_freebsd=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra -Wimplicit -fpic + LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o + LD_solaris=gcc + SOCKET_solaris=usocket.o +@@ -214,7 +211,7 @@ + CC_mingw=gcc + DEF_mingw= -DLUASOCKET_$(DEBUG) \ + -DWINVER=0x0501 +-CFLAGS_mingw=$(LUAINC:%=-I%) $(DEF) -Wall -O2 -fno-common ++CFLAGS_mingw=$(LUAINC:%=-I%) $(DEF) -Wall -fno-common + LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o + LD_mingw=gcc + SOCKET_mingw=wsocket.o +@@ -396,18 +393,18 @@ + all: $(SOCKET_SO) $(MIME_SO) + + $(SOCKET_SO): $(SOCKET_OBJS) +- $(LD) $(SOCKET_OBJS) $(LDFLAGS)$@ ++ $(LD) $(SOCKET_OBJS) -Wl,-soname,socket/core.so $(LDFLAGS)$@ + + $(MIME_SO): $(MIME_OBJS) +- $(LD) $(MIME_OBJS) $(LDFLAGS)$@ ++ $(LD) $(MIME_OBJS) -Wl,-soname,mime/core.so $(LDFLAGS)$@ + + all-unix: all $(UNIX_SO) $(SERIAL_SO) + + $(UNIX_SO): $(UNIX_OBJS) +- $(LD) $(UNIX_OBJS) $(LDFLAGS)$@ ++ $(LD) $(UNIX_OBJS) -Wl,-soname,socket/unix.so $(LDFLAGS)$@ + + $(SERIAL_SO): $(SERIAL_OBJS) +- $(LD) $(SERIAL_OBJS) $(LDFLAGS)$@ ++ $(LD) $(SERIAL_OBJS) -Wl,-soname,socket/serial.so $(LDFLAGS)$@ + + install: + $(INSTALL_DIR) $(INSTALL_TOP_LDIR) diff --git a/dev-lua/luasocket/luasocket-3.0.0.ebuild b/dev-lua/luasocket/luasocket-3.0.0.ebuild new file mode 100644 index 000000000000..9c989a186eaf --- /dev/null +++ b/dev-lua/luasocket/luasocket-3.0.0.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..4} luajit ) +MY_P="${PN}-${EGIT_COMMIT}" + +inherit lua toolchain-funcs + +DESCRIPTION="Networking support for the Lua language" +HOMEPAGE=" + http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/ + https://github.com/lunarmodules/luasocket +" +SRC_URI="https://github.com/lunarmodules/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +REQUIRED_USE="${LUA_REQUIRED_USE}" +RESTRICT="test" + +RDEPEND="${LUA_DEPS}" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +HTML_DOCS="docs/." + +PATCHES=( + "${FILESDIR}/${PN}-3.0_rc1_p20200328_publish_API.patch" + "${FILESDIR}/${PN}-3.0.0_makefile.patch" +) + +src_prepare() { + default + lua_copy_sources +} + +lua_src_compile() { + pushd "${BUILD_DIR}" || die + + local myemakeargs=( + "CC=$(tc-getCC)" + "LD=$(tc-getCC)" + "LUAINC_linux=$(lua_get_include_dir)" + "LUAV=${ELUA}" + "MIME_V=1.0.3-${ELUA}" + "MYCFLAGS=${CFLAGS}" + "MYLDFLAGS=${LDFLAGS}" + "SOCKET_V=3.0.0-${ELUA}" + ) + + emake "${myemakeargs[@]}" all + + popd +} + +src_compile() { + lua_foreach_impl lua_src_compile +} + +lua_src_install() { + pushd "${BUILD_DIR}" || die + + local myemakeargs=( + "CDIR=$(lua_get_cmod_dir)" + "DESTDIR=${ED}" + "LDIR=$(lua_get_lmod_dir)" + "LUAPREFIX_linux=" + "MIME_V=1.0.3-${ELUA}" + "SOCKET_V=3.0.0-${ELUA}" + ) + + emake "${myemakeargs[@]}" install + emake "${myemakeargs[@]}" install-unix + + insinto "$(lua_get_include_dir)"/luasocket + doins src/*.h + + popd +} + +src_install() { + lua_foreach_impl lua_src_install + + einstalldocs +} |