aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2012-02-07 00:06:17 +0800
committerdanfe <danfe@FreeBSD.org>2012-02-07 00:06:17 +0800
commit68b609a1c7f9762a7464f46f1588c17c2478c532 (patch)
tree8a2dfda58c1b9adac4929cd2a9e0d72370a69416 /games
parent59a1a7ec0f88fdb5c506d819f10b03946ad66e89 (diff)
downloadfreebsd-ports-gnome-68b609a1c7f9762a7464f46f1588c17c2478c532.tar.gz
freebsd-ports-gnome-68b609a1c7f9762a7464f46f1588c17c2478c532.tar.zst
freebsd-ports-gnome-68b609a1c7f9762a7464f46f1588c17c2478c532.zip
- Fix the build with Clang [*]
- Remove defunct address from MASTER_SITES - Use USE_DOS2UNIX instead of hand-rolled routine - Define LICENSE (GPLv2) - Remove USE_GMAKE, does not seem to be needed - Do not patch files with both patch(1) and sed(1): when patch file already exists, augment it and remove corresponding REINPLACE_CMD - Convert pkg-plist into PLIST_FILES and PORTDOCS, remove useless file - Remove superfluous backslashes in sed(1) expressions, do minor cleanups Submitted by: Cyril Roelandt [*]
Diffstat (limited to 'games')
-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%%