2 DESCRIPTION="Parrot Virtual Machine"
3 HOMEPAGE="http://www.parrotcode.org/"
4 # The release managers change with every release. Check this link
5 #SRC_URI=$(lwp-request -m HEAD -x -e "http://www.parrotcode.org/release/devel" 2>&1 | \
6 # grep "/authors/id" | tail -n1 | perl -ane 'print $F[2]')
8 SRC_URI=${SRC_URI:-"http://search.cpan.org/CPAN/authors/id/R/RG/RGRJR/parrot-${PV}.tar.gz"}
9 # SRC_URI="http://search.cpan.org/dist/${PN}/${PN}-${PV}.tar.gz"
10 # SRC_DIR="parrot-${PV}"
12 DIFF_EXCLUDES="MANIFEST.* parrot.pc myconfig config_lib.pasm Makefile TAGS"
13 DLLVER=$(echo $PV|sed -e's,\.,_,g')
15 PKG_NAMES="${PN} lib${PN}0 lib${PN}-devel ${PN}-perl6 ${PN}-languages"
16 PKG_HINTS="${PKG_NAMES}"
18 parrot_exists_check() {
19 #/usr/lib/libparrot.dll.a /usr/local/lib/libparrot.dll.a \
20 for d in /usr/local/lib/parrot /usr/local/include/parrot \
21 /usr/include/parrot /usr/lib/parrot
24 echo "Building with $d is not yet supported! Remove or rename first"
34 PATH=${B}/blib/lib:$PATH
37 test -e Configure.pl || lndirs
38 test -e config_lib.pasm && make realclean
40 # stable by irc:#parrot
41 lang_stable="abc cardinal eclectus lolcode lua perl6 pipp punie pynie squaak"
42 # 100% ok by make smoke
43 lang_alltests_ok="bf lazy-k lazy-k regex unlambda"
44 perl Configure.pl --prefix=/usr --optimize --mandir=/usr/share/man
45 # -Ddoc_dir=/usr/share/doc/${P} needs to be patched for cygwin.
46 # cygwin-1.7 will have this changed.
47 sed -e"s,/usr/share/doc/parrot\",/usr/share/doc/${P}\"," -i config_lib.pasm
49 cygmake all parrot_utils perl6.exe
52 Locally applied patches:
53 [perl #39742] [BUG] installed conflict
54 [perl #51944] [DOCS] Cygwin Readme
55 [perl #56544] [PATCH] install_files.pl
56 [perl #56998] [PATCH] rename cygwin dll to cygparrot$MAJOR_$MINOR_$PATCH.dll
57 [perl #57006] [PATCH] add cygwin opengl config quirks
58 [perl #56554] [TODO] make install -C languages
59 [perl #58034] [TODO] config_args
60 [perl #56996] [TODO] FHS runtime paths
63 # Build executables for the other languages.
76 PATH=${B}/blib/lib:$PATH
80 cygmake test -C languages/perl6
81 cygmake languages-smoke
90 man1=${D}/usr/share/man/man1
94 PATH=${B}/blib/lib:$PATH make reallyinstall DESTDIR=${D} DOC_DIR="/usr/share/doc/${P}"
96 #cygmake installable_perl6.exe -C languages/perl6
97 rm $man1/parrot-perl6.1
101 for dir in languages/* ; do
102 lang=$( basename $dir )
103 [ $lang = parrot_compiler ] && continue
104 if [ ! -f $lang -a -d $dir -a -f $dir/${lang}.pbc ] ; then
106 make installable || ../../pbc_to_exe ${lang}.pbc --install
107 make install DESTDIR=${D} DOC_DIR="/usr/share/doc/${P}"
108 # TODO: do some standalone testing with renamed builddir
109 #test -e ${lang}.pir -a ! -e $man1/parrot-${lang}.1 && pod2man ${lang}.pir > $man1/parrot-${lang}.1
110 #test -e installable_${lang}.exe && cp installable_${lang}.exe ../bin/parrot-${lang}.exe
116 # said who? gentoo or freebsd
117 insinto /usr/lib/${PN}
118 # now fix the wrong build_dir in the pbc_to_exe files
119 sed -e"s,\"${B}\",\"/usr\"," -e"s,-L${B}/blib/lib,," \
120 -e"s,/usr/share/doc/parrot\",/usr/share/doc/${P}\"," \
121 < config_lib.pasm > ${D}/usr/lib/${PN}/config_lib.pasm
122 # sed -e"s,\"-L${B}/blib/lib,\"," -i config_lib.pasm
123 # sed -e"s,$B,/usr/lib/${PN}," -i config_lib.pasm
124 doins myconfig VERSION parrotbug
127 doexe parrot_config.exe blib/lib/cygparrot${DLLVER}.dll
128 #cp languages/perl6/installable_perl6.exe ${D}/usr/bin/perl6.exe
131 doins blib/lib/libparrot.dll.a
133 insinto /usr/lib/parrot/library
134 doins runtime/parrot/library/config.pir
135 insinto /usr/lib/parrot/include
136 doins runtime/parrot/include/config.fpmc runtime/parrot/include/interpinfo.pasm
138 # necessary for mod_parrot-0.3
139 insinto /usr/lib/${PN}/src/
140 doins "${B}/src/install_config.o" "${B}/src/null_config.o" "${B}/src/parrot_config.o"
142 insinto /usr/include/parrot
143 doins ${B}/include/parrot/pbcversion.h
145 pod2html DEPRECATED.pod > DEPRECATED.html
146 dodoc README RESPONSIBLE_PARTIES ABI_CHANGES ChangeLog CREDITS NEWS README_cygwin.pod \
147 DONORS.pod PLATFORMS TODO PBC_COMPAT DEPRECATED.html languages\LANGUAGES_STATUS.pod
149 # editor support (make vim-install installs into ~/.vim/)
150 insinto /usr/share/emacs/site-lisp
151 doins ${B}/editor/*.el
152 pod2text ${B}/editor/README.pod > ${D}/usr/share/emacs/site-lisp/parrot.README
153 # put this into ~/.vim/ or to the global vim dirs?
154 insinto /usr/share/vim/vimfiles/syntax
155 doins ${B}/editor/pir.vim ${B}/editor/pasm.vim ${B}/editor/pmc.vim
156 mkdir -p ${D}/usr/share/vim/vimfiles/ftplugin
157 cp ${B}/editor/filetype_parrot.vim ${D}/usr/share/vim/vimfiles/ftplugin/parrot.vim
158 # TODO: put this via postinstall into ~/.vim/
159 #mkdir -p ${D}/etc/defaults/.vim
160 #cp ${B}/editor/skeleton.pir ${D}/etc/defaults/.vim/
162 # man(1) for the main binaries
163 man1=${D}/usr/share/man/man1
164 pod2man docs/running.pod > $man1/parrot.1
165 pod2man src/parrot_debugger.c > $man1/parrot_debugger.1
166 pod2man src/pbc_disassemble.c > $man1/pbc_disassemble.1
167 pod2man src/pbc_info.c > $man1/pbc_info.1
168 pod2man src/pbc_merge.c > $man1/pbc_merge.1
169 pod2man pbc_to_exe.pir > $man1/pbc_to_exe.1
170 pod2man languages/perl6/perl6.pir > $man1/perl6.1
172 # Language examples and docs
173 for dir in languages/* ; do
174 test \! -d $dir && continue
175 lang=$( basename $dir )
176 [ $lang = parrot_compiler ] && continue
177 [ $lang = t ] && continue
180 docinto languages/$lang
181 dodoc MAINTAINER README Changes ChangeLog CREDITS
182 #test -e $lang.pir && pod2man $lang.pir > $man1/parrot-$lang.1
183 test -d docs && dodoc docs/*
185 test -d examples && (insinto /usr/share/doc/${P}/languages/${lang}/examples; doins examples/*)
189 rm $man1/parrot-forth.1
194 --exclude=usr/bin/cygparrot${DLLVER}.dll \
195 --exclude=usr/include \
196 --exclude=usr/bin/perl6.exe \
197 --exclude=usr/bin/parrot-* \
198 --exclude=usr/lib/parrot/dynext/apl_*.dll \
199 --exclude=usr/lib/parrot/dynext/dotnet*.dll \
200 --exclude=usr/lib/parrot/dynext/eclectus_*.dll \
201 --exclude=usr/lib/parrot/dynext/lua_*.dll \
202 --exclude=usr/lib/parrot/dynext/perl6_*.dll \
203 --exclude=usr/lib/parrot/dynext/php_*.dll \
204 --exclude=usr/lib/parrot/dynext/tcl_*.dll \
205 --exclude=usr/lib/parrot/dynext/wmls_*.dll \
206 --exclude=usr/lib/parrot/library/php_*.pbc \
207 --exclude=usr/lib/parrot/library/pipplib.pbc \
208 --exclude=usr/lib/parrot/library/tcllib.pbc \
209 --exclude=usr/share/doc/${P}/languages \
210 --exclude=usr/share/doc/${P}/docs/dev \
211 --exclude=usr/share/doc/${P}/docs/project \
212 --exclude=usr/share/doc/${P}/DEPRECATED.html \
213 --exclude=usr/share/doc/${P}/PBC_COMPAT \
214 --exclude=usr/share/man/man1/parrot-*1.gz \
215 --exclude=usr/share/man/man1/perl6.1.gz \
218 usr/lib/parrot/config_lib.pasm \
219 usr/lib/parrot/myconfig \
220 usr/lib/parrot/parrotbug \
221 usr/lib/parrot/VERSION \
222 usr/lib/parrot/dynext \
223 usr/lib/parrot/library \
224 usr/lib/parrot/include/interpinfo.pasm \
225 usr/lib/parrot/include/config.fpmc \
230 usr/bin/cygparrot${DLLVER}.dll"
234 --exclude=usr/lib/parrot/dynext \
235 --exclude=usr/lib/parrot/library \
236 --exclude=usr/lib/parrot/config_lib.pasm \
237 --exclude=usr/lib/parrot/myconfig \
238 --exclude=usr/lib/parrot/parrotbug \
239 --exclude=usr/lib/parrot/VERSION \
240 --exclude=usr/lib/parrot/include/interpinfo.pasm \
241 --exclude=usr/lib/parrot/include/config.fpmc \
244 usr/share/doc/${P}/DEPRECATED.html \
245 usr/share/doc/${P}/PBC_COMPAT \
246 usr/share/doc/${P}/docs/dev \
247 usr/share/doc/${P}/docs/project \
253 usr/lib/parrot/dynext/perl6_*.dll \
254 usr/share/doc/${P}/languages/perl6 \
255 usr/share/man/man1/perl6.1.gz \
260 --exclude=usr/share/doc/${P}/languages/perl6 \
261 usr/bin/parrot-*.exe \
262 usr/lib/parrot/dynext/apl_*.dll \
263 usr/lib/parrot/dynext/dotnet*.dll \
264 usr/lib/parrot/dynext/eclectus_*.dll \
265 usr/lib/parrot/dynext/lua_*.dll \
266 usr/lib/parrot/dynext/php_*.dll \
267 usr/lib/parrot/dynext/tcl_*.dll \
268 usr/lib/parrot/dynext/wmls_*.dll \
269 usr/lib/parrot/library/php_*.pbc \
270 usr/lib/parrot/library/pipplib.pbc \
271 usr/lib/parrot/library/tcllib.pbc \
272 usr/share/doc/${P}/languages \
273 usr/share/man/man1/parrot-*1.gz \