Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (e3c4187994dd9a1b54e238d57130efa263c4ae08)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (e3c4187994dd9a1b54e238d57130efa263c4ae08)
  • Date: Fri, 18 Mar 2022 18:59:53 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

ChangeLog |
1
devel/mujs/BUILD |
5
devel/mujs/DEPENDS |
1
devel/mujs/DETAILS |
26 +++++
devel/mujs/HISTORY |
2
devel/mujs/INSTALL |
1
devel/mujs/PRE_BUILD |
3
devel/mujs/patches/0001-Compute-VERSION-using-Make.patch |
26 +++++
devel/mujs/patches/0002-Use-D-instead-of-dir.patch |
51 ++++++++++
devel/mujs/patches/0003-Enable-choice-of-library-version-for-shell.patch |
40 +++++++
10 files changed, 156 insertions(+)

New commits:
commit e3c4187994dd9a1b54e238d57130efa263c4ae08
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

mujs: new spell, embeddable lightweight Javascript interpreter

diff --git a/ChangeLog b/ChangeLog
index 4d10b5f..1ee83d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2022-03-18 Ismael Luceno <ismael AT sourcemage.org>
* graphics-libs/zimg: new spell, Scaling, colorspace conversion,
and dithering library
+ * devel/mujs: new spell, embeddable lightweight Javascript
interpreter

