Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jul 2020 20:50:37 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r542053 - head/devel/lua-cqueues
Message-ID:  <202007112050.06BKobwY042861@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Sat Jul 11 20:50:36 2020
New Revision: 542053
URL: https://svnweb.freebsd.org/changeset/ports/542053

Log:
  devel/lua-cqueues: adapt to the needs of dns/knot-resolver
  
  - PORTDOCS / PORTEXAMPLES obviate the need to put docs and examples in
    the plist.
  - There should be no messing with ldconfig and soname, since the
    .so exists only to be dynamically loaded at runtime, not actually
    linked to.
  - Fixed name in the COMMENT
  - Does not build on lua 5.4, note this in USES
  - Force the port to build exactly the version it's supposed to build,
    rather than let it autodetect things. Hence MAKE_ENV and CPPFLAGS
  - shebangfix on the examples is not strictly necessary but is cleaner.
  
  PR:		247739
  Submitted by:	andrew@tao11.riddles.org.uk
  Approved by:	Leo Vandewoestijne <freebsd@dns.company> (maintainer)

Modified:
  head/devel/lua-cqueues/Makefile
  head/devel/lua-cqueues/pkg-plist

Modified: head/devel/lua-cqueues/Makefile
==============================================================================
--- head/devel/lua-cqueues/Makefile	Sat Jul 11 20:45:27 2020	(r542052)
+++ head/devel/lua-cqueues/Makefile	Sat Jul 11 20:50:36 2020	(r542053)
@@ -4,27 +4,47 @@
 PORTNAME=	cqueues
 DISTVERSIONPREFIX=	rel-
 DISTVERSION=	20200603
+PORTREVISION=	1
 CATEGORIES=	devel
 PKGNAMEPREFIX=	${LUA_PKGNAMEPREFIX}
 
 MAINTAINER=	freebsd@dns.company
-COMMENT=	Constant queues lib
+COMMENT=	Continuation queues module for Lua
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		gmake lua:51+,module ssl
-USE_LDCONFIG=	{LUA_MODLIBDIR}
-LDFLAGS+=	-Wl,-soname,liblua-${PORTNAME}.so.${LUA_VER_STR}
+USES=		gmake lua:51-53,module ssl
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	wahern
 
-SONAME=		${STAGEDIR}${PREFIX}/lib/liblua-${PORTNAME}.so
+MAKE_ENV+=	LUA_APIS="${LUA_VER}"
+CPPFLAGS+=	"-I${LUA_INCDIR}"
 
+DOCSDIR=	${LUA_DOCSDIR}
+EXAMPLESDIR=	${LUA_EXAMPLESDIR}
+PORTDOCS=	cqueues.pdf
+PORTEXAMPLES=	*
+
+OPTIONS_DEFINE=	DOCS EXAMPLES
+
+EXAMPLES_USES=	shebangfix
+EXAMPLES_VARS=	shebang_files="examples/*"
+
+# Some of the shebangs in examples/* are formatted like this.
+lua_OLD_CMD+=	/usr/local/lua[0-9]*/bin/lua
+
 post-install:
-	${MV} ${STAGEDIR}${LUA_MODLIBDIR}/_${PORTNAME}.so ${SONAME}.${LUA_VER_STR}
-	${STRIP_CMD} ${SONAME}.${LUA_VER_STR}
-	${RLN} ${SONAME}.${LUA_VER_STR} ${SONAME}
+	${STRIP_CMD} ${STAGEDIR}${LUA_MODLIBDIR}/_${PORTNAME}.so
+
+post-install-DOCS-on:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_MAN} ${BUILD_WRKSRC}/doc/cqueues.pdf ${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
+	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	(cd ${BUILD_WRKSRC}/examples && \
+		${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
 
 .include <bsd.port.mk>

Modified: head/devel/lua-cqueues/pkg-plist
==============================================================================
--- head/devel/lua-cqueues/pkg-plist	Sat Jul 11 20:45:27 2020	(r542052)
+++ head/devel/lua-cqueues/pkg-plist	Sat Jul 11 20:50:36 2020	(r542053)
@@ -1,5 +1,4 @@
-lib/liblua-cqueues.so.%%LUA_VER_STR%%
-lib/liblua-cqueues.so
+%%LUA_MODLIBDIR%%/_cqueues.so
 %%LUA_MODSHAREDIR%%/cqueues.lua
 %%LUA_MODSHAREDIR%%/cqueues/auxlib.lua
 %%LUA_MODSHAREDIR%%/cqueues/condition.lua
@@ -17,4 +16,3 @@ lib/liblua-cqueues.so
 %%LUA_MODSHAREDIR%%/cqueues/signal.lua
 %%LUA_MODSHAREDIR%%/cqueues/socket.lua
 %%LUA_MODSHAREDIR%%/cqueues/thread.lua
-@dir %%LUA_MODLIBDIR%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007112050.06BKobwY042861>