1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00

- 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 [*]
This commit is contained in:
Alexey Dokuchaev 2012-02-06 16:06:17 +00:00
parent 18c9d923c2
commit a9aa1882ce
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=290495
4 changed files with 58 additions and 18 deletions

View File

@ -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
USE_ZIP= yes
LICENSE= GPLv2
MAKEFILE= ${WRKSRC}/linux.mak
USE_ZIP= yes
USE_DOS2UNIX= yes
MAKEFILE= 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>

View File

@ -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 @@
================
*/

View File

@ -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

View File

@ -1,5 +0,0 @@
bin/meqcc
%%PORTDOCS%%%%DOCSDIR%%/meqcc.txt
%%PORTDOCS%%%%DOCSDIR%%/qcc.txt
%%PORTDOCS%%%%DOCSDIR%%/readme.txt
%%PORTDOCS%%@dirrm %%DOCSDIR%%