SUMMARY="7-zip file compression program"
DESCRIPTION="p7zip is a port of 7za.exe (command line 7-Zip) for POSIX systems. 7-Zip is a file archiver with a high compression ratio in 7z format with LZMA and LZMA2 compression. It provides a compression ratio that is 2-10% better than the ratio provided by PKZip and WinZip, and features AES-256 encryption in 7z and ZIP formats. 7-Zip also self-extracts files in 7z format.

Supported Formats:
- Packing/Unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP, and WIM
- Unpacking Only: ARJ, CAB, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, RAR, RPM, SquashFS, UDF, VHD, WIM, XAR, and Z."
HOMEPAGE="http://p7zip.sourceforge.net"
SOURCE_URI="http://downloads.sourceforge.net/project/p7zip/p7zip/9.13/p7zip_9.13_src_all.tar.bz2"
CHECKSUM_SHA256="fc9c0fa2eabd367d6adbc3ea07bb305dbdc1f68717eea362c8c074b91c03d923"
LICENSE="GNU LGPL v2.1"
COPYRIGHT="1999-2010 7-Zip Igor Pavlov."
REVISION="2"
ARCHITECTURES="x86_gcc2 ?x86"

PATCHES="p7zip-9.13.patch"

PROVIDES="
	p7zip = $portVersion
	cmd:7za = $portVersion compat >= 9
	"
REQUIRES="
	haiku
	"
BUILD_REQUIRES="
	"
BUILD_PREREQUIRES="
	haiku_devel
	cmd:gcc
	cmd:ld
	cmd:make
	"

SOURCE_DIR="p7zip_9.13"

BUILD()
{
	cp makefile.haiku makefile.machine
	make
}

INSTALL()
{
	make install DEST_DIR=$prefix DEST_HOME=$prefix DEST_SHARE_DOC=$docDir \
		DEST_MAN=$manDir
}
