Mail archive
alpine-aports

[alpine-aports] [PATCH] main/unrar: upgrade to 5.3.11

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
Date: Wed, 10 Feb 2016 11:13:47 +0100

Also patch the makefile to make it respect our CXXFLAGS and LDFLAGS
environment variables.
---
 main/unrar/APKBUILD       | 42 +++++++++++++++++++++++++++---------------
 main/unrar/makefile.patch | 26 ++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 15 deletions(-)
 create mode 100644 main/unrar/makefile.patch
diff --git a/main/unrar/APKBUILD b/main/unrar/APKBUILD
index ba32b23..1936205 100644
--- a/main/unrar/APKBUILD
+++ b/main/unrar/APKBUILD
_at_@ -1,34 +1,46 @@
+# Contributor: Sören Tempel <soeren+alpine_at_soeren-tempel.net>
 # Contributor: Carlo Landmeter <clandmeter_at_gmail.com>
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=unrar
-pkgver=5.3.4
+pkgver=5.3.11
 pkgrel=0
 pkgdesc="The RAR uncompression program"
 url="http://www.rarlab.com"
 arch="all"
 license="custom"
-depends=
-makedepends=
+depends=""
+makedepends=""
 subpackages="$pkgname-doc"
-source="http://www.rarlab.com/rar/unrarsrc-$pkgver.tar.gz"
+source="http://www.rarlab.com/rar/unrarsrc-$pkgver.tar.gz
+	makefile.patch"
 
+_builddir="$srcdir"/$pkgname
 prepare() {
-	cd "$srcdir/$pkgname"
-	sed -i 's/-O2/-Os/g' makefile
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
 }
 
 build() {
-	cd "$srcdir/$pkgname"
-	make -f makefile || return 1
+	cd "$_builddir"
+	make CXX="${CXX:-g++}" CXXFLAGS="$CXXFLAGS" \
+		LDFLAGS="$LDFLAGS" STRIP=: -f makefile || return 1
 }
 
 package() {
-	cd "$srcdir/$pkgname"
-	install -Dm755 unrar "$pkgdir"/usr/bin/unrar
-	install -Dm644 license.txt "$pkgdir/usr/share/licenses/$pkgname/license.txt"
-
+	cd "$_builddir"
+	install -Dm755 unrar "$pkgdir"/usr/bin/unrar || return 1
+	install -Dm644 license.txt \
+		"$pkgdir/usr/share/licenses/$pkgname/license.txt" || return 1
 }
 
-md5sums="60afbc74a97eff512a6c42425ec43bbf  unrarsrc-5.3.4.tar.gz"
-sha256sums="ce4767b8532f0866c609ec99a0b4d21a2f6cb8a786b15092ddf608ec4904b874  unrarsrc-5.3.4.tar.gz"
-sha512sums="8f1dab09aa51c2aa877165526838edf0a62fe460d334381aca6eee01a04e46b0093694f4eb75ecf0c0cf5de96cc97339e6dbe0a188aba1e8d2782605d48a6ca7  unrarsrc-5.3.4.tar.gz"
+md5sums="4a29cc1b47ced82db11e06090a95ed51  unrarsrc-5.3.11.tar.gz
+b36d660b20005b83987ce81614b8a600  makefile.patch"
+sha256sums="77b87af4b2976ef7c6b0c79e071284c2c1b035a9543273ec925f9d92f73b8763  unrarsrc-5.3.11.tar.gz
+fdebc5aee7399925d615421807d97d2663c61e7f894518877c0cb938bb4e1c24  makefile.patch"
+sha512sums="14ea833fe4c2d81718df25794d2e795a255f92c68a5533d6a7d2cbfc072db3ce07bba7ba1fd5555aad1a17fbaf4980eb217a7d9f6158461fa917e1a17590569b  unrarsrc-5.3.11.tar.gz
+ba81ae03423f5843e3b3b3503829a067b4925b31b5a7348f6c1244a2c1663ed63f8b1fe8a80daa376c51ac128eb74aa7475bf3e53aa8fc9aac09929127b20e83  makefile.patch"
diff --git a/main/unrar/makefile.patch b/main/unrar/makefile.patch
new file mode 100644
index 0000000..37505f4
--- /dev/null
+++ b/main/unrar/makefile.patch
_at_@ -0,0 +1,26 @@
+diff -upr unrar.orig/makefile unrar/makefile
+--- unrar.orig/makefile	2016-02-10 11:07:37.891117505 +0100
++++ unrar/makefile	2016-02-10 11:08:35.014309799 +0100
+_at_@ -3,11 +3,11 @@
+ 
+ # Linux using GCC
+ CXX=g++
+-CXXFLAGS=-O2
++CXXFLAGS?=-O2
+ LIBFLAGS=-fPIC
+ DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
+ STRIP=strip
+-LDFLAGS=-pthread
++LDFLAGS+=-pthread
+ DESTDIR=/usr
+ 
+ # Linux using LCC
+_at_@ -118,7 +118,7 @@ uninstall:	uninstall-unrar
+ clean:
+ 	_at_rm -f *.o *.bak *~
+ 
+-unrar:	clean $(OBJECTS) $(UNRAR_OBJ)
++unrar:	$(OBJECTS) $(UNRAR_OBJ)
+ 	_at_rm -f unrar
+ 	$(LINK) -o unrar $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS)	
+ 	$(STRIP) unrar
-- 
2.7.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Feb 10 2016 - 11:13:47 GMT