aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackbuilds.org>2013-11-17 12:12:53 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2013-11-17 12:35:07 +0700
commitf27aa31d974f311c1762c02b2ca81c60dd524d54 (patch)
tree4a336b34a8fc9ba0d2dceca497abdcdb620a1531 /system
parent3fbb359086fec9ed73ea33ccbd6f9d19b36620e9 (diff)
system/unrar: Rework to make rar2fs buildable
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/unrar/unrar-5.0.13-soname.patch11
-rw-r--r--system/unrar/unrar.SlackBuild13
2 files changed, 23 insertions, 1 deletions
diff --git a/system/unrar/unrar-5.0.13-soname.patch b/system/unrar/unrar-5.0.13-soname.patch
new file mode 100644
index 0000000000000..24d250a51d030
--- /dev/null
+++ b/system/unrar/unrar-5.0.13-soname.patch
@@ -0,0 +1,11 @@
+--- a/makefile 2013-04-29 16:27:05.000000000 +0200
++++ b/makefile 2013-10-01 22:07:29.611485989 +0200
+@@ -133,7 +133,7 @@
+ lib: CXXFLAGS+=$(LIBFLAGS)
+ lib: clean $(OBJECTS) $(LIB_OBJ)
+ @rm -f libunrar.so
+- $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
++ $(LINK) -shared -Wl,-soname,libunrar.so.$(libversion) -o libunrar.so.$(libversion) $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
+
+ install-unrar:
+ install -D unrar $(DESTDIR)/bin/unrar
diff --git a/system/unrar/unrar.SlackBuild b/system/unrar/unrar.SlackBuild
index 7391a49e5deaf..80ecca65c94ef 100644
--- a/system/unrar/unrar.SlackBuild
+++ b/system/unrar/unrar.SlackBuild
@@ -69,10 +69,21 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/unrar-5.0.13-soname.patch
+cp -a $TMP/$PRGNAM/ $TMP/libunrar
+
+make -C $TMP/libunrar lib libversion=$VERSION CXXFLAGS="$SLKCFLAGS"
make CXXFLAGS="$SLKCFLAGS" -f makefile unrar lib
install -D -m 755 unrar $PKG/usr/bin/unrar
-install -D -m 644 libunrar.so $PKG/usr/lib${LIBDIRSUFFIX}/libunrar.so
+install -D -m 755 $TMP/libunrar/libunrar.so.$VERSION $PKG/usr/lib${LIBDIRSUFFIX}/libunrar.so.$VERSION
+install -D -m 644 dll.hpp "$PKG/usr/include/unrar/dll.hpp"
+
+(
+ cd /usr/lib${LIBDIRSUFFIX}
+ ln -s libunrar.so.$VERSION $PKG/usr/lib${LIBDIRSUFFIX}/libunrar.so
+ ln -s libunrar.so.$VERSION $PKG/usr/lib${LIBDIRSUFFIX}/libunrar.so.5
+)
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true