git: 77ccf3653003 - main - lang/duktape*: Update to 2.7.0

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Mon, 21 Feb 2022 07:25:35 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=77ccf365300399ef0065fb10981e1dabd7a8396a

commit 77ccf365300399ef0065fb10981e1dabd7a8396a
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2022-02-21 06:57:39 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2022-02-21 07:13:52 +0000

    lang/duktape*: Update to 2.7.0
    
    Unfortunately upstream doesn't provide a changelog but its mainly
    a few build bug files and pkgconfig file is now provided by upstream
    See https://github.com/svaarala/duktape/commits/v2.7.0 for more
    information
---
 lang/duktape-lib/Makefile                          | 21 ++++-----
 lang/duktape-lib/distinfo                          |  6 +--
 lang/duktape-lib/files/duktape.pc.in               | 11 -----
 .../duktape-lib/files/patch-Makefile.sharedlibrary | 54 +++++++++++-----------
 lang/duktape/Makefile                              |  5 +-
 lang/duktape/distinfo                              |  6 +--
 lang/duktape/files/patch-Makefile.cmdline          | 11 ++---
 7 files changed, 48 insertions(+), 66 deletions(-)

diff --git a/lang/duktape-lib/Makefile b/lang/duktape-lib/Makefile
index f6c64344e4e6..3ba6a02e3055 100644
--- a/lang/duktape-lib/Makefile
+++ b/lang/duktape-lib/Makefile
@@ -1,8 +1,8 @@
 PORTNAME=	duktape
-DISTVERSION=	2.6.0
-PORTREVISION=	1
+DISTVERSION=	2.7.0
 CATEGORIES=	lang devel
-MASTER_SITES=	https://duktape.org/
+MASTER_SITES=	https://github.com/svaarala/${PORTNAME}/releases/download/v${DISTVERSION}/ \
+		https://duktape.org/
 PKGNAMESUFFIX=	-lib
 
 MAINTAINER=	ports@FreeBSD.org
@@ -16,8 +16,8 @@ USE_LDCONFIG=	yes
 
 MAKEFILE=	Makefile.sharedlibrary
 
-MAJOR=	206
-MINOR=	20600
+MAJOR=	207
+MINOR=	20700
 
 PLIST_FILES=	include/duk_config.h \
 		include/duktape.h \
@@ -26,17 +26,12 @@ PLIST_FILES=	include/duk_config.h \
 		lib/libduktape.so.${MAJOR}.${MINOR} \
 		libdata/pkgconfig/duktape.pc
 
-SUB_FILES=	duktape.pc
-SUB_LIST=	PORTVERSION=${DISTVERSION} \
-		DESCRIPTION="${COMMENT}" \
-		URL="${MASTER_SITES}"
-
 do-install:
-	${INSTALL_DATA} ${WRKSRC}/src/duktape.h ${STAGEDIR}${PREFIX}/include
-	${INSTALL_DATA} ${WRKSRC}/src/duk_config.h ${STAGEDIR}${PREFIX}/include
+	${INSTALL_DATA} ${WRKSRC}/duktape.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig
 	${INSTALL_LIB} ${WRKSRC}/libduktape.so.${MAJOR}.${MINOR} ${STAGEDIR}${PREFIX}/lib
 	${RLN} ${STAGEDIR}${PREFIX}/lib/libduktape.so.${MAJOR}.${MINOR} ${STAGEDIR}${PREFIX}/lib/libduktape.so
 	${RLN} ${STAGEDIR}${PREFIX}/lib/libduktape.so.${MAJOR}.${MINOR} ${STAGEDIR}${PREFIX}/lib/libduktape.so.${MAJOR}
-	${INSTALL_DATA} ${WRKDIR}/duktape.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig
+	${INSTALL_DATA} ${WRKSRC}/src/duk_config.h ${STAGEDIR}${PREFIX}/include
+	${INSTALL_DATA} ${WRKSRC}/src/duktape.h ${STAGEDIR}${PREFIX}/include
 
 .include <bsd.port.mk>
