Changeset View
Standalone View
Makefile
# Created by: GreenDog <fiziologus@gmail.com> | |||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# Created by: GreenDog <fiziologus@gmail.com> | |||||
# Date: 2018-03-14 | |||||
mat: The credit will alreay be present in the commit message, please do not add more in the Makefile. | |||||
Not Done Inline ActionsPlease, DO NOT CHANGE the header. mat: Please, DO NOT CHANGE the header. | |||||
Not Done Inline ActionsPlease restore the header. mat: Please restore the header. | |||||
PORTNAME= lua | PORTNAME= lua | ||||
PORTVERSION= 5.3.4 | PORTVERSION= 5.3.5 | ||||
PORTREVISION= 2 | PORTREVISION= 1 | ||||
Done Inline ActionsThis should be resetted when updating the version. mat: This should be resetted when updating the version. | |||||
Not Done Inline ActionsThis was not done. Please remove PORTREVISION, or set it to 0. mat: This was not done. Please remove PORTREVISION, or set it to 0. | |||||
CATEGORIES= lang | CATEGORIES= lang | ||||
MASTER_SITES= http://www.lua.org/ftp/ | MASTER_SITES= https://www.lua.org/ftp/ | ||||
PKGNAMESUFFIX= 53 | PKGNAMESUFFIX= 53 | ||||
MAINTAINER= russ.haley@gmail.com | MAINTAINER= russ.haley@gmail.com | ||||
COMMENT= Small, compilable scripting language providing easy access to C code | COMMENT= Small, embeddable scripting language providing easy access to C code | ||||
Not Done Inline ActionsMost scripting languages are embeddables, is lua not compilable any more ? mat: Most scripting languages are embeddables, is lua not compilable any more ? | |||||
Not Done Inline ActionsWhat does "compilable" mean? There is a bytecode compiler, which is useful for syntax checking and faster code loading, but has no effect whatsoever on execution speed (since code loaded as text is compiled to the same bytecode before execution anyway). Bytecode compilation is also of limited usefulness since the bytecode is version and platform dependent. I think most people would interpret "compilable" as implying faster execution, or execution of machine instructions rather than interpreted code, which is not the case here. andrew_tao173.riddles.org.uk: What does "compilable" mean? There is a bytecode compiler, which is useful for syntax checking… | |||||
Not Done Inline Actions@andrew_tao173.riddles.org.uk is correct, that's why I changed it. I finally decided on the current phrasing because 'compilable' is not in the official description and I was too cowardly to change it entirely. I will change it to the official description on Lua.org: Lua is a powerful, efficient, lightweight, embeddable scripting language. russ.haley_gmail.com: @andrew_tao173.riddles.org.uk is correct, that's why I changed it. I finally decided on the… | |||||
LICENSE= MIT | LICENSE= MIT | ||||
USES= libedit | |||||
Not Done Inline ActionsThis is simply handled in the code patch to lua.c. As far as I can tell, editline is a standard package in FreeBSD 4.4? russ.haley_gmail.com: This is simply handled in the code patch to lua.c. As far as I can tell, editline is a standard… | |||||
LUA_VER= 5.3 | LUA_VER= 5.3 | ||||
USE_LDCONFIG= yes | USE_LDCONFIG= yes | ||||
# Overriding __MAKE_CONF makes sure that we don't re-parse | # Overriding __MAKE_CONF makes sure that we don't re-parse | ||||
# /etc/make.conf during do-build, which would jeopardize the build | # /etc/make.conf during do-build, which would jeopardize the build | ||||
# if, for instance, the user set CFLAGS=mumble | # if, for instance, the user set CFLAGS=mumble | ||||
# NOTE: /etc/make.conf is read BEFORE Makefile, so we already | # NOTE: /etc/make.conf is read BEFORE Makefile, so we already | ||||
# have its settings when we get here. | # have its settings when we get here. | ||||
# See http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt | # See http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt | ||||
MAKE_ARGS= __MAKE_CONF=${NONEXISTENT} | MAKE_ARGS= __MAKE_CONF=${NONEXISTENT} | ||||
# liblua.so requires libm, so make sure it has an explicit dependency | |||||
# so that applications need not second-guess lua's dependencies. | |||||
CPPFLAGS+= -I${LOCALBASE}/include | |||||
Not Done Inline ActionsUnnecessary if the standard editline package is used. russ.haley_gmail.com: Unnecessary if the standard editline package is used.
https://www.freebsd.org/cgi/man.cgi? | |||||
LDFLAGS+= -lm -pthread | |||||
Not Done Inline ActionsAs per an email with Jan Beich: -pthread was inherited from How do I test this? russ.haley_gmail.com: As per an email with Jan Beich:
-pthread was inherited from
https://svnweb.freebsd. | |||||
BUILD_WRKSRC= ${WRKSRC}/src | BUILD_WRKSRC= ${WRKSRC}/src | ||||
Not Done Inline ActionsThese variable have been added to standardize with lua.mk and hopefully other packages if I have time. russ.haley_gmail.com: These variable have been added to standardize with lua.mk and hopefully other packages if I… | |||||
MAKE_ARGS+= MYCFLAGS="${CFLAGS} ${CPPFLAGS} -DLUA_USE_LINUX" \ | |||||
MYLDFLAGS="${LDFLAGS}" \ | |||||
MYLIBS="-Wl,-E -L${LOCALBASE}/lib -ledit" \ | |||||
CC="${CC}" \ | |||||
LUA_T=lua53 \ | |||||
LUAC_T=luac53 \ | |||||
LUA_A=liblua-${LUA_VER}.a \ | |||||
LUA_SO=liblua-${LUA_VER}.so \ | |||||
LUA_SONAME=liblua-${LUA_VER}.so \ | |||||
TO_BIN="lua53 luac53" \ | |||||
TO_LIB="liblua-${LUA_VER}.a liblua-${LUA_VER}.so" \ | |||||
INSTALL_TOP=${STAGEDIR}${PREFIX} \ | |||||
INSTALL_INC=${STAGEDIR}${PREFIX}/include/lua53 \ | |||||
INSTALL_EXEC="${INSTALL_PROGRAM}" | |||||
# Cope with the lack of support for Lua 5.2 in bsd.lua.mk. These | # Source, destination, and filenames to copy for the DOCS option | ||||
# overrides, which are required below, should be removed once bsd.lua.mk | # (automatically added to pkg-plist if DOCS is set) | ||||
Not Done Inline ActionsNo. Linking lua53 with pthread might be defensible (though I personally don't think it is), but linking liblua.so against pthread is not on. andrew_tao173.riddles.org.uk: No. Linking lua53 with pthread might be defensible (though I personally don't think it is), but… | |||||
Not Done Inline ActionsI was unable to find a definitive test to indicate if Lua requires linking pthread. As I had seen mention of it in luaossl, I built Lua with and without linking to pthread and created a public key. In both tests I "required" luaossl and successfully created a public key using 1.0.2k. I emailed the luaossl maintainer (actually, I emailed the author wahern who directed me to the current maintainer duarnimator). Duarnimator indicated that openssl pre 1.1.0 needs pthreads and he pointed me to the sources: At this juncture I have assumed my tests were faulty and added -pthread back in. If you can indicate some tests I could try on any package that would prove this one way or the other (or confirm that my original test was valid) I would like to remove it entirely. To keep all the information together, here is the previous comment on that topic. As per an email with Jan Beich: -pthread was inherited from russ.haley_gmail.com: I was unable to find a definitive test to indicate if Lua requires linking pthread. As I had… | |||||
Not Done Inline ActionsFor reference on the luaossl requirement, see http://25thandclement.com/~william/projects/luaossl.pdf section 1.2.3 russ.haley_gmail.com: For reference on the luaossl requirement, see http://25thandclement. | |||||
Not Done Inline ActionsI think you're missing the point about pthreads. Lua itself has no interaction with threads at all (unless you explicitly modify it to lock the interpreter, which the port doesn't do). Therefore, it's inappropriate for lublua.so (which will never call any pthread function) to force libthr into the process. (Remember that liblua.so might be being loaded because of a reference from a dlopen'd module - this is actually not uncommon) The bug fix you reference (base/276630) is specifically about loading libthr via dlopen, so without that fix, linking lublua.so against libthr actually makes things worse, since any dynamic load of a lua interpreter would trigger the bug even if no pthread-using module was ever used from Lua. If some extension that you want to load from Lua needs to pull in pthreads, then there are two possibilities: either it's enough for the extension .so to reference libthr to pull it in, or if there's an unfixed bug of the same kind as base/276630, then it's not enough for liblua.so to reference libthr, but rather the main executable must do so. andrew_tao173.riddles.org.uk: I think you're missing the point about pthreads.
Lua itself has no interaction with threads at… | |||||
Done Inline ActionsI'm struggling to understand if/why libmath is required for the shared object at all but I don't currently have any code that uses liblua.so. I'll postulate that we should do a second exp run with -lm removed to see if anything breaks? russ.haley_gmail.com: I'm struggling to understand if/why libmath is required for the shared object at all but I… | |||||
Done Inline ActionsLua calls functions from libm. If you try and load liblua.so into a main program that doesn't export the libm functions, it'll fail unless liblua.so pulls in libm itself. So it's always correct for liblua.so to be linked against libm. andrew_tao173.riddles.org.uk: Lua calls functions from libm. If you try and load liblua.so into a main program that doesn't… | |||||
# understands this lua version. | # We override DOCSDIR to get a per-version subdir. | ||||
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX} | |||||
Not Done Inline ActionsThis is the standard make target for freebsd in lua. russ.haley_gmail.com: This is the standard make target for freebsd in lua. | |||||
Not Done Inline ActionsKen Sasaki (lua-stdlib-normalize / lua-stdlib-debug maintainer) suggested in a bugzilla thread that perhaps modules should be installing docs under doc/lua5N/port-name, so perhaps we should consider installing the docs for Lua proper under doc/lua5N/lua to allow that without creating a mess? andrew_tao173.riddles.org.uk: Ken Sasaki (lua-stdlib-normalize / lua-stdlib-debug maintainer) suggested in a bugzilla thread… | |||||
PORTDOCS= *.html *.css *.gif *.png | |||||
Not Done Inline ActionsI would like to remove the renaming of the lua build output and postpone it until the install step, or a preinstall rename. Input appreciated. russ.haley_gmail.com: I would like to remove the renaming of the lua build output and postpone it until the install… | |||||
BUILD_WRKDOC= ${WRKSRC}/doc | |||||
LUA_PREFIX?= ${PREFIX} | LUA_PREFIX?= ${PREFIX} | ||||
LUA_SUBDIR?= lua${PKGNAMESUFFIX} | |||||
LUA_INCDIR?= ${LUA_PREFIX}/include/${LUA_SUBDIR} | # 2018-03-17: AG - These should match lua.mk, but we can't include that here | ||||
LUA_CMD?= ${PORTNAME}${PKGNAMESUFFIX} | |||||
LUAC_CMD?= ${PORTNAME}c${PKGNAMESUFFIX} | |||||
LUA_INCDIR?= ${LUA_PREFIX}/include/${PORTNAME}${PKGNAMESUFFIX} | |||||
LUA_LIBDIR?= ${LUA_PREFIX}/lib | LUA_LIBDIR?= ${LUA_PREFIX}/lib | ||||
SUB_FILES= lua-${LUA_VER}.pc | LUA_LIB_STATIC=lib${PORTNAME}-${LUA_VER}.a | ||||
LUA_LIB_SHARED=lib${PORTNAME}-${LUA_VER}.so | |||||
LUA_PC_FILE=${PORTNAME}-${LUA_VER}.pc | |||||
# using the "bsd" target rather than "freebsd" saves patching out the | |||||
# assumption of using base libedit in order to make it configurable. "bsd" | |||||
# is "generic" plus the POSIX and DLOPEN options, plus -Wl,-E at link time; | |||||
# it doesn't set CC either, which makes it easier for us to control that too. | |||||
ALL_TARGET=bsd | |||||
# Options | |||||
OPTIONS_DEFAULT+= LIBEDIT DOCS | |||||
Not Done Inline ActionsWhy +=? mat: Why `+=`? | |||||
Not Done Inline ActionsI probably cargo-culted that in from some example when adding options to the lua54 port, and russ got it from me. No reason not to change it to just = andrew_tao173.riddles.org.uk: I probably cargo-culted that in from some example when adding options to the lua54 port, and… | |||||
OPTIONS_GROUP= DOCSGROUP DEBUGGROUP | |||||
OPTIONS_GROUP_DOCSGROUP= DOCS | |||||
OPTIONS_GROUP_DEBUGGROUP= ASSERT APICHECK | |||||
OPTIONS_SINGLE= EDIT | |||||
OPTIONS_SINGLE_EDIT=EDITNONE LIBEDIT LIBEDIT_PORT READLINE | |||||
# Option descriptions | |||||
DEBUGGROUP_DESC = Debugging options | |||||
ASSERT_DESC = Enable interpreter assertions | |||||
APICHECK_DESC = Enable API checks | |||||
DOCSGROUP_DESC = Documentation options | |||||
DOCS_DESC = Install language and API reference (HTML, ~400kB) | |||||
EDIT_DESC = Interactive command-line editing | |||||
EDITNONE_DESC = No command-line editing | |||||
LIBEDIT_DESC = Use base system libedit (recommended) | |||||
Not Done Inline ActionsWell, this sucks: qa.sh doesn't allow this and demands that you use the port instead. The problem with using the port libedit is that it links against the wrong libncurses, leading to compatibility problems when you try and use the lua curses module. Same problem exists with readline. I was hoping to avoid that problem this way, but if linking to base libedit isn't an option then we're going to need a much more involved solution, such as installing an extra lua binary without editing support. andrew_tao173.riddles.org.uk: Well, this sucks: qa.sh doesn't allow this and demands that you use the port instead.
The… | |||||
LIBEDIT_PORT_DESC=Use libedit from ports | |||||
READLINE_DESC = Use GNU Readline from ports | |||||
Not Done Inline Actionsextra white space before =. mat: extra white space before `=`. | |||||
# Option implementations | |||||
ASSERT_EXTRA_PATCHES=${PATCHDIR}/extra-patch-assert | |||||
APICHECK_CPPFLAGS=-DLUA_USE_APICHECK | |||||
LIBEDIT_CPPFLAGS=-DLUA_USE_READLINE -I/usr/include/edit | |||||
LIBEDIT_LIBS=-ledit | |||||
LIBEDIT_PORT_USES=libedit | |||||
# USES=libedit adds -I/usr/local/include -L/usr/local/lib itself | |||||
LIBEDIT_PORT_CPPFLAGS=-DLUA_USE_READLINE | |||||
LIBEDIT_PORT_LIBS=-ledit | |||||
Not Done Inline ActionsTo silence what exactly? Do not add inactive code because a third party lint tool gives you warnings. Also, what happens if libedit or libreadline is installed, and one selects this option? mat: To silence what exactly?
Do not add inactive code because a third party lint tool gives you… | |||||
Not Done Inline Actionsportlint, which is prominently mentioned in the porters manual, counts as a third-party tool? Without that line or something logically equivalent, portlint reports: WARN: Makefile: EDITNONE is listed in OPTIONS_DEFINE, but no PORT_OPTIONS:MEDITNONE appears. Obviously that can just be ignored, which I did for a while, but I figured that it cost nothing to suppress the warning. If one selects EDITNONE, then regardless of what is or is not installed, the lua53 binary will not do command-line editing, when running interactively it'll just fgets from stdin. I thought the description of that was clear enough. No dependency on libedit or readline will be generated and no library other than libc and libm will be linked. andrew_tao173.riddles.org.uk: portlint, which is prominently mentioned in the porters manual, counts as a third-party tool? | |||||
Not Done Inline ActionsMmm, if the option does nothing then do not add it. And instead of using an OPTIONS_SINGLE, use OPTIONS_RADIO. https://www.freebsd.org/doc/en/books/porters-handbook/makefile-options.html mat: Mmm, if the option does nothing then do not add it.
And instead of using an OPTIONS_SINGLE… | |||||
Not Done Inline ActionsFrom a user perspective it seemed much clearer to have an explicit option for it (which could have a description). Without it, it's not at all clear that no editing is even an available option. andrew_tao173.riddles.org.uk: From a user perspective it seemed much clearer to have an explicit option for it (which could… | |||||
Not Done Inline ActionsThe reason we have SINGLE (1) and RADIO (0,1) is to handle those case. You can add a few words to EDITGRP_DESC to say that having none is ok, or add a pkg-help file to be more verbose. But do not add a non functionnal variable only to please portlint. mat: The reason we have SINGLE (1) and RADIO (0,1) is to handle those case. You can add a few words… | |||||
Not Done Inline ActionsI'm OK with taking the variable out and just ignoring the warning, but changing the UI appearance just based on the fact that we don't actually need any special option processing to implement EDITNONE seems to me to be putting the cart before the horse. andrew_tao173.riddles.org.uk: I'm OK with taking the variable out and just ignoring the warning, but changing the UI… | |||||
READLINE_USES=readline | |||||
# USES=readline adds -I/usr/local/include -L/usr/local/lib itself | |||||
READLINE_CPPFLAGS=-DLUA_USE_READLINE | |||||
READLINE_LIBS=-lreadline | |||||
Not Done Inline Actionsmissing tab after =. mat: missing tab after `=`. | |||||
# end of option vars | |||||
CFLAGS+= -fPIC | |||||
WITHOUT_NO_STRICT_ALIASING=yes | |||||
Not Done Inline ActionsThis is not used anywhere, what is it for? mat: This is not used anywhere, what is it for? | |||||
Not Done Inline ActionsIt's the only way to stop bsd.port.mk from adding -fno-strict-aliasing to CFLAGS. Lua does not require this flag. andrew_tao173.riddles.org.uk: It's the only way to stop bsd.port.mk from adding -fno-strict-aliasing to CFLAGS. Lua does not… | |||||
Not Done Inline ActionsBut is it broken with it? mat: But is it broken with it? | |||||
Not Done Inline Actions-fno-strict-aliasing only reduces optimization, so absent compiler bugs it can't "break" anything. However since Lua is an actively maintained piece of code which is tested with modern compilers, for which performance is a factor, I think it best to follow the upstream's selection of compile options in the absence of an overriding reason to do otherwise. andrew_tao173.riddles.org.uk: -fno-strict-aliasing only reduces optimization, so absent compiler bugs it can't "break"… | |||||
MAKE_ARGS += CC="${CC}" \ | |||||
MYCFLAGS="${CPPFLAGS} ${CFLAGS}" \ | |||||
MYLDFLAGS="${LDFLAGS}" \ | |||||
MYLIBS="${LIBS}" \ | |||||
LUA_T=${LUA_CMD} \ | |||||
LUAC_T=${LUAC_CMD} \ | |||||
LUA_A=${LUA_LIB_STATIC} \ | |||||
LUA_SO=${LUA_LIB_SHARED} \ | |||||
LUA_SONAME=${LUA_LIB_SHARED} \ | |||||
TO_BIN="${LUA_CMD} ${LUAC_CMD}" \ | |||||
TO_LIB="${LUA_LIB_SHARED} ${LUA_LIB_STATIC}" \ | |||||
INSTALL_TOP=${STAGEDIR}${PREFIX} \ | |||||
INSTALL_INC=${STAGEDIR}${LUA_INCDIR} \ | |||||
INSTALL_EXEC="${INSTALL_PROGRAM}" | |||||
SUB_FILES= ${LUA_PC_FILE} | |||||
SUB_LIST= version=${PORTVERSION} \ | SUB_LIST= version=${PORTVERSION} \ | ||||
includedir=${LUA_INCDIR} \ | includedir=${LUA_INCDIR} \ | ||||
libdir=${LUA_LIBDIR} \ | libdir=${LUA_LIBDIR} \ | ||||
soname=lua-${LUA_VER} | soname=${LUA_LIB_SHARED} | ||||
Done Inline ActionsWhy? mat: Why? | |||||
Done Inline ActionsI'm not sure I understand the question @mat? I'll assume the question is "Why use variables" and say, I was trying to remove the hard coded 'lua' and 'lua53' strings to make it more consistent and usable for the upcoming 5.4 port. To be more accurate, this is a revision of the 5.4 port Makefile 'backported' to 5.3 russ.haley_gmail.com: I'm not sure I understand the question @mat?
I'll assume the question is "Why use variables"… | |||||
Done Inline Actionsthe problem here is that soname= and LUA_LIB_SHARED don't match if PORTNAME is changed. Either both names should be based on PORTNAME or neither should. andrew_tao173.riddles.org.uk: the problem here is that soname= and LUA_LIB_SHARED don't match if PORTNAME is changed. Either… | |||||
Not Done Inline ActionsYes, why remove lua? This will never change, so, there is no point of having it as a variable. (Well, unless the language is renamed, but I don't see that happening.) mat: Yes, why remove `lua`? This will never change, so, there is no point of having it as a… | |||||
Not Done Inline Actions
I suppose the reason is two fold: 1) I'm learning as I go and it seemed like something to clean up and 2) my "OCD" made me cringe when I looked at it. I can change it back if it offends, as I am largely indifferent. russ.haley_gmail.com: > Yes, why remove lua? This will never change, so, there is no point of having it as a variable. | |||||
Not Done Inline ActionsIt would be better to keep lua as it was before, using a 11 characters of variable for a 3 letter constant is a bit overboard. mat: It would be better to keep `lua` as it was before, using a 11 characters of variable for a 3… | |||||
Not Done Inline ActionsI am grateful for you taking the time to review my work. Please let me know what else you wish to see amended. russ.haley_gmail.com: I am grateful for you taking the time to review my work. Please let me know what else you wish… | |||||
andrew_tao173.riddles.org.ukUnsubmitted Done Inline ActionsWrong value for soname= there. LUA_LUB_SHARED is liblua-5.3.so, but soname= needs to be lua-5.3.so without the 'lib' prefix. andrew_tao173.riddles.org.uk: Wrong value for soname= there. LUA_LUB_SHARED is liblua-5.3.so, but soname= needs to be lua-5.3. | |||||
andrew_tao173.riddles.org.ukUnsubmitted Done Inline Actionsuh, I mean soname needs to be lua-5.3 without either the 'lib' prefix or the '.so' suffix. andrew_tao173.riddles.org.uk: uh, I mean soname needs to be lua-5.3 without either the 'lib' prefix or the '.so' suffix. | |||||
CFLAGS+= -fPIC | |||||
Not Done Inline ActionsAdded to the base Makefile russ.haley_gmail.com: Added to the base Makefile | |||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -e 's,rand *(,random(,g' \ | @${REINPLACE_CMD} -e "/LUA_ROOT/s,/usr/local,${LUA_PREFIX}," \ | ||||
Not Done Inline ActionsThe code that this patches is not reachable due to the USE_POSIX. http://lua-users.org/lists/lua-l/2017-09/msg00089.html From lmathlib.c #if !defined(l_rand) /* { */ from luaconf.h #if defined(LUA_USE_LINUX) russ.haley_gmail.com: The code that this patches is not reachable due to the USE_POSIX.
http://lua-users. | |||||
${WRKSRC}/src/lmathlib.c | ${WRKSRC}/src/luaconf.h | ||||
@${REINPLACE_CMD} -e "/LUA_ROOT/s|/usr/local|${LUA_PREFIX}| ; \ | |||||
Not Done Inline Actionsluaconf.h contains no readline reference and I instead created a patch for lua.c. This makes the code changes in one place (patch files) and the changes required are easily visible (in the patch file). russ.haley_gmail.com: luaconf.h contains no readline reference and I instead created a patch for lua.c. This makes… | |||||
Not Done Inline ActionsThis removal isn't quite right because the point of editing luaconf.h here is not to deal with readline, but rather to fix LUA_ROOT to ensure it matches ${PREFIX}. By default these are both /usr/local, so it's not obvious if this step is missed, but if ${PREFIX} is set to something else it's important that LUA_ROOT in luaconf.h be updated to match. andrew_tao173.riddles.org.uk: This removal isn't quite right because the point of editing luaconf.h here is not to deal with… | |||||
s,readline/,editline/,g ; \ | |||||
/history\.h/d" \ | |||||
${WRKSRC}/src/luaconf.h ${WRKSRC}/src/lua.c | |||||
post-patch-LIBEDIT_PORT-on: | |||||
@${REINPLACE_CMD} -e "s,readline/,editline/,g ; \ | |||||
/history\.h/d" ${WRKSRC}/src/lua.c | |||||
post-install: | post-install: | ||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/liblua-${LUA_VER}.so | ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${LUA_LIB_SHARED} | ||||
@${MV} ${STAGEDIR}${PREFIX}/man/man1/lua.1 \ | ${MV} ${STAGEDIR}${PREFIX}/man/man1/lua.1 \ | ||||
${STAGEDIR}${PREFIX}/man/man1/lua53.1 | ${STAGEDIR}${PREFIX}/man/man1/${LUA_CMD}.1 | ||||
@${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \ | ${MV} ${STAGEDIR}${PREFIX}/man/man1/luac.1 \ | ||||
${STAGEDIR}${PREFIX}/man/man1/luac53.1 | ${STAGEDIR}${PREFIX}/man/man1/${LUAC_CMD}.1 | ||||
${INSTALL_DATA} ${WRKDIR}/lua-${LUA_VER}.pc \ | ${INSTALL_DATA} ${WRKDIR}/${LUA_PC_FILE} \ | ||||
${STAGEDIR}${PREFIX}/libdata/pkgconfig | ${STAGEDIR}${PREFIX}/libdata/pkgconfig | ||||
post-install-DOCS-on: | |||||
${MKDIR} ${STAGEDIR}${DOCSDIR} | |||||
${INSTALL_MAN} ${BUILD_WRKDOC}/* ${STAGEDIR}${DOCSDIR}/. | |||||
Not Done Inline Actionsmake check-orphans doesn't like this, I'll fix in the next patch andrew_tao173.riddles.org.uk: make check-orphans doesn't like this, I'll fix in the next patch | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> | ||||
Not Done Inline ActionsAny reason not to simply COPYTREE_SHARE all that directory in DOCSDIR? mat: Any reason not to simply COPYTREE_SHARE all that directory in DOCSDIR? | |||||
Not Done Inline ActionsBUILD_WRKDOC also has the lua.1 and luac.1 files in it that are installed as manpages rather than docs. In a previous version I had it copying those files anyway, but just not including them in PORTDOCS so they didn't get installed. But check-plist objects to that. andrew_tao173.riddles.org.uk: BUILD_WRKDOC also has the lua.1 and luac.1 files in it that are installed as manpages rather… | |||||
Not Done Inline ActionsThis does not really say why you cannot use COPYTREE_SHARE. cd ${BUILD_WRKDOC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} '-not -name "*.1"' mat: This does not really say why you cannot use COPYTREE_SHARE.
```
cd ${BUILD_WRKDOC} &&… | |||||
Not Done Inline ActionsI just tried that, it doesn't work as given (it copies lua.1 and luac.1 anyway). Looks like COPYTREE_SHARE doesn't actually work with wildcards in the third arg, due to issues of shell quoting. "-not -name lua.1 -not -name luac.1" works, but now it's starting to look like not so much of an improvement over the previous form. andrew_tao173.riddles.org.uk: I just tried that, it doesn't work as given (it copies lua.1 and luac.1 anyway). Looks like… | |||||
Not Done Inline ActionsMmmm, wildcards are supported, maybe you need to reverse the " and ' order, like "-not -name '*.1'". Or write it as '-not -name \*.1' mat: Mmmm, wildcards are supported, maybe you need to reverse the `"` and `'` order, like `"-not… | |||||
Not Done Inline ActionsNone of those work. andrew_tao173.riddles.org.uk: None of those work. | |||||
Not Done Inline ActionsApparently the magic incantation is to escape with \ some part of the filename pattern other than the wildcard characters; this works because of an odd interaction between shell and find(1) related to the fact that find(1) does an extra layer of unescaping for itself, while the escape character prevents the pattern from matching any files in the shell (assuming there are no files with \ in the names). i.e. '-not -name *\.1' works this is ... not at all well documented, while there is an example in bsd.port.mk it completely fails to point out the important aspect, and the ports handbook doesn't mention it at all. It also seems rather fragile to me. andrew_tao173.riddles.org.uk: Apparently the magic incantation is to escape with \ some part of the filename pattern //other… | |||||
Not Done Inline ActionsDamn, I knew there was something strange happening. One day I'll try to figure out what really happens and why, and document it properly. mat: Damn, I knew there was something strange happening. One day I'll try to figure out what really… |
The credit will alreay be present in the commit message, please do not add more in the Makefile.