[csw-devel] SF.net SVN: gar:[17087] csw/mgar/pkg/vlc/trunk

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Feb 20 01:23:01 CET 2012


Revision: 17087
          http://gar.svn.sourceforge.net/gar/?rev=17087&view=rev
Author:   wahwah
Date:     2012-02-20 00:23:00 +0000 (Mon, 20 Feb 2012)
Log Message:
-----------
vlc/trunk: building vlc from a dedicated Solaris git repository

Modified Paths:
--------------
    csw/mgar/pkg/vlc/trunk/Makefile
    csw/mgar/pkg/vlc/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/vlc/trunk/files/0004-Bootstrap-on-Solaris.patch
    csw/mgar/pkg/vlc/trunk/files/0005-Work-around-the-lack-of-dirfd.patch

Modified: csw/mgar/pkg/vlc/trunk/Makefile
===================================================================
--- csw/mgar/pkg/vlc/trunk/Makefile	2012-02-19 03:33:25 UTC (rev 17086)
+++ csw/mgar/pkg/vlc/trunk/Makefile	2012-02-20 00:23:00 UTC (rev 17087)
@@ -2,7 +2,7 @@
 # TODO (release-critical prefixed with !, non release-critical with *)
 #
 NAME = vlc
-VERSION = 1.1.12
+VERSION = 1.2-git
 GARTYPE = v2
 CATEGORIES = apps
 
@@ -10,12 +10,22 @@
 define BLURB
 endef
 
-MASTER_SITES = $(SF_MIRROR)
-DISTFILES  = $(DISTNAME).tar.xz
+# MASTER_SITES = http://download.videolan.org/pub/videolan/vlc/$(VERSION)/
+# DISTFILES  = $(DISTNAME).tar.bz2
 
-PATCHFILES += 0001-Disable-strange-check-this-may-be-dangerous.patch
-PATCHFILES += 0002-Hack-around-missing-packed-pragma.patch
+# Solaris port
+MASTER_SITES = http://repo.or.cz/w/vlc/solaris.git/snapshot/
+DISTFILES = 36ddbe70462f36a16c30c75e424cdc768f429fcd.tar.gz
+
+DISTNAME = solaris
+
+# WORKSRC = $(WORKDIR)/solaris
+
+# PATCHFILES += 0001-Disable-strange-check-this-may-be-dangerous.patch
+# PATCHFILES += 0002-Hack-around-missing-packed-pragma.patch
 # PATCHFILES += 0003-Do-not-propagate-vlc-CFLAGS-to-linking.patch
+PATCHFILES += 0004-Bootstrap-on-Solaris.patch
+PATCHFILES += 0005-Work-around-the-lack-of-dirfd.patch
 
 # We need e.g. stdbool.h
 PACKAGING_PLATFORMS = solaris10-sparc solaris10-i386
@@ -35,13 +45,16 @@
 
 # Sun Studio implements packed attributes differently and compilations bails out:
 #   "include/vlc_codecs.h", line 36: #error: FIXME
-GARCOMPILER = SOS12U2
+# GARCOMPILER = SOS12U2
+GARCOMPILER = GNU
 
 # Taken from http://wiki.videolan.org/Solaris
-EXTRA_CFLAGS = -D _XPG4_2 -D __SunOS -D __STDC_ISO_10646__ -D __EXTENSIONS__ -features=extensions -fast
+# EXTRA_CFLAGS = -D _XPG4_2 -D __SunOS -D __STDC_ISO_10646__ -D __EXTENSIONS__ -features=extensions -fast
 
 # Solaris has MAXNAMELEN instead of NAME_MAX
 EXTRA_CFLAGS += -DNAME_MAX=MAXNAMLEN
+# Necessary to include _Xglobal_lock
+EXTRA_CFLAGS += -DXTHREADS
 
 # For inet_pton
 EXTRA_LINKER_FLAGS = -lsocket -lnsl
@@ -54,6 +67,10 @@
 # Not there yet, part of ffmpeg
 CONFIGURE_ARGS += --disable-avcodec
 
+# x264.c:431:9: error: 'x264_open_gop_names' undeclared (first use in this
+# function)
+CONFIGURE_ARGS += --disable-x264
+
 # No libpostproc yet
 #CONFIGURE_ARGS += --disable-postproc
 
@@ -61,8 +78,86 @@
 CONFIGURE_ARGS += --disable-qt4 --disable-skins2
 
 # Taken from http://wiki.videolan.org/Solaris
