Avoid Win32 functions
[git/cygwin-packages/libcaca.git] / libcaca.cygport
1 inherit python python3 ruby autotools # java pypy
2
3 NAME="libcaca"
4 VERSION=0.99.beta19
5 RELEASE=1
6 CATEGORY="Libs"
7 SUMMARY="Color ASCII art library"
8 DESCRIPTION="libcaca is a graphics library that outputs text instead of pixels,
9 so that it can work on older video cards or text terminals. It is not unlike
10 the famous AAlib library, except that colors are supported. libcaca can use
11 almost any virtual terminal to work, and there is also a native X11 driver that
12 does not require a text terminal."
13 HOMEPAGE="http://caca.zoy.org/wiki/libcaca"
14 SRC_URI="http://caca.zoy.org/files/libcaca/libcaca-${VERSION}.tar.gz"
15 PATCH_URI="
16 0.99.16-caca-sharp-dllmap.patch
17 0.99.16-plugins.patch
18 0.99.16-ruby.patch
19 0.99.18-java.patch
20 0.99.18-ncurses6.patch
21 0.99.18-python-errno.patch
22 0.99.19-cygwin-no-win32.patch
23 "
24
25 PKG_NAMES="${NAME}-bin ${NAME}0 ${NAME}++0 ${NAME}-devel ${NAME}++-devel ${NAME}-doc
26 python-caca python3-caca ruby-caca" # java-caca pypy-caca
27 libcaca_bin_SUMMARY="${SUMMARY} (sample programs)"
28 libcaca_bin_CONTENTS="--exclude=*-config.* --exclude=html --exclude=pdf \
29 usr/bin/*.exe usr/share/doc/ usr/share/${NAME} usr/share/man/man1/"
30 libcaca0_SUMMARY="${SUMMARY} (C runtime)"
31 libcaca0_CONTENTS="usr/bin/cygcaca-0.dll"
32 libcaca__0_SUMMARY="${SUMMARY} (C++ runtime)"
33 libcaca__0_CONTENTS="usr/bin/cygcaca++-0.dll"
34 libcaca_devel_SUMMARY="${SUMMARY} (C development)"
35 libcaca_devel_CONTENTS="--exclude=*++.* usr/bin/caca-config usr/include/ usr/lib/lib*
36 usr/lib/pkgconfig/ usr/share/man/man1/caca-config.*"
37 libcaca___devel_SUMMARY="${SUMMARY} (C++ development)"
38 libcaca___devel_CONTENTS="usr/include/*++.h usr/lib/lib*++.* usr/lib/pkgconfig/**++.pc"
39 libcaca_doc_SUMMARY="${SUMMARY} (API documentation)"
40 libcaca_doc_CONTENTS="usr/share/doc/${NAME}/*/ usr/share/man/man3/"
41 java_caca_CATEGORY="Java"
42 java_caca_SUMMARY="${SUMMARY} (Java JNI bindings)"
43 java_caca_CONTENTS="usr/bin/cygcaca-java.dll ${JAVA_DIR#/}/caca.jar"
44 pypy_caca_CATEGORY="Python"
45 pypy_caca_SUMMARY="${SUMMARY} (PyPy bindings)"
46 pypy_caca_REQUIRES="libcaca-devel" # ctypes.util.find_library('caca')
47 pypy_caca_CONTENTS=${PYPY_SITELIB#/}
48 python_caca_CATEGORY="Python"
49 python_caca_SUMMARY="${SUMMARY} (Python bindings)"
50 python_caca_REQUIRES="libcaca-devel" # ctypes.util.find_library('caca')
51 python_caca_CONTENTS=${PYTHON_SITELIB#/}
52 python3_caca_CATEGORY="Python"
53 python3_caca_SUMMARY="${SUMMARY} (Py3K bindings)"
54 python3_caca_REQUIRES="libcaca-devel" # ctypes.util.find_library('caca')
55 python3_caca_CONTENTS=${PYTHON3_SITELIB#/}
56 ruby_caca_CATEGORY="Ruby"
57 ruby_caca_SUMMARY="${SUMMARY} (Ruby bindings)"
58 ruby_caca_CONTENTS="${RUBY_VENDORARCH#/}/*.so ${RUBY_VENDORLIB#/}/*.rb"
59
60 # latex docs FTBFS
61 CYGCONF_ARGS="
62 --disable-debug --enable-doc
63 --enable-x11 --with-x --x-libraries=/usr/lib --enable-gl
64 --enable-imlib2 --enable-ncurses --disable-plugins
65 --disable-cocoa --disable-conio --disable-slang --disable-win32
66 --enable-cxx --disable-csharp --disable-java --enable-python --enable-ruby
67 ac_cv_header_windows_h=no ac_cv_header_winsock2_h=no
68 ac_cv_path_LATEX=no
69 "
70
71 src_install() {
72 cd ${B}
73 cyginstall RUBY_SITEARCHDIR=${RUBY_VENDORARCH} RUBY_SITELIBDIR=${RUBY_VENDORLIB}
74 mv ${D}/usr/share/doc/${NAME}{-dev,}
75 rm -f ${D}/usr/lib/libcucul*.la ${D}/usr/share/doc/libcucul*
76
77 # the python bindings are ctypes-based and Py3K compatible
78 python3into caca
79 dopython3 ${D}${PYTHON_SITELIB}/caca/*.py
80 python3_optimize
81
82 if inherited pypy
83 then
84 pypyinto caca
85 dopypy ${D}${PYTHON_SITELIB}/caca/*.py
86 pypy_optimize
87 fi
88
89 rm -f ${D}/usr/share/man/man1/cacademo.1
90 echo '.so cacafire.1' > ${D}/usr/share/man/man1/cacademo.1
91
92 find ${D}/usr/share/man/man3/ -type f ! -iname 'caca*' ! -iname 'cucul*' -exec rm -f '{}' +
93 }
94
95 KEEP_LA_FILES="none"
This page took 0.036879 seconds and 5 git commands to generate.