mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Properly support png 1.5
Obtained from: Gentoo
This commit is contained in:
parent
d42a40daa3
commit
fc6bef1da2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=375456
4 changed files with 37 additions and 30 deletions
|
@ -13,7 +13,7 @@ COMMENT= Open-source program to read and manipulate RAW photo images
|
||||||
LICENSE= GPLv2
|
LICENSE= GPLv2
|
||||||
|
|
||||||
LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
|
LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
|
||||||
libpng15.so:${PORTSDIR}/graphics/png \
|
libpng.so:${PORTSDIR}/graphics/png \
|
||||||
liblcms.so:${PORTSDIR}/graphics/lcms \
|
liblcms.so:${PORTSDIR}/graphics/lcms \
|
||||||
libexiv2.so:${PORTSDIR}/graphics/exiv2 \
|
libexiv2.so:${PORTSDIR}/graphics/exiv2 \
|
||||||
libdbus-1.so:${PORTSDIR}/devel/dbus \
|
libdbus-1.so:${PORTSDIR}/devel/dbus \
|
||||||
|
@ -28,6 +28,7 @@ GNU_CONFIGURE= yes
|
||||||
USE_GNOME= gtk20 libxml2 gconf2
|
USE_GNOME= gtk20 libxml2 gconf2
|
||||||
USE_SQLITE= 3
|
USE_SQLITE= 3
|
||||||
USE_LDCONFIG= yes
|
USE_LDCONFIG= yes
|
||||||
|
INSTALL_TARGET= install-strip
|
||||||
|
|
||||||
CPPFLAGS+= -I${LOCALBASE}/include
|
CPPFLAGS+= -I${LOCALBASE}/include
|
||||||
LDFLAGS+= -L${LOCALBASE}/lib
|
LDFLAGS+= -L${LOCALBASE}/lib
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
--- plugins/load-gdk/exiv2-colorspace.cpp.orig 2011-02-23 23:35:18.000000000 +0100
|
|
||||||
+++ plugins/load-gdk/exiv2-colorspace.cpp 2012-05-12 12:15:07.000000000 +0200
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#include "exiv2-colorspace.h"
|
|
||||||
#include <math.h>
|
|
||||||
#include <png.h>
|
|
||||||
+#include <pngpriv.h>
|
|
||||||
#include <jpeglib.h>
|
|
||||||
|
|
||||||
#ifndef EXIV2_TEST_VERSION
|
|
||||||
@@ -129,7 +130,7 @@
|
|
||||||
{
|
|
||||||
png_uint_32 retval = png_get_iCCP (png_ptr, info_ptr,
|
|
||||||
(png_charpp) &icc_profile_title, &compression_type,
|
|
||||||
- (png_charpp) &icc_profile, (png_uint_32*) &icc_profile_size);
|
|
||||||
+ (png_byte**) (&icc_profile), (png_uint_32*) &icc_profile_size);
|
|
||||||
if (retval != 0)
|
|
||||||
{
|
|
||||||
RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)icc_profile, icc_profile_size, TRUE);
|
|
35
graphics/rawstudio/files/patch-libpng15
Normal file
35
graphics/rawstudio/files/patch-libpng15
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
--- plugins/output-pngfile/output-pngfile.c
|
||||||
|
+++ plugins/output-pngfile/output-pngfile.c
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
#include <gettext.h>
|
||||||
|
#include "config.h"
|
||||||
|
#include <png.h>
|
||||||
|
+#include <zlib.h>
|
||||||
|
|
||||||
|
#define RS_TYPE_PNGFILE (rs_pngfile_type)
|
||||||
|
#define RS_PNGFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PNGFILE, RSPngfile))
|
||||||
|
@@ -198,7 +199,7 @@
|
||||||
|
rs_icc_profile_get_data(profile, &data, &data_length);
|
||||||
|
|
||||||
|
// FIXME: Insert correct profile name
|
||||||
|
- png_set_iCCP(png_ptr, info_ptr, "Profile name", PNG_COMPRESSION_TYPE_BASE, data, data_length);
|
||||||
|
+ png_set_iCCP(png_ptr, info_ptr, "Profile name", PNG_COMPRESSION_TYPE_BASE, (png_const_bytep)data, data_length);
|
||||||
|
if (pngfile->save16bit)
|
||||||
|
png_set_gAMA(png_ptr, info_ptr, 1.0);
|
||||||
|
}
|
||||||
|
--- plugins/load-gdk/exiv2-colorspace.cpp
|
||||||
|
+++ plugins/load-gdk/exiv2-colorspace.cpp
|
||||||
|
@@ -125,11 +125,11 @@
|
||||||
|
|
||||||
|
int compression_type;
|
||||||
|
/* Extract embedded ICC profile */
|
||||||
|
- if (info_ptr->valid & PNG_INFO_iCCP)
|
||||||
|
+ if (png_get_valid(png_ptr, info_ptr, TRUE) & PNG_INFO_iCCP)
|
||||||
|
{
|
||||||
|
png_uint_32 retval = png_get_iCCP (png_ptr, info_ptr,
|
||||||
|
(png_charpp) &icc_profile_title, &compression_type,
|
||||||
|
- (png_charpp) &icc_profile, (png_uint_32*) &icc_profile_size);
|
||||||
|
+ (png_byte**) &icc_profile, (png_uint_32*) &icc_profile_size);
|
||||||
|
if (retval != 0)
|
||||||
|
{
|
||||||
|
RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)icc_profile, icc_profile_size, TRUE);
|
|
@ -1,10 +0,0 @@
|
||||||
--- plugins/output-pngfile/output-pngfile.c.orig 2011-03-26 02:52:29.000000000 +0100
|
|
||||||
+++ plugins/output-pngfile/output-pngfile.c 2012-05-12 14:23:21.000000000 +0200
|
|
||||||
@@ -23,6 +23,7 @@
|
|
||||||
#include <gettext.h>
|
|
||||||
#include "config.h"
|
|
||||||
#include <png.h>
|
|
||||||
+#include <zlib.h>
|
|
||||||
|
|
||||||
#define RS_TYPE_PNGFILE (rs_pngfile_type)
|
|
||||||
#define RS_PNGFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PNGFILE, RSPngfile))
|
|
Loading…
Add table
Reference in a new issue