/[gentoo-x86]/media-libs/svgalib/svgalib-1.9.17-r3.ebuild
Gentoo

Contents of /media-libs/svgalib/svgalib-1.9.17-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations) (download)
Sun Aug 8 13:30:11 2004 UTC (15 years, 2 months ago) by dragonheart
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +1 -1 lines
FILE REMOVED
Fixed CFLAFS typo. Removed empty /usr/man directory as per bug #46565. Remove old versions (a patch was too big)

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.17-r3.ebuild,v 1.16 2004/07/19 17:10:10 vapier Exp $
4
5 inherit eutils flag-o-matic
6
7 DESCRIPTION="A library for running svga graphics on the console"
8 HOMEPAGE="http://www.svgalib.org/"
9 SRC_URI="http://www.arava.co.il/matan/${PN}/${P}.tar.gz"
10
11 LICENSE="BSD"
12 SLOT="0"
13 KEYWORDS="-* x86"
14 IUSE="build"
15
16 DEPEND="virtual/libc"
17
18 pkg_setup() {
19 use build || check_KV
20 }
21
22 src_unpack() {
23 unpack ${A}
24
25 cd ${S}
26 epatch ${FILESDIR}/${P}-gentoo.patch
27
28 # Get it to work with kernel 2.6
29 epatch ${FILESDIR}/${P}-linux2.6.patch
30
31 # Get modversions.h include right if we have CONFIG_MODVERSIONS set.
32 epatch ${FILESDIR}/${P}-modversions_h.patch
33
34 # Disable kernel module support while building stages #38403
35 if use build ; then
36 sed -i 's:installmodule ::' Makefile
37 fi
38 }
39
40 src_compile() {
41
42 filter-flags "-fPIC"
43
44 make OPTIMIZE="${CFLAGS}" static shared textutils lrmi utils \
45 || die "Failed to build libraries and utils!"
46 # Build the gl stuff tpp
47 make OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!"
48 make OPTIMIZE="${CFLAGS}" -C gl libvgagl.so.${PV} \
49 || die "Failed to build libvgagl.so.${PV}!"
50 rm -f src/svgalib_helper.h
51 make OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} \
52 || die "Failed to build libvga.so.${PV}!"
53 cp -a src/libvga.so.${PV} sharedlib/
54 make OPTIMIZE="${CFLAFS}" LDFLAGS='-L ../sharedlib' \
55 -C threeDKit lib3dkit.a || die "Failed to build threeDKit!"
56
57 if ! use build ; then
58 make INCLUDEDIR="/usr/src/linux/include" -C kernel/svgalib_helper \
59 clean all || die "Failed to build kernel module!"
60 fi
61
62 make OPTIMIZE="${CFLAGS}" LDFLAGS='-L ../sharedlib' demoprogs \
63 || die "Failed to build demoprogs!"
64
65 cp Makefile Makefile.orig
66 sed -e 's/\(install: $(INSTALLAOUTLIB) \)installheaders \(.*\)/\1\2/g' \
67 Makefile.orig > Makefile
68 }
69
70 src_install() {
71 local x=
72
73 dodir /etc/svgalib /usr/{include,lib,bin,share/man}
74
75 make TOPDIR=${D} OPTIMIZE="${CFLAGS}" \
76 INCLUDEDIR="/usr/src/linux/include" install \
77 || die "Failed to install svgalib!"
78
79 insinto /usr/include
80 doins gl/vgagl.h
81 dolib.a gl/libvgagl.a
82 dolib.a threeDKit/lib3dkit.a
83 dolib.so gl/libvgagl.so.${PV}
84 dosym libvgagl.so.${PV} /usr/lib/libvgagl.so
85 preplib
86
87 insinto /usr/include
88 doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h
89 doins src/keyboard/vgakeyboard.h
90
91 dodir /etc/modules.d
92 echo "probeall /dev/svga svgalib_helper" > ${D}/etc/modules.d/svgalib
93
94 exeinto /usr/lib/svgalib/demos
95 for x in ${S}/demos/*
96 do
97 [ -x "${x}" ] && doexe ${x}
98 done
99
100 cd ${S}/threeDKit
101 exeinto /usr/lib/svgalib/threeDKit
102 local THREED_PROGS="plane wrapdemo"
103 doexe ${THREED_PROGS}
104
105 cd ${S}/doc
106 dodoc CHANGES DESIGN TODO
107 docinto txt
108 dodoc Driver-programming-HOWTO README.* add_driver svgalib.lsm
109 }
110
111 pkg_postinst() {
112 [ "${ROOT}" = "/" ] && /sbin/modules-update &> /dev/null
113 einfo "When upgrading your kernel you'll need to rebuild the kernel module."
114 }

  ViewVC Help
Powered by ViewVC 1.1.20