On Mon, Dec 15, 2014 at 08:21:33AM +0000, Stuart Henderson wrote: > Manually written do-install sections like this are fragile. Can these > Makefiles be changed so that they'll pick up files needed by future versions > without further changes, or is there any build infrastructure in the > distribution that can be used instead? Same for the other diff you sent.
For this luasocket port, removing do-install target doesn't alter the files (or their locations). In fact without the do-install target, headers.lua gets picked up automatically. pkg_info -L luasocket_without_do-install > ~/portplist pkg_info -L luasocket_orig_with_do-install > ~/packageplist ~$ diff -u packageplist portplist --- packageplist Mon Dec 15 18:24:11 2014 +++ portplist Mon Dec 15 18:22:42 2014 @@ -36,6 +36,7 @@ /usr/local/share/lua/5.1/mime.lua /usr/local/share/lua/5.1/socket.lua /usr/local/share/lua/5.1/socket/ftp.lua +/usr/local/share/lua/5.1/socket/headers.lua /usr/local/share/lua/5.1/socket/http.lua /usr/local/share/lua/5.1/socket/smtp.lua /usr/local/share/lua/5.1/socket/tp.lua If I read the do-install target correctly, it is seggregating libs into MODLUA_LIBDIR, modules written in Lua into MODLUA_DATADIR and docs into MODLUA_DOCDIR while the underlying distributions do not always provide configure option for DATADIR and DOCDIR. (luasocket doesn't provide and option for MODLUA_DATADIR) However, Lua doesn't distinguish modules written in Lua from libs and as long as it could find them in package.path... ~$ echo "print(package.path)" | lua51 that means Lua could load *.lua modules even if they are in MODLUA_LIBDIR. There must be a good reason for MODLUA_DATADIR though. I am new to ports stuff. Side note... There are 62 ports with MODULES = lang/lua ~$ sqlite3 /usr/local/share/sqlports "select fullpkgpath from ports where modules like 'lang/lua';" | wc -l out of which 30 have do-install target ... /usr/ports$ sqlite3 /usr/local/share/sqlports "select pkgpath from paths where fullpkgpath in (select fullpkgpath from ports where modules like 'lang/lua')" | sort | uniq | xargs fgrep -R do-install | wc -l
