diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-08-16 16:20:35 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-08-16 16:20:35 +0000 |
commit | c3ca0dddf1bdf17d5453f130f791b67f2e80fba4 (patch) | |
tree | 8aad771ffd81138ddc3a931b4c5bfee3e5a3195e /main/vlc | |
parent | 31ec7ef35539ade8c29e24ab884197901fe13264 (diff) | |
download | aports-c3ca0dddf1bdf17d5453f130f791b67f2e80fba4.tar.bz2 aports-c3ca0dddf1bdf17d5453f130f791b67f2e80fba4.tar.xz |
main/vlc: moved from testing
fixes #240
Diffstat (limited to 'main/vlc')
-rw-r--r-- | main/vlc/APKBUILD | 121 | ||||
-rw-r--r-- | main/vlc/uclibc-inhibit-spawn.patch | 35 | ||||
-rw-r--r-- | main/vlc/uclibc-libcompat.patch | 81 | ||||
-rw-r--r-- | main/vlc/uclibc3.patch | 49 |
4 files changed, 286 insertions, 0 deletions
diff --git a/main/vlc/APKBUILD b/main/vlc/APKBUILD new file mode 100644 index 000000000..8b0f6ceec --- /dev/null +++ b/main/vlc/APKBUILD @@ -0,0 +1,121 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=vlc +pkgver=1.1.2 +pkgrel=0 +pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player" +url="http://www.videolan.org/vlc/" +license="GPL-2" +subpackages="$pkgname-dev $pkgname-doc" +#depends="libnotify a52dec fluidsynth zvbi libdvbpsi lirc-utils libdca hal +# libproxy sdl_image libdvdnav>=4.1.3 lua libxv libv4l libcddb smbclient +# libmatroska taglib sysfsutils libmpcdec ffmpeg>=0.5 libshout libmad +# qt fribidi libmpeg2 libmodplug avahi ttf-dejavu" +depends="ttf-dejavu" +makedepends=" + a52dec-dev + alsa-lib-dev + automake + autoconf + libtool + dbus-dev + faad2-dev + ffmpeg-dev + flac-dev + fribidi-dev + gtk+-dev + libgcrypt-dev + libice-dev + libiconv-dev + libmad-dev + libmpeg2-dev + libnotify-dev + libogg-dev + libsm-dev + libtheora-dev + libx11-dev + libxext-dev + libxv-dev + lua-dev + ncurses-dev + mesa-dev + pkgconfig + sdl-dev + sysfsutils-dev + x264-dev + " +source="http://download.videolan.org/pub/videolan/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2 + uclibc3.patch + uclibc-libcompat.patch + uclibc-inhibit-spawn.patch + " + +_builddir="$srcdir"/$pkgname-$pkgver +prepare() { + cd "$_builddir" + for i in $source; do + case $i in + *.patch) + msg "Applying $i" + patch -p1 -i "$srcdir"/$i || return 1 + ;; + esac; + done + ./bootstrap +} + +build () +{ + cd "$_builddir" + sed -i -e 's:/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf:/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf:' modules/misc/freetype.c + + export CFLAGS="$CFLAGS -D_GNU_SOURCE" + + ./configure --prefix=/usr \ + --disable-mmx \ + --disable-nls \ + --disable-optimizations \ + --disable-qt4 --disable-skins2 \ + --disable-rpath \ + --enable-dbus \ + --enable-dbus-control \ + --enable-faad \ + --enable-flac \ + --enable-httpd \ + --enable-ncurses \ + --enable-realrtsp \ + --enable-sdl \ + --enable-sout \ + --enable-theora \ + --enable-vlm \ + --enable-xvideo \ + || return 1 + +# --enable-dvdread \ +# --enable-dvdnav \ +# --enable-qt4 \ +# --enable-skins2 \ +# --enable-dvb \ +# --enable-v4l \ +# --enable-snapshot \ +# --enable-hal \ +# --enable-lirc \ +# --enable-shout \ +# --enable-pvr \ + + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir"/ install || return 1 +# for res in 16 32 48 128; do +# install -D -m644 share/vlc${res}x${res}.png \ +# "$pkgdir"/usr/share/icons/hicolor/${res}x${res}/apps/vlc.png || return 1 +# done + rm -rf "$pkgdir"/usr/lib/mozilla +} + +md5sums="dec11ed850e044c518aee6fef7e7f893 vlc-1.1.2.tar.bz2 +4f74dcde9ce51c15d80c3876b85c05f2 uclibc3.patch +d718e22a7de9f38579f276f720b2f36a uclibc-libcompat.patch +361d6ae9d7b846833ed31e8454074158 uclibc-inhibit-spawn.patch" diff --git a/main/vlc/uclibc-inhibit-spawn.patch b/main/vlc/uclibc-inhibit-spawn.patch new file mode 100644 index 000000000..9a6be5bd6 --- /dev/null +++ b/main/vlc/uclibc-inhibit-spawn.patch @@ -0,0 +1,35 @@ +diff --git a/modules/misc/inhibit/xdg.c b/modules/misc/inhibit/xdg.c +index 01decac..134c5c9 100644 +--- a/modules/misc/inhibit/xdg.c ++++ b/modules/misc/inhibit/xdg.c +@@ -25,7 +25,12 @@ + #include <vlc_common.h> + #include <vlc_plugin.h> + #include <vlc_inhibit.h> +-#include <spawn.h> ++#if !defined(_POSIX_SPAWN) ++# define _POSIX_SPAWN -1 ++#else ++# include <spawn.h> ++#endif ++ + #include <sys/wait.h> + + static int Open (vlc_object_t *); +@@ -125,8 +130,15 @@ static void *Thread (void *data) + }; + pid_t pid; + int canc = vlc_savecancel (); +- ++#if (_POSIX_SPAWN >= 0) + if (!posix_spawnp (&pid, "xdg-screensaver", NULL, NULL, argv, environ)) ++#else ++ pid = fork(); ++ if (pid == 0) { ++ execvp("xdg-screensaver", argv); ++ exit(1); ++ } else if (pid > 0) ++#endif + { + int status; + diff --git a/main/vlc/uclibc-libcompat.patch b/main/vlc/uclibc-libcompat.patch new file mode 100644 index 000000000..e4008002f --- /dev/null +++ b/main/vlc/uclibc-libcompat.patch @@ -0,0 +1,81 @@ +commit c605c09bbc29d88619264c55c371c9dcbc839eda +Author: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu Jul 29 19:20:17 2010 +0000 + + build: libcompat fix in case there are no functions to replace + + If the libc provides all the funcs in libcompat the libcompat.a will + never be created due to LIBOBJS is empty (normally it contains whatever + AC_REPLACE_FUNCS detects). This happens on uclibc. + + Since Makefile.am have a hardcoded LDADD to ../compat/libcompat.la things + goes bad when there is no libcompat.a at all. We solve this by checking + if LIBOBJS is set by AC_REPLACE_FUNCS and add libcompat via LTLIBCOMPAT. + + For alternative fixes see http://www.gnu.org/software/hello/manual/automake/LIBOBJS.html + +diff --git a/bin/Makefile.am b/bin/Makefile.am +index 92e6879..a941d99 100644 +--- a/bin/Makefile.am ++++ b/bin/Makefile.am +@@ -60,5 +60,5 @@ vlc_win32_rc.$(OBJEXT): vlc_win32_rc.rc + vlc_cache_gen_SOURCES = cachegen.c + vlc_cache_gen_LDADD = \ + $(GNUGETOPT_LIBS) \ +- ../compat/libcompat.la \ ++ $(LTLIBCOMPAT) \ + ../src/libvlc.la ../src/libvlccore.la +diff --git a/configure.ac b/configure.ac +index 52e4830..b385100 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -547,6 +547,14 @@ need_libc=false + dnl Check for usual libc functions + AC_CHECK_FUNCS([ctime_r daemon fcntl fdopendir fstatvfs fork getenv getpwuid_r gettimeofday isatty lstat memalign openat posix_fadvise posix_madvise posix_memalign setenv setlocale stricmp strnicmp tdestroy uselocale]) + AC_REPLACE_FUNCS([asprintf atof atoll getcwd getdelim getpid gmtime_r lldiv localtime_r nrand48 rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab vasprintf]) ++ ++dnl Check that we actually need libcompat ++LTLIBCOMPAT="" ++if test "x${LIBOBJS}" != "x"; then ++ LTLIBCOMPAT="\$(top_builddir)/compat/libcompat.la" ++fi ++AC_SUBST(LTLIBCOMPAT) ++ + AC_CHECK_FUNCS(fdatasync,, + [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.]) + ]) +diff --git a/modules/common.am b/modules/common.am +index 5e4d65f..9e2c739 100644 +--- a/modules/common.am ++++ b/modules/common.am +@@ -24,7 +24,7 @@ AM_LDFLAGS = -rpath '$(libvlcdir)' \ + -no-undefined \ + `$(VLC_CONFIG) --ldflags plugin $@` + AM_LIBADD = `$(VLC_CONFIG) -libs plugin $@` \ +- $(LTLIBVLCCORE) $(top_builddir)/compat/libcompat.la ++ $(LTLIBVLCCORE) $(LTLIBCOMPAT) + + include $(srcdir)/Modules.am + +diff --git a/src/Makefile.am b/src/Makefile.am +index f46a154..6aad884 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -201,7 +201,7 @@ libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \ + -export-symbols $(srcdir)/libvlccore.sym \ + -version-info 5:0:0 + libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \ +- $(LTLIBINTL) ../compat/libcompat.la ++ $(LTLIBINTL) $(LTLIBCOMPAT) + libvlccore_la_DEPENDENCIES = libvlccore.sym + if HAVE_WIN32 + libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT) +@@ -214,7 +214,7 @@ libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc + libvlc_la_SOURCES = $(SOURCES_libvlc_control) + nodist_libvlc_la_SOURCES = revision.c + libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \ +- libvlccore.la ../compat/libcompat.la ++ libvlccore.la $(LTLIBCOMPAT) + libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` + libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \ + -version-info 6:0:1 \ diff --git a/main/vlc/uclibc3.patch b/main/vlc/uclibc3.patch new file mode 100644 index 000000000..04154f35b --- /dev/null +++ b/main/vlc/uclibc3.patch @@ -0,0 +1,49 @@ +diff --git a/src/control/vlm.c b/src/control/vlm.c +index 05417e5..46fa957 100644 +--- a/src/control/vlm.c ++++ b/src/control/vlm.c +@@ -25,6 +25,10 @@ + # include <config.h> + #endif + ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ + #include <vlc/libvlc.h> + #include <vlc/libvlc_vlm.h> + #include <vlc_es.h> +diff --git a/src/misc/linux_specific.c b/src/misc/linux_specific.c +index 1644ce6..1440e1c 100644 +--- a/src/misc/linux_specific.c ++++ b/src/misc/linux_specific.c +@@ -83,14 +83,14 @@ static struct + unsigned refs; + } once = { VLC_STATIC_MUTEX, 0 }; + +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + # include <gnu/libc-version.h> + # include <stdlib.h> + #endif + + void system_Init (libvlc_int_t *libvlc, int *argc, const char *argv[]) + { +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + const char *glcv = gnu_get_libc_version (); + + /* gettext in glibc 2.5-2.7 is not thread-safe. LibVLC keeps crashing, +diff --git a/src/misc/mtime.c b/src/misc/mtime.c +index 1cc787d..985aa3a 100644 +--- a/src/misc/mtime.c ++++ b/src/misc/mtime.c +@@ -78,7 +78,7 @@ int nanosleep(struct timespec *, struct timespec *); + # define _POSIX_CLOCK_SELECTION (-1) + #endif + +-# if (_POSIX_CLOCK_SELECTION < 0) ++# if (_POSIX_CLOCK_SELECTION < 0) || defined(__UCLIBC__) + /* + * We cannot use the monotonic clock if clock selection is not available, + * as it would screw vlc_cond_timedwait() completely. Instead, we have to |