On Sat, Oct 20, 2012 at 11:15:11AM +0100, Stuart Henderson wrote:
> cc'ing ports@ as many of the comments here are going to be useful
> to other people who are working on ports (some of them just apply to
> things affecting this particular port and are relatively unimportant,
> but there are a few things which will crop up in many ports so it's
> good to have a wider audience for them).
> 
> On 2012/10/19 16:20, Gleydson Soares wrote:
> > here is an updated tarball(luakit and luajit) with some slight tweaks for 
> > both.
> > i did some tests and luakit works fine here @i386.
> 
> a few notes on the things I spotted in luajit; they're all fixed in
> the diff to tgz below, and the new tgz attached.
> 
> builds OK on amd64/i386 and I've added a minimal do-regress to check
> that it runs, but otherwise untested.
> 
> 
> 
> 
> . lowercase start of COMMENT, no trailing full stop
> 
> . move from devel/ to lang/
> 
> . don't strip "beta11", it's part of the version number, the package
> tools know how to work with certain suffixes like beta/pre/rc; the rules
> are in packages-specs(7) - I would suggest
> PKGNAME =     ${DISTNAME:L:S/-beta/beta/}
> 
> . would look better if some of the make variables are aligned,
> no need to go overboard but something like this would be nice I think.
> 
> ONLY_FOR_ARCHS = amd64 i386
> 
> COMMENT =     just-in-time compiler for Lua
> DISTNAME =    LuaJIT-2.0.0-beta11
> PKGNAME =     ${DISTNAME:L:S/-beta11//}
> 
> CATEGORIES =  devel
> 
> HOMEPAGE =    http://luajit.org
> 
> MAINTAINER =  Aaron Bieber <abie...@openbsd.org>
> 
> . consistency tweaks,
> NO_REGRESS = YES
> NO_REGRESS =  Yes
> 
> . ONLY_FOR_ARCHS not ARCHES; add this to /etc/mk.conf which will add
> some .poison's to catch common misspellings:
> .include "/usr/ports/infrastructure/templates/mk.conf.template"

Added.

> 
> . set SHARED_ONLY=Yes, this is a clue to update-plist to put everything
> into the PLIST file rather than using PFRAG.shared, and as it's only
> for amd64/i386 this doesn't further restrict the arch
> 
> . typo CPPFLGS -> CPPFLAGS (but this is unused anyway)
> 
> . they're using CCOPT to set the optimizer flags so we probably
> want to pass CFLAGS in to there rather than directly into CFLAGS.
> 
> . gets built with -march=i686, this needs to go.
> 
> . they are running strip on the library, this needs to be patched away
> 
> . they are running ldconfig, this needs to be patched away
> 
> . looking at the plist,
> 
> @bin bin/${FULLPKGNAME}-beta11
> - the only time FULLPKGNAME should be used in PLIST is for the
> pkg-readmes stuff
> - this should be renamed or symlinked to a filename which doesn't
> change for every port update; since this is based on lua 5.1 I have
> taken the approach of the main lua port and named it luajit51.

Added the below to PLIST to reflect this change: 

  @bin bin/luajit${MODLUA_DEP_VERSION}

> 
> @bin lib/libluajit-${MODLUA_VERSION}.so.2.0.0
> this is being built wrongly, indicated by the @bin marker which
> comes from file(1) output showing as 'executable' rather than
> 'shared object', also the filename is wrong, the actual name needs
> to be controlled by the SHARED_LIBS variable in the port Makefile
> and the name should be like 'libfoo.so.x.y' rather than '...so.x.y.z',
> this need changes to the build, also there is a library symlink
> created, libluajit-${MODLUA_VERSION}.so, this should be patched
> away or @comment'ed
> 
> . looking at patches, rather than patching wrksrc/Makefile to set
> variables and then SUBST_CMD them, you can just override them via
> MAKE_FLAGS. (MAKE_ENV gets overridden by variables set in a
> Makefile whereas MAKE_FLAGS overrides vars in a Makefile).

This is the second time this has been pointed this out to me :P. I will 
be more mind full of it.

> 
> .  rather than patching all the build lines to change $(E) and $(Q) it would 
> be simpler to switch things around just above '# Make targets', they have
> 
> Q= @
> E= @echo
> #Q=
> #E= @:
> 
> so the commented-out ones can just be uncommented to replace the others:
> 
> Q=
> E= @:
> 
> maybe this could also be done via MAKE_FLAGS but patching is probably
> easier for this one (unlike patch-Makefile this one doesn't involve
> SUBST_CMD, and SUBST_CMD makes 'make update-patches' harder to use).

I also removed the blurb about "symlink for luajit" from the Makefile's
install: section because it was confusing.

Attachment: luajit.tgz
Description: application/tar-gz

Reply via email to