ports/173314: [PATCH] graphics/comix: OptionsNG, changed Makefile, pkg-descr, pkg-plist, take maintainership

nemysis nemysis at gmx.ch
Sat Nov 3 01:00:00 UTC 2012


>Number:         173314
>Category:       ports
>Synopsis:       [PATCH] graphics/comix: OptionsNG, changed Makefile, pkg-descr, pkg-plist, take maintainership
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 03 01:00:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     nemysis
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD_Ports 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC
>Description:

- Take maintainership

Removed file(s):
- files/patch-install.py

Makefile changed:
+LICENSE=	GPLv2
+PORTDOCS=	ChangeLog README
+OPTIONS_DEFINE=	THUMBNAILS NLS
+THUMBNAILS_DESC=Enable graphic thumbnails
+.include <bsd.port.options.mk>
+.if ${PORT_OPTIONS:Mnautilus2} || ${PORT_OPTIONS:MTHUMBNAILS}
+.if ${PORT_OPTIONS:MNLS}
+do-build:

Changed and refined:
 post-extract:
 do-install:
pkg-descr
pkg-plist

Generated and tested manually, tested with port test and with RedPorts (all RELEASES, CLANG), sent with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)
>How-To-Repeat:

portlint -A
WARN: Makefile: [79]: possible direct use of command "install" found. use ${INSTALL_foobaa} instead.
WARN: Makefile: [85]: possible direct use of command "install" found. use ${INSTALL_foobaa} instead.
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: new ports should not set PORTREVISION.
0 fatal errors and 4 warnings found.

WARN: Makefile: [79] and [85] because is used
 		${PYTHON_CMD} install.py install --dir ${PREFIX})
 		${PYTHON_CMD} install.py install \

port test: clean

Build log

https://redports.org/buildarchive/20121102204323-47965/

>Fix:

--- comix-4.0.4_5.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/graphics/comix/Makefile ./Makefile
--- /usr/ports/graphics/comix/Makefile	2012-07-28 17:57:55.000000000 +0200
+++ ./Makefile	2012-11-03 01:40:06.000000000 +0100
@@ -8,30 +8,37 @@
 
 PORTNAME=	comix
 PORTVERSION=	4.0.4
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	graphics
-MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
+MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}/
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	nemysis at gmx.ch
 COMMENT=	GTK2 comic book viewer for .cbz, .cbr, and .cbt files
 
