glew: convert to new package format

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2014-01-17 14:40:30 +01:00
parent 4d8cb24d38
commit d46f26610c
2 changed files with 19 additions and 39 deletions

View File

@ -1,36 +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
cd $PKG_BUILD
make CC="$CC" LD="$CC" AR="$AR" \
POPT="$CFLAGS" LDFLAGS.EXTRA="$LDFLAGS" \
GLEW_DEST="/usr" LIBDIR="/usr/lib" lib/libGLEW.a glew.pc
mkdir -p $SYSROOT_PREFIX/usr/lib
cp -PR lib/libGLEW.a $SYSROOT_PREFIX/usr/lib
mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig
cp -PR glew.pc $SYSROOT_PREFIX/usr/lib/pkgconfig
mkdir -p $SYSROOT_PREFIX/usr/include
cp -PR include/GL $SYSROOT_PREFIX/usr/include

View File

@ -23,14 +23,14 @@ PKG_ARCH="any"
PKG_LICENSE="BSD"
PKG_SITE="http://glew.sourceforge.net/"
PKG_URL="$SOURCEFORGE_SRC/glew/glew/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tgz"
PKG_DEPENDS="libX11 libXext libXi"
PKG_BUILD_DEPENDS="toolchain libX11 libXext libXi libXmu"
PKG_DEPENDS_TARGET="libX11 libXext libXi"
PKG_BUILD_DEPENDS_TARGET="toolchain libX11 libXext libXi libXmu"
PKG_PRIORITY="optional"
PKG_SECTION="graphics"
PKG_SHORTDESC="glew: The OpenGL Extension Wrangler Library"
PKG_LONGDESC="The OpenGL Extension Wrangler Library (GLEW) is a cross-platform C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. OpenGL core and extension functionality is exposed in a single header file."
PKG_IS_ADDON="no"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
if [ "$OPENGL" = "Mesa" ]; then
@ -38,3 +38,19 @@ if [ "$OPENGL" = "Mesa" ]; then
PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS Mesa glu"
fi
make_target() {
make CC="$CC" LD="$CC" AR="$AR" \
POPT="$CFLAGS" LDFLAGS.EXTRA="$LDFLAGS" \
GLEW_DEST="/usr" LIBDIR="/usr/lib" lib/libGLEW.a glew.pc
}
makeinstall_target() {
mkdir -p $SYSROOT_PREFIX/usr/lib
cp -PR lib/libGLEW.a $SYSROOT_PREFIX/usr/lib
mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig
cp -PR glew.pc $SYSROOT_PREFIX/usr/lib/pkgconfig
mkdir -p $SYSROOT_PREFIX/usr/include
cp -PR include/GL $SYSROOT_PREFIX/usr/include
}