From d02db5c8f687c9ed6a6935f5416191cd52ce16c5 Mon Sep 17 00:00:00 2001 From: nys Date: Sat, 30 Dec 2017 00:20:09 +0800 Subject: [PATCH] steghide: new recipe (#1996) --- .../steghide/patches/steghide-0.5.1.patchset | 96 +++++++++++++++++++ app-crypt/steghide/steghide-0.5.1.recipe | 69 +++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 app-crypt/steghide/patches/steghide-0.5.1.patchset create mode 100644 app-crypt/steghide/steghide-0.5.1.recipe diff --git a/app-crypt/steghide/patches/steghide-0.5.1.patchset b/app-crypt/steghide/patches/steghide-0.5.1.patchset new file mode 100644 index 000000000..e5127d3f3 --- /dev/null +++ b/app-crypt/steghide/patches/steghide-0.5.1.patchset @@ -0,0 +1,96 @@ +From 0cfb3d091cc4cd236042c5c4b784f2f240e6a3b1 Mon Sep 17 00:00:00 2001 +From: nys <33534144+nysnatuss@users.noreply.github.com> +Date: Fri, 29 Dec 2017 21:48:53 +0000 +Subject: fix steghide code + + +diff --git a/src/AuData.h b/src/AuData.h +index b4ccc9a..ebb4663 100644 +--- a/src/AuData.h ++++ b/src/AuData.h +@@ -26,22 +26,30 @@ + + // AuMuLawAudioData + typedef AudioDataImpl AuMuLawAudioData ; ++template <> + inline BYTE AuMuLawAudioData::readValue (BinaryIO* io) const { return (io->read8()) ; } ++template <> + inline void AuMuLawAudioData::writeValue (BinaryIO* io, BYTE v) const { io->write8(v) ; } + + // AuPCM8AudioData + typedef AudioDataImpl AuPCM8AudioData ; ++template <> + inline SBYTE AuPCM8AudioData::readValue (BinaryIO* io) const { return ((SBYTE) io->read8()) ; } ++template <> + inline void AuPCM8AudioData::writeValue (BinaryIO* io, SBYTE v) const { io->write8((BYTE) v) ; } + + // AuPCM16AudioData + typedef AudioDataImpl AuPCM16AudioData ; ++template <> + inline SWORD16 AuPCM16AudioData::readValue (BinaryIO* io) const { return ((SWORD16) io->read16_be()) ; } ++template <> + inline void AuPCM16AudioData::writeValue (BinaryIO* io, SWORD16 v) const { io->write16_be((UWORD16) v) ; } + + // AuPCM32AudioData + typedef AudioDataImpl AuPCM32AudioData ; ++template <> + inline SWORD32 AuPCM32AudioData::readValue (BinaryIO* io) const { return ((SWORD32) io->read32_be()) ; } ++template <> + inline void AuPCM32AudioData::writeValue (BinaryIO* io, SWORD32 v) const { io->write32_be((UWORD32) v) ; } + + #endif // ndef SH_AUDATA_H +diff --git a/src/AuSampleValues.cc b/src/AuSampleValues.cc +index 64709f3..de884e8 100644 +--- a/src/AuSampleValues.cc ++++ b/src/AuSampleValues.cc +@@ -21,17 +21,25 @@ + #include "AuSampleValues.h" + + // AuMuLawSampleValue ++template <> + const BYTE AuMuLawSampleValue::MinValue = 0 ; ++template <> + const BYTE AuMuLawSampleValue::MaxValue = BYTE_MAX ; + + // AuPCM8SampleValue ++template <> + const SBYTE AuPCM8SampleValue::MinValue = SBYTE_MIN ; ++template <> + const SBYTE AuPCM8SampleValue::MaxValue = SBYTE_MAX ; + + // AuPCM16SampleValue ++template <> + const SWORD16 AuPCM16SampleValue::MinValue = SWORD16_MIN ; ++template <> + const SWORD16 AuPCM16SampleValue::MaxValue = SWORD16_MAX ; + + // AuPCM32SampleValue ++template <> + const SWORD32 AuPCM32SampleValue::MinValue = SWORD32_MIN ; ++template <> + const SWORD32 AuPCM32SampleValue::MaxValue = SWORD32_MAX ; +diff --git a/src/MHashPP.cc b/src/MHashPP.cc +old mode 100755 +new mode 100644 +index 27b3d73..1c4023b +--- a/src/MHashPP.cc ++++ b/src/MHashPP.cc +@@ -120,13 +120,13 @@ std::string MHashPP::getAlgorithmName () + + std::string MHashPP::getAlgorithmName (hashid id) + { +- char *name = mhash_get_hash_name (id) ; ++ unsigned char *name = mhash_get_hash_name (id) ; + std::string retval ; + if (name == NULL) { + retval = std::string ("") ; + } + else { +- retval = std::string (name) ; ++ retval = std::string (reinterpret_cast(name)) ; + } + free (name) ; + return retval ; +-- +2.15.0 + diff --git a/app-crypt/steghide/steghide-0.5.1.recipe b/app-crypt/steghide/steghide-0.5.1.recipe new file mode 100644 index 000000000..2c7963700 --- /dev/null +++ b/app-crypt/steghide/steghide-0.5.1.recipe @@ -0,0 +1,69 @@ +SUMMARY="A Steganography Program" +DESCRIPTION="Steghide is a steganography program that is able to hide data in \ +various kinds of image and audio files. The color respectivly \ +sample-frequencies are not changed thus making the embedding resistant against \ +first-order statistical tests." +HOMEPAGE="http://steghide.sourceforge.net/" +COPYRIGHT="2001-2003 Stefan Hetzl" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://downloads.sourceforge.net/steghide/steghide-$portVersion.tar.bz2" +CHECKSUM_SHA256="a2c7f879a3e22860879889106cc49e486000653f81448264affa0fd616a47da1" +PATCHES="steghide-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86 x86_64" + +PROVIDES=" + steghide = $portVersion + cmd:steghide = $portVersion + " +REQUIRES=" + haiku + lib:libintl + lib:libjpeg + lib:libmhash + lib:libmcrypt + lib:libz + " + +BUILD_REQUIRES=" + haiku_devel + devel:libintl + devel:libjpeg + devel:libmhash + devel:libmcrypt + devel:libz + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoreconf + cmd:gcc + cmd:gettext + cmd:libtoolize + cmd:make + " + +PATCH() +{ + sed -i -e "/^docdir =/ d;" Makefile.am +} + +BUILD() +{ + touch ./NEWS + touch ./AUTHORS + touch ./ChangeLog + autoreconf -vfi + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install +} + +TEST() +{ + make check +}