how to compile VLC on CENTOS

how to compile VLC on CENTOS

yum install compat-gcc-34 compat-gcc-34-c++

cd /usr/src
wget http://download.videolan.org/pub/videolan/vls/0.5.6/vls-0.5.6.tar.gz
wget http://download.videolan.org/pub/videolan/vls/0.5.6/contrib/libdvb-0.2.2.tar.gz
wget http://download.videolan.org/pub/videolan/vls/0.5.6/contrib/libdvbpsi3-0.1.4.tar.gz
wget http://download.videolan.org/pub/videolan/vls/0.5.6/contrib/libdvdcss-1.2.8.tar.gz
wget http://download.videolan.org/pub/videolan/vls/0.5.6/contrib/libdvdread-0.9.4.tar.gz
tar -zxf vls-0.5.6.tar.gz
tar -zxf libdvb-0.2.2.tar.gz
tar -zxf libdvbpsi3-0.1.4.tar.gz
tar -zxf libdvdcss-1.2.8.tar.gz
tar -zxf libdvdread-0.9.4.tar.gz

cd /usr/src/libdvb-0.2.2
make
make install

cd /usr/src/libdvbpsi3-0.1.4
./configure --prefix=/usr
make
make install

cd /usr/src/libdvdcss-1.2.8
./configure --prefix=/usr
make
make install

cd /usr/src/libdvdread-0.9.4
./configure --prefix=/usr
make
make install

cd /usr/src/vls-0.5.6

## Now you should perform the following modification for a successful compilation :

###########################
### Makefile.dep
###########################
## find (2 occurances) :
        | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/src\/$(subst /,\/,$*).o \
        dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
## replace with :
        | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \ dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
##

###########################
### Makefile.module.dep
###########################
## find :
        | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
        dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
## replace with :
        | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \ dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
##

###########################
### Makefile
###########################
## find :
LCFLAGS += $(VLS_LCFLAGS)
## add after :
CFLAGS += -fpermissive

###########################
### src/core/hashtable.h
###########################
## find :
class C_HashMethod<u32>
## replace with:
template <> class C_HashMethod<u32>
## find :
class C_HashMethod<u16>
## replace with:
template <> class C_HashMethod<u16>
## find :
class C_HashMethod<handle>
## replace with:
template <> class C_HashMethod<handle>

###########################
### src/core/library.cpp
###########################
## Find:(line 30)
//------------------------------------------------------------------------------
// Preamble
//------------------------------------------------------------------------------
// There is no preamble since this file is to be included in the files which
// use the template: look at vector.h for further explanation
## add after:
include <dlfcn.h>
## Find: (line 82)
m_hHandle = dlopen(m_strName.GetString(), DL_LAZY);
## replace with :
m_hHandle = dlopen(m_strName.GetString(), RTLD_LAZY);

###########################
### src/core/stream.cpp
###########################
## find :
template <class IOStream>
 C_Stream<IOStream>& C_Stream<IOStream>::operator >> (C_Serializable& cObject)
{
## add after :
C_ClassDescription cObjectDescription = cObject.Reflect();
C_Serializer cSerializer(&cObject, cObjectDescription);
## find :
u32 iOffset = 0;
## add after :
      int iRc;
## find :
int iRc = m_pIOStream->Read(aBytes+iOffset, iByteCount-iOffset);
## replace with :
iRc = m_pIOStream->Read(aBytes+iOffset, iByteCount-iOffset);

# Now install
CC=gcc34 CXX=g++34 ./configure --prefix=/usr
make
make install

Comentarios

Publicar un comentario

Entradas populares de este blog

INSTALLING HADOOP,HIVE,DERBY ON CENTOS

Accounting Utilities Linux