COMMENT= NGINX JavaScript static library and CLI
GH_ACCOUNT= nginx
GH_PROJECT= njs
GH_TAGNAME= 0.7.12
CATEGORIES= lang
HOMEPAGE= https://nginx.org/en/docs/njs/
MAINTAINER= Sergey A. Osokin <osa@FreeBSD.org>
# 2 clause BSD
PERMIT_PACKAGE= Yes
WANTLIB= c crypto pcre2-8 ssl xml2 z
LIB_DEPENDS= devel/pcre2 \
textproc/libxml
CONFIGURE_STYLE=simple
ALL_TARGET= libnjs njs
do-install:
${INSTALL_DATA} ${WRKSRC}/src/*.h ${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/build/njs_auto_config.h ${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/build/libnjs.a ${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/build/njs.pc ${PREFIX}/lib/pkgconfig
.include <bsd.port.mk>
On 2023/05/22 17:28, Sergey A. Osokin wrote:
> Hi Landry,
>
> On Sat, May 20, 2023 at 06:03:26PM +0200, Landry Breuil wrote:
> > Le Thu, May 18, 2023 at 09:31:35PM +0000, Sergey A. Osokin a écrit :
> > > Hi there,
> > >
> > > here's the port of nginx javascript static library for OpenBSD
> > > ports tree.
> > > Please let me know your thoughts, ask questions, provide comments.
> >
> > you should be able to use the various GH_PROJECT/GH_ACCOUNT/GH_TAGNAME
> > variables instead of handrolling DISTFILES/MASTER_SITES/PKGNAME/WRKDIST.
>
> That's exactly what I tried to use as a first step, however that didn't
> work for me, so I decided to use this way.
Please see attached Makefile (and run make makesum to update distinfo).
The way your Makefile has it, the distfile is just named 0.7.12.tar.gz
which is not specific enough.
> > is only the static lib necessary in libnjs ? for both ports, why the
> > auto/make patch, afaict, our sed supports s,X,Y, constructs..
>
> The static library is necessary, and probably a shared library will
> be available for the future releases on nginx javascript.
>
> About the auto/make patch - the issue has been reported to the upstream,
> the upstream's updated,
> https://github.com/nginx/njs/commit/8a03334e27393fc2031f071830f9605f4373b0be
> So, I'll remove that patch with the next release of nginx javascript.
The patches don't match standard naming conventions, we normally use
"make update-patches" to generate them. To fix them up, you can "make
patch" with the existing patches, then mv the patches dir out the way,
and "make update-patches". (For newly patched files, copy the source
file to filename.orig.port, modify as needed, and make update-patches
to pick them up).
PLIST should also be autogenerated (and maybe tweaked afterwards if
necessary, but that's the starting point). Run "make plist". Here
the sort order changes, and lib/libnjs.a gets an "@static-lib"
annotation.
> > i dont think do-build is necessary, setting ALL_TARGET=libnjs njs should
> > achieve the same.
>
> Good catch, I'm going to re-work this part and let you know how
> that works, thanks.
>
> > why two ports, instead of a single, or eventually a MULTI_PACKAGE ? i
> > suppose your hidden untold goal is to enable support in nginx, if so why
> > not saying it upfront ?
>
> That's good idea. Since those two (devel/libnjs and lang/njs) from
> the different categories, not sure what's the best place to create
> a port for both (similarly to www/unit, I believe).
My preference would be a single port in lang/njs providing library and cli.
They're in the same distfile, I don't think it makes all that much sense
to split the package into njs and libnjs really (we don't normally do
that for other software in ports unless there are heavy extra dependencies
in one or the other).
> Also, I'm going to enable nginx javascript support for www/unit, so
> I'd like to create that the same way as I did that for FreeBSD and
> NetBSD.
sounds good to me.
Thanks.
No comments:
Post a Comment