diff --git a/lang/duktape-lib/distinfo b/lang/duktape-lib/distinfo
index 4b672e7583c7..eb3f2e6232a3 100644
--- a/lang/duktape-lib/distinfo
+++ b/lang/duktape-lib/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1602747604
-SHA256 (duktape-2.6.0.tar.xz) = 96f4a05a6c84590e53b18c59bb776aaba80a205afbbd92b82be609ba7fe75fa7
-SIZE (duktape-2.6.0.tar.xz) = 1035160
+TIMESTAMP = 1645321077
+SHA256 (duktape-2.7.0.tar.xz) = 90f8d2fa8b5567c6899830ddef2c03f3c27960b11aca222fa17aa7ac613c2890
+SIZE (duktape-2.7.0.tar.xz) = 1026524
diff --git a/lang/duktape-lib/files/duktape.pc.in b/lang/duktape-lib/files/duktape.pc.in
deleted file mode 100644
index bcdb0329a6cd..000000000000
--- a/lang/duktape-lib/files/duktape.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=%%PREFIX%%
-exec_prefix=%%PREFIX%%
-libdir=%%PREFIX%%/lib
-includedir=%%PREFIX%%/include
-
-Name: duktape
-Description: %%DESCRIPTION%%
-URL: %%URL%%
-Version: %%PORTVERSION%%
-Libs: -L${libdir} -lduktape
-Cflags: -I${includedir}
diff --git a/lang/duktape-lib/files/patch-Makefile.sharedlibrary b/lang/duktape-lib/files/patch-Makefile.sharedlibrary
index 66f9296e0c53..782b81298bdc 100644
--- a/lang/duktape-lib/files/patch-Makefile.sharedlibrary
+++ b/lang/duktape-lib/files/patch-Makefile.sharedlibrary
@@ -1,47 +1,45 @@
---- Makefile.sharedlibrary.orig	2020-10-12 22:23:10 UTC
+--- Makefile.sharedlibrary.orig	2022-02-20 01:42:54 UTC
 +++ Makefile.sharedlibrary
-@@ -52,22 +52,20 @@ INSTALL_PREFIX = /usr/local
- DUKTAPE_SRCDIR = ./src
- #DUKTAPE_SRCDIR = ./src-noline
+@@ -63,19 +63,19 @@ CC ?= gcc
+ CC := $(CC)
  
--CC = gcc
--
  .PHONY: all
--all: libduktape.$(SO_REALNAME_SUFFIX) libduktaped.$(SO_REALNAME_SUFFIX)
-+all: libduktape.$(SO_REALNAME_SUFFIX)
+-all: libduktape.$(SO_REALNAME_SUFFIX) libduktaped.$(SO_REALNAME_SUFFIX) duktape.pc
++all: libduktape.$(SO_REALNAME_SUFFIX) duktape.pc
  
  # If the default duk_config.h is not suitable for the distribution, modify it
  # before compiling the shared library and copy the same, edited duk_config.h
  # to $INSTALL_PREFIX/include on installation.
  
  libduktape.$(SO_REALNAME_SUFFIX):
--	$(CC) -shared -fPIC -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktape.$(SO_SONAME_SUFFIX) \
-+	$(CC) -shared -fPIC -Wall -Wextra ${CFLAGS} -Wl,$(LD_SONAME_ARG),libduktape.$(SO_SONAME_SUFFIX) \
+-	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktape.$(SO_SONAME_SUFFIX) \
++	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC -Wall -Wextra -Wl,$(LD_SONAME_ARG),libduktape.$(SO_SONAME_SUFFIX) \
  		-o $@ $(DUKTAPE_SRCDIR)/duktape.c
  
 -libduktaped.$(SO_REALNAME_SUFFIX):
--	$(CC) -shared -fPIC -g -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktaped.$(SO_SONAME_SUFFIX) \
+-	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC -g -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktaped.$(SO_SONAME_SUFFIX) \
 -		-o $@ $(DUKTAPE_SRCDIR)/duktape.c
 +#libduktaped.$(SO_REALNAME_SUFFIX):
-+#	$(CC) -shared -fPIC -g -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktaped.$(SO_SONAME_SUFFIX) \
++#	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC -g -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktaped.$(SO_SONAME_SUFFIX) \
 +#		-o $@ $(DUKTAPE_SRCDIR)/duktape.c
  
- # Symlinks depend on platform conventions.
- .PHONY: install
-@@ -77,12 +75,12 @@ install: libduktape.$(SO_REALNAME_SUFFIX) libduktaped.
- 	rm -f $(INSTALL_PREFIX)/lib/libduktape.so $(INSTALL_PREFIX)/lib/libduktape.$(SO_SONAME_SUFFIX)
- 	ln -s libduktape.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktape.so
- 	ln -s libduktape.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktape.$(SO_SONAME_SUFFIX)
--	rm -f $(INSTALL_PREFIX)/lib/libduktaped.so $(INSTALL_PREFIX)/lib/libduktaped.$(SO_SONAME_SUFFIX)
--	ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktaped.so
--	ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktaped.$(SO_SONAME_SUFFIX)
-+#	rm -f $(INSTALL_PREFIX)/lib/libduktaped.so $(INSTALL_PREFIX)/lib/libduktaped.$(SO_SONAME_SUFFIX)
-+#	ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktaped.so
-+#	ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(INSTALL_PREFIX)/lib/libduktaped.$(SO_SONAME_SUFFIX)
- 	mkdir -p $(INSTALL_PREFIX)/include/
- 	cp $(DUKTAPE_SRCDIR)/duktape.h $(DUKTAPE_SRCDIR)/duk_config.h $(INSTALL_PREFIX)/include/
+ duktape.pc:
+ 	sed -e "s|@PREFIX@|$(INSTALL_PREFIX)|" \
+@@ -92,13 +92,13 @@ install: libduktape.$(SO_REALNAME_SUFFIX) libduktaped.
+ 	rm -f $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktape.so $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktape.$(SO_SONAME_SUFFIX)
+ 	ln -s libduktape.$(SO_REALNAME_SUFFIX) $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktape.so
+ 	ln -s libduktape.$(SO_REALNAME_SUFFIX) $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktape.$(SO_SONAME_SUFFIX)
+-	rm -f $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktaped.so $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktaped.$(SO_SONAME_SUFFIX)
+-	ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktaped.so
+-	ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktaped.$(SO_SONAME_SUFFIX)
++#	rm -f $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktaped.so $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktaped.$(SO_SONAME_SUFFIX)
++#	ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktaped.so
++#	ln -s libduktaped.$(SO_REALNAME_SUFFIX) $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/libduktaped.$(SO_SONAME_SUFFIX)
+ 	mv $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/duktape.pc $(DESTDIR)$(INSTALL_PREFIX)$(LIBDIR)/pkgconfig/
+ 	mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/include/
+ 	cp $(DUKTAPE_SRCDIR)/duktape.h $(DUKTAPE_SRCDIR)/duk_config.h $(DESTDIR)$(INSTALL_PREFIX)/include/
  
  CCOPTS = -I./examples/cmdline
  duk:
