ports/174187: graphics/darknock: Support CXXFLAGS properly

KATO Tsuguru tkato432 at yahoo.com
Wed Dec 5 18:10:09 UTC 2012


>Number:         174187
>Category:       ports
>Synopsis:       graphics/darknock: Support CXXFLAGS properly
>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:   Wed Dec 05 18:10:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 7.4-RELEASE-p11 i386
>Organization:
>Environment:
>Description:
- Support CXXFLAGS properly
- Support PLIST_FILES
- Add LICENSE

Remove file:
pkg-plist

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/graphics/darknock/Makefile graphics/darknock/Makefile
--- /usr/ports/graphics/darknock/Makefile	2012-11-08 09:35:24.000000000 +0900
+++ graphics/darknock/Makefile	2012-12-04 02:37:31.000000000 +0900
@@ -1,31 +1,24 @@
-# New ports collection makefile for:	darknock
-# Date created:		5 August 2007
-# Whom:                	Yinghong.Liu <relaxbsd at gmail.com>
-#
+# Created by: Yinghong.Liu <relaxbsd at gmail.com>
 # $FreeBSD: head/graphics/darknock/Makefile 300896 2012-07-14 13:54:48Z beat $
-#
 
 PORTNAME=	darknock
-DISTVERSION=	0.3.0
-PORTREVISION=	3
+PORTVERSION=	0.3.0
+PORTREVISION=	4
 CATEGORIES=	graphics kde
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	A program that can detect edges in images
 
-USE_QT4=	qmake_build moc_build rcc_build uic_build linguist_build gui
+LICENSE=	GPLv2 # (or later)
+
 WRKSRC=		${WRKDIR}/${PORTNAME}
-LRELEASE=	${QT_PREFIX}/bin/lrelease-qt4
-MAKE_JOBS_SAFE=	yes
 
-PORTDOCS=	changelog copyright
+USE_QT4=	gui linguist_build moc_build qmake_build rcc_build uic_build
+MAKE_JOBS_SAFE=	yes
 
-.if !defined(WITHOUT_NLS)
-PLIST_SUB+=	NLS=""
-.else
-PLIST_SUB+=	NLS="@comment "
-.endif
+PORTDOCS=	changelog
+PLIST_FILES=	bin/darknock share/pixmaps/darknock.png
 
 DESKTOP_ENTRIES=	"${PORTNAME}" \
 			"${COMMENT}" \
@@ -34,25 +27,36 @@
 			"Qt;KDE;Graphics;" \
 			"false"
 
+LRELEASE=	${QT_PREFIX}/bin/lrelease-qt4
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MNLS}
+.for lang in fr it pl ro sv tr
+PLIST_FILES+=	%%DATADIR%%/locale/darknock_${lang}.qm
+.endfor
+PLIST_DIRS+=	%%DATADIR%%/locale %%DATADIR%%
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|/usr/share/darknock|${DATADIR}|g' \
 		${WRKSRC}/src/main.cpp
 
 pre-build:
 	@${LRELEASE} ${BUILD_WRKSRC}/${PORTNAME}.pro
-	@cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${QMAKE} -spec ${QMAKESPEC}
+	@(cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE} ${QMAKEFLAGS})
 
 do-install:
-	@${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-	@${INSTALL_DATA} ${WRKSRC}/images/${PORTNAME}.png ${PREFIX}/share/pixmaps
-.if !defined(WITHOUT_NLS)
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+	${INSTALL_DATA} ${WRKSRC}/images/${PORTNAME}.png ${PREFIX}/share/pixmaps
+.if ${PORT_OPTIONS:MNLS}
 	@${MKDIR} ${DATADIR}/locale
-	@${INSTALL_DATA} ${WRKSRC}/locale/*.qm ${DATADIR}/locale
+	${INSTALL_DATA} ${WRKSRC}/locale/*.qm ${DATADIR}/locale
 .endif
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 .for doc in ${PORTDOCS}
-	@${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
 .endfor
 .endif
 
diff -urN /usr/ports/graphics/darknock/pkg-plist graphics/darknock/pkg-plist
--- /usr/ports/graphics/darknock/pkg-plist	2012-11-08 09:35:24.000000000 +0900
+++ graphics/darknock/pkg-plist	1970-01-01 09:00:00.000000000 +0900
@@ -1,10 +0,0 @@
-bin/darknock
-%%NLS%%%%DATADIR%%/locale/darknock_fr.qm
-%%NLS%%%%DATADIR%%/locale/darknock_it.qm
-%%NLS%%%%DATADIR%%/locale/darknock_pl.qm
-%%NLS%%%%DATADIR%%/locale/darknock_ro.qm
-%%NLS%%%%DATADIR%%/locale/darknock_sv.qm
-%%NLS%%%%DATADIR%%/locale/darknock_tr.qm
-share/pixmaps/darknock.png
-%%NLS%%@dirrm %%DATADIR%%/locale
-%%NLS%%@dirrm %%DATADIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list