diff --git a/common/shlibs b/common/shlibs index ab4de933304..b98f88ab32f 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2823,3 +2823,4 @@ libbrotlidec.so.0.6.0 brotli-0.6.0_1 libbrotlienc.so.0.6.0 brotli-0.6.0_1 libfilteraudio.so filter_audio-0.0.1_1 libarmadillo.so.7 armadillo-7.800.2_1 +libduktape.so.201 duktape-2.1.1_1 diff --git a/srcpkgs/duktape-devel b/srcpkgs/duktape-devel new file mode 120000 index 00000000000..f61acddb0e5 --- /dev/null +++ b/srcpkgs/duktape-devel @@ -0,0 +1 @@ +duktape \ No newline at end of file diff --git a/srcpkgs/duktape/patches/makefile.patch b/srcpkgs/duktape/patches/makefile.patch new file mode 100644 index 00000000000..b22bbb54267 --- /dev/null +++ b/srcpkgs/duktape/patches/makefile.patch @@ -0,0 +1,17 @@ +# Fix hardcoded compiler / -Os in the makefile... +--- Makefile.sharedlibrary 2017-01-26 11:56:36.000000000 -0800 ++++ Makefile.sharedlibrary.new 2017-04-15 15:57:34.679605829 -0700 +@@ -44,11 +44,11 @@ + # to $INSTALL_PREFIX/include on installation. + + libduktape.so.$(REAL_VERSION): +- gcc -shared -fPIC -Wall -Wextra -Os -Wl,-soname,libduktape.so.$(SONAME_VERSION) \ ++ $(CC) -shared -fPIC -Wall -Wextra $(CFLAGS) -Wl,-soname,libduktape.so.$(SONAME_VERSION) \ + -o $@ $(DUKTAPE_SRCDIR)/duktape.c + + libduktaped.so.$(REAL_VERSION): +- gcc -shared -fPIC -g -Wall -Wextra -Os -Wl,-soname,libduktaped.so.$(SONAME_VERSION) \ ++ $(CC) -shared -fPIC -g -Wall -Wextra $(CFLAGS) -Wl,-soname,libduktaped.so.$(SONAME_VERSION) \ + -o $@ $(DUKTAPE_SRCDIR)/duktape.c + + # Symlinks depend on platform conventions. diff --git a/srcpkgs/duktape/template b/srcpkgs/duktape/template new file mode 100644 index 00000000000..f0b69db2ced --- /dev/null +++ b/srcpkgs/duktape/template @@ -0,0 +1,36 @@ +# Template file for 'duktape' +pkgname=duktape +version=2.1.1 +revision=1 +build_style=gnu-makefile +make_build_args="-f Makefile.sharedlibrary" +make_install_args="-f Makefile.sharedlibrary INSTALL_PREFIX=\${DESTDIR}/usr" +short_desc="Embeddable JavaScript engine" +maintainer="Christopher Brannon " +license="MIT" +homepage="http://duktape.org" +distfiles="https://github.com/svaarala/${pkgname}/releases/download/v${version}/${pkgname}-${version}.tar.xz" +checksum=6a58e5e8d8c7e3e638cd6e5b91be3bcaa4c89778d3892054a36052ae043dd11e + +pre_install() { + vmkdir /usr/lib + vmkdir /usr/include +} + +post_install() { + vlicense LICENSE.txt + # Two libraries were installed, one with debugging symbols, one + # without. Maybe that makes sense on a distro without debug + # splitting, but not on Void. Replace libduktape. + cd "${DESTDIR}/usr/lib" + rm libduktaped.* +} + +duktape-devel_package() { + depends="${makedepends} duktape>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove "usr/include" + vmove "usr/lib/*.so" + } +}