aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2012-02-06 16:06:17 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2012-02-06 16:06:17 +0000
commita9aa1882cedc1da053a88d7f7eed4f07fba3cbe6 (patch)
tree5a6e9c8311e9b9b13a5fd25244e670aaeda89d35
parent18c9d923c2cd3a3bed05f4d5edea6c6ee8d0cf34 (diff)
downloadports-a9aa1882cedc1da053a88d7f7eed4f07fba3cbe6.tar.gz
ports-a9aa1882cedc1da053a88d7f7eed4f07fba3cbe6.zip
Notes
-rw-r--r--games/meqcc/Makefile24
-rw-r--r--games/meqcc/files/patch-cmdlib.c9
-rw-r--r--games/meqcc/files/patch-qcc.c36
-rw-r--r--games/meqcc/pkg-plist5
4 files changed, 57 insertions, 17 deletions
diff --git a/games/meqcc/Makefile b/games/meqcc/Makefile
index eb89ca793469..97e27677fc0d 100644
--- a/games/meqcc/Makefile
+++ b/games/meqcc/Makefile
@@ -8,33 +8,33 @@
PORTNAME= meqcc
PORTVERSION= 1.4
CATEGORIES= games devel
-MASTER_SITES= http://wiki.quakesrc.org/files/ \
- http://freebsd.nsu.ru/distfiles/
+MASTER_SITES= http://freebsd.nsu.ru/distfiles/
DISTNAME= ${PORTNAME}${PORTVERSION:S/.//g}src
MAINTAINER= danfe@FreeBSD.org
COMMENT= MrElusive's QuakeC compiler
-USE_GMAKE= yes
+LICENSE= GPLv2
+
USE_ZIP= yes
+USE_DOS2UNIX= yes
+MAKEFILE= linux.mak
-MAKEFILE= ${WRKSRC}/linux.mak
+PLIST_FILES= bin/meqcc
+PORTDOCS= *
post-extract:
- @${FIND} -E ${WRKDIR} -type f -iregex ".*\.(c|h|mak|txt)" -print0 | \
- ${XARGS} -0 ${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//'
- @${REINPLACE_CMD} -e 's/<io\.h>/<unistd\.h>/' ${WRKSRC}/cmdlib.c \
- ${WRKSRC}/qcc.c ${WRKSRC}/l_log.c
- @${REINPLACE_CMD} -e '/<conio\.h>/d' ${WRKSRC}/l_log.c
- @${REINPLACE_CMD} -e 's/unsigned long t/time_t t/' ${WRKSRC}/l_precomp.c
+ @${REINPLACE_CMD} -e 's/<io\.h>/<unistd.h>/ ; /<conio\.h>/d' \
+ ${WRKSRC}/l_log.c
+ @${REINPLACE_CMD} -e 's/unsigned long t/time_t t/' \
+ ${WRKSRC}/l_precomp.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/qcc ${PREFIX}/bin/${PORTNAME}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/[^g]*.txt ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/[^gr]*.txt ${DOCSDIR}
.endif
.include "${.CURDIR}/../quake-source/Makefile.include"
-
.include <bsd.port.mk>
diff --git a/games/meqcc/files/patch-cmdlib.c b/games/meqcc/files/patch-cmdlib.c
index bc0d24a72e9a..390ae80d8268 100644
--- a/games/meqcc/files/patch-cmdlib.c
+++ b/games/meqcc/files/patch-cmdlib.c
@@ -1,5 +1,14 @@
--- cmdlib.c.orig Sat Jan 15 20:08:10 2005
+++ cmdlib.c Sat Jan 15 20:03:02 2005
+@@ -5,7 +5,7 @@
+
+ #include "cmdlib.h"
+ #include <time.h>
+-#include <io.h>
++#include <unistd.h>
+
+ #define PATHSEPERATOR '/'
+
@@ -141,6 +141,8 @@
================
*/
diff --git a/games/meqcc/files/patch-qcc.c b/games/meqcc/files/patch-qcc.c
new file mode 100644
index 000000000000..07706a22303b
--- /dev/null
+++ b/games/meqcc/files/patch-qcc.c
@@ -0,0 +1,36 @@
+--- qcc.c.orig 2012-02-06 23:25:07.000000000 +0800
++++ qcc.c 2012-02-06 23:27:08.000000000 +0800
+@@ -7,7 +7,7 @@
+
+ #include <time.h>
+ #include <stdio.h>
+-#include <io.h> //lseek, close, filelength
++#include <unistd.h> //lseek, close, filelength
+ #if defined(WIN32)|defined(_WIN32)|defined(__NT__)|defined(__WINDOWS__)|defined(__WINDOWS_386__)
+ #include <direct.h> //mkdir
+ #endif
+@@ -1519,7 +1519,7 @@
+ main
+ =================
+ */
+-void main (int argc, char **argv)
++int main (int argc, char **argv)
+ {
+ char *src;
+ char filename[1024];
+@@ -1549,7 +1549,7 @@
+ Log_Print("-? display command line options\n");
+ Log_Print("-h \"\n");
+ Log_Print("-help \"\n");
+- return;
++ return EXIT_SUCCESS;
+ } //end if
+
+ CMDPrecompilerDefinitions();
+@@ -1628,4 +1628,6 @@
+ BspModels();
+ //report / copy the data files
+ CopyFiles();
++
++ return EXIT_SUCCESS;
+ } //end of the function main
diff --git a/games/meqcc/pkg-plist b/games/meqcc/pkg-plist
deleted file mode 100644
index a0cb9a2c8a68..000000000000
--- a/games/meqcc/pkg-plist
+++ /dev/null
@@ -1,5 +0,0 @@
-bin/meqcc
-%%PORTDOCS%%%%DOCSDIR%%/meqcc.txt
-%%PORTDOCS%%%%DOCSDIR%%/qcc.txt
-%%PORTDOCS%%%%DOCSDIR%%/readme.txt
-%%PORTDOCS%%@dirrm %%DOCSDIR%%