first commit
[scm/bb/meta-tizen.git] / recipes-tizen / aspell / aspell.inc
1 DESCRIPTION = "A Free and Open Source Spell Checker"
2 HOMEPAGE = "http://aspell.net/"
3 SECTION = "System/Libraries"
4 LICENSE = "LGPL-2.1+"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by libpspell 
13 PROVIDES += "libpspell"
14 RPROVIDES_libpspell += "libpspell"
15
16 #PROVIDES by aspell 
17 PROVIDES += "aspell"
18 RPROVIDES_aspell += "aspell"
19
20 #PROVIDES by aspell-devel 
21 PROVIDES += "aspell-devel"
22 RPROVIDES_aspell-devel += "aspell-devel"
23 RPROVIDES_aspell-devel += "aspell-dev"
24
25 #PROVIDES by libaspell 
26 PROVIDES += "libaspell"
27 RPROVIDES_libaspell += "libaspell"
28
29 #PROVIDES by aspell-ispell 
30 PROVIDES += "aspell-ispell"
31 RPROVIDES_aspell-ispell += "aspell-ispell"
32
33 #PROVIDES by aspell-spell 
34 PROVIDES += "aspell-spell"
35 RPROVIDES_aspell-spell += "aspell-spell"
36
37 #PROVIDES by aspell-docs  
38 PROVIDES += "aspell-docs "
39 RPROVIDES_aspell-docs  += "aspell-docs "
40
41 RDEPENDS = ""
42 #RDEPENDS of aspell-devel (${PN}-devel)
43 RDEPENDS_${PN}-devel += "glibc-dev"
44 RDEPENDS_${PN}-devel += "libpspell"
45 RDEPENDS_${PN}-devel += "libaspell"
46
47 #RDEPENDS of aspell-ispell (${PN}-ispell)
48 RDEPENDS_${PN}-ispell += "aspell"
49
50 #RDEPENDS of aspell-spell (${PN}-spell)
51 RDEPENDS_${PN}-spell += "aspell"
52
53
54 DEPENDS = ""
55 #DEPENDS of aspell 
56 DEPENDS += "libtool-cross"
57 #Replace "DEPENDS" on gettext by "inherit gettext"
58 inherit gettext
59 DEPENDS += "fdupes-native"
60 DEPENDS += "gcc-c++"
61 DEPENDS += "ncurses-devel"
62
63 do_patch() {
64  chmod -Rf a+rX,u+w,g-w,o-w ${S}
65  #setup -q
66  cp ${S}/packaging/aspell.manifest .
67  
68  
69 }
70
71 do_configure() {
72 }
73
74 do_compile() {
75  LANG=C
76  export LANG
77  unset DISPLAY
78  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
79  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
80  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
81  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
82  
83  autoreconf -fiv
84  export CXXFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables `ncursesw6-config --cflags`"
85  #this is an ugly kludge , don't look :-)
86  export LDFLAGS="`ncursesw6-config --libs`"
87  
88    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
89    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
90    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
91    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
92          --target=x86_64-tizen-linux \
93          --program-prefix= \
94          --prefix=/usr \
95          --exec-prefix=/usr \
96          --bindir=/usr/bin \
97          --sbindir=/usr/sbin \
98          --sysconfdir=/etc \
99          --datadir=/usr/share \
100          --includedir=/usr/include \
101          --libdir=/usr/lib \
102          --libexecdir=/usr/libexec \
103          --localstatedir=/var \
104          --sharedstatedir=/usr/com \
105          --mandir=/usr/share/man \
106          --infodir=/usr/share/info \
107      --enable-curses="-lncursesw" \
108   --disable-rpath
109  
110  make -j16
111  
112  
113  
114 }
115
116 do_install() {
117  echo export RPM_BUILD_ROOT=${D}
118  LANG=C
119  export LANG
120  unset DISPLAY
121  rm -rf ${D} 
122  mkdir -p ${D} 
123  
124  
125    oe_runmake \
126          DESTDIR=${D} \
127          INSTALL_ROOT=${D} \
128          BINDIR=/usr/bin \
129    install  
130    rm -f ${D}/usr/share/info/dir 
131    find ${D} -regex ".*\.la$" | xargs rm -f -- 
132    find ${D} -regex ".*\.a$" | xargs rm -f --
133  # Links for compatibility reasons (ispell and spell)
134  ln -s /usr/lib/aspell-0.60/ispell ${D}/usr/bin
135  ln -s /usr/lib/aspell-0.60/spell ${D}/usr/bin
136  
137   _target=""; 
138   _symlinks=0; 
139   _symlinks=1; 
140   fdupes -q -n -r ${D} | 
141    while read _file; do 
142      if test -z "$_target" ; then 
143        _target="$_file"; 
144      else 
145        if test -z "$_file" ; then 
146         _target=""; 
147         continue ; 
148        fi ; 
149        if test "$_symlinks" = 1; then 
150          ln -sf "${_target#${D}}" "$_file"; 
151        else 
152          ln -f "$_target" "$_file"; 
153        fi ;
154      fi ; 
155   done 
156  
157  /usr/share/spec2yocto/macro/lib/find-lang.sh ${D} aspell
158  
159  
160  
161  
162 }
163
164 PACKAGES = ""
165 PACKAGES += "libpspell"
166 PACKAGES += "aspell"
167 PACKAGES += "aspell-devel"
168 PACKAGES += "aspell-docs"
169 PACKAGES += "libaspell"
170 PACKAGES += "aspell-ispell"
171 PACKAGES += "aspell-spell"
172
173 libpspell_files = ""
174 libpspell_files += "aspell.manifest"
175 libpspell_files += "/usr/lib/libpspell.so.15*"
176
177 aspell_files = ""
178 aspell_files += "aspell.manifest"
179 aspell_files += "/usr/bin/aspell"
180 aspell_files += "/usr/bin/aspell-import"
181 aspell_files += "/usr/bin/pre*"
182 aspell_files += "/usr/bin/run-with-aspell"
183 aspell_files += "/usr/bin/word-list-compress"
184
185 aspell-devel_files = ""
186 aspell-devel_files += "aspell.manifest"
187 aspell-devel_files += "manual/aspell-dev.html/"
188 aspell-devel_files += "/usr/bin/pspell-config"
189 aspell-devel_files += "/usr/include/pspell/"
190 aspell-devel_files += "/usr/include/*.h"
191 aspell-devel_files += "/usr/lib/libaspell.so"
192 aspell-devel_files += "/usr/lib/libpspell.so"
193 aspell-devel_files += "/usr/share/info/aspell-dev.info.gz"
194 aspell-devel_files += "/usr/share/man/man1/pspell-config.1.gz"
195
196 aspell-docs_files = ""
197 aspell-docs_files += "/usr/share/info"
198 aspell-docs_files += "/usr/share/man"
199
200 libaspell_files = ""
201 libaspell_files += "aspell.manifest"
202 libaspell_files += "/usr/lib/aspell-0.60/"
203 libaspell_files += "/usr/lib/libaspell.so.15*"
204
205 aspell-ispell_files = ""
206 aspell-ispell_files += "aspell.manifest"
207 aspell-ispell_files += "/usr/bin/ispell"
208
209 aspell-spell_files = ""
210 aspell-spell_files += "aspell.manifest"
211 aspell-spell_files += "/usr/bin/spell"
212
213 FILES_libpspell = "${libpspell_files}"
214 FILES_${PN} = "${aspell_files}"
215 FILES_${PN}-devel = "${aspell-devel_files}"
216 FILES_${PN}-docs = "${aspell-docs_files}"
217 FILES_lib${PN} = "${libaspell_files}"
218 FILES_${PN}-ispell = "${aspell-ispell_files}"
219 FILES_${PN}-spell = "${aspell-spell_files}"
220
221 PKG_libpspell= "libpspell"
222 PKG_aspell= "aspell"
223 PKG_aspell-devel= "aspell-devel"
224 PKG_aspell-docs= "aspell-docs"
225 PKG_libaspell= "libaspell"
226 PKG_aspell-ispell= "aspell-ispell"
227 PKG_aspell-spell= "aspell-spell"
228
229 require aspell-extraconf.inc