2022-03-17 Pavel Vinogradov <public AT sourcemage.org>
* gnu.gpg: added new key, 7A75A648B3F9220C:
diff --git a/devel/mujs/BUILD b/devel/mujs/BUILD
new file mode 100755
index 0000000..8a053fd
--- /dev/null
+++ b/devel/mujs/BUILD
@@ -0,0 +1,5 @@
+cat <<-EOF >user.make &&
+ libmujs=libmujs.so
+ prefix="$INSTALL_ROOT"/usr
+EOF
+default_build_make
diff --git a/devel/mujs/DEPENDS b/devel/mujs/DEPENDS
new file mode 100755
index 0000000..965a081
--- /dev/null
+++ b/devel/mujs/DEPENDS
@@ -0,0 +1 @@
+depends readline
diff --git a/devel/mujs/DETAILS b/devel/mujs/DETAILS
new file mode 100755
index 0000000..0a9f327
--- /dev/null
+++ b/devel/mujs/DETAILS
@@ -0,0 +1,26 @@
+ SPELL=mujs
+ VERSION=1.2.0
+ SOURCE="$SPELL-$VERSION.tar.xz"
+ SOURCE_URL[0]="https://mujs.com/downloads/$SOURCE";
+
SOURCE_HASH=sha512:04cc246091bf878aadfa2382ef46c8c42cd04924d9459558016f27474ae3ebca7fc7a0fda7b4efee1bd668b8b051030a2e1f9f40722cb547700c7f84857f4071
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+ WEB_SITE="https://mujs.com/";
+ LICENSE[0]="ISC"
+ ENTERED=20220318
+ KEYWORDS=""
+ SHORT="embeddable lightweight Javascript interpreter"
+cat << EOF
+MuJS is a lightweight Javascript interpreter designed for embedding in other
+software to extend them with scripting capabilities.
+
+MuJS was designed with a focus on small size, correctness, and simplicity. It
+is written in portable C and implements ECMAScript as specified by
+ECMA-262. The interface for binding with native code is designed to be as
+simple as possible to use, and is very similar to Lua. There is no need to
+interact with byzantine C++ template mechanisms, or worry about marking and
+unmarking garbage collection roots, or wrestle with obscure build systems.
+
+MuJS is developed and maintained by Artifex Software. It was originally
+developed for use with the MuPDF viewer, but is designed to be useful as an
+independent component.
+EOF
diff --git a/devel/mujs/HISTORY b/devel/mujs/HISTORY
new file mode 100644
index 0000000..d12d7f4
--- /dev/null
+++ b/devel/mujs/HISTORY
@@ -0,0 +1,2 @@
+2022-03-18 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, DEPENDS, DETAILS, INSTALL, PRE_BUILD, patches/*: spell
created
diff --git a/devel/mujs/INSTALL b/devel/mujs/INSTALL
new file mode 100755
index 0000000..9379fad
--- /dev/null
+++ b/devel/mujs/INSTALL
@@ -0,0 +1 @@
+make install-shared
diff --git a/devel/mujs/PRE_BUILD b/devel/mujs/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/devel/mujs/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/devel/mujs/patches/0001-Compute-VERSION-using-Make.patch
b/devel/mujs/patches/0001-Compute-VERSION-using-Make.patch
new file mode 100644
index 0000000..4fe3578
--- /dev/null
+++ b/devel/mujs/patches/0001-Compute-VERSION-using-Make.patch
@@ -0,0 +1,26 @@
+From 0a1a39a3ceb6d813005b0b16314fd3f3d008139a Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Fri, 18 Mar 2022 17:58:32 +0100
+Subject: [PATCH 1/3] Compute VERSION using Make
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index e3767161e8ad..eb6e99d6124c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -12,7 +12,7 @@ libdir ?= $(prefix)/lib
+ ifeq "$(wildcard .git)" ".git"
+ VERSION := $(shell git describe --tags --always)
+ else
+- VERSION := $(shell basename $$PWD | sed -e s,^mujs-,,)
++ VERSION := $(patsubst mujs-%,%,$(notdir $(CURDIR)))
+ endif
+
+ ifeq ($(shell uname),Darwin)
+--
+2.35.1
+
diff --git a/devel/mujs/patches/0002-Use-D-instead-of-dir.patch
b/devel/mujs/patches/0002-Use-D-instead-of-dir.patch
new file mode 100644
index 0000000..4072f45
--- /dev/null
+++ b/devel/mujs/patches/0002-Use-D-instead-of-dir.patch
@@ -0,0 +1,51 @@
+From c24501d2c139ff8e4fceb51e961e24c7848be0ec Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Fri, 18 Mar 2022 18:04:53 +0100
+Subject: [PATCH 2/3] Use $(@D) instead of $(dir $@)
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ Makefile | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb6e99d6124c..2d6fb959b6b2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -75,27 +75,27 @@ one.c: $(SRCS)
+ jsdump.c: astnames.h opnames.h
+
+ $(OUT)/%.o: %.c $(HDRS)
+- @ mkdir -p $(dir $@)
++ @ mkdir -p $(@D)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
+
+ $(OUT)/libmujs.o: one.c $(HDRS)
+- @ mkdir -p $(dir $@)
++ @ mkdir -p $(@D)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
+
+ $(OUT)/libmujs.a: $(OUT)/libmujs.o
+- @ mkdir -p $(dir $@)
++ @ mkdir -p $(@D)
+ $(AR) cr $@ $^
+
+ $(OUT)/libmujs.$(SO_EXT): one.c $(HDRS)
+- @ mkdir -p $(dir $@)
++ @ mkdir -p $(@D)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -shared $(LDFLAGS) -o $@ $< -lm
+
+ $(OUT)/mujs: $(OUT)/libmujs.o $(OUT)/main.o
+- @ mkdir -p $(dir $@)
++ @ mkdir -p $(@D)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBREADLINE) -lm
+
+ $(OUT)/mujs-pp: $(OUT)/libmujs.o $(OUT)/pp.o
+- @ mkdir -p $(dir $@)
++ @ mkdir -p $(@D)
+ $(CC) $(LDFLAGS) -o $@ $^ -lm
+
+ .PHONY: $(OUT)/mujs.pc
+--
+2.35.1
+
diff --git
a/devel/mujs/patches/0003-Enable-choice-of-library-version-for-shell.patch
b/devel/mujs/patches/0003-Enable-choice-of-library-version-for-shell.patch
new file mode 100644
index 0000000..c30f933
--- /dev/null
+++ b/devel/mujs/patches/0003-Enable-choice-of-library-version-for-shell.patch
@@ -0,0 +1,40 @@
+From bcca489771f5c91286d661eb5c26e586a15f7cdb Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Fri, 18 Mar 2022 18:51:28 +0100
+Subject: [PATCH 3/3] Enable choice of library version for shell
+
+Default behavior is unchanged, but enables to choose the dynamic version by
+passing "libmujs=libmujs.so" to make.
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ Makefile | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2d6fb959b6b2..c026325fdb7b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -90,13 +90,15 @@ $(OUT)/libmujs.$(SO_EXT): one.c $(HDRS)
+ @ mkdir -p $(@D)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -shared $(LDFLAGS) -o $@ $< -lm
+
+-$(OUT)/mujs: $(OUT)/libmujs.o $(OUT)/main.o
++libmujs ?= libmujs.a
++
++$(OUT)/mujs: $(OUT)/main.o $(OUT)/$(libmujs)
+ @ mkdir -p $(@D)
+- $(CC) $(LDFLAGS) -o $@ $^ $(LIBREADLINE) -lm
++ $(CC) $(LDFLAGS) -o $@ $< -L$(OUT) -l:$(libmujs) $(LIBREADLINE) -lm
+
+-$(OUT)/mujs-pp: $(OUT)/libmujs.o $(OUT)/pp.o
++$(OUT)/mujs-pp: $(OUT)/pp.o $(OUT)/$(libmujs)
+ @ mkdir -p $(@D)
+- $(CC) $(LDFLAGS) -o $@ $^ -lm
++ $(CC) $(LDFLAGS) -o $@ $< -L$(OUT) -l:$(libmujs) -lm
+
+ .PHONY: $(OUT)/mujs.pc
+ $(OUT)/mujs.pc:
+--
+2.35.1
+



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (e3c4187994dd9a1b54e238d57130efa263c4ae08), Ismael Luceno, 03/18/2022

Archive powered by MHonArc 2.6.24.

Top of Page