summaryrefslogtreecommitdiff
path: root/media-libs/stimg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-libs/stimg
reinit the tree, so we can have metadata
Diffstat (limited to 'media-libs/stimg')
-rw-r--r--media-libs/stimg/Manifest6
-rw-r--r--media-libs/stimg/files/stimg-0.1.0-libpng15.patch37
-rw-r--r--media-libs/stimg/metadata.xml8
-rw-r--r--media-libs/stimg/stimg-0.1.0.ebuild36
4 files changed, 87 insertions, 0 deletions
diff --git a/media-libs/stimg/Manifest b/media-libs/stimg/Manifest
new file mode 100644
index 000000000000..22d785b9cc97
--- /dev/null
+++ b/media-libs/stimg/Manifest
@@ -0,0 +1,6 @@
+AUX stimg-0.1.0-libpng15.patch 1445 SHA256 b90c277e5749157dbfb5776885757350fb461e079fb499ba6bd2b0142be3e129 SHA512 a615da45ba3579e92e246ead3784cba6802b4543c60528d7fbf7d660a7593e8083bab8d05a7c0f42fa4b0628c59c9cec5fc567a48f3c4627e05742e229f1fb94 WHIRLPOOL 331b8d7737addbe5520740a9cbb887ae280f34b297690752473d664274f73e2578ab82bebf1a9177daf7b0499c42d20f78a791a429438b3433bdba7219e74b25
+DIST stimg-0.1.0.tar.gz 187172 SHA256 1098daac6fb37bd0135d700605d99cdbb8b8a9c9e16cdc892b3018a8534fb528 SHA512 6a2b938e3fdac9bd079664a276e7091adc62fe60a386e5f575afe455e355e3639799171c0729131ee8d99c6b86776d64fecb3a85f15eb4ec5a4559e4cc1326a9 WHIRLPOOL 26e3116c5d7ebee3b66f680c69eb94f7f4afa8a1a3d9df5cb1f6490d1113f4ea55558e5f46e8784539221a8a70352e4312a55fbf375e1713e028a8c0d92ba00e
+EBUILD stimg-0.1.0.ebuild 760 SHA256 2c577ef8081264238f8f9211b3d286d81285faefa0fddf938ceb9a21feb04031 SHA512 3c7d65b16f699b39d56ed9c8efb270f99abba2bbe69011aba4d37ade2f9832a237521bdb1874380d8b5b8267c1873f11b0f98cdce17131a4d4aa8b0d79a2b131 WHIRLPOOL 155914531cdf2c136fd7fdbff4d9571b894da4444879606d6bd55449e54eec6690149af66277ce81f7a95e1c4be42e326545daf2a74468dfcba73c92a14779b8
+MISC ChangeLog 2458 SHA256 23a2059ed754ce7c7f83e0ef579b745571fbe799e1421806ff9ac7c513f18af5 SHA512 1136452d7bd0bb64567a8c5b2e2f970544f05652689689e3300507e4e54be16c1212a8c54e5ccf161696ac36c3856d2f892f3855259f0e7187cc97ed00a15df6 WHIRLPOOL 8dbb89f42b3e48a790c401ba3b038709c75bedc0d2ea63d7c21fd475c796726c7035edcd79754b1d9775cb2460fcf1b10782d565900136e3141fccf6d74110c5
+MISC ChangeLog-2015 1577 SHA256 31eeac6e4446358b2364804307eda95c5136ddac3835838a6d85fd18c4109771 SHA512 10bdfc07ae93f3d3e8e1f0b4cf666937736cba088616236bf0b9290398876df8ed0b59216ed66f5a14b24699aa6d2d297f3b5161feb78202039ef427400d3b68 WHIRLPOOL 693098371ee313bda912c4e8ca39fb712be8cf3159cbfcc0f06df025436362a36c66f9ef5393dc6344b7bc8da177f25080b8e800072dab81e37bf02e29b791e4
+MISC metadata.xml 265 SHA256 db1cfbffc28a5904257a8fbd4f99c081aa42b08239ff8d97aa299983b32d58fd SHA512 65fd64249e8dde8eb2ddcb67c58c05b36b10e51956e2237f60dd3ae50872492f3d5872b64106acb13e453a41960f4f817161be3c8b89e6b9a2367b8f1403ffaf WHIRLPOOL ea60bca9e9cd33aa65e8800ca0bc1c3e84a3f4cad168d7d3d8a8b73d335b866442271f1b027f7f1a6d69dbd1408555c495a581a9280c0b217036a6b736276906
diff --git a/media-libs/stimg/files/stimg-0.1.0-libpng15.patch b/media-libs/stimg/files/stimg-0.1.0-libpng15.patch
new file mode 100644
index 000000000000..41ae138f1b1f
--- /dev/null
+++ b/media-libs/stimg/files/stimg-0.1.0-libpng15.patch
@@ -0,0 +1,37 @@
+--- src/png.c
++++ src/png.c
+@@ -102,8 +102,8 @@
+ 0x00,
+ NULL);
+
+- alpha = (info_ptr->channels == 4 || info_ptr->channels == 2) ? 1: 0;
+- image = stimg_new(info_ptr->width, info_ptr->height, alpha);
++ alpha = (png_get_channels(png_ptr, info_ptr) == 4 || png_get_channels(png_ptr, info_ptr) == 2) ? 1: 0;
++ image = stimg_new(png_get_image_width(png_ptr, info_ptr), png_get_image_height(png_ptr, info_ptr), alpha);
+
+ if (image == NULL) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+@@ -112,18 +112,18 @@
+ }
+
+ row_pointers = png_get_rows(png_ptr, info_ptr);
+- row_size = info_ptr->width * (3 + alpha);
++ row_size = png_get_image_width(png_ptr, info_ptr) * (3 + alpha);
+ data = stimg_get_data(image);
+- if (info_ptr->channels > 2) {
+- for (i = 0; i < info_ptr->height; i++) {
++ if (png_get_channels(png_ptr, info_ptr) > 2) {
++ for (i = 0; i < png_get_image_height(png_ptr, info_ptr); i++) {
+ memcpy(data + row_size * i, row_pointers[i], row_size);
+ }
+ } else {
+ unsigned char *buf = data;
+ int x;
+- for (i = 0; i < info_ptr->height; i++) {
++ for (i = 0; i < png_get_image_height(png_ptr, info_ptr); i++) {
+ x = 0;
+- for (j = 0; j < info_ptr->width; j++) {
++ for (j = 0; j < png_get_image_width(png_ptr, info_ptr); j++) {
+ buf[0] = buf[1] = buf[2] = row_pointers[i][x];
+ if (alpha) {
+ buf[3] = row_pointers[i][++x];
diff --git a/media-libs/stimg/metadata.xml b/media-libs/stimg/metadata.xml
new file mode 100644
index 000000000000..6ade85e1c642
--- /dev/null
+++ b/media-libs/stimg/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>graphics@gentoo.org</email>
+ <name>Gentoo Graphics Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-libs/stimg/stimg-0.1.0.ebuild b/media-libs/stimg/stimg-0.1.0.ebuild
new file mode 100644
index 000000000000..970a96a7b2c7
--- /dev/null
+++ b/media-libs/stimg/stimg-0.1.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Simple and tiny image loading library"
+HOMEPAGE="http://homepage3.nifty.com/slokar/fb/"
+SRC_URI="http://homepage3.nifty.com/slokar/stimg/${P}.tar.gz"
+
+LICENSE="LGPL-2+ MIT-with-advertising"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc x86"
+IUSE="linguas_ja static-libs"
+
+RDEPEND="media-libs/libpng
+ media-libs/tiff
+ virtual/jpeg"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+}
+
+src_configure() {
+ tc-export CC
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -exec rm -f {} +
+ use linguas_ja && dodoc README.ja
+}