summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/comical/files/comical-0.8-syslibs.patch')
-rw-r--r--media-gfx/comical/files/comical-0.8-syslibs.patch91
1 files changed, 91 insertions, 0 deletions
diff --git a/media-gfx/comical/files/comical-0.8-syslibs.patch b/media-gfx/comical/files/comical-0.8-syslibs.patch
new file mode 100644
index 000000000000..e831bc82c4a7
--- /dev/null
+++ b/media-gfx/comical/files/comical-0.8-syslibs.patch
@@ -0,0 +1,91 @@
+Use system libminizip (zlib) wrt http://bugs.gentoo.org/407269.
+Use system libunrar. Use CXX and CXXFLAGS instead of CC and CFLAGS for g++.
+Stop using passing libraries from LDFLAGS and use LDLIBS instead.
+
+--- Makefile
++++ Makefile
+@@ -1,5 +1,5 @@
+-CC = `wx-config --cxx`
+-LDFLAGS = `wx-config --libs` -Lunrar -lunrar -Lunzip -lminiunzip
++CXX ?= `wx-config --cxx`
++LDLIBS = `wx-config --libs` -lunrar `pkg-config --libs minizip`
+ INSTALL = install
+ INSTALL_PROGRAM = $(INSTALL)
+ prefix = /usr/local
+@@ -12,18 +12,12 @@
+
+ all: comical
+
+-comical: $(OBJS) unrar/libunrar.a unzip/libminiunzip.a
+- $(CC) -o $@ $(OBJS) $(LDFLAGS)
++comical: $(OBJS)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) -o $@ $(OBJS) $(LDLIBS)
+
+ $(OBJS):
+ $(MAKE) -C src
+
+-unrar/libunrar.a:
+- $(MAKE) lib -C unrar -f makefile.linux
+-
+-unzip/libminiunzip.a:
+- $(MAKE) -C unzip
+-
+ install: comical
+ $(INSTALL_PROGRAM) comical $(DESTDIR)$(bindir)/comical
+
+@@ -39,8 +33,6 @@
+
+ distclean:
+ $(MAKE) clean
+- $(MAKE) clean -C unrar -f makefile.linux
+- $(MAKE) clean -C unzip
+ rm -f $(DEPS) bin2h src/bin2h.o
+
+ .PHONY : install install-strip uninstall clean distclean
+--- src/ComicBookRAR.h
++++ src/ComicBookRAR.h
+@@ -29,7 +29,7 @@
+ #define _ComicBookRAR_h_
+
+ #include "ComicBook.h"
+-#include "dll.hpp"
++#include <dll.hpp>
+
+ class ComicBookRAR : public ComicBook {
+
+--- src/ComicBookZIP.cpp
++++ src/ComicBookZIP.cpp
+@@ -27,7 +27,7 @@
+
+ #include "ComicBookZIP.h"
+ #include <wx/mstream.h>
+-#include "unzip.h"
++#include <unzip.h>
+ #include "Exceptions.h"
+ #include <cstring>
+ #include <errno.h>
+--- src/Makefile
++++ src/Makefile
+@@ -1,6 +1,5 @@
+-INCLUDE = -I../unrar -I../unzip
+-CFLAGS = -O2 -Wall -pipe
+-CPPFLAGS = `wx-config --cxxflags` $(CFLAGS) -D_UNIX $(INCLUDE)
++CXXFLAGS += -Wall `wx-config --cxxflags` `pkg-config --cflags minizip` -I/usr/include/libunrar
++CPPFLAGS += -D_UNIX $(CXXFLAGS)
+
+ .SUFFIXES: .cpp .png .h .d .o
+
+@@ -21,11 +20,11 @@
+ @echo -e "};\n\n#endif" >> $@
+
+ %.o : %.cpp
+- $(CC) $(CPPFLAGS) -c -o $*.o $<
++ $(CXX) $(CPPFLAGS) -c -o $*.o $<
+
+ %.d : %.cpp
+ @set -e; rm -f $@; \
+- $(CC) -MM -MG $(CPPFLAGS) -MT '$*.o' $< > $@.$$$$; \
++ $(CXX) -MM -MG $(CPPFLAGS) -MT '$*.o' $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+