From cb8111a9c8a8793ab9816775845bdfa759b1bfa7 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Wed, 17 Jul 2013 06:19:17 +0200 Subject: [PATCH] freetype: convert ot new package format Signed-off-by: Stephan Raue --- packages/print/freetype/build | 49 -------------------- packages/print/freetype/install | 26 ----------- packages/print/freetype/{meta => package.mk} | 23 ++++++++- 3 files changed, 21 insertions(+), 77 deletions(-) delete mode 100755 packages/print/freetype/build delete mode 100755 packages/print/freetype/install rename packages/print/freetype/{meta => package.mk} (74%) diff --git a/packages/print/freetype/build b/packages/print/freetype/build deleted file mode 100755 index a25c6a2b64..0000000000 --- a/packages/print/freetype/build +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program 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, or (at your option) -# any later version. -# -# This Program 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.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -# unset LIBTOOL because freetype uses its own -unset LIBTOOL - -cd $PKG_BUILD - -sh autogen.sh -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --with-zlib - -make - -$MAKEINSTALL - -$SED "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" \ - $SYSROOT_PREFIX/usr/bin/$1-config - -mv $SYSROOT_PREFIX/usr/bin/$1-config $ROOT/$TOOLCHAIN/bin - -ln -v -sf $SYSROOT_PREFIX/usr/include/freetype2/freetype $SYSROOT_PREFIX/usr/include diff --git a/packages/print/freetype/install b/packages/print/freetype/install deleted file mode 100755 index 32aedd9259..0000000000 --- a/packages/print/freetype/install +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program 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, or (at your option) -# any later version. -# -# This Program 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.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/objs/.libs/libfreetype.so* $INSTALL/usr/lib diff --git a/packages/print/freetype/meta b/packages/print/freetype/package.mk similarity index 74% rename from packages/print/freetype/meta rename to packages/print/freetype/package.mk index 35df10f1db..2d78de58fd 100644 --- a/packages/print/freetype/meta +++ b/packages/print/freetype/package.mk @@ -26,11 +26,30 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.freetype.org" PKG_URL="http://download.savannah.gnu.org/releases/freetype/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="zlib" -PKG_BUILD_DEPENDS="toolchain zlib libpng" +PKG_BUILD_DEPENDS_TARGET="toolchain zlib libpng" PKG_PRIORITY="optional" PKG_SECTION="print" PKG_SHORTDESC="freetype: TrueType font rendering library" PKG_LONGDESC="The FreeType engine is a free and portable TrueType font rendering engine. It has been developed to provide TT support to a great variety of platforms and environments." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="no" + +# package specific configure options +PKG_CONFIGURE_OPTS_TARGET="--with-zlib" + +pre_configure_target() { + # unset LIBTOOL because freetype uses its own + ( cd .. + unset LIBTOOL + sh autogen.sh + ) +} + +post_makeinstall_target() { + $SED "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/bin/freetype-config + mv $SYSROOT_PREFIX/usr/bin/freetype-config $ROOT/$TOOLCHAIN/bin + ln -v -sf $SYSROOT_PREFIX/usr/include/freetype2/freetype $SYSROOT_PREFIX/usr/include + + rm -rf $INSTALL/usr/bin +}