-RUN_DEPENDS=	unrar:${PORTSDIR}/archivers/unrar \
-		${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \
-		${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3
+LICENSE=	GPLv2
+
+BUILD_DEPENDS=	update-mime-database:${PORTSDIR}/misc/shared-mime-info
+RUN_DEPENDS=	update-mime-database:${PORTSDIR}/misc/shared-mime-info \
+		unrar:${PORTSDIR}/archivers/unrar \
+		unzip:${PORTSDIR}/archivers/unzip \
+		${PYTHON_PKGNAMEPREFIX}imaging>0:${PORTSDIR}/graphics/py-imaging \
+		${PYTHON_PKGNAMEPREFIX}sqlite3>=0:${PORTSDIR}/databases/py-sqlite3
 
-NO_BUILD=	yes
 USE_GNOME=	desktopfileutils pygtk2
 WANT_GNOME=	yes
 USE_PYTHON=	yes
-USE_GETTEXT=	yes
 INSTALLS_ICONS=	yes
 
-DOCS=		COPYING ChangeLog README
+PORTDOCS=	ChangeLog README
 MAN1=		comix.1
 
+OPTIONS_DEFINE=	THUMBNAILS NLS
+THUMBNAILS_DESC=Enable graphic thumbnails
+
 .include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
-.if (${HAVE_GNOME:Mnautilus2}!="" || defined(WITH_THUMBNAILS)) && !defined(WITHOUT_THUMBNAILS)
+.if ${PORT_OPTIONS:Mnautilus2} || ${PORT_OPTIONS:MTHUMBNAILS}
 USE_GNOME+=	gnomehier gconf2
 MAN1+=		comicthumb.1
 GCONF_SCHEMAS=	comicbook.schemas
@@ -41,39 +48,52 @@
 PLIST_SUB+=	THUMBNAILS:="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MNLS}
+USE_GETTEXT=	yes
+PLIST_SUB+=	NLS=""
+.else
+PLIST_SUB+=	NLS="@comment "
+.endif
+
 post-extract:
 	@${FIND} ${WRKSRC} -name \*.gz | ${XARGS} ${GUNZIP_CMD}
-	@${RM} -f ${WRKSRC}/src/*.pyc
 
 post-patch:
-	@${REINPLACE_CMD} -e "s|share/man|man|g ; s|1.gz|1|g ; \
-		s|%%GCONF_CONFIG_SOURCE%%|${GCONF_CONFIG_SOURCE}|g" \
-			${WRKSRC}/install.py
-	@${REINPLACE_CMD} -e "s|\[base,.*\]:|\[base, '/usr/local'\]:|g" \
-		${WRKSRC}/src/about.py ${WRKSRC}/src/icons.py
+	@${REINPLACE_CMD} -e 's|share/man|man|g' \
+	-e 's|1.gz|1|g' \
+	-e 's|$$(gconftool-2 --get-default-source)|$${GCONF_CONFIG_SOURCE}|' \
+		${WRKSRC}/install.py
+.if !${PORT_OPTIONS:MNLS}
+	@${REINPLACE_CMD} -i '' '/for lang in TRANSLATIONS/,/'LC_MESSAGES')/s/^/#/' ${WRKSRC}/install.py
+.endif
+	@${FIND} ${WRKSRC} -name "*.bak" -delete
+
+do-build:
+	@${PYTHON_CMD} -m compileall ${WRKSRC}/src
+	@${PYTHON_CMD} -O -m compileall ${WRKSRC}/src
 
 do-install:
-.if defined(THUMBNAILS_ENABLED)
-	@${MKDIR} ${PREFIX}/share/mime/packages
+.if ${PORT_OPTIONS:MTHUMBNAILS}
+	${MKDIR} ${PREFIX}/share/mime/packages
 	@(cd ${WRKSRC} ; \
 		${PYTHON_CMD} install.py install --dir ${PREFIX})
-	@${MKDIR} ${PREFIX}/etc/gconf/schemas
-	@${INSTALL_DATA} ${WRKSRC}/mime/comicbook.schemas \
+	${MKDIR} ${PREFIX}/etc/gconf/schemas
+	${INSTALL_DATA} ${WRKSRC}/mime/comicbook.schemas \
 		${PREFIX}/etc/gconf/schemas/
 .else
 	@(cd ${WRKSRC} ; \
 		${PYTHON_CMD} install.py install \
 			--dir ${PREFIX} --no-mime)
 .endif
+	${INSTALL_DATA} ${WRKSRC}/src/comix.pyc ${DATADIR}/src
 
 post-install:
-	@-update-desktop-database
-.ifndef (NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-.for i in ${DOCS}
-	@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
-.endfor
+	- at update-desktop-database
+	${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png ${PREFIX}/share/pixmaps
+
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
 .endif
-	@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${DATADIR}/src
 
 .include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/graphics/comix/files/patch-install.py ./files/patch-install.py
--- /usr/ports/graphics/comix/files/patch-install.py	2008-12-15 23:05:44.000000000 +0100
+++ ./files/patch-install.py	1970-01-01 01:00:00.000000000 +0100
@@ -1,82 +0,0 @@
---- install.py.orig	2008-12-15 15:55:31.000000000 -0600
-+++ install.py	2008-12-15 16:00:04.000000000 -0600
-@@ -35,70 +35,38 @@
- 
- # Files to be installed, as (source file, destination directory)
- FILES = (('src/about.py', 'share/comix/src'),
--         ('src/about.pyc', 'share/comix/src'),
-          ('src/archive.py', 'share/comix/src'),
--         ('src/archive.pyc', 'share/comix/src'),
-          ('src/bookmark.py', 'share/comix/src'),
--         ('src/bookmark.pyc', 'share/comix/src'),
-          ('src/comix.py', 'share/comix/src'),
-          ('src/comment.py', 'share/comix/src'),
--         ('src/comment.pyc', 'share/comix/src'),
-          ('src/constants.py', 'share/comix/src'),
--         ('src/constants.pyc', 'share/comix/src'),
-          ('src/cursor.py', 'share/comix/src'),
--         ('src/cursor.pyc', 'share/comix/src'),
-          ('src/deprecated.py', 'share/comix/src'),
--         ('src/deprecated.pyc', 'share/comix/src'),
-          ('src/edit.py', 'share/comix/src'),
--         ('src/edit.pyc', 'share/comix/src'),
-          ('src/encoding.py', 'share/comix/src'),
--         ('src/encoding.pyc', 'share/comix/src'),
-          ('src/enhance.py', 'share/comix/src'),
--         ('src/enhance.pyc', 'share/comix/src'),
-          ('src/event.py', 'share/comix/src'),
--         ('src/event.pyc', 'share/comix/src'),
-          ('src/filechooser.py', 'share/comix/src'),
--         ('src/filechooser.pyc', 'share/comix/src'),
-          ('src/filehandler.py', 'share/comix/src'),
--         ('src/filehandler.pyc', 'share/comix/src'),
-          ('src/histogram.py', 'share/comix/src'),
--         ('src/histogram.pyc', 'share/comix/src'),
-          ('src/icons.py', 'share/comix/src'),
--         ('src/icons.pyc', 'share/comix/src'),
-          ('src/image.py', 'share/comix/src'),
--         ('src/image.pyc', 'share/comix/src'),
-          ('src/labels.py', 'share/comix/src'),
--         ('src/labels.pyc', 'share/comix/src'),
-          ('src/lens.py', 'share/comix/src'),
--         ('src/lens.pyc', 'share/comix/src'),
-          ('src/library.py', 'share/comix/src'),
--         ('src/library.pyc', 'share/comix/src'),
-          ('src/librarybackend.py', 'share/comix/src'),
--         ('src/librarybackend.pyc', 'share/comix/src'),
-          ('src/main.py', 'share/comix/src'),
--         ('src/main.pyc', 'share/comix/src'),
-          ('src/portability.py', 'share/comix/src'),
--         ('src/portability.pyc', 'share/comix/src'),
-          ('src/preferences.py', 'share/comix/src'),
--         ('src/preferences.pyc', 'share/comix/src'),
-          ('src/process.py', 'share/comix/src'),
--         ('src/process.pyc', 'share/comix/src'),
-          ('src/properties.py', 'share/comix/src'),
--         ('src/properties.pyc', 'share/comix/src'),
-          ('src/recent.py', 'share/comix/src'),
--         ('src/recent.pyc', 'share/comix/src'),
-          ('src/slideshow.py', 'share/comix/src'),
--         ('src/slideshow.pyc', 'share/comix/src'),
-          ('src/status.py', 'share/comix/src'),
--         ('src/status.pyc', 'share/comix/src'),
-          ('src/thumbbar.py', 'share/comix/src'),
--         ('src/thumbbar.pyc', 'share/comix/src'),
-          ('src/thumbnail.py', 'share/comix/src'),
--         ('src/thumbnail.pyc', 'share/comix/src'),
-          ('src/thumbremover.py', 'share/comix/src'),
--         ('src/thumbremover.pyc', 'share/comix/src'),
-          ('src/ui.py', 'share/comix/src'),
--         ('src/ui.pyc', 'share/comix/src'),
-          ('images/16x16/comix.png', 'share/comix/images/16x16'),
-          ('images/comix.svg', 'share/comix/images'),
-          ('images/double-page.png', 'share/comix/images'),
-@@ -314,7 +282,7 @@
-             os.path.join(install_dir, 'share/mime'))
-         print '\nUpdated mime database (added .cbz, .cbr and .cbt file types.)'
-         schema = os.path.join(source_dir, 'mime/comicbook.schemas')
--        os.popen('GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source) '
-+        os.popen('GCONF_CONFIG_SOURCE=%%GCONF_CONFIG_SOURCE%% '
-                  'gconftool-2 --makefile-install-rule "%s" 2>/dev/null' %
-                     schema)
-         print '\nRegistered comic archive thumbnailer in gconf (if available).'
diff -ruN --exclude=CVS /usr/ports/graphics/comix/pkg-descr ./pkg-descr
--- /usr/ports/graphics/comix/pkg-descr	2005-12-10 19:45:03.000000000 +0100
+++ ./pkg-descr	2012-11-02 11:51:30.000000000 +0100
@@ -1,5 +1,6 @@
-Comix is an image viewer specifically designed to handle comic books. It reads
-ZIP, RAR and tar archives (also gzip or bzip2 compressed), as well as plain
-image files. It has a simple and user-friendly GUI using PyGTK.
+Comix is a user-friendly, customizable image viewer. It is specifically designed
+to handle comic books, but also serves as a generic viewer. It reads images in
+ZIP, RAR or tar archives (also gzip or bzip2 compressed) as well as plain
+image files. It is written in Python and uses GTK+ through the PyGTK bindings.
 
 WWW: http://comix.sourceforge.net/
diff -ruN --exclude=CVS /usr/ports/graphics/comix/pkg-plist ./pkg-plist
--- /usr/ports/graphics/comix/pkg-plist	2009-05-09 19:25:46.000000000 +0200
+++ ./pkg-plist	2012-11-02 20:33:59.000000000 +0100
@@ -90,9 +90,6 @@
 %%DATADIR%%/src/thumbremover.pyc
 %%DATADIR%%/src/ui.py
 %%DATADIR%%/src/ui.pyc
-%%PORTDOCS%%%%DOCSDIR%%/COPYING
-%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
-%%PORTDOCS%%%%DOCSDIR%%/README
 share/icons/hicolor/16x16/apps/comix.png
 %%THUMBNAILS:%%share/icons/hicolor/16x16/mimetypes/application-x-cbr.png
 %%THUMBNAILS:%%share/icons/hicolor/16x16/mimetypes/application-x-cbt.png
@@ -113,24 +110,24 @@
 %%THUMBNAILS:%%share/icons/hicolor/48x48/mimetypes/application-x-cbr.png
 %%THUMBNAILS:%%share/icons/hicolor/48x48/mimetypes/application-x-cbt.png
 %%THUMBNAILS:%%share/icons/hicolor/48x48/mimetypes/application-x-cbz.png
-share/icons/hicolor/scalable/apps/comix.svg
-share/locale/ca/LC_MESSAGES/comix.mo
-share/locale/cs/LC_MESSAGES/comix.mo
-share/locale/es/LC_MESSAGES/comix.mo
-share/locale/fr/LC_MESSAGES/comix.mo
-share/locale/hr/LC_MESSAGES/comix.mo
-share/locale/hu/LC_MESSAGES/comix.mo
-share/locale/id/LC_MESSAGES/comix.mo
-share/locale/ja/LC_MESSAGES/comix.mo
-share/locale/ko/LC_MESSAGES/comix.mo
-share/locale/pl/LC_MESSAGES/comix.mo
-share/locale/pt_BR/LC_MESSAGES/comix.mo
-share/locale/ru/LC_MESSAGES/comix.mo
-share/locale/sv/LC_MESSAGES/comix.mo
-share/locale/zh_CN/LC_MESSAGES/comix.mo
-share/locale/zh_TW/LC_MESSAGES/comix.mo
+%%NLS%%share/icons/hicolor/scalable/apps/comix.svg
+%%NLS%%share/locale/ca/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/es/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/hr/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/id/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/ja/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/ko/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/zh_CN/LC_MESSAGES/comix.mo
+%%NLS%%share/locale/zh_TW/LC_MESSAGES/comix.mo
+share/pixmaps/comix.png
 %%THUMBNAILS:%%share/mime/packages/comix.xml
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm %%DATADIR%%/src
 @dirrm %%DATADIR%%/images/16x16
 @dirrm %%DATADIR%%/images
--- comix-4.0.4_5.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list