forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unrar-5.5.5-honor-flags.patch
46 lines (37 loc) · 1.18 KB
/
unrar-5.5.5-honor-flags.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Makefile: Honor {LD,CXX}FLAGS, add LIBFLAGS
- append -pthread to LDFLAGS instead of replacing them
- use CXXFLAGS when linking
- append LIBFLAGS to the individual targets instead of the final link
Gentoo-Bug: https://bugs.gentoo.org/461806
--- a/makefile
+++ b/makefile
@@ -8,7 +8,7 @@ LIBFLAGS=-fPIC
DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
STRIP=strip
AR=ar
-LDFLAGS=-pthread
+LDFLAGS+=-pthread
DESTDIR=/usr
# Linux using LCC
@@ -145,18 +145,19 @@ clean:
@rm -f libunrar.a
unrar: $(OBJECTS) $(UNRAR_OBJ)
- $(LINK) -o unrar $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS)
+ $(LINK) -o unrar $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS)
$(STRIP) unrar
sfx: WHAT=SFX_MODULE
sfx: $(OBJECTS)
- $(LINK) -o default.sfx $(LDFLAGS) $(OBJECTS)
+ $(LINK) -o default.sfx $(CXXFLAGS) $(LDFLAGS) $(OBJECTS)
$(STRIP) default.sfx
+$(OBJECTS) $(LIB_OBJ): CXXFLAGS+=$(LIBFLAGS)
+
lib: WHAT=RARDLL
-lib: CXXFLAGS+=$(LIBFLAGS)
lib: $(OBJECTS) $(LIB_OBJ)
- $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
+ $(LINK) -shared -o libunrar.so $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
$(AR) rcs libunrar.a $(OBJECTS) $(LIB_OBJ)
install-unrar:
--
2.13.1