diff --git a/archivers/Makefile b/archivers/Makefile index b822ef0cddb6..d5d9a7c17e85 100644 --- a/archivers/Makefile +++ b/archivers/Makefile @@ -1,276 +1,277 @@ COMMENT = Archivers SUBDIR += 7-zip SUBDIR += 9e SUBDIR += R-cran-zip SUBDIR += advancecomp SUBDIR += amigadepacker SUBDIR += apache-commons-compress SUBDIR += arc SUBDIR += arj SUBDIR += ark SUBDIR += atool SUBDIR += bicom SUBDIR += brotli SUBDIR += bzip SUBDIR += bzip2 SUBDIR += c-blosc SUBDIR += c-blosc2 SUBDIR += cabextract + SUBDIR += ccmix SUBDIR += cmdpack SUBDIR += dact SUBDIR += deb2targz SUBDIR += deco SUBDIR += deutex SUBDIR += dpkg SUBDIR += draco SUBDIR += dzip SUBDIR += engrampa SUBDIR += fastjar SUBDIR += file-roller SUBDIR += fpc-bzip2 SUBDIR += fpc-unzip SUBDIR += gcab SUBDIR += gcpio SUBDIR += gnome-autoar SUBDIR += grzip SUBDIR += gtar SUBDIR += gzip SUBDIR += gzip-hpp SUBDIR += gzrecover SUBDIR += ha SUBDIR += hlextract SUBDIR += innoextract SUBDIR += javatar SUBDIR += jzlib SUBDIR += kf5-karchive SUBDIR += kzip SUBDIR += laszip SUBDIR += lazperf SUBDIR += lbrate SUBDIR += lbzip2 SUBDIR += lcab SUBDIR += lha SUBDIR += lha-ac SUBDIR += lhasa SUBDIR += lib1541img SUBDIR += libarc SUBDIR += libarchive SUBDIR += libarchive-qt SUBDIR += libcabinet SUBDIR += libcomprex SUBDIR += libdeflate SUBDIR += libdynamite SUBDIR += liblz4 SUBDIR += liblzxcomp SUBDIR += libmspack SUBDIR += libpar2 SUBDIR += librtfcomp SUBDIR += libunrar SUBDIR += libunrar6 SUBDIR += libzip SUBDIR += libzippp SUBDIR += linux-c7-lz4 SUBDIR += lizard SUBDIR += lrzip SUBDIR += lua-lzlib SUBDIR += lua-zlib SUBDIR += lxqt-archiver SUBDIR += lzfse SUBDIR += lzip SUBDIR += lziprecover SUBDIR += lzlib SUBDIR += lzma SUBDIR += lzmalib SUBDIR += lzo2 SUBDIR += lzop SUBDIR += makeself SUBDIR += mar SUBDIR += maxcso SUBDIR += minizip SUBDIR += minizip-ng SUBDIR += mscompress SUBDIR += mtf SUBDIR += nfpm SUBDIR += nomarch SUBDIR += nwreckdum SUBDIR += ocaml-bz2 SUBDIR += ocaml-zip SUBDIR += opkg-openwrt SUBDIR += p5-Archive-Any SUBDIR += p5-Archive-Any-Lite SUBDIR += p5-Archive-Any-Plugin-Rar SUBDIR += p5-Archive-Extract SUBDIR += p5-Archive-Extract-Libarchive SUBDIR += p5-Archive-Peek SUBDIR += p5-Archive-Rar SUBDIR += p5-Archive-SimpleExtractor SUBDIR += p5-Archive-Tar SUBDIR += p5-Archive-Tar-Wrapper SUBDIR += p5-Archive-Zip SUBDIR += p5-Compress-Bzip2 SUBDIR += p5-Compress-LZ4 SUBDIR += p5-Compress-LZF SUBDIR += p5-Compress-LZO SUBDIR += p5-Compress-LZW SUBDIR += p5-Compress-Raw-Bzip2 SUBDIR += p5-Compress-Raw-Lzma SUBDIR += p5-Compress-Raw-Zlib SUBDIR += p5-Compress-Snappy SUBDIR += p5-Compress-Zstd SUBDIR += p5-Gzip-Faster SUBDIR += p5-IO-Compress SUBDIR += p5-IO-Compress-Brotli SUBDIR += p5-IO-Compress-Lzf SUBDIR += p5-IO-Compress-Lzma SUBDIR += p5-IO-Compress-Lzop SUBDIR += p5-IO-Zlib SUBDIR += p5-Mac-Macbinary SUBDIR += p5-POE-Filter-Bzip2 SUBDIR += p5-POE-Filter-LZF SUBDIR += p5-POE-Filter-LZO SUBDIR += p5-POE-Filter-LZW SUBDIR += p5-POE-Filter-Zlib SUBDIR += p5-PerlIO-gzip SUBDIR += p5-PerlIO-via-Bzip2 SUBDIR += packddir SUBDIR += paq SUBDIR += par SUBDIR += par2cmdline SUBDIR += parchive SUBDIR += pbzip2 SUBDIR += pear-File_Archive SUBDIR += pear-Horde_Compress SUBDIR += pear-Horde_Compress_Fast SUBDIR += pear-Horde_Pack SUBDIR += pear-PHP_Archive SUBDIR += peazip SUBDIR += pecl-lzf SUBDIR += pecl-rar SUBDIR += php-brotli SUBDIR += php-horde_lz4 SUBDIR += php-lz4 SUBDIR += php-snappy SUBDIR += php-zstd SUBDIR += php74-bz2 SUBDIR += php74-phar SUBDIR += php74-zip SUBDIR += php74-zlib SUBDIR += php80-bz2 SUBDIR += php80-phar SUBDIR += php80-zip SUBDIR += php80-zlib SUBDIR += php81-bz2 SUBDIR += php81-phar SUBDIR += php81-zip SUBDIR += php81-zlib SUBDIR += php82-bz2 SUBDIR += php82-phar SUBDIR += php82-zip SUBDIR += php82-zlib SUBDIR += pigz SUBDIR += pixz SUBDIR += plzip SUBDIR += ppmd SUBDIR += ppmd-7z SUBDIR += ppunpack SUBDIR += pxz SUBDIR += py-acefile SUBDIR += py-borgbackup SUBDIR += py-brotli SUBDIR += py-brotlicffi SUBDIR += py-brotlipy SUBDIR += py-bup SUBDIR += py-bz2file SUBDIR += py-libarchive-c SUBDIR += py-lz4 SUBDIR += py-lzma SUBDIR += py-lzstring SUBDIR += py-python-lhafile SUBDIR += py-python-lzo SUBDIR += py-python-rpm-packaging SUBDIR += py-python-snappy SUBDIR += py-rarfile SUBDIR += py-rcssmin SUBDIR += py-rjsmin SUBDIR += py-warctools SUBDIR += py-xopen SUBDIR += py-zopfli SUBDIR += py-zstandard SUBDIR += py-zstd SUBDIR += qpress SUBDIR += quazip SUBDIR += rar SUBDIR += rpm2cpio SUBDIR += rpm4 SUBDIR += rubygem-archive-tar-minitar SUBDIR += rubygem-archive-zip SUBDIR += rubygem-bzip2-ruby SUBDIR += rubygem-fpm SUBDIR += rubygem-libarchive SUBDIR += rubygem-minitar SUBDIR += rubygem-minitar-cli SUBDIR += rubygem-ruby-xz SUBDIR += rubygem-rubyzip SUBDIR += rubygem-rubyzip13 SUBDIR += rubygem-rubyzip2 SUBDIR += rubygem-rubyzip20 SUBDIR += rubygem-snappy SUBDIR += rvm SUBDIR += rzip SUBDIR += sectar SUBDIR += sharutils SUBDIR += snappy SUBDIR += snappy-java SUBDIR += snzip SUBDIR += squsq SUBDIR += star SUBDIR += stormlib SUBDIR += streamvbyte SUBDIR += stuffit SUBDIR += szip SUBDIR += tar-stream-chunker SUBDIR += tardy SUBDIR += thunar-archive-plugin SUBDIR += torrentzip SUBDIR += ucl SUBDIR += unace SUBDIR += unadf SUBDIR += unalz SUBDIR += unarchiver SUBDIR += unarj SUBDIR += unarr SUBDIR += undms SUBDIR += unfoo SUBDIR += unlzx SUBDIR += unmakeself SUBDIR += unmass SUBDIR += unrar SUBDIR += unrar-iconv SUBDIR += unrpa SUBDIR += unshield SUBDIR += unzip SUBDIR += unzoo SUBDIR += upx SUBDIR += urbackup-client SUBDIR += urbackup-server SUBDIR += v1541commander SUBDIR += vbz-compression SUBDIR += xar SUBDIR += xarchive SUBDIR += xarchiver SUBDIR += xdms SUBDIR += xmill SUBDIR += xpk SUBDIR += zchunk SUBDIR += zip SUBDIR += zipmix SUBDIR += zipper SUBDIR += zlib-ng SUBDIR += zoo SUBDIR += zopfli SUBDIR += zstd SUBDIR += zstr SUBDIR += zutils .include diff --git a/archivers/ccmix/Makefile b/archivers/ccmix/Makefile new file mode 100644 index 000000000000..b6b43c06115e --- /dev/null +++ b/archivers/ccmix/Makefile @@ -0,0 +1,42 @@ +PORTNAME= ccmix +PORTVERSION= g20170612 +CATEGORIES= archivers games +MASTER_SITES= SF/xccu/XCC%20Mixer/XCC%20Mixer%201.44:dat +DISTFILES= XCC_Mixer-1.44.zip:dat + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Westwood Studios MIX format file manipulator + +LICENSE= GPLv2+ + +LIB_DEPENDS= libcryptopp.so:security/cryptopp + +USES= gmake pkgconfig +USE_GITHUB= yes +GH_ACCOUNT= OmniBlade +GH_TAGNAME= 4369c8f + +PLIST_FILES= bin/ccmix bin/gmdedit bin/mixkey \ + ${DATADIR_REL}/global\ mix\ database.dat +PORTDOCS= README.md + +OPTIONS_DEFINE= DOCS + +post-patch: + @${REINPLACE_CMD} -e '/ccmix program usage/s,/n,\\n, ; \ + /gmd_dir/s,/usr/share/ccmix,${DATADIR},' \ + ${WRKSRC}/src/ccmix.cpp + +do-install: + ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/build/* \ + ${STAGEDIR}${PREFIX}/bin + @${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKDIR}/global\ mix\ database.dat \ + ${STAGEDIR}${DATADIR} + +do-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S,^,${INSTALL_WRKSRC}/,} \ + ${STAGEDIR}${DOCSDIR} + +.include diff --git a/archivers/ccmix/distinfo b/archivers/ccmix/distinfo new file mode 100644 index 000000000000..e1ce6b2867b4 --- /dev/null +++ b/archivers/ccmix/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1497276455 +SHA256 (OmniBlade-ccmix-g20170612-4369c8f_GH0.tar.gz) = 523d0894aa6b00596813c397c01fd579dee9b2a6145a77e0f2b0c6b655a6fa66 +SIZE (OmniBlade-ccmix-g20170612-4369c8f_GH0.tar.gz) = 1695028 +SHA256 (XCC_Mixer-1.44.zip) = 7b3654f483b5da40af64d2d232c4c00a3e50be75aed75298bbc56dd9778f78f8 +SIZE (XCC_Mixer-1.44.zip) = 691768 diff --git a/archivers/ccmix/files/patch-Makefile b/archivers/ccmix/files/patch-Makefile new file mode 100644 index 000000000000..b854792c5592 --- /dev/null +++ b/archivers/ccmix/files/patch-Makefile @@ -0,0 +1,32 @@ +--- Makefile.orig 2017-06-12 14:07:35 UTC ++++ Makefile +@@ -1,4 +1,5 @@ +-CXXFLAGS=-g -Wall -Wextra -DNDEBUG $(OPTFLAGS) ++CXXFLAGS+=-Wall -Wextra -DNDEBUG $(OPTFLAGS) ++CPPFLAGS+=$(shell pkg-config --cflags libcryptopp) + LIBS=$(OPTLIBS) + PREFIX?=/usr/local + CC=g++ +@@ -19,11 +20,11 @@ gmd: $(OBJECTS) src/gmdedit/gmdedit.o + dev: all + + gmd: $(OBJECTS) src/gmdedit/gmdedit.o +- $(CC) src/gmdedit/gmdedit.o src/mixid.o src/mix_db_gamedb.o src/mix_db_gmd.o \ ++ $(CXX) $(CXXFLAGS) src/gmdedit/gmdedit.o src/mixid.o src/mix_db_gamedb.o src/mix_db_gmd.o \ + -o build/gmdedit + + mixkey: src/mixkey/mixkey.o src/mixkey/mix_dexoder.o +- $(CC) src/mixkey/mixkey.o src/mixkey/mix_dexoder.o -o build/mixkey -lcryptopp ++ $(CXX) $(CXXFLAGS) src/mixkey/mixkey.o src/mixkey/mix_dexoder.o -o build/mixkey $(shell pkg-config --libs libcryptopp) + + win32: + /usr/bin/make -f Makefile.win32 CC=i586-mingw32msvc-g++ \ +@@ -31,7 +32,7 @@ $(TARGET): build $(OBJECTS) + + + $(TARGET): build $(OBJECTS) +- $(CC) $(OBJECTS) -o $(TARGET) -lcryptopp ++ $(CXX) $(CXXFLAGS) $(OBJECTS) -o $(TARGET) $(shell pkg-config --libs libcryptopp) + + build: + @mkdir -p build diff --git a/archivers/ccmix/files/patch-src_gmdedit_gmdedit.cpp b/archivers/ccmix/files/patch-src_gmdedit_gmdedit.cpp new file mode 100644 index 000000000000..90450086b9a4 --- /dev/null +++ b/archivers/ccmix/files/patch-src_gmdedit_gmdedit.cpp @@ -0,0 +1,24 @@ +--- src/gmdedit/gmdedit.cpp.orig 2017-06-12 14:07:35 UTC ++++ src/gmdedit/gmdedit.cpp +@@ -83,10 +83,6 @@ int main(int argc, char** argv) { + std::fstream ofh; + std::vector names; + +- ifh.open(argv[1], std::ios_base::in|std::ios_base::binary); +- gmd.readDB(ifh); +- ifh.close(); +- + if(argc < 4){ + //menu(); + std::cout << "Use: gmdedit gmdpath additionspath newgmdpath\n"; +@@ -106,6 +102,10 @@ int main(int argc, char** argv) { + } + } + } ++ ++ ifh.open(argv[1], std::ios_base::in|std::ios_base::binary); ++ gmd.readDB(ifh); ++ ifh.close(); + + for(unsigned int i = 0; i < names.size(); i++) { + gmd.addName(game, names[i].first, names[i].second); diff --git a/archivers/ccmix/files/patch-src_mix__file.cpp b/archivers/ccmix/files/patch-src_mix__file.cpp new file mode 100644 index 000000000000..f89a57552846 --- /dev/null +++ b/archivers/ccmix/files/patch-src_mix__file.cpp @@ -0,0 +1,11 @@ +--- src/mix_file.cpp.orig 2017-06-12 14:07:35 UTC ++++ src/mix_file.cpp +@@ -75,7 +75,7 @@ bool MixFile::open(const string path) + if (fh.is_open()) + close(); + +- fh.open(path.c_str(), fstream::in | fstream::out | fstream::binary); ++ fh.open(path.c_str(), fstream::in | fstream::binary); + if (!fh.is_open()) { + cout << "File " << path << " failed to open" << endl; + return false; diff --git a/archivers/ccmix/files/patch-src_mixid.cpp b/archivers/ccmix/files/patch-src_mixid.cpp new file mode 100644 index 000000000000..e6b2720b15d6 --- /dev/null +++ b/archivers/ccmix/files/patch-src_mixid.cpp @@ -0,0 +1,46 @@ +From c55a16f2a142c55f344480c3eecc6ecdedcfa735 Mon Sep 17 00:00:00 2001 +From: askeladdk +Date: Sat, 2 Jan 2016 14:15:35 +0100 +Subject: [PATCH] The filenames of unidentified files will be used as the + internal ID without being re-hashed. This lets you repack + unidentified files easily. Unidentified filenames are + detected if their name is exactly 8 characters long and + does not contain a dot ('.'). + +--- src/mixid.cpp.orig 2017-06-12 14:07:35 UTC ++++ src/mixid.cpp +@@ -8,7 +8,7 @@ namespace MixID + { + namespace + { +- int32_t crc_table[256] = { ++ uint32_t crc_table[256] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, + 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, + 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, +@@ -42,8 +42,6 @@ namespace MixID + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, + 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d}; + +- const char* marker = "[id]"; +- + uint32_t do_block(const void* data, int size); + + uint32_t do_block(const void* data, int size) +@@ -62,7 +60,7 @@ namespace MixID + { + //if the filename starts [id] treat next 8 chars as an id to convert to int + if(isIdName(fname)){ +- return strId(fname.substr(4, 8)); ++ return strId(fname); + } + std::transform(fname.begin(), fname.end(), fname.begin(), + (int(*)(int)) toupper); // convert to uppercase +@@ -128,6 +126,6 @@ namespace MixID + + bool isIdName(std::string fname) + { +- return !strncmp(fname.c_str(), marker, strlen(marker)); ++ return (fname.size() == 8) && (fname.find('.') == std::string::npos); + } + } diff --git a/archivers/ccmix/pkg-descr b/archivers/ccmix/pkg-descr new file mode 100644 index 000000000000..ae9cd3e0b2af --- /dev/null +++ b/archivers/ccmix/pkg-descr @@ -0,0 +1,9 @@ +ccmix is a command-line tool to create and extract from archive files in +the Westwood Studios MIX format. The tool can create any of the three main +variants used in classic Westwood games. These are Tiberian Dawn versions, +Red Alert versions with both encrypted and unencrypted file headers, and +Tiberian Sun versions with encrypted and unencrypted file headers. It also +optionally adds the XCC extension of including a local filenames database +to allow recovery of filenames from the one way hash they are stored as. + +WWW: https://github.com/OmniBlade/ccmix