svn commit: r430716 - in head/graphics/comical: . files
Jason E. Hale
jhale at FreeBSD.org
Fri Jan 6 17:01:43 UTC 2017
Author: jhale
Date: Fri Jan 6 17:01:41 2017
New Revision: 430716
URL: https://svnweb.freebsd.org/changeset/ports/430716
Log:
- 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
Added:
head/graphics/comical/files/patch-ComicalIcons_comical.xpm (contents, props changed)
head/graphics/comical/files/patch-src_ComicalApp.cpp (contents, props changed)
head/graphics/comical/files/patch-src_Makefile (contents, props changed)
Modified:
head/graphics/comical/Makefile
head/graphics/comical/files/patch-Makefile
Modified: head/graphics/comical/Makefile
==============================================================================
--- head/graphics/comical/Makefile Fri Jan 6 16:49:12 2017 (r430715)
+++ head/graphics/comical/Makefile Fri Jan 6 17:01:41 2017 (r430716)
@@ -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
-
-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
-
- @${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
-
- @${REINPLACE_CMD} -e 's|gcc|${CC}|; \
- s|CFLAGS=|CFLAGS+=|;' \
- ${WRKSRC}/unzip/Makefile
+MAKE_ENV= WX_CONFIG=${WX_CONFIG}
+INSTALL_TARGET= install-strip
+MAKE_JOBS_UNSAFE= yes
- @${REINPLACE_CMD} -e 's|frame->SetIcon|//frame->SetIcon|' \
- ${WRKSRC}/src/ComicalApp.cpp
+DESKTOP_ENTRIES="Comical" \
+ "Comic Book Viewer" \
+ "${PORTNAME}.png" \
+ "${PORTNAME}" \
+ "Graphics;Viewer;" \
+ false
+
+ICONS= comical.png comical.xpm
+PLIST_FILES= bin/comical \
+ share/pixmaps/comical.png \
+ share/pixmaps/comical.xpm
+
+# '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>
Added: head/graphics/comical/files/patch-ComicalIcons_comical.xpm
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/comical/files/patch-ComicalIcons_comical.xpm Fri Jan 6 17:01:41 2017 (r430716)
@@ -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",
Modified: head/graphics/comical/files/patch-Makefile
==============================================================================
--- head/graphics/comical/files/patch-Makefile Fri Jan 6 16:49:12 2017 (r430715)
+++ head/graphics/comical/files/patch-Makefile Fri Jan 6 17:01:41 2017 (r430716)
@@ -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):
Added: head/graphics/comical/files/patch-src_ComicalApp.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/comical/files/patch-src_ComicalApp.cpp Fri Jan 6 17:01:41 2017 (r430716)
@@ -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.
Added: head/graphics/comical/files/patch-src_Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/comical/files/patch-src_Makefile Fri Jan 6 17:01:41 2017 (r430716)
@@ -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
+
More information about the svn-ports-all
mailing list