mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
libnsgif0.2, revive base package for gegl (#9937)
This commit is contained in:
54
media-libs/libnsgif/libnsgif0.2-0.2.1.recipe
Normal file
54
media-libs/libnsgif/libnsgif0.2-0.2.1.recipe
Normal file
@@ -0,0 +1,54 @@
|
||||
SUMMARY="A decoding library for GIF images"
|
||||
DESCRIPTION="Libnsgif is a decoding library for GIF image file format"
|
||||
HOMEPAGE="https://www.netsurf-browser.org/projects/libnsgif/"
|
||||
COPYRIGHT="2003-2018 The NetSurf Developers"
|
||||
LICENSE="MIT"
|
||||
REVISION="4"
|
||||
SOURCE_URI="https://download.netsurf-browser.org/libs/releases/libnsgif-$portVersion-src.tar.gz"
|
||||
CHECKSUM_SHA256="9eaea534cd70b53c5aaf45317ae957701685a6b4a88dbe34ed26f4faae879a4b"
|
||||
SOURCE_DIR="libnsgif-$portVersion"
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
||||
PATCHES="libnsgif-$portVersion-gcc2.patchset"
|
||||
fi
|
||||
|
||||
ARCHITECTURES="all"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
libnsgif0.2$secondaryArchSuffix = $portVersion
|
||||
lib:libnsgif$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
netsurf_buildsystem >= 1.6
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make PREFIX="$prefix" NSSHARED=/system/data/netsurf-buildsystem \
|
||||
COMPONENT_TYPE=lib-shared
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make PREFIX="$prefix" NSSHARED=/system/data/netsurf-buildsystem \
|
||||
COMPONENT_TYPE=lib-shared \
|
||||
INCLUDEDIR=$relativeIncludeDir install \
|
||||
LIBDIR=$relativeLibDir
|
||||
|
||||
prepareInstalledDevelLib libnsgif
|
||||
fixPkgconfig
|
||||
|
||||
rm -rf $developDir
|
||||
}
|
||||
46
media-libs/libnsgif/patches/libnsgif-0.2.1-gcc2.patchset
Normal file
46
media-libs/libnsgif/patches/libnsgif-0.2.1-gcc2.patchset
Normal file
@@ -0,0 +1,46 @@
|
||||
From de35bdb4f508cdf9a900781209dfb196d4f5acbe Mon Sep 17 00:00:00 2001
|
||||
From: fbrosson <fbrosson@localhost>
|
||||
Date: Sun, 23 Sep 2018 08:41:22 +0000
|
||||
Subject: C89 fixes for gcc2 compatibility
|
||||
|
||||
|
||||
diff --git a/src/lzw.c b/src/lzw.c
|
||||
index 31cf7d4..355b14e 100644
|
||||
--- a/src/lzw.c
|
||||
+++ b/src/lzw.c
|
||||
@@ -178,11 +178,10 @@ static inline lzw_result lzw__next_code(
|
||||
uint8_t bits_remaining_0 = (code_size < (8 - current_bit)) ?
|
||||
code_size : (8 - current_bit);
|
||||
uint8_t bits_remaining_1 = code_size - bits_remaining_0;
|
||||
- uint8_t bits_used[3] = {
|
||||
- [0] = bits_remaining_0,
|
||||
- [1] = bits_remaining_1 < 8 ? bits_remaining_1 : 8,
|
||||
- [2] = bits_remaining_1 - 8,
|
||||
- };
|
||||
+ uint8_t bits_used[3];
|
||||
+ bits_used[0] = bits_remaining_0;
|
||||
+ bits_used[1] = bits_remaining_1 < 8 ? bits_remaining_1 : 8;
|
||||
+ bits_used[2] = bits_remaining_1 - 8;
|
||||
|
||||
while (true) {
|
||||
const uint8_t *data = ctx->sb_data;
|
||||
@@ -271,6 +270,7 @@ lzw_result lzw_decode_init(
|
||||
const uint8_t ** const stack_pos_out)
|
||||
{
|
||||
struct lzw_dictionary_entry *table = ctx->table;
|
||||
+ uint32_t i;
|
||||
|
||||
/* Initialise the input reading context */
|
||||
ctx->input.data = compressed_data;
|
||||
@@ -287,7 +287,7 @@ lzw_result lzw_decode_init(
|
||||
ctx->eoi_code = (1 << code_size) + 1;
|
||||
|
||||
/* Initialise the standard dictionary entries */
|
||||
- for (uint32_t i = 0; i < ctx->clear_code; ++i) {
|
||||
+ for (i = 0; i < ctx->clear_code; ++i) {
|
||||
table[i].first_value = i;
|
||||
table[i].last_value = i;
|
||||
}
|
||||
--
|
||||
2.19.0
|
||||
|
||||
Reference in New Issue
Block a user