From d934827bf44b7cfcf6711964418148fa60877668 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 25 Nov 2020 22:39:15 +0000 Subject: gentoo resync : 25.11.2020 --- games-util/fteqcc/Manifest | 5 +- games-util/fteqcc/files/fteqcc-2501-Makefile.patch | 61 ++++++ .../fteqcc/files/fteqcc-2501-cleanup-source.patch | 205 +++++++++++++++++---- games-util/fteqcc/fteqcc-2501.ebuild | 31 ++-- 4 files changed, 243 insertions(+), 59 deletions(-) create mode 100644 games-util/fteqcc/files/fteqcc-2501-Makefile.patch (limited to 'games-util/fteqcc') diff --git a/games-util/fteqcc/Manifest b/games-util/fteqcc/Manifest index f615138f3b66..f112bac3f8bd 100644 --- a/games-util/fteqcc/Manifest +++ b/games-util/fteqcc/Manifest @@ -1,4 +1,5 @@ -AUX fteqcc-2501-cleanup-source.patch 2655 BLAKE2B 3c0af9e2663e9f18aee250f79b1315744fe8aaf818d3b7aaa590a6dbe2eaf62d44280507d5a4a4796b6ede78ed76c89f4153998cca4a0cca2f3b4553763f1db1 SHA512 978f3fc8238383ba63be4095fb7ebe30b0a6a0220b2d0f28033ab61ed23251de3757414fecdda2d987996094e3953797d0d89f3b4cc812c4ce7e15335f06035c +AUX fteqcc-2501-Makefile.patch 1742 BLAKE2B e744676a627626d078ed502a3e181abe13bc430164163b97a2f53487e881f38886dd7166c73ef3750174d2d49ab30b9b70cc40956d7b2d57789aee043c62d058 SHA512 75de8de81f7e071bf7734a38e8a150eb9ebe27e55b7a096f88f863e503e4f9f574a4b6d7c42a54c0044f0848e41a5a4814087ec3e6187793b06b1756dc28ada7 +AUX fteqcc-2501-cleanup-source.patch 5791 BLAKE2B 6db9e70087f06f0bb16ecd74f36874216bc8b6a5ae835e5ba5d5fb6b492ff84c332209c72c7a5bde79980c8aaaeec0ed3cd21913c73952dfb71d2cf402f8c6b6 SHA512 81e0d529a0e942da3de40a564c5d349eef9e5a18a44111acb77d7205ff5270a8175cf7bdb23c01d76b069ffc18cae39eb6e22a9c815e0f0b944826b11ac6ef85 DIST qclibsrc2501.zip 204047 BLAKE2B 3e9b6aeeaadf44adf8ea32c7f1f627082cc5e98f6ea84f339d44a6e34adda5dbf01add1fb2957866323ab93b8f07393bb79d94cf0d5819cc8b48376d68fefc0d SHA512 60740e55c470dcb8deb235b49b5e8bd56f3c932fd9290808224b4d0ff2d6d8eb95302fdd1c972f36c992ac046fdbbc6a34c6de2fc67e1e7de54f23fd10de89d7 -EBUILD fteqcc-2501.ebuild 770 BLAKE2B b88373414e91d51c179faa8bc2b872ededd31446d12d1028bf0e598478207635c8a87324330df9ad6483e218bf85f074d42d129eaf346ef2ad18b5d939752bb9 SHA512 3528807c8d81e5243f16ee5c605e4c780b3a1e1fdcba05d9c29e8a64e3dcfa8da613beb162855433be1a786e7d64b84bd7586acdf25cf49050cda904972ca888 +EBUILD fteqcc-2501.ebuild 614 BLAKE2B a956c79dbc0dd9064348f89602c5fd780142b40c20ec5fbd818c6c09c4d365d6a7729ffee55f472b2b7bd4bb5eb063065b034bb80d18ebc0064176d0c0a99bcc SHA512 c52924834aa61932ea357c7804a295a5dc0a2c3b7f131ec8bc88cc0c130c729d10c306920f6077f8a8ac42a29dde85e6d674feb4584bf837dc7b45f571c38882 MISC metadata.xml 328 BLAKE2B 3cf3ef53d251c16dbdf4dac64df6b6f61d39259def9e37191d28449b1eb733c89f1496a69eca590c536541e3763b5870880eec8f4b27e0a370d430c75dda9712 SHA512 9a114bb9f7d3e6d5995830c71662bc58b78bee8a1d104399b9f7a53efaf3410a6da94486e8a5a9a2b25677eb79327b1fad4b135c8ed63429e21fee500853a78f diff --git a/games-util/fteqcc/files/fteqcc-2501-Makefile.patch b/games-util/fteqcc/files/fteqcc-2501-Makefile.patch new file mode 100644 index 000000000000..cc70e9be4d8b --- /dev/null +++ b/games-util/fteqcc/files/fteqcc-2501-Makefile.patch @@ -0,0 +1,61 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,51 +1,19 @@ + QCC_OBJS=qccmain.o qcc_cmdlib.o qcc_pr_comp.o qcc_pr_lex.o comprout.o hash.o qcd_main.o + GTKGUI_OBJS=qcc_gtk.o qccguistuff.c + +-CC=gcc -Wall -DQCCONLY +- +-DO_CC=$(CC) $(BASE_CFLAGS) -o $@ -c $< $(CFLAGS) +- + all: qcc + +-BASE_CFLAGS=-ggdb +-CFLAGS = +- ++CFLAGS += -Wall ++CPPFLAGS += -DQCCONLY + + win_nocyg: $(QCC_OBJS) qccgui.c qccguistuff.c +- $(CC) $(BASE_CFLAGS) -o fteqcc.exe -O3 -s $(QCC_OBJS) -mno-cygwin -mwindows ++ $(CC) $(BASE_CFLAGS) -o fteqcc.exe $(QCC_OBJS) -mno-cygwin -mwindows + nocyg: $(QCC_OBJS) qccgui.c qccguistuff.c +- $(CC) $(BASE_CFLAGS) -o fteqcc.exe -O3 -s $(QCC_OBJS) -mno-cygwin ++ $(CC) $(BASE_CFLAGS) -o fteqcc.exe $(QCC_OBJS) -mno-cygwin + win: $(QCC_OBJS) qccgui.c qccguistuff.c +- $(CC) $(BASE_CFLAGS) -o fteqcc.exe -O3 -s $(QCC_OBJS) -mwindows ++ $(CC) $(BASE_CFLAGS) -o fteqcc.exe $(QCC_OBJS) -mwindows + qcc: $(QCC_OBJS) +- $(CC) $(BASE_CFLAGS) -o fteqcc.bin -O3 -s $(QCC_OBJS) +- +-qccmain.o: qccmain.c qcc.h +- $(DO_CC) +- +-qcc_cmdlib.o: qcc_cmdlib.c qcc.h +- $(DO_CC) +- +-qcc_pr_comp.o: qcc_pr_comp.c qcc.h +- $(DO_CC) +- +-qcc_pr_lex.o: qcc_pr_lex.c qcc.h +- $(DO_CC) +- +-comprout.o: comprout.c qcc.h +- $(DO_CC) +- +-hash.o: hash.c qcc.h +- $(DO_CC) +- +-qcd_main.o: qcd_main.c qcc.h +- $(DO_CC) +- +-qccguistuff.o: qccguistuff.c qcc.h +- $(DO_CC) +- +-qcc_gtk.o: qcc_gtk.c qcc.h +- $(DO_CC) `pkg-config --cflags gtk+-2.0` ++ $(CC) $(BASE_CFLAGS) $(LDFLAGS) -o fteqcc.bin $(QCC_OBJS) + + gtkgui: $(QCC_OBJS) $(GTKGUI_OBJS) +- $(CC) $(BASE_CFLAGS) -DQCCONLY -DUSEGUI -o fteqccgui.bin -O3 $(GTKGUI_OBJS) $(QCC_OBJS) `pkg-config --libs gtk+-2.0` ++ $(CC) $(CFLAGS) $(LDFLAGS) -DUSEGUI -o fteqccgui.bin $(GTKGUI_OBJS) $(QCC_OBJS) $(GTK_LIBS) diff --git a/games-util/fteqcc/files/fteqcc-2501-cleanup-source.patch b/games-util/fteqcc/files/fteqcc-2501-cleanup-source.patch index 35f3dcf100ae..be8cccb074b2 100644 --- a/games-util/fteqcc/files/fteqcc-2501-cleanup-source.patch +++ b/games-util/fteqcc/files/fteqcc-2501-cleanup-source.patch @@ -1,43 +1,5 @@ ---- qcc_pr_comp.c -+++ qcc_pr_comp.c -@@ -7322,7 +7322,7 @@ - QCC_def_t *def, *d; - QCC_function_t *f; - QCC_dfunction_t *df; -- int i; -+ int i = 0; - pbool shared=false; - pbool externfnc=false; - pbool isconstant = false; -@@ -8541,8 +8545,6 @@ - struct qcc_includechunk_s *oldcurrentchunk; - extern struct qcc_includechunk_s *currentchunk; - -- extern char qccmsourcedir[]; -- - ocompilingfile = compilingfile; - os_file = s_file; - os_file2 = s_file2; ---- hash.h -+++ hash.h -@@ -19,12 +19,12 @@ - int Hash_Key(char *name, int modulus); - void *Hash_Get(hashtable_t *table, char *name); - void *Hash_GetInsensative(hashtable_t *table, char *name); --void *Hash_GetKey(hashtable_t *table, int key); -+void *Hash_GetKey(hashtable_t *table, long key); - void *Hash_GetNext(hashtable_t *table, char *name, void *old); - void *Hash_GetNextInsensative(hashtable_t *table, char *name, void *old); - void *Hash_Add(hashtable_t *table, char *name, void *data, bucket_t *buck); - void *Hash_AddInsensative(hashtable_t *table, char *name, void *data, bucket_t *buck); - void Hash_Remove(hashtable_t *table, char *name); - void Hash_RemoveData(hashtable_t *table, char *name, void *data); --void Hash_RemoveKey(hashtable_t *table, int key); --void *Hash_AddKey(hashtable_t *table, int key, void *data, bucket_t *buck); -+void Hash_RemoveKey(hashtable_t *table, long key); -+void *Hash_AddKey(hashtable_t *table, long key, void *data, bucket_t *buck); ---- hash.c -+++ hash.c +--- a/hash.c ++++ b/hash.c @@ -68,7 +68,7 @@ } return NULL; @@ -91,3 +53,166 @@ { buck->next = buck->next->next; return; +--- a/hash.h ++++ b/hash.h +@@ -19,12 +19,12 @@ + int Hash_Key(char *name, int modulus); + void *Hash_Get(hashtable_t *table, char *name); + void *Hash_GetInsensative(hashtable_t *table, char *name); +-void *Hash_GetKey(hashtable_t *table, int key); ++void *Hash_GetKey(hashtable_t *table, long key); + void *Hash_GetNext(hashtable_t *table, char *name, void *old); + void *Hash_GetNextInsensative(hashtable_t *table, char *name, void *old); + void *Hash_Add(hashtable_t *table, char *name, void *data, bucket_t *buck); + void *Hash_AddInsensative(hashtable_t *table, char *name, void *data, bucket_t *buck); + void Hash_Remove(hashtable_t *table, char *name); + void Hash_RemoveData(hashtable_t *table, char *name, void *data); +-void Hash_RemoveKey(hashtable_t *table, int key); +-void *Hash_AddKey(hashtable_t *table, int key, void *data, bucket_t *buck); ++void Hash_RemoveKey(hashtable_t *table, long key); ++void *Hash_AddKey(hashtable_t *table, long key, void *data, bucket_t *buck); +--- a/qcc.h ++++ b/qcc.h +@@ -286,7 +286,7 @@ + #endif + + #ifdef WRITEASM +-FILE *asmfile; ++extern FILE *asmfile; + #endif + //============================================================================= + +@@ -830,23 +830,23 @@ + + typedef char PATHSTRING[MAX_DATA_PATH]; + +-PATHSTRING *precache_sounds; +-int *precache_sounds_block; +-int *precache_sounds_used; +-int numsounds; +- +-PATHSTRING *precache_textures; +-int *precache_textures_block; +-int numtextures; +- +-PATHSTRING *precache_models; +-int *precache_models_block; +-int *precache_models_used; +-int nummodels; +- +-PATHSTRING *precache_files; +-int *precache_files_block; +-int numfiles; ++extern PATHSTRING *precache_sounds; ++extern int *precache_sounds_block; ++extern int *precache_sounds_used; ++extern int numsounds; ++ ++extern PATHSTRING *precache_textures; ++extern int *precache_textures_block; ++extern int numtextures; ++ ++extern PATHSTRING *precache_models; ++extern int *precache_models_block; ++extern int *precache_models_used; ++extern int nummodels; ++ ++extern PATHSTRING *precache_files; ++extern int *precache_files_block; ++extern int numfiles; + + int QCC_CopyString (char *str); + +--- a/qccmain.c ++++ b/qccmain.c +@@ -2,6 +2,14 @@ + + #define PROGSUSED + #include "qcc.h" ++ ++#ifdef WRITEASM ++FILE *asmfile; ++#endif ++ ++int *precache_sounds_used; ++int *precache_models_used; ++ + int mkdir(const char *path); + + char QCC_copyright[1024]; +@@ -22,7 +30,7 @@ + void *FS_ReadToMem(char *fname, void *membuf, int *len); + void FS_CloseFromMem(void *mem); + +-struct qcc_includechunk_s *currentchunk; ++extern struct qcc_includechunk_s *currentchunk; + + unsigned int MAX_REGS; + +@@ -84,8 +92,8 @@ + hashtable_t compconstantstable; + hashtable_t globalstable; + hashtable_t localstable; +-hashtable_t floatconstdefstable; +-hashtable_t stringconstdefstable; ++extern hashtable_t floatconstdefstable; ++extern hashtable_t stringconstdefstable; + + pbool qccwarningdisabled[WARN_MAX]; + +@@ -1627,7 +1635,7 @@ + + #define PROGDEFS_MAX_SIZE 16384 + //write (to file buf) and add to the crc +-void inline Add(char *p, unsigned short *crc, char *file) ++void Add(char *p, unsigned short *crc, char *file) + { + char *s; + int i = strlen(file); +@@ -1643,7 +1651,7 @@ + #define ADD(p) Add(p, &crc, file) + //#define ADD(p) {char *s;int i = strlen(p);for(s=p;*s;s++,i++){QCC_CRC_ProcessByte(&crc, *s);file[i] = *s;}file[i]='\0';} + +-void inline Add3(char *p, unsigned short *crc, char *file) ++void Add3(char *p, unsigned short *crc, char *file) + { + char *s; + for(s=p;*s;s++) +@@ -3283,7 +3291,7 @@ + + + #ifdef QCCONLY +-progfuncs_t *progfuncs; ++extern progfuncs_t *progfuncs; + + /* + ============== +--- a/qcc_pr_comp.c ++++ b/qcc_pr_comp.c +@@ -733,7 +733,7 @@ + ============ + */ + QCC_def_t *QCC_PR_Statement ( QCC_opcode_t *op, QCC_def_t *var_a, QCC_def_t *var_b, QCC_dstatement_t **outstatement); +-int inline QCC_ShouldConvert(QCC_def_t *var, etype_t wanted) ++int QCC_ShouldConvert(QCC_def_t *var, etype_t wanted) + { + if (var->type->type == ev_integer && wanted == ev_function) + return 0; +@@ -7322,7 +7322,7 @@ + QCC_def_t *def, *d; + QCC_function_t *f; + QCC_dfunction_t *df; +- int i; ++ int i = 0; + pbool shared=false; + pbool externfnc=false; + pbool isconstant = false; +@@ -8541,8 +8541,6 @@ + struct qcc_includechunk_s *oldcurrentchunk; + extern struct qcc_includechunk_s *currentchunk; + +- extern char qccmsourcedir[]; +- + ocompilingfile = compilingfile; + os_file = s_file; + os_file2 = s_file2; diff --git a/games-util/fteqcc/fteqcc-2501.ebuild b/games-util/fteqcc/fteqcc-2501.ebuild index c03aa1ac4ee1..3791f964ea75 100644 --- a/games-util/fteqcc/fteqcc-2501.ebuild +++ b/games-util/fteqcc/fteqcc-2501.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 -inherit eutils flag-o-matic +EAPI=7 + +inherit edos2unix toolchain-funcs DESCRIPTION="QC compiler" HOMEPAGE="http://fteqw.sourceforge.net/" @@ -11,28 +12,24 @@ SRC_URI="mirror://sourceforge/fteqw/qclibsrc${PV}.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" RESTRICT="test" -DEPEND="app-arch/unzip" -RDEPEND="" +BDEPEND="app-arch/unzip" + +S="${WORKDIR}" -S=${WORKDIR} +PATCHES=( + "${FILESDIR}"/${P}-cleanup-source.patch + "${FILESDIR}"/${P}-Makefile.patch +) src_prepare() { - epatch "${FILESDIR}"/${P}-cleanup-source.patch - sed -i \ - -e '/^CC/d' \ - -e "s: -O3 : :g" \ - -e "s: -s : :g" \ - -e 's/-o fteqcc.bin/$(LDFLAGS) -o fteqcc.bin/' \ - Makefile || die "sed failed" + default edos2unix readme.txt - append-flags -DQCCONLY } -src_compile() { - emake BASE_CFLAGS="${CFLAGS} -Wall" +src_configure() { + tc-export CC } src_install() { -- cgit v1.2.3