- Use archivers/minizip from ports instead of bundled version
- Use archivers/libunrar5 instead of old archivers/libunrar - Fix and install icons - Add .desktop file - Convert ugly REINPLACE_CMDs to patches - Remove a bunch of useless warnings
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= comical
|
||||
PORTVERSION= 0.8
|
||||
PORTREVISION= 9
|
||||
PORTREVISION= 10
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= SF
|
||||
|
||||
@@ -13,39 +13,34 @@ COMMENT= Sequential image viewer
|
||||
LICENSE= GPLv2+
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
LIB_DEPENDS= libunrar.so:archivers/libunrar
|
||||
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
LIB_DEPENDS= libminizip.so:archivers/minizip \
|
||||
libunrar.so.5:archivers/libunrar5
|
||||
|
||||
USES= gmake
|
||||
USE_WX= 2.8+
|
||||
|
||||
PLIST_FILES= bin/comical
|
||||
MAKE_ENV= WX_CONFIG=${WX_CONFIG}
|
||||
INSTALL_TARGET= install-strip
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
|
||||
s|\`wx-config --cxx\`|${CXX}|; \
|
||||
s|wx-config|${WX_CONFIG}|; \
|
||||
s|unrar/libunrar.a u|u|; \
|
||||
s|-lunrar|-L${LOCALBASE}/lib -lunrar|;' \
|
||||
${WRKSRC}/Makefile
|
||||
DESKTOP_ENTRIES="Comical" \
|
||||
"Comic Book Viewer" \
|
||||
"${PORTNAME}.png" \
|
||||
"${PORTNAME}" \
|
||||
"Graphics;Viewer;" \
|
||||
false
|
||||
|
||||
@${REINPLACE_CMD} -e 's|wx-config|${WX_CONFIG}|; \
|
||||
s|-D_UNIX|-D_UNIX -DwxUSE_UNICODE|; \
|
||||
s|CFLAGS =|CFLAGS=${CFLAGS} |; \
|
||||
s|CPPFLAGS =|CPPFLAGS=${CXXFLAGS} |; \
|
||||
s|$$(CC)|${CXX}|; \
|
||||
s|-I../unrar|-I${LOCALBASE}/include/libunrar3|;' \
|
||||
${WRKSRC}/src/Makefile
|
||||
ICONS= comical.png comical.xpm
|
||||
PLIST_FILES= bin/comical \
|
||||
share/pixmaps/comical.png \
|
||||
share/pixmaps/comical.xpm
|
||||
|
||||
@${REINPLACE_CMD} -e 's|gcc|${CC}|; \
|
||||
s|CFLAGS=|CFLAGS+=|;' \
|
||||
${WRKSRC}/unzip/Makefile
|
||||
|
||||
@${REINPLACE_CMD} -e 's|frame->SetIcon|//frame->SetIcon|' \
|
||||
${WRKSRC}/src/ComicalApp.cpp
|
||||
# 'make makepatch' doesn't like dirs with spaces
|
||||
pre-patch:
|
||||
@${MV} ${WRKSRC}/Comical\ Icons ${WRKSRC}/ComicalIcons
|
||||
|
||||
post-install:
|
||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
||||
cd ${WRKSRC}/ComicalIcons && \
|
||||
${INSTALL_DATA} ${ICONS} ${STAGEDIR}${PREFIX}/share/pixmaps
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
14
graphics/comical/files/patch-ComicalIcons_comical.xpm
Normal file
14
graphics/comical/files/patch-ComicalIcons_comical.xpm
Normal file
@@ -0,0 +1,14 @@
|
||||
Avoid a boatload of warnings like this:
|
||||
In file included from ComicalApp.cpp:34:
|
||||
./../Comical Icons/comical.xpm:3:1: warning: conversion from string literal to 'char *'
|
||||
is deprecated [-Wc++11-compat-deprecated-writable-strings]
|
||||
|
||||
--- ComicalIcons/comical.xpm.orig 2017-01-06 15:58:55 UTC
|
||||
+++ ComicalIcons/comical.xpm
|
||||
@@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
-static char *comical_xpm[]={
|
||||
+static const char *comical_xpm[]={
|
||||
"128 128 131 2",
|
||||
"Qt c None",
|
||||
".8 c #080000",
|
||||
@@ -1,9 +1,23 @@
|
||||
--- Makefile.orig 2006-03-05 03:27:10.000000000 +0000
|
||||
--- Makefile.orig 2006-03-05 03:27:10 UTC
|
||||
+++ Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
CC = `wx-config --cxx`
|
||||
@@ -1,8 +1,8 @@
|
||||
-CC = `wx-config --cxx`
|
||||
-LDFLAGS = `wx-config --libs` -Lunrar -lunrar -Lunzip -lminiunzip
|
||||
+LDFLAGS = `wx-config --libs` -Lunrar -lunrar -Lunzip -lminiunzip -lz
|
||||
+CC = ${CXX}
|
||||
+LDFLAGS += `${WX_CONFIG} --libs` -L${LOCALBASE}/lib -lunrar -lminizip -lz
|
||||
INSTALL = install
|
||||
INSTALL_PROGRAM = $(INSTALL)
|
||||
prefix = /usr/local
|
||||
-prefix = /usr/local
|
||||
+prefix = ${PREFIX}
|
||||
exec_prefix = $(prefix)
|
||||
bindir = $(exec_prefix)/bin
|
||||
|
||||
@@ -12,7 +12,7 @@ OBJS = $(patsubst %.cpp,%.o,$(wildcard s
|
||||
|
||||
all: comical
|
||||
|
||||
-comical: $(OBJS) unrar/libunrar.a unzip/libminiunzip.a
|
||||
+comical: $(OBJS)
|
||||
$(CC) -o $@ $(OBJS) $(LDFLAGS)
|
||||
|
||||
$(OBJS):
|
||||
|
||||
14
graphics/comical/files/patch-src_ComicalApp.cpp
Normal file
14
graphics/comical/files/patch-src_ComicalApp.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
Add missing header and adjust location of icons
|
||||
|
||||
--- src/ComicalApp.cpp.orig 2006-03-03 04:23:15 UTC
|
||||
+++ src/ComicalApp.cpp
|
||||
@@ -30,7 +30,8 @@
|
||||
#include <wx/log.h>
|
||||
|
||||
#if !defined(__WXMAC__) && !defined(__WXCOCOA__) && !defined(__WXMSW__) && !defined(__WXPM__)
|
||||
-#include "../Comical Icons/comical.xpm"
|
||||
+#include <wx/icon.h>
|
||||
+#include "../ComicalIcons/comical.xpm"
|
||||
#endif
|
||||
|
||||
// Create a new application object.
|
||||
12
graphics/comical/files/patch-src_Makefile
Normal file
12
graphics/comical/files/patch-src_Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
--- src/Makefile.orig 2006-03-05 03:27:10 UTC
|
||||
+++ src/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
-INCLUDE = -I../unrar -I../unzip
|
||||
-CFLAGS = -O2 -Wall -pipe
|
||||
-CPPFLAGS = `wx-config --cxxflags` $(CFLAGS) -D_UNIX $(INCLUDE)
|
||||
+INCLUDE = -I${LOCALBASE}/include/libunrar5 -I${LOCALBASE}/include/minizip
|
||||
+CFLAGS += -Wall -Wno-unused-local-typedef -pipe ${CXXFLAGS}
|
||||
+CPPFLAGS += `${WX_CONFIG} --cxxflags` $(CFLAGS) -D_UNIX -DwxUSE_UNICODE $(INCLUDE)
|
||||
|
||||
.SUFFIXES: .cpp .png .h .d .o
|
||||
|
||||
Reference in New Issue
Block a user