devel/sjasmplus: Update to 1.20.2

Update to 1.20.2 and use a local patch to Makefile until
the next update that allows to drop the patch.
This commit is contained in:
Juraj Lutter 2023-02-18 15:30:28 +01:00
parent 457faca4ec
commit e662b8a2a0
4 changed files with 99 additions and 21 deletions

View file

@ -1,6 +1,9 @@
PORTNAME= sjasmplus
PORTVERSION= 1.20.1
DISTVERSION= 1.20.2
CATEGORIES= devel
MASTER_SITES= https://github.com/z00m128/sjasmplus/releases/download/v${DISTVERSION}/
EXTRACT_SUFX= .tar.xz
DISTFILES= ${PORTNAME}-${DISTVERSION}-src${EXTRACT_SUFX}
MAINTAINER= otis@FreeBSD.org
COMMENT= Command-line cross-compiler of assembly language for Z80 CPU
@ -8,12 +11,9 @@ WWW= https://github.com/z00m128/sjasmplus
LICENSE= BSD3CLAUSE
USES= compiler:c++14-lang gmake
USES= compiler:c++14-lang gmake tar:xz
USE_GITHUB= yes
GH_ACCOUNT= z00m128
GH_PROJECT= sjasmplus
GH_TAGNAME= v1.20.1
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
OPTIONS_DEFINE= DOCS EXAMPLES
OPTIONS_DEFAULT= BUNDLED_LUA
@ -25,17 +25,29 @@ BUNDLED_LUA_DESC= Use bundled LUA 5.4
NOLUA_DESC= Do not use LUA
SJLUA_DESC= Which LUA version to use
BUNDLED_LUA_GH_TUPLE= ${_LUA_GH_TUPLE}
BUNDLED_LUA_MAKE_ARGS= USE_BUNDLED_LUA=1
DOCS_BUILD_DEPENDS= xsltproc:textproc/libxslt
BUNDLED_LUA_MAKE_ARGS= USE_BUNDLED_LUA=1 \
USE_LUA=1
DOCS_BUILD_DEPENDS= docbook-xsl-ns>0:textproc/docbook-xsl-ns \
xsltproc:textproc/libxslt
LUA_USES= lua:54
LUA_GH_TUPLE= ${_LUA_GH_TUPLE}
LUA_MAKE_ARGS= USE_BUNDLED_LUA=0
LUA_CPPFLAGS= -I${LUA_INCDIR}
LUA_LDFLAGS= -L${LUA_LIBDIR} -llua-5.4
NOLUA_MAKE_ARGS= USE_LUA=0
LUA_MAKE_ARGS= INCDIR_LUA=${LUA_INCDIR} \
LUA_VER=${LUA_VER} \
USE_BUNDLED_LUA=0 \
USE_LUA=1
LUA_LDFLAGS= -L${LUA_LIBDIR}
NOLUA_MAKE_ARGS= USE_BUNDLED_LUA=0 \
USE_LUA=0
_LUA_GH_TUPLE= vinniefalco:LuaBridge:c882d32b:sjasmplus/LuaBridge
.include <bsd.port.pre.mk>
.if !${PORT_OPTIONS:MNOLUA}
USE_GITHUB= nodefault
GH_TUPLE= vinniefalco:LuaBridge:6580b187:sjasmplus/LuaBridge
.endif
post-patch-DOCS-on:
${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
${WRKSRC}/docs/docbook-xsl-ns-html-customization-freebsd.xsl
post-build-DOCS-on:
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} docs)
@ -54,4 +66,4 @@ do-install-EXAMPLES-on:
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/sjasmplus
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View file

