media-libs/libpgf: new recipe (#2085)

This commit is contained in:
alaviss
2018-01-08 19:44:17 +07:00
committed by fbrosson
parent 62d3b64540
commit be7059dd55
2 changed files with 112 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
SUMMARY="An implementation of the Progressive Graphics File (PGF)"
DESCRIPTION="libpgf is a library implementing an interface for handling \
PGF (Progressive Graphic File) format files."
HOMEPAGE="http://www.libpgf.org/"
COPYRIGHT="2006 xeraina GmbH, Switzerland"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://downloads.sourceforge.net/libpgf/libpgf/$portVersion-latest/libPGF-codec-and-console-src.zip"
CHECKSUM_SHA256="f1dd054b09b0f3651209d67529490b4cbc156a985d8b019ff3bfe575260f4221"
SOURCE_FILENAME="libpgf-$portVersion.zip"
SOURCE_DIR="PGF/Codec"
PATCHES="libpgf-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
libVersion="7.0.15"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libpgf$secondaryArchSuffix = $portVersion
lib:libpgf$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libpgf${secondaryArchSuffix}_devel = $portVersion
devel:libpgf$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libpgf$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:doxygen
cmd:g++$secondaryArchSuffix
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage libpgf$secondaryArchSuffix \
"$libDir/libpgf.so.$libVersion"
BUILD()
{
sh ./autogen.sh
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm -f "$libDir"/*.la
install -d -m 755 "$developDocDir"
mv "$dataDir/doc/libpgf-$portVersion/html" "$developDocDir"
rm -rf "$dataDir" "$manDir"
prepareInstalledDevelLib libpgf
fixPkgconfig
packageEntries devel "$developDir"
}

View File

@@ -0,0 +1,39 @@
From b9dcd0b355909011e35ed00ecab17a68cc008dca Mon Sep 17 00:00:00 2001
From: Leorize <alaviss@users.noreply.github.com>
Date: Mon, 8 Jan 2018 14:16:07 +0700
Subject: PGFplatform: add Haiku support
diff --git a/include/PGFplatform.h b/include/PGFplatform.h
index 22634ac..e54097b 100644
--- a/include/PGFplatform.h
+++ b/include/PGFplatform.h
@@ -352,6 +352,25 @@ inline OSError SetFPos(HANDLE hFile, int posMode, INT64 posOff) {
#endif // __NetBSD__ or __OpenBSD__ or __FreeBSD__
+//-------------------------------------------------------------------------------
+// HAIKU
+//-------------------------------------------------------------------------------
+#ifdef __HAIKU__
+#ifndef __POSIX__
+#define __POSIX__
+#endif
+
+#ifndef off64_t
+#define off64_t off_t
+#endif
+
+#ifndef lseek64
+#define lseek64 lseek
+#endif
+
+#endif // __HAIKU__
+
+
//-------------------------------------------------------------------------------
// POSIX *NIXes
//-------------------------------------------------------------------------------
--
2.15.0