first commit
[scm/bb/meta-tizen.git] / recipes-tizen / libsndfile / libsndfile.inc
1 DESCRIPTION = "C library for reading and writing sound files"
2 HOMEPAGE = "http://www.mega-nerd.com/libsndfile/"
3 SECTION = "Multimedia/Audio"
4 LICENSE = "LGPL-2.1+"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by libsndfile 
13 PROVIDES += "libsndfile"
14 RPROVIDES_libsndfile += "libsndfile"
15
16 #PROVIDES by libsndfile-devel 
17 PROVIDES += "libsndfile-devel"
18 RPROVIDES_libsndfile-devel += "libsndfile-devel"
19 RPROVIDES_libsndfile-devel += "libsndfile-dev"
20
21 RDEPENDS = ""
22 #RDEPENDS of libsndfile-devel (${PN}-devel)
23 RDEPENDS_${PN}-devel += "glibc-dev"
24 RDEPENDS_${PN}-devel += "libsndfile"
25 RDEPENDS_${PN}-devel += "libstdc++-dev"
26
27
28 DEPENDS = ""
29 #DEPENDS of libsndfile 
30 DEPENDS += "gcc-cross"
31 DEPENDS += "pkgconfig(alsa)"
32 DEPENDS += "sqlite-devel"
33 DEPENDS += "libvorbis-devel"
34 DEPENDS += "pkgconfig-native"
35 DEPENDS += "speex-devel"
36 DEPENDS += "libtool-cross"
37
38 do_patch() {
39  chmod -Rf a+rX,u+w,g-w,o-w ${S}
40  #setup -q
41  cp ${S}/packaging/libsndfile.manifest .
42  
43  
44 }
45
46 do_configure() {
47 }
48
49 do_compile() {
50  LANG=C
51  export LANG
52  unset DISPLAY
53  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
54  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
55  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
56  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
57  
58  autoreconf --force --install
59  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter"
60  export CFLAGS
61  
62    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
63    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
64    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
65    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
66          --target=x86_64-tizen-linux \
67          --program-prefix= \
68          --prefix=/usr \
69          --exec-prefix=/usr \
70          --bindir=/usr/bin \
71          --sbindir=/usr/sbin \
72          --sysconfdir=/etc \
73          --datadir=/usr/share \
74          --includedir=/usr/include \
75          --libdir=/usr/lib \
76          --libexecdir=/usr/libexec \
77          --localstatedir=/var \
78          --sharedstatedir=/usr/com \
79          --mandir=/usr/share/man \
80          --infodir=/usr/share/info --disable-silent-rules \
81         --disable-static \
82      --enable-sqlite \
83         --with-pic \
84      --enable-experimental
85  make -j16
86  
87  exit 0
88  pushd src
89  make check
90  popd
91  
92  
93  
94 }
95
96 do_install() {
97  echo export RPM_BUILD_ROOT=${D}
98  LANG=C
99  export LANG
100  unset DISPLAY
101  rm -rf ${D} 
102  mkdir -p ${D} 
103  
104  
105    oe_runmake \
106          DESTDIR=${D} \
107          INSTALL_ROOT=${D} \
108          BINDIR=/usr/bin \
109    install  
110    rm -f ${D}/usr/share/info/dir 
111    find ${D} -regex ".*\.la$" | xargs rm -f -- 
112    find ${D} -regex ".*\.a$" | xargs rm -f --
113  # remove programs; built in another spec file
114  rm -rf ${D}/usr/bin
115  rm -rf ${D}/usr/share/man/man1
116  # remove binaries from examples directory
117  make -C examples distclean
118  rm -rf ${D}/usr/share/doc/libsndfile1-dev
119  
120  
121 }
122
123 PACKAGES = ""
124 PACKAGES += "libsndfile"
125 PACKAGES += "libsndfile-devel"
126
127 libsndfile_files = ""
128 libsndfile_files += "libsndfile.manifest"
129 libsndfile_files += "/usr/lib/libsndfile.so.1*"
130
131 libsndfile-devel_files = ""
132 libsndfile-devel_files += "libsndfile.manifest"
133 libsndfile-devel_files += "/usr/lib/libsndfile.so"
134 libsndfile-devel_files += "/usr/include/sndfile.h"
135 libsndfile-devel_files += "/usr/include/sndfile.hh"
136 libsndfile-devel_files += "/usr/lib/pkgconfig/*.pc"
137
138 FILES_${PN} = "${libsndfile_files}"
139 FILES_${PN}-devel = "${libsndfile-devel_files}"
140
141 PKG_libsndfile= "libsndfile"
142 PKG_libsndfile-devel= "libsndfile-devel"
143
144 require libsndfile-extraconf.inc