Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Nov 2013 21:55:55 +0000 (UTC)
From:      Rusmir Dusko <nemysis@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r334266 - in head/cad/ldraw: . files
Message-ID:  <201311182155.rAILttZK084341@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nemysis
Date: Mon Nov 18 21:55:54 2013
New Revision: 334266
URL: http://svnweb.freebsd.org/changeset/ports/334266

Log:
  - Add USE_DOS2UNIX
  - Use mklist1_6 instead of mklist1_4
  - Support STAGEDIR
  - Add patch, fix typo
  
  Approved by:	pawel / wg (mentors, implicit)

Added:
  head/cad/ldraw/files/patch-mklist__mklist.c   (contents, props changed)
Modified:
  head/cad/ldraw/Makefile

Modified: head/cad/ldraw/Makefile
==============================================================================
--- head/cad/ldraw/Makefile	Mon Nov 18 21:52:24 2013	(r334265)
+++ head/cad/ldraw/Makefile	Mon Nov 18 21:55:54 2013	(r334266)
@@ -22,6 +22,7 @@ WRKSRC=		${WRKDIR}/${PORTNAME}
 
 USE_ZIP=	yes
 USES=		gmake
+USE_DOS2UNIX=	*.h makefile mklist.c *.txt *.dat
 
 PORTDOCS=	Readme.txt
 
@@ -29,41 +30,34 @@ OPTIONS_DEFINE=	DOCS
 
 SUB_FILES=	pkg-message
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
-
 post-extract-script:
-	@(cd ${WRKSRC} && ${UNZIP_CMD} -qo -d ${WRKSRC}/mklist1_4 ${WRKSRC}/mklist1_4.zip)
+	@(cd ${WRKSRC} && ${UNZIP_CMD} -qo -d ${WRKSRC}/mklist ${WRKSRC}/mklist1_6.zip)
+	@(cd ${WRKSRC}/mklist/include && ${MV} * ..)
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|CC=gcc|CC?=gcc|' \
 		-e 's|CFLAGS=|CFLAGS?=|' \
-		${WRKSRC}/mklist1_4/makefile
+		${WRKSRC}/mklist/makefile
 	@${REINPLACE_CMD} -e 's|PARTS|parts|' \
-		${WRKSRC}/mklist1_4/mklist.c
+		${WRKSRC}/mklist/mklist.c
 
 do-build:
-	@(cd ${WRKSRC}/mklist1_4 ; ${GMAKE} ${MAKE_ENV})
+	@(cd ${WRKSRC}/mklist ; ${GMAKE} ${MAKE_ENV})
 
 do-install:
 .for f in models p parts LDCfgalt.ldr LDConfig.ldr LDConfig_TLG.ldr
-	@(cd ${WRKSRC} ; ${COPYTREE_SHARE} ${f} ${DATADIR})
+	@(cd ${WRKSRC} ; ${COPYTREE_SHARE} ${f} ${STAGEDIR}${DATADIR})
 .endfor
 
-	${INSTALL_SCRIPT} ${WRKSRC}/mklist1_4/mklist ${DATADIR}
-	@(cd ${DATADIR} ; ./mklist -n)
+	${INSTALL_SCRIPT} ${WRKSRC}/mklist/mklist ${STAGEDIR}${DATADIR}
+	@(cd ${STAGEDIR}${DATADIR} ; ./mklist -n)
+
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
 
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
-.endif
-
-	@${FIND} ${DATADIR}/ ! -type d | ${SED} 's|^${PREFIX}/||' >> ${TMPPLIST}
-	@${FIND} -ds ${DATADIR}/ -type d | \
-		${SED} -E -e 's,(.*),@unexec ${RMDIR} "\1" 2>/dev/null || true,' >> ${TMPPLIST}
-
-	@${ECHO_CMD}
-	@${CAT} ${PKGMESSAGE}
-	@${ECHO_CMD}
+	@cd ${STAGEDIR}${PREFIX} && ${FIND} ${DATADIR_REL}\
+		-type f >> ${TMPPLIST} && \
+		${FIND} ${DATADIR_REL} -type d -o -type l | ${SORT} -r | \
+		${SED} 's|^|@dirrm |' >> ${TMPPLIST}
 
 .include <bsd.port.mk>

Added: head/cad/ldraw/files/patch-mklist__mklist.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/ldraw/files/patch-mklist__mklist.c	Mon Nov 18 21:55:54 2013	(r334266)
@@ -0,0 +1,22 @@
+--- ./mklist/mklist.c.orig	2013-11-15 20:23:32.000000000 +0100
++++ ./mklist/mklist.c	2013-11-15 20:25:12.000000000 +0100
+@@ -53,8 +53,8 @@
+ /*****************************************************************/
+ /* Filename length compatibility stuff */
+ /*****************************************************************/
+-#ifndef _MAX_PATH
+-#define _MAX_PATH 256
++#ifndef MAX_PATH
++#define MAX_PATH 256
+ #endif
+ char    shortfilepath[MAX_PATH];
+ char    shortfilename[MAX_PATH];
+@@ -84,7 +84,7 @@
+ int GetShortPathName(char *longpath, char * shortpath, int psize)
+ {
+     strncpy(shortpath, longpath, psize);
+-    return(strlen(shortpath);
++    return(strlen(shortpath));
+ }
+ #endif
+ 



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