-CONFIGURE_ARGS += --disable-libgcrypt --disable-remoteosd --disable-glx --disable-lua --disable-mad --disable-swscale --disable-postproc --disable-a52 --disable-fribidi --with-gnu-ld=no --disable-xcb
+# CONFIGURE_ARGS += --disable-libgcrypt
+# CONFIGURE_ARGS += --disable-remoteosd
+# CONFIGURE_ARGS += --disable-glx
+# CONFIGURE_ARGS += --disable-lua
+# CONFIGURE_ARGS += --disable-mad
+# CONFIGURE_ARGS += --disable-swscale
+# CONFIGURE_ARGS += --disable-postproc
+# CONFIGURE_ARGS += --disable-a52
+# CONFIGURE_ARGS += --disable-fribidi
+# CONFIGURE_ARGS += --with-gnu-ld=no
+# CONFIGURE_ARGS += --disable-xcb
 
+SKIPTEST = 1
 
+PACKAGES = CSWvlc
+# The catch-all package
+SPKG_DESC_CSWvlc = $(DESCRIPTION)
+RUNTIME_DEP_PKGS_CSWvlc += CSWfconfig
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibcairo2
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibdvdread
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibflac8
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibfreetype6
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibgcc-s1
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibgdk-pixbuf2-0-0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibgio2-0-0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibglib2-0-0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibgmodule2-0-0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibgobject2-0-0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibgthread2-0-0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibiconv2
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibintl8
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibkate1
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibogg0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibpng12-0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibproxy
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibrsvg2-2
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibsdl1-2-0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibsmbclient0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibspeex1
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibsqlite3-0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibstdc++6
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibtheora0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibvlc5
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibvlccore5
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibvorbis0
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibvorbisenc2
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibxml2-2
+RUNTIME_DEP_PKGS_CSWvlc += CSWlibz1
+RUNTIME_DEP_PKGS_CSWvlc += CSWsdlimage
+CHECKPKG_OVERRIDES_CSWvlc += file-with-bad-content|/usr/share|root/opt/csw/share/vlc/utils/audio-vlc-default.sh
+CHECKPKG_OVERRIDES_CSWvlc += file-with-bad-content|/usr/share|root/opt/csw/share/vlc/utils/video-vlc-default.sh
+CHECKPKG_OVERRIDES_CSWvlc += file-with-bad-content|/usr/local|root/opt/csw/share/doc/vlc/intf-vcd.txt
+
+PACKAGES += CSWvlc-dev
+CATALOGNAME_CSWvlc-dev = vlc_dev
+SPKG_DESC_CSWvlc-dev += $(DESCRIPTION), development files
+PKGFILES_CSWvlc-dev += $(PKGFILES_DEVEL)
+RUNTIME_DEP_PKGS_CSWvlc-dev += CSWlibvlc5
+RUNTIME_DEP_PKGS_CSWvlc-dev += CSWlibvlccore5
+
+PACKAGES += CSWlibvlc5
+CATALOGNAME_CSWlibvlc5 = libvlc5
+PKGFILES_CSWlibvlc5 += $(call baseisadirs,$(libdir),libvlc\.so\.5(\.\d+)*)
+SPKG_DESC_CSWlibvlc5 += $(DESCRIPTION), libvlc.so.5
+RUNTIME_DEP_PKGS_CSWlibvlc5 += CSWlibintl8
+RUNTIME_DEP_PKGS_CSWlibvlc5 += CSWlibgcc-s1
+RUNTIME_DEP_PKGS_CSWlibvlc5 += CSWlibiconv2
+RUNTIME_DEP_PKGS_CSWlibvlc5 += CSWlibvlccore5
+
+PACKAGES += CSWlibvlccore5
+CATALOGNAME_CSWlibvlccore5 = libvlccore5
+PKGFILES_CSWlibvlccore5 += $(call baseisadirs,$(libdir),libvlccore\.so\.5(\.\d+)*)
+SPKG_DESC_CSWlibvlccore5 += $(DESCRIPTION), libvlccore.so.5
+RUNTIME_DEP_PKGS_CSWlibvlccore5 += CSWlibintl8
+RUNTIME_DEP_PKGS_CSWlibvlccore5 += CSWlibgcc-s1
+RUNTIME_DEP_PKGS_CSWlibvlccore5 += CSWlibiconv2
+
 include gar/category.mk
 
