[packages/mujs] - fixed shared patch to actually build library from libtool object file; -fPIC is now handled by lib
qboosh
qboosh at pld-linux.org
Fri Jul 16 22:05:07 CEST 2021
commit 805dc612e36b42fac2639a335f78df21d4ad6a93
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Jul 16 22:08:24 2021 +0200
- fixed shared patch to actually build library from libtool object file; -fPIC is now handled by libtool
mujs-shared.patch | 21 +++++++++++----------
mujs.spec | 2 +-
2 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/mujs.spec b/mujs.spec
index 38ee98b..640e5e2 100644
--- a/mujs.spec
+++ b/mujs.spec
@@ -52,7 +52,7 @@ Statyczna biblioteka MuJS.
%build
%{__make} \
CC="%{__cc}" \
- CFLAGS="%{rpmcflags} %{rpmcppflags} -std=c99 -Wall -Wextra -Wno-unused-parameter -Wunreachable-code -fPIC" \
+ CFLAGS="%{rpmcflags} %{rpmcppflags} -std=c99 -Wall -Wextra -Wno-unused-parameter -Wunreachable-code" \
LDFLAGS="%{rpmldflags}" \
libdir=%{_libdir}
diff --git a/mujs-shared.patch b/mujs-shared.patch
index a4b66ad..24ac955 100644
--- a/mujs-shared.patch
+++ b/mujs-shared.patch
@@ -1,6 +1,6 @@
---- mujs-1.0.7/Makefile.orig 2020-03-17 14:10:18.000000000 +0100
-+++ mujs-1.0.7/Makefile 2020-05-10 15:47:59.561908525 +0200
-@@ -16,6 +16,8 @@
+--- mujs-1.1.3/Makefile.orig 2021-06-08 13:41:51.000000000 +0200
++++ mujs-1.1.3/Makefile 2021-07-16 21:24:29.059361193 +0200
+@@ -18,6 +18,8 @@ endif
# Compiler flags for various configurations:
CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
@@ -9,7 +9,7 @@
ifeq "$(CC)" "clang"
CFLAGS += -Wunreachable-code
-@@ -52,7 +54,7 @@
+@@ -55,7 +57,7 @@ HDRS := $(wildcard js*.h mujs.h utf.h re
default: shell
shell: $(OUT)/mujs $(OUT)/mujs-pp
static: $(OUT)/libmujs.a
@@ -18,20 +18,20 @@
astnames.h: jsparse.h
grep -E '(AST|EXP|STM)_' jsparse.h | sed 's/^[^A-Z]*\(AST_\)*/"/;s/,.*/",/' | tr A-Z a-z > $@
-@@ -77,13 +79,14 @@
+@@ -80,13 +82,15 @@ $(OUT)/libmujs.a: $(OUT)/libmujs.o
@ mkdir -p $(dir $@)
$(AR) cr $@ $^
-$(OUT)/libmujs.so: one.c $(HDRS)
-- @ mkdir -p $(dir $@)
++$(OUT)/libmujs.lo: one.c $(HDRS)
+ @ mkdir -p $(dir $@)
- $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -shared $(LDFLAGS) -o $@ $< -lm
-+$(OUT)/%.lo: one.c $(HDRS)
+ $(LTCC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
-$(OUT)/mujs: $(OUT)/libmujs.o $(OUT)/main.o
- @ mkdir -p $(dir $@)
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBREADLINE) -lm
-+$(OUT)/libmujs.la: $(OUT)/libmujs.o
++$(OUT)/libmujs.la: $(OUT)/libmujs.lo
+ $(LTLINK) $(LDFLAGS) -o $@ $^ -rpath $(libdir) -lm
+
+$(OUT)/mujs: $(OUT)/libmujs.la $(OUT)/main.o
@@ -39,7 +39,8 @@
$(OUT)/mujs-pp: $(OUT)/libmujs.o $(OUT)/pp.o
@ mkdir -p $(dir $@)
-@@ -115,9 +118,10 @@
+@@ -117,10 +121,11 @@ install-common: $(OUT)/mujs $(OUT)/mujs.
+ install-static: install-common $(OUT)/libmujs.a
install -m 644 $(OUT)/libmujs.a $(DESTDIR)$(libdir)
-install-shared: install-common $(OUT)/libmujs.so
@@ -49,7 +50,7 @@
+ libtool --mode=install install $(OUT)/mujs $(DESTDIR)$(bindir)
-install: install-static
-+install: install-static install-shared
++install: install-shared
uninstall:
rm -f $(DESTDIR)$(bindir)/mujs
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mujs.git/commitdiff/805dc612e36b42fac2639a335f78df21d4ad6a93
More information about the pld-cvs-commit
mailing list