first commit
[scm/bb/meta-tizen.git] / recipes-tizen / bc / bc.inc
1 DESCRIPTION = "GNU Command Line Calculator"
2 HOMEPAGE = "ftp://ftp.gnu.org/pub/gnu/bc"
3 SECTION = "Base/Utilities"
4 LICENSE = "GPL-2.0+"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by bc 
13 PROVIDES += "bc"
14 RPROVIDES_bc += "bc"
15
16 RDEPENDS = ""
17
18 DEPENDS = ""
19 #DEPENDS of bc 
20 DEPENDS += "ed"
21 DEPENDS += "bison-native"
22 DEPENDS += "readline-devel"
23 DEPENDS += "flex"
24 DEPENDS += "automake-native"
25
26 do_patch() {
27  chmod -Rf a+rX,u+w,g-w,o-w ${S}
28  #setup -q
29  cp ${S}/packaging/bc.manifest .
30  
31  
32 }
33
34 do_configure() {
35 }
36
37 do_compile() {
38  LANG=C
39  export LANG
40  unset DISPLAY
41  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
42  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
43  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
44  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
45  
46  
47    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
48    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
49    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
50    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
51          --target=x86_64-tizen-linux \
52          --program-prefix= \
53          --prefix=/usr \
54          --exec-prefix=/usr \
55          --bindir=/usr/bin \
56          --sbindir=/usr/sbin \
57          --sysconfdir=/etc \
58          --datadir=/usr/share \
59          --includedir=/usr/include \
60          --libdir=/usr/lib \
61          --libexecdir=/usr/libexec \
62          --localstatedir=/var \
63          --sharedstatedir=/usr/com \
64          --mandir=/usr/share/man \
65          --infodir=/usr/share/info --with-readline
66  
67  rm bc/libmath.h
68  sed -i 's|\(^_PR.*readline.*$\)|/* \1 */|' bc/scan.l
69  make
70  
71  
72  
73 }
74
75 do_install() {
76  echo export RPM_BUILD_ROOT=${D}
77  LANG=C
78  export LANG
79  unset DISPLAY
80  rm -rf ${D} 
81  mkdir -p ${D} 
82  
83  make install DESTDIR=$RPM_BUILD_ROOT
84  
85  
86 }
87
88 PACKAGES = ""
89 PACKAGES += "bc"
90
91 bc_files = ""
92 bc_files += "bc.manifest"
93 bc_files += "COPYING"
94 bc_files += "/usr/bin/bc"
95 bc_files += "/usr/bin/dc"
96 bc_files += "/usr/share/info/*.info*"
97 bc_files += "/usr/share/man/man1/*"
98
99 FILES_${PN} = "${bc_files}"
100
101 PKG_bc= "bc"
102
103 require bc-extraconf.inc