Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Mar 2013 01:57:52 +0100
From:      nemysis <nemysis@gmx.ch>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        dhn@FreeBSD.org
Subject:   ports/176930: [PATCH] graphics/synfigstudio: OptionsNG, Port is now safe with NOPORTDOCS=yes
Message-ID:  <20130314005756.68E6B391@hub.freebsd.org>
Resent-Message-ID: <201303140100.r2E103cj004486@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         176930
>Category:       ports
>Synopsis:       [PATCH] graphics/synfigstudio: OptionsNG, Port is now safe with NOPORTDOCS=yes
>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:   Thu Mar 14 01:00:03 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     nemysis
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD_Ports 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10
>Description:

Makefile changed:

Port is now safe with NOPORTDOCS=yes in /etc/make.conf
+OPTIONS_DEFINE=	DOCS
+.if ${PORT_OPTIONS:MDOCS}
+PLIST_SUB+=	PORTDOCS=""
+.else
+PLIST_SUB+=	PORTDOCS="@comment "
+.endif

+		update-mime-database:${PORTSDIR}/misc/shared-mime-info
+.include <bsd.port.options.mk>
+.if ${PORT_OPTIONS:MDOCS}
+	@-update-mime-database ${PREFIX}/share/mime

Changed and refined:
 pkg-plist <-- removed not needed INSTALL

Port maintainer (dhn@FreeBSD.org) is cc'd.

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

--- synfigstudio-0.63.05_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/graphics/synfigstudio/Makefile ./Makefile
--- /usr/ports/graphics/synfigstudio/Makefile	2013-01-14 17:57:02.000000000 +0100
+++ ./Makefile	2013-03-14 01:01:13.000000000 +0100
@@ -1,20 +1,17 @@
-# New ports collection makefile for:	synfigstudio
-# Date created:				25 Jun 2006
-# Whom:					Yinghong.Liu <relaxbsd@gmail.com>
-#
+# Created by: Yinghong.Liu <relaxbsd@gmail.com>
 # $FreeBSD: head/graphics/synfigstudio/Makefile 300896 2012-07-14 13:54:48Z beat $
-#
 
 PORTNAME=	synfigstudio
 DISTVERSION=	0.63.05
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics multimedia
 MASTER_SITES=	SF/synfig/${PORTNAME}/${PORTVERSION}
 
 MAINTAINER=	dhn@FreeBSD.org
 COMMENT=	Vector-based 2D animation software package
 
-BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/ETL.pc:${PORTSDIR}/devel/etl
+BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/ETL.pc:${PORTSDIR}/devel/etl \
+		update-mime-database:${PORTSDIR}/misc/shared-mime-info
 LIB_DEPENDS=	synfig.0:${PORTSDIR}/devel/synfig \
 		gtkmm-2.4.1:${PORTSDIR}/x11-toolkits/gtkmm24
 
@@ -23,9 +20,22 @@
 USE_GMAKE=	yes
 INSTALLS_ICONS=	yes
 GNU_CONFIGURE=	yes
+USE_LDCONFIG=	yes
+
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
-USE_LDCONFIG=	yes
+
+OPTIONS_DEFINE=	DOCS
+
+PORTDOCS=	AUTHORS ChangeLog NEWS README TODO
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
+PLIST_SUB+=	PORTDOCS=""
+.else
+PLIST_SUB+=	PORTDOCS="@comment "
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e '/optimization_flags/s|CXXFLAGS=|#CXXFLAGS=| ; \
@@ -36,11 +46,11 @@
 	${MV} ${WRKSRC}/po/sk_SK.gmo ${WRKSRC}/po/sk.gmo
 
 post-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${DOCSDIR}
-.for doc in AUTHORS ChangeLog INSTALL NEWS README TODO
-	@${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
-.endfor
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
 .endif
 
+	@-update-mime-database ${PREFIX}/share/mime
+
 .include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/graphics/synfigstudio/pkg-plist ./pkg-plist
--- /usr/ports/graphics/synfigstudio/pkg-plist	2013-01-14 17:57:02.000000000 +0100
+++ ./pkg-plist	2013-03-13 23:27:38.000000000 +0100
@@ -102,7 +102,6 @@
 share/applications/synfigstudio.desktop
 %%PORTDOCS%%%%DOCSDIR%%/AUTHORS
 %%PORTDOCS%%%%DOCSDIR%%/ChangeLog
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL
 %%PORTDOCS%%%%DOCSDIR%%/NEWS
 %%PORTDOCS%%%%DOCSDIR%%/README
 %%PORTDOCS%%%%DOCSDIR%%/TODO
@@ -293,3 +292,5 @@
 @dirrm include/synfigapp-0.0/synfigapp
 @dirrm include/synfigapp-0.0
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
+@exec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
+@unexec %%LOCALBASE%%/bin/update-mime-database %D/share/mime
--- synfigstudio-0.63.05_2.patch ends here ---

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130314005756.68E6B391>