diff --git a/packages/graphics/libjpeg-turbo-host/build b/packages/graphics/libjpeg-turbo-host/build
deleted file mode 100755
index ef7c36fb67..0000000000
--- a/packages/graphics/libjpeg-turbo-host/build
+++ /dev/null
@@ -1,44 +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 .
-################################################################################
-
-. config/options $1
-
-$SCRIPTS/unpack libjpeg-turbo
-
-LIBJPEG_DIR=`ls -d $BUILD/libjpeg-turbo-[0-9]*`
-
-setup_toolchain host
-
-CFLAGS="$CFLAGS -fPIC -DPIC"
-
-cd $LIBJPEG_DIR
-mkdir -p .build-host && cd .build-host
-../configure --host=$HOST_NAME \
- --build=$HOST_NAME \
- --prefix=$ROOT/$TOOLCHAIN \
- --sysconfdir=$ROOT/$TOOLCHAIN/etc \
- --localstatedir=/var \
- --enable-static \
- --disable-shared \
- --with-jpeg8 \
- --without-simd
-
-make
-make install
diff --git a/packages/graphics/libjpeg-turbo-host/meta b/packages/graphics/libjpeg-turbo-host/meta
deleted file mode 100644
index c0ddef9a84..0000000000
--- a/packages/graphics/libjpeg-turbo-host/meta
+++ /dev/null
@@ -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 .
-################################################################################
-
-PKG_NAME="libjpeg-turbo-host"
-PKG_VERSION=""
-PKG_REV="1"
-PKG_ARCH="any"
-PKG_LICENSE="GPL"
-PKG_SITE="http://libjpeg-turbo.virtualgl.org/"
-PKG_URL=""
-PKG_DEPENDS=""
-PKG_BUILD_DEPENDS="toolchain"
-PKG_PRIORITY="optional"
-PKG_SECTION="graphics"
-PKG_SHORTDESC="libjpeg-turbo: a high-speed version of libjpeg for x86 and x86-64 processors which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG compression and decompression."
-PKG_LONGDESC="libjpeg-turbo is a high-speed version of libjpeg for x86 and x86-64 processors which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG compression and decompression. libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal."
-PKG_IS_ADDON="no"
-
-PKG_AUTORECONF="no"
diff --git a/packages/graphics/libjpeg-turbo/build b/packages/graphics/libjpeg-turbo/build
deleted file mode 100755
index 166b614a8b..0000000000
--- a/packages/graphics/libjpeg-turbo/build
+++ /dev/null
@@ -1,43 +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 .
-################################################################################
-
-. config/options $1
-
-CFLAGS="$CFLAGS -fPIC -DPIC"
-
-if [ $SIMD_SUPPORT = "no" ]; then
- LIBJPEG_SIMD="--without-simd"
-fi
-
-cd $PKG_BUILD
-mkdir -p .build-target && cd .build-target
-../configure --host=$TARGET_NAME \
- --build=$HOST_NAME \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --enable-static \
- --disable-shared \
- --with-jpeg8 \
- $LIBJPEG_SIMD
-
-make
-
-$MAKEINSTALL
diff --git a/packages/graphics/libjpeg-turbo/meta b/packages/graphics/libjpeg-turbo/package.mk
similarity index 72%
rename from packages/graphics/libjpeg-turbo/meta
rename to packages/graphics/libjpeg-turbo/package.mk
index 568a53e54c..478eaaeff9 100644
--- a/packages/graphics/libjpeg-turbo/meta
+++ b/packages/graphics/libjpeg-turbo/package.mk
@@ -23,12 +23,37 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://libjpeg-turbo.virtualgl.org/"
PKG_URL="$SOURCEFORGE_SRC/libjpeg-turbo/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz"
-PKG_DEPENDS=""
-PKG_BUILD_DEPENDS="toolchain"
+PKG_DEPENDS_HOST=""
+PKG_DEPENDS_TARGET=""
+PKG_BUILD_DEPENDS_HOST="toolchain"
+PKG_BUILD_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="graphics"
PKG_SHORTDESC="libjpeg-turbo: a high-speed version of libjpeg for x86 and x86-64 processors which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG compression and decompression."
PKG_LONGDESC="libjpeg-turbo is a high-speed version of libjpeg for x86 and x86-64 processors which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG compression and decompression. libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal."
-PKG_IS_ADDON="no"
+PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
+
+PKG_CONFIGURE_OPTS_HOST="--enable-static \
+ --disable-shared \
+ --with-jpeg8 \
+ --without-simd"
+
+PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared --with-jpeg8"
+
+pre_configure_host() {
+ export CFLAGS="$CFLAGS -fPIC -DPIC"
+}
+
+pre_configure_target() {
+ export CFLAGS="$CFLAGS -fPIC -DPIC"
+}
+
+if [ $SIMD_SUPPORT = "no" ]; then
+ PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --without-simd"
+fi
+
+post_makeinstall_target() {
+ rm -rf $INSTALL/usr/bin
+}
diff --git a/packages/multimedia/SDL_image-host/meta b/packages/multimedia/SDL_image-host/meta
index 820c78fcca..c46404a368 100644
--- a/packages/multimedia/SDL_image-host/meta
+++ b/packages/multimedia/SDL_image-host/meta
@@ -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"