From 70cb6b8098336908999540cf427eaec26a9a8064 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Fri, 14 Sep 2018 08:23:23 -0300 Subject: [PATCH] mozjs60: fix linking against libmozjs-60 --- common/shlibs | 1 - srcpkgs/mozjs60/patches/fix-soname-lib.patch | 30 ++++++++++++++++++++ srcpkgs/mozjs60/template | 5 +--- 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/mozjs60/patches/fix-soname-lib.patch diff --git a/common/shlibs b/common/shlibs index d3a44794c0a..c9d97336a7a 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3397,7 +3397,6 @@ libmaxminddb.so.0 libmaxminddb-1.3.2_1 libmysqlpp.so mysql++-3.2.4_1 libKF5Syndication.so.5 syndication-18.08.0_1 liblqr-1.so.0 liblqr-0.4.2_1 -libmozjs-60.so mozjs60-60.0.2_1 libmozjs-60.so.0 mozjs60-60.0.2_1 libgtksourceview-4.so.0 gtksourceview4-4.0.2_1 libwx_gtk3u_propgrid-3.0.so.0 wxWidgets-gtk3-3.0.4_1 diff --git a/srcpkgs/mozjs60/patches/fix-soname-lib.patch b/srcpkgs/mozjs60/patches/fix-soname-lib.patch new file mode 100644 index 00000000000..b9147fa20c9 --- /dev/null +++ b/srcpkgs/mozjs60/patches/fix-soname-lib.patch @@ -0,0 +1,30 @@ +Source: Arch Linux +Upstream: Unknown +Reason: fixes linking against libmozjs-60 + +diff --git i/js/src/build/Makefile.in w/js/src/build/Makefile.in +index ee19104e0ef5..a0f06fd35a18 100644 +--- i/js/src/build/Makefile.in ++++ w/js/src/build/Makefile.in +@@ -89,6 +89,8 @@ ifneq (,$(REAL_LIBRARY)) + endif + ifneq (,$(SHARED_LIBRARY)) + $(SYSINSTALL) $(SHARED_LIBRARY) $(DESTDIR)$(libdir) ++ mv -f $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).0 ++ ln -s $(SHARED_LIBRARY).0 $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) + ifeq ($(OS_ARCH),Darwin) + install_name_tool -id $(abspath $(libdir)/$(SHARED_LIBRARY)) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) + endif +diff --git i/js/src/build/moz.build w/js/src/build/moz.build +index a7f5fa4ce8eb..726687c13fb0 100644 +--- i/js/src/build/moz.build ++++ w/js/src/build/moz.build +@@ -23,6 +23,7 @@ if not CONFIG['JS_STANDALONE']: + if CONFIG['JS_SHARED_LIBRARY']: + GeckoSharedLibrary('js', linkage=None) + SHARED_LIBRARY_NAME = CONFIG['JS_LIBRARY_NAME'] ++ LDFLAGS += ['-Wl,-soname,lib{}.so.0'.format(SHARED_LIBRARY_NAME)] + else: + Library('js') + + diff --git a/srcpkgs/mozjs60/template b/srcpkgs/mozjs60/template index f340d38b233..89506f72ac6 100644 --- a/srcpkgs/mozjs60/template +++ b/srcpkgs/mozjs60/template @@ -1,7 +1,7 @@ # Template file for 'mozjs60' pkgname=mozjs60 version=60.0.2 -revision=3 +revision=4 wrksrc="firefox-${version}" build_wrksrc=js/src build_style=gnu-configure @@ -46,9 +46,6 @@ do_check() { } post_install() { - mv $DESTDIR/usr/lib/libmozjs-60.so $DESTDIR/usr/lib/libmozjs-60.so.0 - ln -sr $DESTDIR/usr/lib/libmozjs-60.so.0 $DESTDIR/usr/lib/libmozjs-60.so - # temp fix for mozjs60 not installing headers into the right place mkdir $DESTDIR/usr/include/mozjs-60 mv $DESTDIR/usr/include/{double-conversion,js,mozilla,*.h} $DESTDIR/usr/include/mozjs-60/