Le Tue, Sep 05, 2023 at 04:07:41PM +0000, Sergey A. Osokin a écrit : > On Tue, Sep 05, 2023 at 05:42:45PM +0200, Landry Breuil wrote: > > Le Tue, Sep 05, 2023 at 02:59:37PM +0000, Sergey A. Osokin a écrit : > > > > > > Alright, let's keep it as is and update the lang/njs to v0.8.0, the patch > > > is attached, thank you. > > > > with the order of includes: > > -I/usr/local/include -Isrc -Ibuild -I/usr/local/include/libxml2 > > -I/usr/local/include -Injs > > > > that new version fails to build if 0.7.12 happens to be installed. Not a > > big deal but good to know, and usually should be fixed upstream. > > > > i guess patches/patch-external_njs_fs_module_c should be removed, doesnt > > apply anymore > > you remove @CFLAGS@ & @LIBDIR@ from njs.pc.in so at that point.. maybe > > we could/should remove patch-auto_make too and directly set what we want > > (${TRUEPREFIX} ?) in the njs.pc.in file ? all this seems.. convoluted to > > me. > > Not sure what's the latest suggestion means, could you provide a bit more > detail on this, thank you.
the attached patch produces the same njs.pc file here.
? njs-0.8.0.diff Index: Makefile =================================================================== RCS file: /cvs/ports/lang/njs/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- Makefile 17 Jun 2023 03:03:18 -0000 1.2 +++ Makefile 5 Sep 2023 16:39:48 -0000 @@ -2,7 +2,7 @@ GH_ACCOUNT= nginx GH_PROJECT= njs -GH_TAGNAME= 0.7.12 +GH_TAGNAME= 0.8.0 CATEGORIES= lang www @@ -24,6 +24,9 @@ CONFIGURE_STYLE=simple ALL_TARGET= libnjs njs + +post-patch: + ${SUBST_CMD} ${WRKSRC}/src/njs.pc.in do-install: ${INSTALL_PROGRAM} ${WRKDIST}/build/njs ${PREFIX}/bin Index: distinfo =================================================================== RCS file: /cvs/ports/lang/njs/distinfo,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 distinfo --- distinfo 25 May 2023 09:29:24 -0000 1.1.1.1 +++ distinfo 5 Sep 2023 16:39:48 -0000 @@ -1,2 +1,2 @@ -SHA256 (njs-0.7.12.tar.gz) = enWjkCLftY2/RhBTkDoHzEjdSUL32CpGYBgZwbAHdoc= -SIZE (njs-0.7.12.tar.gz) = 662554 +SHA256 (njs-0.8.0.tar.gz) = uYAz//aq3LuOEIuW6AwNlMbiEDvL51hGta4LVgaWCEs= +SIZE (njs-0.8.0.tar.gz) = 715391 Index: patches/patch-auto_make =================================================================== RCS file: patches/patch-auto_make diff -N patches/patch-auto_make --- patches/patch-auto_make 25 May 2023 09:29:24 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,23 +0,0 @@ -should no longer be needed after -https://github.com/nginx/njs/commit/e9d814a0a8c1857f78fdc85ed1461cb9101ebf4e - -Index: auto/make ---- auto/make.orig -+++ auto/make -@@ -320,11 +320,11 @@ cat << END >> $NJS_MAKEFILE - pc: $NJS_BUILD_DIR/njs.pc - - $NJS_BUILD_DIR/njs.pc: $NJS_BUILD_DIR/njs_auto_config.h -- sed -e "s,@PREFIX@,$(pwd)/$NJS_BUILD_DIR," \\ -- -e "s,@LIBDIR@,$(pwd)/$NJS_BUILD_DIR," \\ -- -e "s,@CFLAGS@,-I$(pwd)/$NJS_BUILD_DIR -I$(pwd)/src," \\ -- -e "s,@VERSION@,\$(NJS_VER)," \\ -- -e "s,@EXTRA_LIBS@,-lm $NJS_LIBS $NJS_LIB_AUX_LIBS," \\ -+ sed -e "s|@PREFIX@|$(pwd)/$NJS_BUILD_DIR|" \\ -+ -e "s|@LIBDIR@|$(pwd)/$NJS_BUILD_DIR|" \\ -+ -e "s|@CFLAGS@|-I$(pwd)/$NJS_BUILD_DIR -I$(pwd)/src|" \\ -+ -e "s|@VERSION@|\$(NJS_VER)|" \\ -+ -e "s|@EXTRA_LIBS@|-lm $NJS_LIBS $NJS_LIB_AUX_LIBS|" \\ - src/njs.pc.in > \$@ - END - Index: patches/patch-external_njs_fs_module_c =================================================================== RCS file: patches/patch-external_njs_fs_module_c diff -N patches/patch-external_njs_fs_module_c --- patches/patch-external_njs_fs_module_c 25 May 2023 09:29:24 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -Index: external/njs_fs_module.c ---- external/njs_fs_module.c.orig -+++ external/njs_fs_module.c -@@ -3297,8 +3297,8 @@ njs_fs_to_stat(njs_stat_t *dst, struct stat *st) - dst->st_mtim.tv_nsec = st->st_mtimespec.tv_nsec; - dst->st_ctim.tv_sec = st->st_ctimespec.tv_sec; - dst->st_ctim.tv_nsec = st->st_ctimespec.tv_nsec; -- dst->st_birthtim.tv_sec = st->st_birthtimespec.tv_sec; -- dst->st_birthtim.tv_nsec = st->st_birthtimespec.tv_nsec; -+ dst->st_birthtim.tv_sec = st->__st_birthtimespec.tv_sec; -+ dst->st_birthtim.tv_nsec = st->__st_birthtimespec.tv_nsec; - - #elif (NJS_HAVE_STAT_ATIM) - Index: patches/patch-src_njs.pc.in =================================================================== RCS file: patches/patch-src_njs.pc.in diff -N patches/patch-src_njs.pc.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_njs.pc.in 5 Sep 2023 16:39:48 -0000 @@ -0,0 +1,15 @@ +Index: src/njs.pc.in +--- src/njs.pc.in.orig ++++ src/njs.pc.in +@@ -1,8 +1,8 @@ +-prefix=@PREFIX@ +-libdir=@LIBDIR@ ++prefix=${TRUEPREFIX} ++libdir=${prefix}/lib + + Name: njs + Description: library to embed njs scripting language + Version: @VERSION@ + Libs: -L${libdir} -lnjs @EXTRA_LIBS@ +-Cflags: @CFLAGS@ ++Cflags: -I${prefix}/include