distribution/packages/graphics/libpng/package.mk

36 lines
1.1 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
PKG_NAME="libpng"
2022-12-24 22:18:36 +00:00
PKG_VERSION="1.6.39"
2022-02-05 14:23:32 +00:00
PKG_LICENSE="LibPNG2"
PKG_SITE="http://www.libpng.org/"
2022-12-26 12:18:11 +00:00
PKG_URL="${SOURCEFORGE_SRC}/libpng/${PKG_NAME}-${PKG_VERSION}.tar.xz"
2022-02-05 14:23:32 +00:00
PKG_DEPENDS_HOST="zlib:host"
PKG_DEPENDS_TARGET="toolchain zlib"
PKG_LONGDESC="An extensible file format for the lossless, portable, well-compressed storage of raster images."
PKG_TOOLCHAIN="configure"
PKG_BUILD_FLAGS="+pic +pic:host"
PKG_CONFIGURE_OPTS_TARGET="ac_cv_lib_z_zlibVersion=yes \
--enable-static \
--enable-shared"
PKG_CONFIGURE_OPTS_HOST="--enable-static --disable-shared"
2022-02-05 14:23:32 +00:00
pre_configure_host() {
2022-12-26 12:18:11 +00:00
export CPPFLAGS="$CPPFLAGS -I${TOOLCHAIN}/include"
2022-02-05 14:23:32 +00:00
}
pre_configure_target() {
2022-12-26 12:18:11 +00:00
export CPPFLAGS="${CPPFLAGS} -I${SYSROOT_PREFIX}/usr/include"
2022-02-05 14:23:32 +00:00
}
post_makeinstall_target() {
2022-12-26 12:18:11 +00:00
sed -e "s:\([\"'= ]\)/usr:\\1${SYSROOT_PREFIX}/usr:g" \
2022-02-05 14:23:32 +00:00
-e "s:libs=\"-lpng16\":libs=\"-lpng16 -lz\":g" \
2022-12-26 12:18:11 +00:00
-i ${SYSROOT_PREFIX}/usr/bin/libpng*-config
2022-02-05 14:23:32 +00:00
2022-12-26 12:18:11 +00:00
rm -rf ${INSTALL}/usr/bin
2022-02-05 14:23:32 +00:00
}