--- b/games/hllib/Makefile +++ b/games/hllib/Makefile @@ -1,12 +1,12 @@ # Created by: Alexey Dokuchaev PORTNAME= hllib -PORTVERSION= 2.4.4 +PORTVERSION= 2.4.6 CATEGORIES= games devel -MASTER_SITES= LOCAL/danilo +MASTER_SITES= https://github.com/osen/distfiles/raw/main/ DISTNAME= ${PORTNAME}${PORTVERSION:S/.//g} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= kpedersen@disroot.org COMMENT= Library to work with various Half-Life file formats LICENSE= LGPL21 @@ -18,8 +18,7 @@ CFLAGS+= -fpic -DUSE_ZLIB PATCH_WRKSRC= ${WRKDIR} -HLLIB_VERS= 2.4.4 -PLIST_FILES= include/hl.h lib/libhl.so.${HLLIB_VERS} \ +PLIST_FILES= include/hl.h lib/libhl.so.${PORTVERSION} \ lib/libhl.so.2 lib/libhl.so MAKE_ARGS= PREFIX="${STAGEDIR}${PREFIX}" @@ -28,14 +27,9 @@ post-patch: # Allow propagating of CXX, CXXFLAGS, and PREFIX; fix Linuxism and symlinks @${REINPLACE_CMD} -E 's,^([CP][^=]*)=,\1?=, ; s,-g root,,g ; \ s,-o root,,g ; s,s \$$\(PREFIX\)/lib/,s ,' ${WRKSRC}/Makefile -# Add forgotten file to the source list so it would be picked up by linker - @${REINPLACE_CMD} -e 's,ProcStream\.cpp,& SGAFile.cpp,' \ - ${WRKSRC}/Makefile -# Remove two lines of code that offend C++ compiler - @${REINPLACE_CMD} -e '/friend CSGADirectory/d' ${WRKSRC}/SGAFile.h +# Fix library version + @${REINPLACE_CMD} -e 's/2\.3\.0/2\.4\.6/' ${WRKSRC}/Makefile # Add missing -lz @${REINPLACE_CMD} -e '/$$(LDFLAGS)/s,$$, -lz,' ${WRKSRC}/Makefile -# Fix library version - @${REINPLACE_CMD} -e 's/2\.3\.0/2\.4\.4/' ${WRKSRC}/Makefile .include --- b/games/hllib/distinfo +++ b/games/hllib/distinfo @@ -1,2 +1,3 @@ -SHA256 (hllib244.zip) = cb94da1c32e9577dce1aa2bbb77f283212684afcd7814d42228c9ffff71d3699 -SIZE (hllib244.zip) = 593745 +TIMESTAMP = 1622320652 +SHA256 (hllib246.zip) = ed12bee31ec867a92e3daf4c52653ea2afb78c4ce69ca01a6f1588068ae5a1e9 +SIZE (hllib246.zip) = 419924 --- a/games/hllib/files/patch-HLLib-BSPFile.cpp +++ /dev/null @@ -1,19 +0,0 @@ ---- ../orig/HLLib/BSPFile.cpp 2010-10-31 22:48:46.000000000 -0200 -+++ ./HLLib/BSPFile.cpp 2013-02-11 17:56:51.271215107 -0200 -@@ -203,10 +203,14 @@ - hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], uiPaletteSize, hlFalse); - return hlTrue; - } -+ default: -+ ; - } - } - break; - } -+ default: -+ ; - } - - return hlFalse; -Only in ./HLLib: BSPFile.cpp.orig -diff -ru ../orig/HLLib/DirectoryFolder.cpp ./HLLib/DirectoryFolder.cpp --- a/games/hllib/files/patch-HLLib-DirectoryFolder.cpp +++ /dev/null @@ -1,58 +0,0 @@ ---- ../orig/HLLib/DirectoryFolder.cpp 2012-09-17 20:16:52.000000000 -0300 -+++ ./HLLib/DirectoryFolder.cpp 2013-02-11 17:56:51.275211034 -0200 -@@ -517,6 +517,8 @@ - case HL_ITEM_FILE: - uiSize += static_cast(pItem)->GetSize(); - break; -+ default: -+ ; - } - } - -@@ -541,6 +543,8 @@ - case HL_ITEM_FILE: - uiSize += static_cast(static_cast(pItem)->GetSize()); - break; -+ default: -+ ; - } - } - -@@ -565,6 +569,8 @@ - case HL_ITEM_FILE: - uiSize += static_cast(pItem)->GetSizeOnDisk(); - break; -+ default: -+ ; - } - } - -@@ -589,6 +595,8 @@ - case HL_ITEM_FILE: - uiSize += static_cast(static_cast(pItem)->GetSizeOnDisk()); - break; -+ default: -+ ; - } - } - -@@ -611,6 +619,8 @@ - uiCount += static_cast(pItem)->GetFolderCount(bRecurse); - } - break; -+ default: -+ ; - } - } - -@@ -635,6 +645,8 @@ - case HL_ITEM_FILE: - uiCount++; - break; -+ default: -+ ; - } - } - -Only in ./HLLib: DirectoryFolder.cpp.orig -diff -ru ../orig/HLLib/Error.cpp ./HLLib/Error.cpp --- a/games/hllib/files/patch-HLLib-Error.cpp +++ /dev/null @@ -1,12 +0,0 @@ ---- ../orig/HLLib/Error.cpp 2010-04-17 13:48:52.000000000 -0300 -+++ ./HLLib/Error.cpp 2013-02-11 18:00:09.931600402 -0200 -@@ -139,7 +139,7 @@ - - hlUInt uiLength = (hlUInt)strlen(this->lpSystemError); - -- while(uiLength >= 0 && isspace(this->lpSystemError[uiLength - 1])) -+ while(isspace(this->lpSystemError[uiLength - 1])) - { - uiLength--; - } -diff -ru ../orig/HLLib/FileStream.cpp ./HLLib/FileStream.cpp --- a/games/hllib/files/patch-HLLib-FileStream.cpp +++ /dev/null @@ -1,13 +0,0 @@ ---- ../orig/HLLib/FileStream.cpp 2010-10-28 20:41:26.000000000 -0200 -+++ ./HLLib/FileStream.cpp 2013-02-11 17:56:51.278212203 -0200 -@@ -216,6 +216,8 @@ - case HL_SEEK_END: - iMode = SEEK_END; - break; -+ default: -+ ; - } - - return (hlUInt)lseek(this->iFile, iOffset, iMode); -Only in ./HLLib: FileStream.cpp.orig -diff -ru ../orig/HLLib/GCFFile.cpp ./HLLib/GCFFile.cpp --- a/games/hllib/files/patch-HLLib-GCFFile.cpp +++ /dev/null @@ -1,27 +0,0 @@ ---- ../orig/HLLib/GCFFile.cpp 2010-11-01 20:56:16.000000000 -0200 -+++ ./HLLib/GCFFile.cpp 2013-02-11 17:56:51.281214140 -0200 -@@ -789,6 +789,8 @@ - } - return hlTrue; - } -+ default: -+ ; - } - break; - } -@@ -819,9 +821,13 @@ - } - return hlTrue; - } -+ default: -+ ; - } - break; - } -+ default: -+ ; - } - - return hlFalse; -Only in ./HLLib: GCFFile.cpp.orig -diff -ru ../orig/HLLib/HLLib.cpp ./HLLib/HLLib.cpp --- a/games/hllib/files/patch-HLLib-HLLib.cpp +++ /dev/null @@ -1,31 +0,0 @@ ---- ../orig/HLLib/HLLib.cpp 2010-11-01 19:45:14.000000000 -0200 -+++ ./HLLib/HLLib.cpp 2013-02-11 17:56:51.284213443 -0200 -@@ -153,6 +153,8 @@ - case HL_PACKAGE_BOUND: - *pValue = pPackage != 0; - return hlTrue; -+ default: -+ ; - } - - return hlFalse; -@@ -171,6 +173,8 @@ - case HL_FORCE_DEFRAGMENT: - bForceDefragment = bValue; - break; -+ default: -+ ; - } - } - -@@ -533,6 +537,8 @@ - case HL_PROC_DEFRAGMENT_PROGRESS_EX: - pDefragmentProgressExProc = (PDefragmentProgressExProc)pValue; - break; -+ default: -+ ; - } - } - -Only in ./HLLib: HLLib.cpp.orig -diff -ru ../orig/HLLib/Makefile ./HLLib/Makefile --- a/games/hllib/files/patch-HLLib-NCFFile.cpp +++ /dev/null @@ -1,27 +0,0 @@ ---- ../orig/HLLib/NCFFile.cpp 2010-10-31 22:48:26.000000000 -0200 -+++ ./HLLib/NCFFile.cpp 2013-02-11 17:56:51.287210992 -0200 -@@ -347,6 +347,8 @@ - hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], this->lpDirectoryEntries[pFile->GetID()].uiDirectoryFlags, hlTrue); - return hlTrue; - } -+ default: -+ ; - } - break; - } -@@ -360,9 +362,13 @@ - hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], this->lpDirectoryEntries[pFolder->GetID()].uiDirectoryFlags, hlTrue); - return hlTrue; - } -+ default: -+ ; - } - break; - } -+ default: -+ ; - } - - return hlFalse; -Only in ./HLLib: NCFFile.cpp.orig -diff -ru ../orig/HLLib/SGAFile.cpp ./HLLib/SGAFile.cpp --- a/games/hllib/files/patch-HLLib-SGAFile.cpp +++ /dev/null @@ -1,34 +0,0 @@ ---- ../orig/HLLib/SGAFile.cpp 2012-11-20 20:17:10.000000000 -0200 -+++ ./HLLib/SGAFile.cpp 2013-02-11 17:56:51.289212795 -0200 -@@ -387,6 +387,8 @@ - } - return hlFalse; - } -+ default: -+ ; - } - break; - } -@@ -448,9 +450,13 @@ - } - return hlFalse; - } -+ default: -+ ; - } - break; - } -+ default: -+ ; - } - } - return hlFalse; -@@ -624,4 +630,4 @@ - { - delete []static_cast(static_cast(Stream).GetBuffer()); - } --} -\ No newline at end of file -+} -Only in ./HLLib: SGAFile.cpp.orig -diff -ru ../orig/HLLib/SGAFile.h ./HLLib/SGAFile.h --- a/games/hllib/files/patch-HLLib-SGAFile.h +++ /dev/null @@ -1,14 +0,0 @@ ---- ../orig/HLLib/SGAFile.h 2012-09-17 20:16:38.000000000 -0300 -+++ ./HLLib/SGAFile.h 2013-02-11 17:56:51.311213431 -0200 -@@ -160,8 +160,6 @@ - typedef CSGADirectory CSGADirectory4; - typedef CSGADirectory CSGADirectory5; - -- friend CSGADirectory4; -- friend CSGADirectory5; - - private: - static const char *lpAttributeNames[]; -Only in ./HLLib: SGAFile.h.bak -Only in ./HLLib: SGAFile.h.orig -diff -ru ../orig/HLLib/VBSPFile.cpp ./HLLib/VBSPFile.cpp --- a/games/hllib/files/patch-HLLib-VBSPFile.cpp +++ /dev/null @@ -1,38 +0,0 @@ ---- ../orig/HLLib/VBSPFile.cpp 2011-05-22 07:53:42.000000000 -0300 -+++ ./HLLib/VBSPFile.cpp 2013-02-11 17:56:51.294217852 -0200 -@@ -422,6 +422,8 @@ - delete []lpComment; - return hlTrue; - } -+ default: -+ ; - } - } - else -@@ -444,6 +446,8 @@ - hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], *(hlUInt *)this->pHeader->lpLumps[uiID].lpFourCC, hlTrue); - return hlTrue; - } -+ default: -+ ; - } - - if(this->pEndOfCentralDirectoryRecord != 0 && pItem->GetID() == HL_VBSP_LUMP_PAKFILE) -@@ -466,11 +470,15 @@ - delete []lpComment; - return hlTrue; - } -+ default: -+ ; - } - } - } - break; - } -+ default: -+ ; - } - - return hlFalse; -Only in ./HLLib: VBSPFile.cpp.orig -diff -ru ../orig/HLLib/VPKFile.cpp ./HLLib/VPKFile.cpp --- a/games/hllib/files/patch-HLLib-VPKFile.cpp +++ /dev/null @@ -1,18 +0,0 @@ ---- ../orig/HLLib/VPKFile.cpp 2013-01-27 14:13:28.000000000 -0200 -+++ ./HLLib/VPKFile.cpp 2013-02-11 17:56:51.297217265 -0200 -@@ -415,9 +415,13 @@ - hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], pDirectoryItem->pDirectoryEntry->uiCRC, hlTrue); - return hlTrue; - } -+ default: -+ ; - } - break; - } -+ default: -+ ; - } - - return hlFalse; -Only in ./HLLib: VPKFile.cpp.orig -diff -ru ../orig/HLLib/WADFile.cpp ./HLLib/WADFile.cpp --- a/games/hllib/files/patch-HLLib-WADFile.cpp +++ /dev/null @@ -1,18 +0,0 @@ ---- ../orig/HLLib/WADFile.cpp 2010-10-31 22:56:14.000000000 -0200 -+++ ./HLLib/WADFile.cpp 2013-02-11 17:56:51.300216459 -0200 -@@ -200,9 +200,13 @@ - hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], (hlUInt)pLump->iType, hlTrue); - return hlTrue; - } -+ default: -+ ; - } - break; - } -+ default: -+ ; - } - - return hlFalse; -Only in ./HLLib: WADFile.cpp.orig -diff -ru ../orig/HLLib/XZPFile.cpp ./HLLib/XZPFile.cpp --- a/games/hllib/files/patch-HLLib-XZPFile.cpp +++ /dev/null @@ -1,27 +0,0 @@ ---- ../orig/HLLib/XZPFile.cpp 2010-10-31 22:49:18.000000000 -0200 -+++ ./HLLib/XZPFile.cpp 2013-02-11 17:56:51.302217604 -0200 -@@ -197,7 +197,7 @@ - for(hlUInt i = 0; i < this->pHeader->uiDirectoryEntryCount; i++) - { - hlChar lpTemp[16] = ""; -- hlChar *lpLookup[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" }; -+ const hlChar *lpLookup[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" }; - for(hlByte *lpCRC = (hlByte *)&this->lpDirectoryEntries[i].uiFileNameCRC; lpCRC < (hlByte *)&this->lpDirectoryEntries[i].uiFileNameCRC + sizeof(hlUInt); lpCRC++) - { - strcat(lpTemp, lpLookup[(hlByte)(*lpCRC >> 4)]); -@@ -299,9 +299,13 @@ - hlAttributeSetUnsignedInteger(&Attribute, this->lpItemAttributeNames[eAttribute], uiSize, hlFalse); - return hlTrue; - } -+ default: -+ ; - } - break; - } -+ default: -+ ; - } - - return hlFalse; -Only in ./HLLib: XZPFile.cpp.orig -diff -ru ../orig/HLLib/ZIPFile.cpp ./HLLib/ZIPFile.cpp --- a/games/hllib/files/patch-HLLib-ZIPFile.cpp +++ /dev/null @@ -1,24 +0,0 @@ ---- ../orig/HLLib/ZIPFile.cpp 2012-09-18 19:51:30.000000000 -0300 -+++ ./HLLib/ZIPFile.cpp 2013-02-11 17:56:51.305211203 -0200 -@@ -393,9 +393,13 @@ - delete []lpComment; - return hlTrue; - } -+ default: -+ ; - } - break; - } -+ default: -+ ; - } - - return hlFalse; -@@ -598,4 +602,4 @@ - { - delete []static_cast(static_cast(Stream).GetBuffer()); - } --} -\ No newline at end of file -+} -Only in ./HLLib: ZIPFile.cpp.orig --- /dev/null +++ b/games/hllib/files/patch-HLLib_SGAFile.cpp @@ -0,0 +1,123 @@ +--- HLLib/SGAFile.cpp.orig 2021-05-29 21:01:07 UTC ++++ HLLib/SGAFile.cpp +@@ -301,37 +301,37 @@ CSGAFile::CSGADirectory + hlBool CSGAFile::CSGADirectory::MapDataStructures() + { +- if(!this->File.pMapping->Map(this->pHeaderDirectoryView, sizeof(SGAHeader), static_cast(this->File.pHeader)->uiHeaderLength)) ++ if(!this->File.pMapping->Map(this->pHeaderDirectoryView, sizeof(TSGAHeader), static_cast(this->File.pHeader)->uiHeaderLength)) + { + return hlFalse; + } + +- this->pDirectoryHeader = static_cast(this->pHeaderDirectoryView->GetView()); ++ this->pDirectoryHeader = static_cast(this->pHeaderDirectoryView->GetView()); + +- if(this->pDirectoryHeader->uiSectionCount > 0 && this->pDirectoryHeader->uiSectionOffset + sizeof(SGASection) * this->pDirectoryHeader->uiSectionCount > static_cast(this->File.pHeader)->uiHeaderLength) ++ if(this->pDirectoryHeader->uiSectionCount > 0 && this->pDirectoryHeader->uiSectionOffset + sizeof(TSGASection) * this->pDirectoryHeader->uiSectionCount > static_cast(this->File.pHeader)->uiHeaderLength) + { + LastError.SetErrorMessage("Invalid file: the file map is too small for section data."); + return hlFalse; + } +- if(this->pDirectoryHeader->uiFolderCount > 0 && this->pDirectoryHeader->uiFolderOffset + sizeof(SGAFolder) * this->pDirectoryHeader->uiFolderCount > static_cast(this->File.pHeader)->uiHeaderLength) ++ if(this->pDirectoryHeader->uiFolderCount > 0 && this->pDirectoryHeader->uiFolderOffset + sizeof(TSGAFolder) * this->pDirectoryHeader->uiFolderCount > static_cast(this->File.pHeader)->uiHeaderLength) + { + LastError.SetErrorMessage("Invalid file: the file map is too small for folder data."); + return hlFalse; + } +- if(this->pDirectoryHeader->uiFileCount > 0 && this->pDirectoryHeader->uiFileOffset + sizeof(SGAFile) * this->pDirectoryHeader->uiFileCount > static_cast(this->File.pHeader)->uiHeaderLength) ++ if(this->pDirectoryHeader->uiFileCount > 0 && this->pDirectoryHeader->uiFileOffset + sizeof(TSGAFile) * this->pDirectoryHeader->uiFileCount > static_cast(this->File.pHeader)->uiHeaderLength) + { + LastError.SetErrorMessage("Invalid file: the file map is too small for file data."); + return hlFalse; + } +- if(this->pDirectoryHeader->uiStringTableOffset > static_cast(this->File.pHeader)->uiHeaderLength) ++ if(this->pDirectoryHeader->uiStringTableOffset > static_cast(this->File.pHeader)->uiHeaderLength) + { + LastError.SetErrorMessage("Invalid file: the file map is too small for string table data."); + return hlFalse; + } + +- this->lpSections = reinterpret_cast(reinterpret_cast(this->pDirectoryHeader) + this->pDirectoryHeader->uiSectionOffset); +- this->lpFolders = reinterpret_cast(reinterpret_cast(this->pDirectoryHeader) + this->pDirectoryHeader->uiFolderOffset); +- this->lpFiles = reinterpret_cast(reinterpret_cast(this->pDirectoryHeader) + this->pDirectoryHeader->uiFileOffset); ++ this->lpSections = reinterpret_cast(reinterpret_cast(this->pDirectoryHeader) + this->pDirectoryHeader->uiSectionOffset); ++ this->lpFolders = reinterpret_cast(reinterpret_cast(this->pDirectoryHeader) + this->pDirectoryHeader->uiFolderOffset); ++ this->lpFiles = reinterpret_cast(reinterpret_cast(this->pDirectoryHeader) + this->pDirectoryHeader->uiFileOffset); + this->lpStringTable = reinterpret_cast(reinterpret_cast(this->pDirectoryHeader) + this->pDirectoryHeader->uiStringTableOffset); + + return hlTrue; +@@ -352,7 +352,7 @@ hlVoid CSGAFile::CSGADirectory + CDirectoryFolder *CSGAFile::CSGADirectory::CreateRoot() + { +- CDirectoryFolder *pRoot = new CDirectoryFolder(&File); ++ CDirectoryFolder *pRoot = new CDirectoryFolder(&this->File); + + for(hlUInt i = 0; i < this->pDirectoryHeader->uiSectionCount; i++) + { +@@ -558,7 +558,7 @@ hlBool CSGAFile::CSGADirectory(pItem); +- const SGAFile &File = this->lpFiles[pFile->GetID()]; ++ const TSGAFile &File = this->lpFiles[pFile->GetID()]; + switch(eAttribute) + { + case HL_SGA_ITEM_SECTION_ALIAS: +@@ -613,7 +613,7 @@ template::GetFileExtractableInternal(const CDirectoryFile *pFile, hlBool &bExtractable) const + { + #if !USE_ZLIB +- const SGAFile &File = this->lpFiles[pFile->GetID()]; ++ const TSGAFile &File = this->lpFiles[pFile->GetID()]; + + bExtractable = File.uiType == 0; + #else +@@ -831,7 +831,7 @@ hlBool CSGAFile::CSGASpecializedDirectory + hlBool CSGAFile::CSGADirectory::GetFileSizeInternal(const CDirectoryFile *pFile, hlUInt &uiSize) const + { +- const SGAFile &File = this->lpFiles[pFile->GetID()]; ++ const TSGAFile &File = this->lpFiles[pFile->GetID()]; + + uiSize = File.uiSize; + +@@ -841,7 +841,7 @@ hlBool CSGAFile::CSGADirectory + hlBool CSGAFile::CSGADirectory::GetFileSizeOnDiskInternal(const CDirectoryFile *pFile, hlUInt &uiSize) const + { +- const SGAFile &File = this->lpFiles[pFile->GetID()]; ++ const TSGAFile &File = this->lpFiles[pFile->GetID()]; + + uiSize = File.uiSizeOnDisk; + +@@ -851,18 +851,18 @@ hlBool CSGAFile::CSGADirectory + hlBool CSGAFile::CSGADirectory::CreateStreamInternal(const CDirectoryFile *pFile, Streams::IStream *&pStream) const + { +- const SGAFile &File = this->lpFiles[pFile->GetID()]; ++ const TSGAFile &File = this->lpFiles[pFile->GetID()]; + + if(File.uiType == 0) + { +- pStream = new Streams::CMappingStream(*this->File.pMapping, static_cast(this->File.pHeader)->uiFileDataOffset + File.uiOffset, File.uiSizeOnDisk); ++ pStream = new Streams::CMappingStream(*this->File.pMapping, static_cast(this->File.pHeader)->uiFileDataOffset + File.uiOffset, File.uiSizeOnDisk); + return hlTrue; + } + else + { + #if USE_ZLIB + Mapping::CView *pFileDataView = 0; +- if(this->File.pMapping->Map(pFileDataView, static_cast(this->File.pHeader)->uiFileDataOffset + File.uiOffset, File.uiSizeOnDisk)) ++ if(this->File.pMapping->Map(pFileDataView, static_cast(this->File.pHeader)->uiFileDataOffset + File.uiOffset, File.uiSizeOnDisk)) + { + hlBool bResult = hlFalse; + hlByte *lpInflateBuffer = new hlByte[File.uiSize]; +@@ -905,4 +905,4 @@ hlVoid CSGAFile::CSGADirectory(static_cast(Stream).GetBuffer()); + } +-} +\ No newline at end of file ++} --- /dev/null +++ b/games/hllib/files/patch-HLLib_SGAFile.h @@ -0,0 +1,60 @@ +--- HLLib/SGAFile.h.orig 2021-05-29 20:58:37 UTC ++++ HLLib/SGAFile.h +@@ -163,11 +163,11 @@ namespace HLLib + class CSGASpecializedDirectory : public ISGADirectory + { + public: +- typedef typename TSGAHeader SGAHeader; +- typedef typename TSGADirectoryHeader SGADirectoryHeader; +- typedef typename TSGASection SGASection; +- typedef typename TSGAFolder SGAFolder; +- typedef typename TSGAFile SGAFile; ++ typedef TSGAHeader SGAHeader; ++ typedef TSGADirectoryHeader SGADirectoryHeader; ++ typedef TSGASection SGASection; ++ typedef TSGAFolder SGAFolder; ++ typedef TSGAFile SGAFile; + + CSGASpecializedDirectory(CSGAFile& File); + +@@ -192,10 +192,10 @@ namespace HLLib + class CSGASpecializedDirectory : public ISGADirectory + { + public: +- typedef typename TSGAHeader SGAHeader; +- typedef typename TSGADirectoryHeader SGADirectoryHeader; +- typedef typename TSGASection SGASection; +- typedef typename TSGAFolder SGAFolder; ++ typedef TSGAHeader SGAHeader; ++ typedef TSGADirectoryHeader SGADirectoryHeader; ++ typedef TSGASection SGASection; ++ typedef TSGAFolder SGAFolder; + typedef CSGAFile::SGAFile4 SGAFile; + + CSGASpecializedDirectory(CSGAFile& File); +@@ -221,10 +221,10 @@ namespace HLLib + class CSGASpecializedDirectory : public ISGADirectory + { + public: +- typedef typename TSGAHeader SGAHeader; +- typedef typename TSGADirectoryHeader SGADirectoryHeader; +- typedef typename TSGASection SGASection; +- typedef typename TSGAFolder SGAFolder; ++ typedef TSGAHeader SGAHeader; ++ typedef TSGADirectoryHeader SGADirectoryHeader; ++ typedef TSGASection SGASection; ++ typedef TSGAFolder SGAFolder; + typedef CSGAFile::SGAFile6 SGAFile; + + CSGASpecializedDirectory(CSGAFile& File); +@@ -276,10 +276,6 @@ namespace HLLib + typedef CSGADirectory CSGADirectory6; + typedef CSGADirectory CSGADirectory7; + +- friend CSGADirectory4; +- friend CSGADirectory5; +- friend CSGADirectory6; +- friend CSGADirectory7; + + private: + static const char *lpAttributeNames[]; --- b/games/hllib/pkg-descr +++ b/games/hllib/pkg-descr @@ -6,4 +6,4 @@ standard C imports). HLLib works natively in both Windows and *nix. BSP, GCF, NCF, PAK, SGA, VPK, WAD, XZP, and ZIP (store/deflate) package formats are supported. -WWW: http://nemesis.thewavelength.net/index.php?p=35 +WWW: https://developer.valvesoftware.com/wiki/HLLib