+pre-configure-modulated:
+	# bootstrap defines #!/bin/sh and $(dirname ...)
+	(cd $(WORKSRC) && $(CONFIGURE_ENV) bash ./bootstrap)
+	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/vlc/trunk/checksums
===================================================================
--- csw/mgar/pkg/vlc/trunk/checksums	2012-02-19 03:33:25 UTC (rev 17086)
+++ csw/mgar/pkg/vlc/trunk/checksums	2012-02-20 00:23:00 UTC (rev 17087)
@@ -1 +1 @@
-56cb9975725a12da8c84882bc00fdce0  vlc-1.1.12.tar.xz
+5dfeae611f841bf29549f0f2619b1c35  36ddbe70462f36a16c30c75e424cdc768f429fcd.tar.gz

Added: csw/mgar/pkg/vlc/trunk/files/0004-Bootstrap-on-Solaris.patch
===================================================================
--- csw/mgar/pkg/vlc/trunk/files/0004-Bootstrap-on-Solaris.patch	                        (rev 0)
+++ csw/mgar/pkg/vlc/trunk/files/0004-Bootstrap-on-Solaris.patch	2012-02-20 00:23:00 UTC (rev 17087)
@@ -0,0 +1,71 @@
+From 5d5c633d80070ec43f7780e89fe15602dbc0b078 Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Sun, 19 Feb 2012 09:47:31 +0100
+Subject: [PATCH 1/2] Bootstrap on Solaris
+
+Solaris /bin/sh does not support "$( ... )" nor "if ! test ..."
+
+Tested on Solaris 10.
+---
+ bootstrap     |   14 +++++++++++---
+ modules/genmf |    6 ++++--
+ 2 files changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/bootstrap b/bootstrap
+index d315be2..1f478e2 100755
+--- a/bootstrap
++++ b/bootstrap
+@@ -22,7 +22,7 @@ export CYGWIN
+ set -e
+ set -x
+ 
+-cd "$(dirname "$0")"
++cd "`dirname "$0"`"
+ 
+ ##
+ ## Check for various tools
+@@ -66,8 +66,16 @@ fi
+ 
+ # Check for autopoint (GNU gettext)
+ export AUTOPOINT
+-test "$AUTOPOINT" || AUTOPOINT=autopoint
+-if ! "$AUTOPOINT" --dry-run --force >/dev/null 2>&1; then
++if test "$AUTOPOINT"; then
++  :
++else
++  AUTOPOINT=autopoint
++fi
++if "$AUTOPOINT" --dry-run --force >/dev/null 2>&1; then
++  # Solaris /bin/sh does not support "if ! test ...", we have to invert the
++  # expression and use the "else" statement.
++  :
++else
+   AUTOPOINT=true
+   echo > ABOUT-NLS
+ fi
+diff --git a/modules/genmf b/modules/genmf
+index d7b2887..11cd702 100755
+--- a/modules/genmf
++++ b/modules/genmf
+@@ -7,14 +7,16 @@
+ ##  Authors: Sam Hocevar <sam at zoy.org>
+ ##           Rémi Denis-Courmont <rem # videolan # org>
+ 
+-cd $(dirname "$0")/.. || exit 1
++cd `dirname "$0"`/.. || exit 1
+ 
+ while test "$1"
+ do
+   printf "."
+   dir="$1"
+   modf="modules/${dir}/Modules.am"
+-  if ! test -f "$modf"; then
++  if test -f "$modf"; then
++    :
++  else
+     echo "$modf does not exist!" >&2
+     exit 1
+   fi
+-- 
+1.7.5.4
+

