This commit is contained in:
Rmys
2020-02-19 21:31:21 +03:00
parent 8c7ff1d91e
commit c156996efd
17 changed files with 334 additions and 16 deletions
+11 -2
View File
@@ -6,13 +6,17 @@
from pisi.actionsapi import pisitools
from pisi.actionsapi import autotools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
WorkDir = "%s" % get.srcNAME()
def build():
shelltools.cd("%s" % get.workDIR())
shelltools.copytree("unrar", "libunrar")
#changed for version 4.2.4
autotools.make()
autotools.make("-C libunrar lib")
autotools.make("-C unrar -j1")
#autotools.make for older version
# autotools.make('-f makefile.unix \
# CXXFLAGS="%s" \
@@ -21,5 +25,10 @@ def build():
def install():
pisitools.dobin("unrar")
shelltools.cd("%s" % get.workDIR())
shelltools.cd("libunrar")
pisitools.doexe("libunrar.so", "/usr/lib")
pisitools.insinto("/usr/include/unrar", "dll.hpp")
pisitools.dodoc("readme.txt","license.txt")
@@ -0,0 +1,44 @@
Makefile: Fix parallel build issue
If clean runs in parallel with $(OBJECTS), it is possible to build some
objects first, then the clean target fires and deletes some, and then we
try to link and fail.
Gentoo-Bug: https://bugs.gentoo.org/528218
--- a/makefile
+++ b/makefile
@@ -139,23 +139,23 @@ uninstall: uninstall-unrar
clean:
@rm -f *.o *.bak *~
-
-unrar: clean $(OBJECTS) $(UNRAR_OBJ)
@rm -f unrar
+ @rm -f default.sfx
+ @rm -f libunrar.so
+ @rm -f libunrar.a
+
+unrar: $(OBJECTS) $(UNRAR_OBJ)
$(LINK) -o unrar $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS)
$(STRIP) unrar
sfx: WHAT=SFX_MODULE
-sfx: clean $(OBJECTS)
- @rm -f default.sfx
+sfx: $(OBJECTS)
$(LINK) -o default.sfx $(LDFLAGS) $(OBJECTS)
$(STRIP) default.sfx
lib: WHAT=RARDLL
lib: CXXFLAGS+=$(LIBFLAGS)
-lib: clean $(OBJECTS) $(LIB_OBJ)
- @rm -f libunrar.so
- @rm -f libunrar.a
+lib: $(OBJECTS) $(LIB_OBJ)
$(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
$(AR) rcs libunrar.a $(OBJECTS) $(LIB_OBJ)
--
2.13.1
@@ -0,0 +1,46 @@
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
+12 -2
View File
@@ -12,9 +12,10 @@
<IsA>app:console</IsA>
<Summary>RAR decompressor</Summary>
<Description>unrar is a program to decompress RAR archives.</Description>
<Archive sha1sum="f4fa1c4142b497356a3df505e1459c188f646fad" type="targz">http://www.rarlab.com/rar/unrarsrc-5.5.8.tar.gz</Archive>
<Archive sha1sum="6af7fc7a56639e22c982f4469decc519bc73fbad" type="targz">http://www.rarlab.com/rar/unrarsrc-5.9.1.tar.gz</Archive>
<Patches>
<!--Patch level="1">unrar-5.3.4-soname.patch</Patch-->
<Patch level="1">unrar-5.5.5-build.patch</Patch>
<Patch level="1">unrar-5.5.5-honor-flags.patch</Patch>
</Patches>
</Source>
@@ -25,11 +26,20 @@
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="header">/usr/include</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
</Package>
<History>
<Update release="6">
<Date>2020-02-19</Date>
<Version>5.9.1</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="5">
<Date>2018-08-10</Date>
<Version>5.5.8</Version>