unrar-5.5.5-build.patch 938 B

123456789101112131415161718192021222324252627282930313233343536
  1. Makefile: Fix parallel build issue
  2. If clean runs in parallel with $(OBJECTS), it is possible to build some
  3. objects first, then the clean target fires and deletes some, and then we
  4. try to link and fail.
  5. Gentoo-Bug: https://bugs.gentoo.org/528218
  6. --- unrar/makefile
  7. +++ unrar/makefile
  8. @@ -142,21 +142,18 @@
  9. @rm -f $(OBJECTS) $(UNRAR_OBJ) $(LIB_OBJ)
  10. @rm -f unrar libunrar.*
  11. -unrar: clean $(OBJECTS) $(UNRAR_OBJ)
  12. - @rm -f unrar
  13. +unrar: $(OBJECTS) $(UNRAR_OBJ)
  14. $(LINK) -o unrar $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS)
  15. $(STRIP) unrar
  16. sfx: WHAT=SFX_MODULE
  17. -sfx: clean $(OBJECTS)
  18. - @rm -f default.sfx
  19. +sfx: $(OBJECTS)
  20. $(LINK) -o default.sfx $(LDFLAGS) $(OBJECTS)
  21. $(STRIP) default.sfx
  22. lib: WHAT=RARDLL
  23. lib: CXXFLAGS+=$(LIBFLAGS)
  24. -lib: clean $(OBJECTS) $(LIB_OBJ)
  25. - @rm -f libunrar.*
  26. +lib: $(OBJECTS) $(LIB_OBJ)
  27. $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
  28. $(AR) rcs libunrar.a $(OBJECTS) $(LIB_OBJ)