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

Contents of /media-libs/svgalib/svgalib-1.9.18.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Wed Jun 23 02:56:28 2004 UTC (15 years, 3 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
ver bump #54465

1 # Copyright 1999-2004 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.18.ebuild,v 1.5 2004/05/12 12:30:06 pappy 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/glibc"
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 # Fix a small gcc33 issue
29 epatch ${FILESDIR}/${P}-gcc33.patch
30
31 # Get it to work with kernel 2.6
32 epatch ${FILESDIR}/${P}-linux2.6.patch
33
34 # Disable kernel module support while building stages #38403
35 #use build &&
36 sed -i 's:installmodule ::' Makefile
37 # for now we dont build the module at all #42522
38 }
39
40 src_compile() {
41
42 filter-flags "-fPIC"
43
44 make OPTIMIZE="${CFLAGS}" static \
45 || die "Failed to build static libraries!"
46 rm -f src/svgalib_helper.h
47 make OPTIMIZE="${CFLAGS}" shared textutils lrmi utils \
48 || die "Failed to build libraries and utils!"
49 # Build the gl stuff tpp
50 make OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!"
51 make OPTIMIZE="${CFLAGS}" -C gl libvgagl.so.${PV} \
52 || die "Failed to build libvgagl.so.${PV}!"
53 rm -f src/svgalib_helper.h
54 make OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} \
55 || die "Failed to build libvga.so.${PV}!"
56 cp -a src/libvga.so.${PV} sharedlib/
57 make OPTIMIZE="${CFLAFS}" LDFLAGS='-L ../sharedlib' \
58 -C threeDKit lib3dkit.a || die "Failed to build threeDKit!"
59
60 if ! use build ; then
61 # for now we dont build the module at all #42522
62 if [ 0 -eq 1 ] ; then
63 cd ${S}/kernel/svgalib_helper
64 env -u ARCH \
65 make -C /usr/src/linux SUBDIRS=`pwd` clean modules \
66 || die "Failed to build kernel module!"
67 cd ${S}
68 fi
69 fi
70
71 make OPTIMIZE="${CFLAGS}" LDFLAGS='-L ../sharedlib' demoprogs \
72 || die "Failed to build demoprogs!"
73
74 cp Makefile Makefile.orig
75 sed -e 's/\(install: $(INSTALLAOUTLIB) \)installheaders \(.*\)/\1\2/g' \
76 Makefile.orig > Makefile
77 }
78
79 src_install() {
80 local x=
81
82 dodir /etc/svgalib /usr/{include,lib,bin,share/man}
83
84 make TOPDIR=${D} OPTIMIZE="${CFLAGS}" \
85 INCLUDEDIR="/usr/src/linux/include" install installmodule \
86 || die "Failed to install svgalib!"
87
88 insinto /usr/include
89 doins gl/vgagl.h
90 dolib.a staticlib/libvga.a
91 dolib.a gl/libvgagl.a
92 dolib.a threeDKit/lib3dkit.a
93 dolib.so gl/libvgagl.so.${PV}
94 dosym libvgagl.so.${PV} /usr/lib/libvgagl.so
95 preplib
96
97 insinto /usr/include
98 doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h
99 doins src/keyboard/vgakeyboard.h
100
101 dodir /etc/modules.d
102 echo "probeall /dev/svga svgalib_helper" > ${D}/etc/modules.d/svgalib
103
104 exeinto /usr/lib/svgalib/demos
105 for x in ${S}/demos/*
106 do
107 [ -x "${x}" ] && doexe ${x}
108 done
109
110 cd ${S}/threeDKit
111 exeinto /usr/lib/svgalib/theeDKit
112 local THREED_PROGS="plane wrapdemo"
113 doexe ${THREED_PROGS}
114
115 cd ${S}
116 dodoc 0-README LICENSE
117 cd ${S}/doc
118 dodoc CHANGES DESIGN TODO
119 docinto txt
120 dodoc Driver-programming-HOWTO README.* add_driver svgalib.lsm
121 }
122
123 pkg_postinst() {
124 [ "${ROOT}" = "/" ] && /sbin/modules-update &> /dev/null
125 einfo "When upgrading your kernel you'll need to rebuild the kernel module."
126 }

  ViewVC Help
Powered by ViewVC 1.1.20