Added: csw/mgar/pkg/vlc/trunk/files/0005-Work-around-the-lack-of-dirfd.patch
===================================================================
--- csw/mgar/pkg/vlc/trunk/files/0005-Work-around-the-lack-of-dirfd.patch	                        (rev 0)
+++ csw/mgar/pkg/vlc/trunk/files/0005-Work-around-the-lack-of-dirfd.patch	2012-02-20 00:23:00 UTC (rev 17087)
@@ -0,0 +1,126 @@
+From 7501269c2b9df09861a82662d175ade4cfce3941 Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Sun, 19 Feb 2012 17:52:00 +0100
+Subject: [PATCH 2/2] Work around the lack of dirfd()
+
+Detect whether the system supports dirfd(). There was a Solaris-specific
+workaround in one of the files, but it's a better idea to test for the
+function and not rely on the OS detection.
+---
+ configure.ac               |    2 ++
+ include/vlc_common.h       |    6 ++++++
+ include/vlc_fixups.h       |    7 +++++++
+ modules/access/directory.c |   11 ++---------
+ modules/misc/gnutls.c      |    2 +-
+ src/misc/filesystem.c      |    2 +-
+ 6 files changed, 19 insertions(+), 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fa99eb7..6904bdd1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2334,6 +2334,8 @@ AS_IF([test "${have_ipv6}" = "yes"], [
+ AC_CHECK_FUNCS(inet_ntop,[
+   AC_DEFINE(HAVE_INET_NTOP, 1, [Define to 1 if you have inet_ntop().])])
+ 
++AC_CHECK_FUNCS(dirfd,[
++  AC_DEFINE(HAVE_DIRFD, 1, [Define to 1 if you have the dirfd() function.])])
+ 
+ dnl
+ dnl  GME demux plugin
+diff --git a/include/vlc_common.h b/include/vlc_common.h
+index 7f488a5..efd3b79 100644
+--- a/include/vlc_common.h
++++ b/include/vlc_common.h
+@@ -887,4 +887,10 @@ VLC_EXPORT( const char *, VLC_Compiler, ( void ) LIBVLC_USED );
+     "Public License;\nsee the file named COPYING for details.\n" \
+     "Written by the VideoLAN team; see the AUTHORS file.\n")
+ 
++#ifndef HAVE_DIRFD
++#define DIRFD(a) ((a)->dd_fd)
++#else
++#define DIRFD(a) (dirfd(a))
++#endif
++
+ #endif /* !VLC_COMMON_H */
+diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
+index ef37367..8808b0e 100644
+--- a/include/vlc_fixups.h
++++ b/include/vlc_fixups.h
+@@ -275,4 +275,11 @@ long jrand48 (unsigned short subi[3]);
+ long nrand48 (unsigned short subi[3]);
+ #endif
+ 
++/* dirfd() not available on some systems, e.g. Solaris 9 and 10 */
++#ifndef HAVE_DIRFD
++#define DIRFD(a) ((a)->dd_fd)
++#else
++#define DIRFD(a) (dirfd(a))
++#endif
++
+ #endif /* !LIBVLC_FIXUPS_H */
+diff --git a/modules/access/directory.c b/modules/access/directory.c
+index 7f29547..35fe91b 100644
+--- a/modules/access/directory.c
++++ b/modules/access/directory.c
+@@ -46,13 +46,6 @@
+ #   include <io.h>
+ #endif
+ 
+-#ifdef __sun__
+-static inline int dirfd (DIR *dir)
+-{
+-    return dir->dd_fd;
+-}
+-#endif
+-
+ #include <vlc_fs.h>
+ #include <vlc_url.h>
+ #include <vlc_strings.h>
+@@ -155,7 +148,7 @@ int DirInit (access_t *p_access, DIR *handle)
+     root->i = 0;
+ #ifdef HAVE_OPENAT
+     struct stat st;
+-    if (fstat (dirfd (handle), &st))
++    if (fstat (DIRFD (handle), &st))
+     {
+         free (root);
+         free (uri);
+@@ -315,7 +308,7 @@ block_t *DirBlock (access_t *p_access)
+     {
+         DIR *handle;
+ #ifdef HAVE_OPENAT
+-        int fd = vlc_openat (dirfd (current->handle), entry, O_RDONLY);
++        int fd = vlc_openat (DIRFD (current->handle), entry, O_RDONLY);
+         if (fd == -1)
+             goto skip; /* File cannot be opened... forget it */
+ 
+diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
+index 1aba7da..5df560e 100644
+--- a/modules/misc/gnutls.c
++++ b/modules/misc/gnutls.c
+@@ -538,7 +538,7 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
+     else
+     {
+         struct stat st1, st2;
+-        int fd = dirfd( dir );
++        int fd = DIRFD( dir );
+ 
+         /*
+          * Gets stats for the directory path, checks that it is not a
+diff --git a/src/misc/filesystem.c b/src/misc/filesystem.c
+index 9138ae9..bb3186f 100644
+--- a/src/misc/filesystem.c
++++ b/src/misc/filesystem.c
+@@ -190,7 +190,7 @@ char *vlc_readdir( DIR *dir )
+     struct dirent *ent;
+     char *path = NULL;
+ 
+-    long len = fpathconf (dirfd (dir), _PC_NAME_MAX);
++    long len = fpathconf (DIRFD (dir), _PC_NAME_MAX);
+     if (len == -1)
+     {
+ #ifdef NAME_MAX
+-- 
+1.7.5.4
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list