From 8c8e58a2ee673b5dbd79c3d18c3a43680e917a87 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sat, 2 Jan 2010 11:26:24 -0600 Subject: [PATCH] [alpha] Recognize and use "--sysroot=DIR" in libpng-config.in and libpng.pc.in Recognize and use environment variable $PKG_CONFIG_SYSROOT_DIR as default setting of ${sysroot} in libpng.pc.in --- ANNOUNCE | 7 +++++-- CHANGES | 7 +++++-- libpng-config.in | 11 ++++++----- libpng.pc.in | 9 +++++---- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 9f429890b..68f15a6a9 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -49,8 +49,8 @@ version 1.4.1alpha02 [December 11, 2009] Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco to put png.h and pngconf.h in $prefix/include, like the other scripts, instead of in $prefix/include/libpng. Also revised makefile.sco - to put them in $prefix/include/libpng14 instead of in - $prefix/include/libpng/libpng14. + to put them in $prefix/include/libpng15 instead of in + $prefix/include/libpng/libpng15. Relocated png_do_chop() to its original position in pngrtran.c; the change in version 1.2.41beta08 caused transparency to be handled wrong in some 16-bit datastreams (Yusaku Sugai). @@ -67,6 +67,9 @@ version 1.5.0alpha01 [January 2, 2010] Makefile.in to be consistent with changes in libpng-1.4.0rc03 Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr in pngtest.c + Recognize and use "--sysroot=DIR" in libpng-config.in and libpng.pc.in + Recognize and use environment variable $PKG_CONFIG_SYSROOT_DIR as default + setting of ${sysroot} in libpng.pc.in Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 046df494d..58a459b99 100644 --- a/CHANGES +++ b/CHANGES @@ -2431,8 +2431,8 @@ version 1.4.1alpha02 [December 11, 2009] Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco to put png.h and pngconf.h in $prefix/include, like the other scripts, instead of in $prefix/include/libpng. Also revised makefile.sco - to put them in $prefix/include/libpng14 instead of in - $prefix/include/libpng/libpng14. + to put them in $prefix/include/libpng15 instead of in + $prefix/include/libpng/libpng15. Relocated png_do_chop() to its original position in pngrtran.c; the change in version 1.2.41beta08 caused transparency to be handled wrong in some 16-bit datastreams (Yusaku Sugai). @@ -2450,6 +2450,9 @@ version 1.5.0alpha01 [January 2, 2010] Updated copyright year to 2010. Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr in pngtest.c + Recognize and use "--sysroot=DIR" in libpng-config.in and libpng.pc.in + Recognize and use environment variable $PKG_CONFIG_SYSROOT_DIR as default + setting of ${sysroot} in libpng.pc.in Send comments/corrections/commendations to png-mng-implement at lists.sf.net diff --git a/libpng-config.in b/libpng-config.in index 2987cef8e..50d344206 100755 --- a/libpng-config.in +++ b/libpng-config.in @@ -3,7 +3,7 @@ # libpng-config # provides configuration info for libpng. -# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson +# Copyright (C) 2002, 2004, 2006, 2007, 2010 Glenn Randers-Pehrson # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer @@ -11,11 +11,12 @@ # Modeled after libxml-config. +sysroot="" version="@PNGLIB_VERSION@" -prefix="@prefix@" -exec_prefix="@exec_prefix@" -libdir="@libdir@" -includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@" +prefix="${sysroot}@prefix@" +exec_prefix="${sysroot}@exec_prefix@" +libdir="${sysroot}@libdir@" +includedir="${sysroot}@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@" libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@" all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@" I_opts="-I${includedir}" diff --git a/libpng.pc.in b/libpng.pc.in index 3e7e2c58a..4ba1c6263 100644 --- a/libpng.pc.in +++ b/libpng.pc.in @@ -1,7 +1,8 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ +sysroot=${PKG_CONFIG_SYSROOT_DIR} +prefix=${sysroot}@prefix@ +exec_prefix=${sysroot}@exec_prefix@ +libdir=${sysroot}@libdir@ +includedir=${sysroot}@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ Name: libpng Description: Loads and saves PNG files