aboutsummaryrefslogtreecommitdiffstats
path: root/cad/ldraw
diff options
context:
space:
mode:
authornemysis <nemysis@FreeBSD.org>2013-11-19 05:55:54 +0800
committernemysis <nemysis@FreeBSD.org>2013-11-19 05:55:54 +0800
commita37283a30f9f0004331c76d80b005a10bdf6b444 (patch)
tree12bb5b155b55637d2ca1021789a163a228382255 /cad/ldraw
parentdaac836e750fe7fe750f2b1c02c218e8d2f06186 (diff)
downloadfreebsd-ports-gnome-a37283a30f9f0004331c76d80b005a10bdf6b444.tar.gz
freebsd-ports-gnome-a37283a30f9f0004331c76d80b005a10bdf6b444.tar.zst
freebsd-ports-gnome-a37283a30f9f0004331c76d80b005a10bdf6b444.zip
- Add USE_DOS2UNIX
- Use mklist1_6 instead of mklist1_4 - Support STAGEDIR - Add patch, fix typo Approved by: pawel / wg (mentors, implicit)
Diffstat (limited to 'cad/ldraw')
-rw-r--r--cad/ldraw/Makefile36
-rw-r--r--cad/ldraw/files/patch-mklist__mklist.c22
2 files changed, 37 insertions, 21 deletions
diff --git a/cad/ldraw/Makefile b/cad/ldraw/Makefile
index 78be35e9e4b0..f589282dd21c 100644
--- a/cad/ldraw/Makefile
+++ b/cad/ldraw/Makefile
@@ -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)
-
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
-.endif
+ ${INSTALL_SCRIPT} ${WRKSRC}/mklist/mklist ${STAGEDIR}${DATADIR}
+ @(cd ${STAGEDIR}${DATADIR} ; ./mklist -n)
- @${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}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
- @${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>
diff --git a/cad/ldraw/files/patch-mklist__mklist.c b/cad/ldraw/files/patch-mklist__mklist.c
new file mode 100644
index 000000000000..2bf6bd7a445f
--- /dev/null
+++ b/cad/ldraw/files/patch-mklist__mklist.c
@@ -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
+