diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-12-22 08:03:23 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-12-22 10:32:40 +0000 |
commit | 3cbd465f269c0504654d700336ed5e0573acfa0c (patch) | |
tree | 55acd93fe9684cd8fe466411a367b924bf9ed972 /testing | |
parent | 49ef3cc88b68b40376fb354dfab86dd655ed33cf (diff) | |
download | aports-3cbd465f269c0504654d700336ed5e0573acfa0c.tar.bz2 aports-3cbd465f269c0504654d700336ed5e0573acfa0c.tar.xz |
testing/libdlna: cleanup and rebuild against ffmpeg-0.9
Diffstat (limited to 'testing')
-rw-r--r-- | testing/libdlna/APKBUILD | 30 | ||||
-rw-r--r-- | testing/libdlna/Makefile.patched | 64 | ||||
-rw-r--r-- | testing/libdlna/avmedia_type.patch | 18 |
3 files changed, 40 insertions, 72 deletions
diff --git a/testing/libdlna/APKBUILD b/testing/libdlna/APKBUILD index 1f6fa2bb06..add2354e8d 100644 --- a/testing/libdlna/APKBUILD +++ b/testing/libdlna/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Francesco Colista <francesco.colista@gmail.com> pkgname=libdlna pkgver=0.2.3 -pkgrel=0 +pkgrel=1 pkgdesc="An open-source implementation of DLNA (Digital Living Network Alliance) standards" url="http://libdlna.geexbox.org" arch="all" @@ -12,24 +12,38 @@ depends_dev="ffmpeg-dev" makedepends="$depends_dev" subpackages="$pkgname-dev" source="http://libdlna.geexbox.org/releases/$pkgname-$pkgver.tar.bz2 - Makefile.patched" + avmedia_type.patch" + _builddir="$srcdir"/$pkgname-$pkgver -build() { +prepare() { cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + sed -i -e 's/cat -n/cat/' configure - sed -i 's|ffmpeg/avformat.h|libavformat/avformat.h|' ./configure src/profiles.h src/*.c || return 1 - sed -i 's|ffmpeg/avcodec.h|libavcodec/avcodec.h|' ./configure src/profiles.h src/*.c || return 1 + sed -i 's|ffmpeg/avformat.h|libavformat/avformat.h|' \ + ./configure src/profiles.h src/*.c || return 1 + sed -i 's|ffmpeg/avcodec.h|libavcodec/avcodec.h|' \ + ./configure src/profiles.h src/*.c || return 1 + +} + +build() { + cd "$_builddir" ./configure --prefix=/usr \ --includedir=/usr/include/libavformat \ --with-ffmpeg-dir=/usr/lib \ --disable-static - cp "$srcdir"/Makefile.patched Makefile - make || return 1 + make lib || return 1 } + package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 } md5sums="2c974f95b711e5fd07f78fc4ebfcca66 libdlna-0.2.3.tar.bz2 -5ba58c2f91079f73d80837974259d2ad Makefile.patched" +7d67a4029c8145a0f9270057143e5e45 avmedia_type.patch" diff --git a/testing/libdlna/Makefile.patched b/testing/libdlna/Makefile.patched deleted file mode 100644 index 7c4a028aa2..0000000000 --- a/testing/libdlna/Makefile.patched +++ /dev/null @@ -1,64 +0,0 @@ -ifeq (,$(wildcard config.mak)) -$(error "config.mak is not present, run configure !") -endif -include config.mak - -DISTFILE = libdlna-$(VERSION).tar.bz2 -PKGCONFIG_DIR = $(libdir)/pkgconfig -PKGCONFIG_FILE = libdlna.pc - -SRCS = test-libdlna.c - -EXTRADIST = AUTHORS \ - ChangeLog \ - configure \ - COPYING \ - README \ - -SUBDIRS = src \ - -CFLAGS += -Isrc -LDFLAGS += -Lsrc -ldlna - -ifeq ($(BUILD_STATIC),yes) - LDFLAGS += $(EXTRALIBS) -endif - -all: lib - -lib: - $(MAKE) -C src - -clean: - $(MAKE) -C src clean - -$(RM) -f $(LIBTEST) - -distclean: clean - -$(RM) -f config.log - -$(RM) -f config.mak - -$(RM) -f $(PKGCONFIG_FILE) - -install: install-pkgconfig - $(MAKE) -C src install - -install-pkgconfig: $(PKGCONFIG_FILE) - $(INSTALL) -d "$(PKGCONFIG_DIR)" - $(INSTALL) -m 644 $< "$(PKGCONFIG_DIR)" - -.PHONY: clean distclean -.PHONY: install install-pkgconfig - -dist: - -$(RM) $(DISTFILE) - dist=$(shell pwd)/libdlna-$(VERSION) && \ - for subdir in . $(SUBDIRS); do \ - mkdir -p "$$dist/$$subdir"; \ - $(MAKE) -C $$subdir dist-all DIST="$$dist/$$subdir"; \ - done && \ - tar cjf $(DISTFILE) libdlna-$(VERSION) - -$(RM) -rf libdlna-$(VERSION) - -dist-all: - cp $(EXTRADIST) $(SRCS) Makefile $(DIST) - -.PHONY: dist dist-all diff --git a/testing/libdlna/avmedia_type.patch b/testing/libdlna/avmedia_type.patch new file mode 100644 index 0000000000..b4caa1892e --- /dev/null +++ b/testing/libdlna/avmedia_type.patch @@ -0,0 +1,18 @@ +--- ./src/profiles.c.orig ++++ ./src/profiles.c +@@ -205,13 +205,13 @@ + 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) + { + 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) + { + video_stream = i; + continue; |