ports/183812: textproc/stardict2-quick: rename port, fix fetch, clean-up Makefile

Max Brazhnikov makc at FreeBSD.org
Sat Nov 9 15:40:02 UTC 2013


>Number:         183812
>Category:       ports
>Synopsis:       textproc/stardict2-quick: rename port, fix fetch, clean-up Makefile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 09 15:40:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Max Brazhnikov
>Release:        FreeBSD 9.2-STABLE amd64
>Organization:
>Environment:
>Description:
- Rename ports
- fix fetch
- simplify Makefile, bring stage support
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: stardict-quick/Makefile
===================================================================
--- stardict-quick/Makefile	(revision 333249)
+++ stardict-quick/Makefile	(working copy)
@@ -1,12 +1,11 @@
 # Created by: Timur I. Bakeyev <timur at gnome.org>
 # $FreeBSD$
 
-PORTNAME=	stardict
+PORTNAME=	stardict-quick
 PORTVERSION=	2.4.2
 PORTREVISION=	9
 CATEGORIES=	textproc
-MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-dictionaries-quick/${PORTVERSION}
-PKGNAMESUFFIX=	-quick
+MASTER_SITES=	http://abloz.com/huzheng/stardict-dic/Quick/
 DIST_SUBDIR=	stardict
 
 MAINTAINER=	timur at FreeBSD.org
@@ -16,11 +15,10 @@
 NO_BUILD=	yes
 USE_BZIP2=	yes
 
-LATEST_LINK=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
+DATADIR=	${PREFIX}/share/stardict
+DICTDIR=	${DATADIR}/dic
+PORTDATA=	*
 
-STARDICT_DIR=	share/stardict
-DICTDIR=	${STARDICT_DIR}/dic
-
 DICTIONARIES=	afr-eng afr-swe bul-swe dan-deu dan-eng dan-fin dan-fra \
 		dan-hun dan-ind dan-ita dan-jpn dan-lat dan-nld dan-nor \
 		dan-por dan-rus dan-spa dan-swa dan-swe deu-dan deu-deu \
@@ -39,7 +37,6 @@
 		swe-nld swe-nor swe-pol swe-por swe-rum swe-rus swe-slo \
 		swe-spa swe-swa swe-wel wel-swe
 
-.if !defined(DICT_PACK)
 OPTIONS_DEFINE=	ALL
 OPTIONS_DEFAULT=	ALL
 ALL_DESC=	All dictionaries
@@ -46,38 +43,23 @@
 .for dict in ${DICTIONARIES}
 OPTIONS_DEFINE+=	${dict:U:S|-|_|g}
 ${dict:U:S|-|_|g}_DESC=	${dict} dictionary
+${dict}_DISTNAME=	${PORTNAME}_${dict}-${PORTVERSION}
 .endfor
-.endif
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .for dict in ${DICTIONARIES}
 .if ${PORT_OPTIONS:MALL} || ${PORT_OPTIONS:M${dict:U:S|-|_|g}}
 INSTALL_DICTIONARIES+=	${dict}
+DISTFILES+=	${${dict}_DISTNAME}${EXTRACT_SUFX}
 .endif
 .endfor
 
-.for dict in ${INSTALL_DICTIONARIES}
-DISTFILES+=	${PORTNAME}${PKGNAMESUFFIX}_${dict}-${PORTVERSION}${EXTRACT_SUFX}
-.endfor
-
-do-build:
-	@${DO_NADA}
-
 do-install:
-		@${MKDIR} ${PREFIX}/${DICTDIR}
+	@${MKDIR} ${STAGEDIR}${DICTDIR}
 .for dict in ${INSTALL_DICTIONARIES}
