packages/utils/unrar/patches/100-makefile_fixes.patch
Rosen Penev 68ab6919fd
unrar: Update to 5.7.3
Added -fno-rtti and -nodefaultlibs for slightly smaller size.

Also added LTO for a close to 25kb size reduction.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-04-05 18:24:33 -07:00

33 lines
729 B
Diff

--- a/makefile
+++ b/makefile
@@ -2,14 +2,14 @@
# Makefile for UNIX - unrar
# Linux using GCC
-CXX=c++
-CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
-LIBFLAGS=-fPIC
+CXX?=c++
+CXXFLAGS?=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
+LIBFLAGS?=-fPIC
DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
-STRIP=strip
-AR=ar
-LDFLAGS=-pthread
-DESTDIR=/usr
+STRIP?=strip
+AR?=ar
+LDFLAGS?=-lpthread
+DESTDIR?=/usr
# Linux using LCC
#CXX=lcc
@@ -166,7 +166,7 @@ uninstall-unrar:
rm -f $(DESTDIR)/bin/unrar
install-lib:
- install libunrar.so $(DESTDIR)/lib
+ install -D libunrar.so $(DESTDIR)/lib/libunrar.so
install libunrar.a $(DESTDIR)/lib
uninstall-lib: