add libdlna package
git-svn-id: svn://svn.openwrt.org/openwrt/packages@10885 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
9b1256c99b
commit
fccc97ce40
75
libs/libdlna/Makefile
Normal file
75
libs/libdlna/Makefile
Normal file
@ -0,0 +1,75 @@
|
||||
#
|
||||
# Copyright (C) 2006-2008 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libdlna
|
||||
PKG_VERSION:=0.2.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=http://libdlna.geexbox.org/releases/
|
||||
PKG_MD5SUM:=2c974f95b711e5fd07f78fc4ebfcca66
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libdlna
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:= Reference DLNA implementation
|
||||
URL:=http://libdlna.geexbox.org/
|
||||
DEPENDS:=+libffmpeg
|
||||
endef
|
||||
|
||||
define Package/libdlna/description
|
||||
libdlna aims at being the reference open-source implementation of DLNA
|
||||
(Digital Living Network Alliance) standards. Its primary goal is to
|
||||
provide DLNA support to uShare, an embedded DLNA & UPnP A/V Media Server,
|
||||
but it will be used to build both DLNA servers and players in the long
|
||||
term.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
# this is *NOT* GNU configure
|
||||
( cd $(PKG_BUILD_DIR); \
|
||||
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
|
||||
LDFLAGS="-L$(STAGING_DIR)/usr/lib -lfaad -lpthread -lz" \
|
||||
HOST_CC="$(HOSTCC)" \
|
||||
./configure \
|
||||
--cross-compile \
|
||||
--cross-prefix=$(TARGET_CROSS) \
|
||||
--prefix=/usr \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
--disable-debug \
|
||||
--disable-optimize \
|
||||
--disable-strip \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/dlna.h $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdlna.{a,so*} $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdlna.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libdlna/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdlna.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libdlna))
|
120
libs/libdlna/patches/100-configure_fix.patch
Normal file
120
libs/libdlna/patches/100-configure_fix.patch
Normal file
@ -0,0 +1,120 @@
|
||||
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"
|
Loading…
x
Reference in New Issue
Block a user