-		${INSTALL_DATA} ${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}_${dict}-${PORTVERSION}/* \
-			${PREFIX}/${DICTDIR}
+	${INSTALL_DATA} ${WRKDIR}/${${dict}_DISTNAME}/* \
+		${STAGEDIR}${DICTDIR}
 .endfor
 
-post-install:
-.for dict in ${INSTALL_DICTIONARIES}
-		@cd ${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}_${dict}-${PORTVERSION} && \
-		${FIND} -s . -type f -o -type l | ${SED} -e 's|^\.|${DICTDIR}|' >> ${TMPPLIST}
-.endfor
-		@${ECHO_CMD} "@unexec ${RMDIR} %D/${DICTDIR} 2>/dev/null || true" >> ${TMPPLIST}
-		@${ECHO_CMD} "@unexec ${RMDIR} %D/${STARDICT_DIR} 2>/dev/null || true" >> ${TMPPLIST}
-
 .include <bsd.port.mk>
Index: stardict-dictd_mova/Makefile
===================================================================
--- stardict-dictd_mova/Makefile	(revision 333249)
+++ stardict-dictd_mova/Makefile	(working copy)
@@ -1,12 +1,11 @@
 # Created by: Timur I. Bakeyev <timur at gnome.org>
 # $FreeBSD$
 
-PORTNAME=	stardict
+PORTNAME=	stardict-dictd_mova
 PORTVERSION=	2.4.2
 PORTREVISION=	8
 CATEGORIES=	textproc
-MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-dictionaries-mova/${PORTVERSION}
-PKGNAMESUFFIX=	-dictd_mova
+MASTER_SITES=	http://abloz.com/huzheng/stardict-dic/mova.org/
 DIST_SUBDIR=	stardict
 
 MAINTAINER=	timur at FreeBSD.org
@@ -16,13 +15,10 @@
 NO_BUILD=	yes
 USE_BZIP2=	yes
 
-LATEST_LINK=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
+DATADIR=	${PREFIX}/share/stardict
+DICTDIR=	${DATADIR}/dic
+PORTDATA=	*
 
-STARDICT_DIR=	share/stardict
-DICTDIR=	${STARDICT_DIR}/dic
-
-DISTSUFFIX=	-dictd_www.mova.org
-
 DICTIONARIES=	1000pbio aviation beslov biology brok_and_efr compbe \
 		deutsch engcom ethnographic findict geology_enru geology_ruen \
 		idioms korolew_enru korolew_ruen mech mueller7 ozhegov \
@@ -36,7 +32,6 @@
 		smiley sokrat_enru sokrat_ruen swedish teo ushakov \
 		zhelezyaki_abbr zhelezyaki_analogs
 
-.if !defined(DICT_PACK)
 OPTIONS_DEFINE=	ALL
 OPTIONS_DEFAULT=	ALL
 ALL_DESC=	All dictionaries
@@ -43,36 +38,23 @@
 .for dict in ${DICTIONARIES}
 OPTIONS_DEFINE+=	${dict:U:S|-|_|g}
 ${dict:U:S|-|_|g}_DESC=	${dict} dictionary
+${dict}_DISTNAME=	stardict-dictd_www.mova.org_${dict}-${PORTVERSION}
 .endfor
-.endif
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .for dict in ${DICTIONARIES}
 .if ${PORT_OPTIONS:MALL} || ${PORT_OPTIONS:M${dict:U:S|-|_|g}}
 INSTALL_DICTIONARIES+=	${dict}
+DISTFILES+=	${${dict}_DISTNAME}${EXTRACT_SUFX}
 .endif
 .endfor
 
-.for dict in ${INSTALL_DICTIONARIES}
-DISTFILES+=	${PORTNAME}${DISTSUFFIX}_${dict}-${PORTVERSION}${EXTRACT_SUFX}
-.endfor
-
-do-build:
-	    @${DO_NADA}
-
 do-install:
-	    ${MKDIR} ${PREFIX}/${DICTDIR}
+	${MKDIR} ${STAGEDIR}${DICTDIR}
 .for dict in ${INSTALL_DICTIONARIES}
-.for ext in dict.dz idx ifo
-	    ${INSTALL_DATA} \
-		${WRKDIR}/${PORTNAME}${DISTSUFFIX}_${dict}-${PORTVERSION}/${DISTSUFFIX:C|^-||}_${dict}.${ext} \
-		${PREFIX}/${DICTDIR}
-	    @${ECHO_CMD} "${DICTDIR}/${DISTSUFFIX:C|^-||}_${dict}.${ext}" >> ${TMPPLIST}
+	${INSTALL_DATA} ${WRKDIR}/${${dict}_DISTNAME}/* \
+		${STAGEDIR}${DICTDIR}
 .endfor
-.endfor
-	    @${ECHO_CMD} "@unexec ${RMDIR} %D/${DICTDIR} 2>/dev/null || true" >> ${TMPPLIST}
-	    @${ECHO_CMD} "@unexec ${RMDIR} %D/${STARDICT_DIR} 2>/dev/null || true" >> ${TMPPLIST}
 
 .include <bsd.port.mk>


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


More information about the freebsd-ports-bugs mailing list