@ -1,5 +1,5 @@
TIMESTAMP = 1659520367
SHA256 (z00m128-sjasmplus-1.20.1-v1.20.1_GH0.tar.gz) = f76f57dee65e75a8b7b5ced9b3241ae97e62f98ee9a0219fa05a6f506e5162d7
SIZE (z00m128-sjasmplus-1.20.1-v1.20.1_GH0.tar.gz) = 1588141
SHA256 (vinniefalco-LuaBridge-c882d32b_GH0.tar.gz) = 73877beb86b30bcac17494be3ce643a89bc09f2645b155c49971605768c71f68
SIZE (vinniefalco-LuaBridge-c882d32b_GH0.tar.gz) = 544744
TIMESTAMP = 1676719682
SHA256 (sjasmplus-1.20.2-src.tar.xz) = 34421abd754639a5add999ef194dbd215aed92ac445eea7981ee46438021870f
SIZE (sjasmplus-1.20.2-src.tar.xz) = 2272400
SHA256 (vinniefalco-LuaBridge-6580b187_GH0.tar.gz) = e48ab46ff42c53e60ff0baddb995b5f8f0cdb8f295eca6999960d68eec107cff
SIZE (vinniefalco-LuaBridge-6580b187_GH0.tar.gz) = 1197086

View file

@ -0,0 +1,53 @@
--- Makefile.orig 2023-02-16 20:39:21 UTC
+++ Makefile
@@ -54,7 +54,8 @@ MEMCHECK?=valgrind --leak-check=yes
EXE_BASE_NAME=sjasmplus
BUILD_DIR=build
-LUA_VER=5.4
+LUA_VER?=5.4
+LUA_LIBNAME=lua-$(LUA_VER)
SUBDIR_BASE=sjasm
SUBDIR_LUA=lua$(LUA_VER)
@@ -63,15 +64,16 @@ SUBDIR_CRC32C=crc32c
SUBDIR_DOCS=docs
SUBDIR_COV=coverage
-INCDIR_LUA=/usr/include/lua$(LUA_VER)
+INCDIR_LUA?=/usr/include/lua$(LUA_VER)
ifeq ($(USE_LUA), 1)
-_LUA_CPPFLAGS=-I$(SUBDIR_LUA)
-endif
-
ifeq ($(USE_BUNDLED_LUA), 0)
_LUA_CPPFLAGS=-I$(INCDIR_LUA)
+LDFLAGS+=-l$(LUA_LIBNAME)
+else
+_LUA_CPPFLAGS=-I$(SUBDIR_LUA)
endif
+endif
# TODO too many lua5.4 warnings: -pedantic removed
CPPFLAGS+=-Wall -DMAX_PATH=PATH_MAX -I$(SUBDIR_CRC32C)
@@ -85,10 +87,6 @@ ifeq ($(USE_LUA), 1)
LDFLAGS+=-ldl
endif
-ifeq ($(USE_BUNDLED_LUA), 0)
-LDFLAGS+=-llua$(LUA_VER)
-endif
-
ifdef DEBUG
BUILD_DIR:=$(BUILD_DIR)/debug
CFLAGS+=-g -O0
@@ -258,7 +256,7 @@ $(SUBDIR_DOCS)/documentation.html: Makefile $(wildcard
--stringparam html.stylesheet docbook.css \
--stringparam generate.toc "book toc" \
-o $(SUBDIR_DOCS)/documentation.html \
- $(SUBDIR_DOCS)/docbook-xsl-ns-html-customization-linux.xsl \
+ $(SUBDIR_DOCS)/docbook-xsl-ns-html-customization-freebsd.xsl \
$(SUBDIR_DOCS)/documentation.xml
clean:

View file

@ -0,0 +1,13 @@
--- docs/docbook-xsl-ns-html-customization-freebsd.xsl.orig 2023-02-18 11:01:11 UTC
+++ docs/docbook-xsl-ns-html-customization-freebsd.xsl
@@ -0,0 +1,10 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- import the original docbook template -->
+<xsl:import href="%%LOCALBASE%%/share/xsl/docbook-ns/html/docbook.xsl"/>
+
+<!-- import the sjasmplus customization -->
+<xsl:import href="docbook-xsl-ns-html-customization.xsl"/>
+
+</xsl:stylesheet>