libpng: convert to new package format

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2014-01-20 22:57:14 +01:00
parent 9f13fbc087
commit d4259ac6e9
5 changed files with 29 additions and 127 deletions

View File

@ -1,42 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
. config/options $1
$SCRIPTS/unpack libpng
LIBPNG_DIR=`ls -d $BUILD/libpng-[0-9]*`
setup_toolchain host
export CPPFLAGS="$CPPFLAGS -I$ROOT/$TOOLCHAIN/include"
cd $LIBPNG_DIR
mkdir -p .build-host && cd .build-host
../configure --host=$HOST_NAME \
--build=$HOST_NAME \
--prefix=$ROOT/$TOOLCHAIN \
--sysconfdir=$ROOT/$TOOLCHAIN/etc \
--disable-static \
--enable-shared \
make
make install

View File

@ -1,34 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="libpng"
PKG_VERSION=""
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="OSS"
PKG_SITE="http://www.libpng.org/"
PKG_URL=""
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain zlib:host"
PKG_PRIORITY="optional"
PKG_SECTION="graphics"
PKG_SHORTDESC="libpng: Portable Network Graphics (PNG) Reference Library"
PKG_LONGDESC="PNG (Portable Network Graphics) is an extensible file format for the lossless, portable, well-compressed storage of raster images. PNG provides a patent-free replacement for GIF and can also replace many common uses of TIFF. Indexed-color, grayscale, and truecolor images are supported, plus an optional alpha channel. Sample depths range from 1 to 16 bits."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -1,47 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
. config/options $1
CFLAGS="$CFLAGS -fPIC -DPIC"
export CPPFLAGS="$CPPFLAGS -I$SYSROOT_PREFIX/usr/include"
cd $PKG_BUILD
mkdir -p .build-target && cd .build-target
ac_cv_lib_z_zlibVersion=yes \
../configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--sysconfdir=/etc \
--enable-static \
--disable-shared \
make
$MAKEINSTALL
$SED "s:\([\"'= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" \
$SYSROOT_PREFIX/usr/bin/libpng*-config
$SED "s:libs=\"-lpng15\":libs=\"-lpng15 -lz\":g" \
$SYSROOT_PREFIX/usr/bin/libpng*-config
cp -P $SYSROOT_PREFIX/usr/bin/libpng*-config $ROOT/$TOOLCHAIN/bin

View File

@ -23,12 +23,37 @@ PKG_ARCH="any"
PKG_LICENSE="OSS"
PKG_SITE="http://www.libpng.org/"
PKG_URL="$SOURCEFORGE_SRC/libpng/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS="zlib"
PKG_BUILD_DEPENDS="toolchain zlib"
PKG_DEPENDS_HOST=""
PKG_DEPENDS_TARGET="zlib"
PKG_BUILD_DEPENDS_HOST="toolchain zlib:host"
PKG_BUILD_DEPENDS_TARGET="toolchain zlib"
PKG_PRIORITY="optional"
PKG_SECTION="graphics"
PKG_SHORTDESC="libpng: Portable Network Graphics (PNG) Reference Library"
PKG_LONGDESC="PNG (Portable Network Graphics) is an extensible file format for the lossless, portable, well-compressed storage of raster images. PNG provides a patent-free replacement for GIF and can also replace many common uses of TIFF. Indexed-color, grayscale, and truecolor images are supported, plus an optional alpha channel. Sample depths range from 1 to 16 bits."
PKG_IS_ADDON="no"
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
PKG_CONFIGURE_OPTS_TARGET="ac_cv_lib_z_zlibVersion=yes \
--enable-static \
--disable-shared"
pre_configure_host() {
export CPPFLAGS="$CPPFLAGS -I$ROOT/$TOOLCHAIN/include"
}
pre_configure_target() {
export CFLAGS="$CFLAGS -fPIC -DPIC"
export CPPFLAGS="$CPPFLAGS -I$SYSROOT_PREFIX/usr/include"
}
post_makeinstall_target() {
sed -e "s:\([\"'= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" \
-e "s:libs=\"-lpng15\":libs=\"-lpng15 -lz\":g" \
-i $SYSROOT_PREFIX/usr/bin/libpng*-config
cp -P $SYSROOT_PREFIX/usr/bin/libpng*-config $ROOT/$TOOLCHAIN/bin
rm -rf $INSTALL/usr/bin
}

View File

@ -24,7 +24,7 @@ PKG_LICENSE="GPL"
PKG_SITE="http://www.libsdl.org/"
PKG_URL=""
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain SDL-host libpng-host libjpeg-turbo-host"
PKG_BUILD_DEPENDS="toolchain SDL-host libpng:host libjpeg-turbo-host"
PKG_PRIORITY="optional"
PKG_SECTION="multimedia"
PKG_SHORTDESC="libsdl_image: A cross-platform Graphic API"