The update itself is straightforward and all tests are passing.
However, upstream added three more man pages (for a total of four now)
which would get shipped in all of four fennel flavors (lua5[1-3]).

Now, this is practice works, i.e. even if you have installed all the
flavors `man fennel-api' works and since all the manpages are
identical it's not really important if mandoc chooses fennel-5.1-api
or fennel-5.4-api.

However, I disliked to ship the same set of man pages four times, so
here's an attempt to move them to a -docs subpackage.  (thanks sthen@
for pointing me at www/squid)

Note that RUN_DEPENDS-docs is needed otherwise (via lua.port.mk and
global RUN_DEPENDS) it ends up depending on lang/lua,${FLAVOR} and
that will break subsequent build (the plist register the deps on one
flavor, when building the next one the plist would differ)

However, I'm not sure I'm overthinking it and just rename the three
new manpages to fennel-${V}-XYZ instead of doing a subpackage would be
preferred.


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/lang/fennel/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile    26 Dec 2022 11:05:59 -0000      1.2
+++ Makefile    18 Sep 2023 15:52:07 -0000
@@ -1,8 +1,16 @@
-COMMENT =      Lisp dialect that runs on Lua ${MODLUA_VERSION}
+COMMENT-main = Lisp dialect that runs on Lua ${MODLUA_VERSION}
+COMMENT-docs = Documentation for fennel
 
-V =            1.2.1
+V =            1.3.1
 PKGNAME =      fennel-$V
-FULLPKGNAME =  fennel-${FLAVOR}-${V}
+FULLPKGPATH-main =     lang/fennel,-main,${FLAVOR}
+FULLPKGNAME-main =     fennel-${FLAVOR}-${V}
+
+# -docs isn't flavoured, so overwrite its default name/path
+FULLPKGNAME-docs = fennel-docs-$V
+FULLPKGPATH-docs = ${PKGPATH},-docs
+RUN_DEPENDS-main+= lang/fennel,-docs
+RUN_DEPENDS-docs =
 
 CATEGORIES =   lang
 
@@ -13,7 +21,9 @@ MAINTAINER =  Omar Polo <o...@openbsd.org>
 # MIT
 PERMIT_PACKAGE = Yes
 
-MASTER_SITES = https://git.sr.ht/~technomancy/fennel/archive/
+MULTI_PACKAGES = -main -docs
+
+SITES =                https://git.sr.ht/~technomancy/fennel/archive/
 
 DISTFILES =    fennel-{}$V${EXTRACT_SUFX}
 
@@ -29,13 +39,13 @@ ALL_TARGET =        build
 MAKE_FLAGS +=  LUA=${MODLUA_BIN} \
                LUA_VERSION=${MODLUA_VERSION} \
                LUA_LIB_DIR=${MODLUA_LIBDIR}
-FAKE_FLAGS +=  PREFIX=${TRUEPREFIX}
+FAKE_FLAGS +=  PREFIX=${TRUEPREFIX} \
+               MAN_DIR=${PREFIX}
 
 WRKDIST =      ${WRKDIR}/${PKGNAME}
 
 post-install:
        chmod +x ${PREFIX}/bin/fennel
        cd ${PREFIX}/bin && mv fennel fennel-${MODLUA_VERSION}
-       cd ${PREFIX}/man/man1 && mv fennel.1 fennel-${MODLUA_VERSION}.1
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/lang/fennel/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo    24 Dec 2022 08:57:07 -0000      1.1.1.1
+++ distinfo    18 Sep 2023 11:20:49 -0000
@@ -1,2 +1,2 @@
-SHA256 (fennel-1.2.1.tar.gz) = ZlSq23ZZu/iNOHkZA5JXPhrjkIfqr1CE6V9F246CrVE=
-SIZE (fennel-1.2.1.tar.gz) = 271590
+SHA256 (fennel-1.3.1.tar.gz) = gz2Qt+me3Uh0A/Uf38PLsmO/lltyqRS7u7AVbGEy1GU=
+SIZE (fennel-1.3.1.tar.gz) = 293564
Index: pkg/DESCR
===================================================================
RCS file: pkg/DESCR
diff -N pkg/DESCR
--- pkg/DESCR   24 Dec 2022 08:57:07 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-Fennel is a programming language that brings together the speed,
-simplicity, and reach of Lua with the flexibility of a lisp syntax and
-macro system.
-
- - Full Lua compatibility: Easily call any Lua function or library from
-   Fennel and vice-versa.
-
- - Zero overhead: Compiled code should be just as efficient as
-   hand-written Lua.
-
- - Compile-time macros: Ship compiled code with no runtime dependency on
-   Fennel.
-
- - Embeddable: Fennel is a one-file library as well as an executable.
-   Embed it in other programs to support runtime extensibility and
-   interactive development.
Index: pkg/DESCR-docs
===================================================================
RCS file: pkg/DESCR-docs
diff -N pkg/DESCR-docs
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-docs      19 Sep 2023 08:09:09 -0000
@@ -0,0 +1 @@
+Manual pages for fennel.
Index: pkg/DESCR-main
===================================================================
RCS file: pkg/DESCR-main
diff -N pkg/DESCR-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-main      24 Dec 2022 08:57:07 -0000
@@ -0,0 +1,16 @@
+Fennel is a programming language that brings together the speed,
+simplicity, and reach of Lua with the flexibility of a lisp syntax and
+macro system.
+
+ - Full Lua compatibility: Easily call any Lua function or library from
+   Fennel and vice-versa.
+
+ - Zero overhead: Compiled code should be just as efficient as
+   hand-written Lua.
+
+ - Compile-time macros: Ship compiled code with no runtime dependency on
+   Fennel.
+
+ - Embeddable: Fennel is a one-file library as well as an executable.
+   Embed it in other programs to support runtime extensibility and
+   interactive development.
Index: pkg/PLIST
===================================================================
RCS file: pkg/PLIST
diff -N pkg/PLIST
--- pkg/PLIST   24 Dec 2022 08:57:07 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-bin/fennel-${MODLUA_VERSION}
-lib/lua/${MODLUA_VERSION}/fennel.lua
-@man man/man1/fennel-${MODLUA_VERSION}.1
Index: pkg/PLIST-docs
===================================================================
RCS file: pkg/PLIST-docs
diff -N pkg/PLIST-docs
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-docs      18 Sep 2023 13:12:25 -0000
@@ -0,0 +1,4 @@
+@man man/man1/fennel.1
+@man man/man3/fennel-api.3
+@man man/man5/fennel-reference.5
+@man man/man7/fennel-tutorial.7
Index: pkg/PLIST-main
===================================================================
RCS file: pkg/PLIST-main
diff -N pkg/PLIST-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-main      18 Sep 2023 15:37:07 -0000
@@ -0,0 +1,3 @@
+@pkgpath lang/fennel
+bin/fennel-${MODLUA_VERSION}
+lib/lua/${MODLUA_VERSION}/fennel.lua
Index: patches/patch-test_irc_lua
===================================================================
RCS file: patches/patch-test_irc_lua
diff -N patches/patch-test_irc_lua
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-test_irc_lua  19 Sep 2023 08:09:24 -0000
@@ -0,0 +1,15 @@
+don't run git during the regress suite.
+
+Index: test/irc.lua
+--- test/irc.lua.orig
++++ test/irc.lua
+@@ -5,8 +5,7 @@ local url = os.getenv("JOB_URL") or "???"
+ local origin_job_prefix = 'https://builds.sr.ht/technomancy/job/'
+ local is_origin = url:sub(1, #origin_job_prefix) == origin_job_prefix
+ 
+-local branch = io.popen("git rev-parse --abbrev-ref HEAD"):read('*a')
+-local is_main = branch == 'main'
++local is_main = false
+ 
+ -- This may fail in future if libera chat once again blocks builds.sr.ht
+ -- from connecting; it currently works after we asked them to look into it

Reply via email to