#
-# Copyright (C) 2006-2009 OpenWrt.org
+# Copyright (C) 2006-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=libdlna
-PKG_VERSION:=0.2.3
+PKG_VERSION:=0.2.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://libdlna.geexbox.org/releases/
-PKG_MD5SUM:=2c974f95b711e5fd07f78fc4ebfcca66
+PKG_MD5SUM:=64d7de57aff5a729f2434fc5e69b4ffc
+
+PKG_LICENSE:=LGPLv2.1+
+PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
--- /dev/null
+--- a/configure
++++ b/configure
+@@ -184,6 +184,19 @@ check_ld(){
+ check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
+ }
+
++check_host_cc(){
++ log check_host_cc "$@"
++ cat >$TMPC
++ log_file $TMPC
++ check_cmd $host_cc $host_cflags "$@" -c -o $TMPO $TMPC
++}
++
++check_host_ld(){
++ log check_host_ld "$@"
++ check_host_cc || return
++ check_cmd $host_cc $host_cflags $host_ldflags "$@" -o $TMPE $TMPO
++}
++
+ check_exec(){
+ check_ld "$@" && { enabled cross_compile || $TMPE >>$logfile 2>&1; }
+ }
+@@ -318,6 +331,7 @@ includedir='$(PREFIX)/include'
+ static="yes"
+ shared="yes"
+ cc="gcc"
++host_cc="gcc"
+ ar="ar"
+ ranlib="ranlib"
+ make="make"
+@@ -465,6 +479,10 @@ else
+ [ -n "$STRIP" ] && strip="$STRIP"
+ fi
+ [ -n "$MAKE" ] && make="$MAKE"
++[ -n "$HOST_CC" ] && host_cc="$HOST_CC"
++[ -n "$HOST_CFLAGS" ] && host_cflags="$HOST_CFLAGS"
++[ -n "$HOST_LDFLAGS" ] && host_ldflags="$HOST_LDFLAGS"
++host_cflags="-Isrc $host_cflags"
+
+ #################################################
+ # create logging file
+@@ -649,8 +667,7 @@ check_lib libavcodec/avcodec.h avcodec_r
+ #################################################
+ # version
+ #################################################
+-temp_cflags "-Isrc"
+-check_ld <<EOF
++check_host_ld <<EOF
+ #include <stdio.h>
+ #include <dlna.h>
+ int main(){
+@@ -660,7 +677,6 @@ int main(){
+ }
+ EOF
+ VERSION=`$TMPE`
+-restore_flags
+
+
+ #################################################
-diff -ruN libdlna-0.2.3.orig/configure libdlna-0.2.3/configure
---- libdlna-0.2.3.orig/configure 2007-11-26 21:47:43.000000000 +0100
-+++ libdlna-0.2.3/configure 2008-04-19 21:59:15.000000000 +0200
-@@ -177,6 +177,19 @@
- check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
- }
-
-+check_host_cc(){
-+ log check_host_cc "$@"
-+ cat >$TMPC
-+ log_file $TMPC
-+ check_cmd $host_cc $host_cflags "$@" -c -o $TMPO $TMPC
-+}
-+
-+check_host_ld(){
-+ log check_host_ld "$@"
-+ check_host_cc || return
-+ check_cmd $host_cc $host_cflags $host_ldflags "$@" -o $TMPE $TMPO
-+}
-+
- check_exec(){
- check_ld "$@" && { enabled cross_compile || $TMPE >>$logfile 2>&1; }
- }
-@@ -311,6 +324,7 @@
- static="yes"
- shared="yes"
- cc="gcc"
-+host_cc="gcc"
- ar="ar"
- ranlib="ranlib"
- make="make"
-@@ -454,6 +468,11 @@
- fi
- [ -n "$MAKE" ] && make="$MAKE"
-
-+[ -n "$HOST_CC" ] && host_cc="$HOST_CC"
-+[ -n "$HOST_CFLAGS" ] && host_cflags="$HOST_CFLAGS"
-+[ -n "$HOST_LDFLAGS" ] && host_ldflags="$HOST_LDFLAGS"
-+host_cflags="-Isrc $host_cflags"
-+
- #################################################
- # create logging file
- #################################################
-@@ -610,15 +629,14 @@
- fi
-
- echolog "Checking for libavformat ..."
--check_lib ffmpeg/avformat.h av_register_all -lavformat || die "Error, can't find libavformat !"
-+check_lib libavformat/avformat.h av_register_all -lavformat -lavcodec -lavutil || die "Error, can't find libavformat !"
- echolog "Checking for libavcodec ..."
--check_lib ffmpeg/avcodec.h avcodec_register_all -lavcodec || die "Error, can't find libavcodec !"
-+check_lib libavcodec/avcodec.h avcodec_register_all -lavcodec || die "Error, can't find libavcodec !"
-
- #################################################
- # version
- #################################################
--temp_cflags "-Isrc"
--check_ld <<EOF
-+check_host_ld <<EOF
- #include <stdio.h>
- #include <dlna.h>
- int main(){
-@@ -628,7 +646,6 @@
- }
- EOF
- VERSION=`$TMPE`
--restore_flags
-
-
- #################################################
-diff -ruN libdlna-0.2.3.orig/src/av_mpeg4_part10.c libdlna-0.2.3/src/av_mpeg4_part10.c
---- libdlna-0.2.3.orig/src/av_mpeg4_part10.c 2007-11-26 21:47:43.000000000 +0100
-+++ libdlna-0.2.3/src/av_mpeg4_part10.c 2008-04-19 21:48:45.000000000 +0200
-@@ -26,7 +26,7 @@
- #include <sys/stat.h>
- #include <fcntl.h>
-
--#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
-
- #include "dlna_internals.h"
- #include "profiles.h"
-diff -ruN libdlna-0.2.3.orig/src/av_mpeg4_part2.c libdlna-0.2.3/src/av_mpeg4_part2.c
---- libdlna-0.2.3.orig/src/av_mpeg4_part2.c 2007-11-26 21:47:43.000000000 +0100
-+++ libdlna-0.2.3/src/av_mpeg4_part2.c 2008-04-19 21:48:45.000000000 +0200
-@@ -26,7 +26,7 @@
- #include <sys/stat.h>
- #include <fcntl.h>
-
--#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
-
- #include "dlna_internals.h"
- #include "profiles.h"
-diff -ruN libdlna-0.2.3.orig/src/containers.c libdlna-0.2.3/src/containers.c
---- libdlna-0.2.3.orig/src/containers.c 2007-11-26 21:47:43.000000000 +0100
-+++ libdlna-0.2.3/src/containers.c 2008-04-19 21:48:45.000000000 +0200
-@@ -4,7 +4,7 @@
- #include <sys/stat.h>
- #include <fcntl.h>
-
--#include <ffmpeg/avformat.h>
-+#include <libavformat/avformat.h>
-
- #include "containers.h"
- #include "profiles.h"
-diff -ruN libdlna-0.2.3.orig/src/profiles.h libdlna-0.2.3/src/profiles.h
---- libdlna-0.2.3.orig/src/profiles.h 2007-11-26 21:47:43.000000000 +0100
-+++ libdlna-0.2.3/src/profiles.h 2008-04-19 21:48:45.000000000 +0200
-@@ -22,8 +22,8 @@
- #ifndef _PROFILES_H_
- #define _PROFILES_H_
-
--#include <ffmpeg/avcodec.h>
--#include <ffmpeg/avformat.h>
-+#include <libavcodec/avcodec.h>
-+#include <libavformat/avformat.h>
-
- #include "dlna_internals.h"
- #include "containers.h"
-Index: libdlna-0.2.3/src/profiles.c
-===================================================================
---- libdlna-0.2.3.orig/src/profiles.c 2011-10-10 13:00:12.000000000 +0200
-+++ libdlna-0.2.3/src/profiles.c 2011-10-10 13:05:52.000000000 +0200
-@@ -205,13 +205,13 @@
+--- a/src/profiles.c
++++ b/src/profiles.c
+@@ -205,13 +205,13 @@ av_profile_get_codecs (AVFormatContext *
for (i = 0; i < ctx->nb_streams; i++)
{
if (audio_stream == -1 &&
-- ctx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
+- ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
+ ctx->streams[i]->codec->codec_type == LIBDLNA_CODEC_TYPE_AUDIO)
{
audio_stream = i;
continue;
}
else if (video_stream == -1 &&
-- ctx->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO)
+- ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ ctx->streams[i]->codec->codec_type == LIBDLNA_CODEC_TYPE_VIDEO)
{
video_stream = i;
continue;
-Index: libdlna-0.2.3/src/profiles.h
-===================================================================
---- libdlna-0.2.3.orig/src/profiles.h 2011-10-10 13:00:26.000000000 +0200
-+++ libdlna-0.2.3/src/profiles.h 2011-10-10 13:05:27.000000000 +0200
+--- a/src/profiles.h
++++ b/src/profiles.h
@@ -25,6 +25,14 @@
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>