--	$(CC) $(CCOPTS) -I$(INSTALL_PREFIX)/include -L$(INSTALL_PREFIX)/lib -Wall -Wextra -Os -o $@ ./examples/cmdline/duk_cmdline.c -lduktape -lm
-+	$(CC) $(CCOPTS) -I$(INSTALL_PREFIX)/include -L$(INSTALL_PREFIX)/lib -Wall -Wextra ${CFLAGS} -o $@ ./examples/cmdline/duk_cmdline.c -lduktape -lm
+-	$(CC) $(CCOPTS) -I$(INSTALL_PREFIX)/include -L$(INSTALL_PREFIX)$(LIBDIR) -Wall -Wextra -Os -o $@ ./examples/cmdline/duk_cmdline.c -lduktape -lm
++	$(CC) $(CCOPTS) -I$(INSTALL_PREFIX)/include -L$(INSTALL_PREFIX)$(LIBDIR) -Wall -Wextra -o $@ ./examples/cmdline/duk_cmdline.c -lduktape -lm
diff --git a/lang/duktape/Makefile b/lang/duktape/Makefile
index de63a5497274..2d8b4fc32fd9 100644
--- a/lang/duktape/Makefile
+++ b/lang/duktape/Makefile
@@ -1,7 +1,8 @@
 PORTNAME=	duktape
-DISTVERSION=	2.6.0
+DISTVERSION=	2.7.0
 CATEGORIES=	lang devel
-MASTER_SITES=	https://duktape.org/
+MASTER_SITES=	https://github.com/svaarala/${PORTNAME}/releases/download/v${DISTVERSION}/ \
+		https://duktape.org/
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Embeddable Javascript engine
diff --git a/lang/duktape/distinfo b/lang/duktape/distinfo
index 7d207db902cf..0bb79c2e9481 100644
--- a/lang/duktape/distinfo
+++ b/lang/duktape/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1602737106
-SHA256 (duktape-2.6.0.tar.xz) = 96f4a05a6c84590e53b18c59bb776aaba80a205afbbd92b82be609ba7fe75fa7
-SIZE (duktape-2.6.0.tar.xz) = 1035160
+TIMESTAMP = 1645322288
+SHA256 (duktape-2.7.0.tar.xz) = 90f8d2fa8b5567c6899830ddef2c03f3c27960b11aca222fa17aa7ac613c2890
+SIZE (duktape-2.7.0.tar.xz) = 1026524
diff --git a/lang/duktape/files/patch-Makefile.cmdline b/lang/duktape/files/patch-Makefile.cmdline
index 3fcd00ca8287..00ce1e485b0d 100644
--- a/lang/duktape/files/patch-Makefile.cmdline
+++ b/lang/duktape/files/patch-Makefile.cmdline
@@ -1,12 +1,11 @@
---- Makefile.cmdline.orig	2020-10-12 22:23:10 UTC
+--- Makefile.cmdline.orig	2022-02-18 21:22:19 UTC
 +++ Makefile.cmdline
-@@ -8,8 +8,7 @@ DUKTAPE_SOURCES = src/duktape.c
- CMDLINE_SOURCES = \
- 	examples/cmdline/duk_cmdline.c
+@@ -10,7 +10,7 @@ CMDLINE_SOURCES = \
  
--CC = gcc
+ CC ?= gcc
+ CC := $(CC)
 -CCOPTS = -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer
-+CCOPTS = ${CFLAGS} -pedantic -Wall -fstrict-aliasing -fomit-frame-pointer
++CCOPTS = -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer
  CCOPTS += -I./examples/cmdline -I./src   # duktape.h and duk_config.h must be in include path
  CCLIBS = -lm