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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Aug 3 12:59:03 2003 UTC (16 years, 2 months ago) by azarah
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
remove temp stuff from 2.6 patch; clean old builds

1 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License, v2 or later
3 # $Header: /home/cvsroot/gentoo-x86/media-libs/svgalib/svgalib-1.9.17-r1.ebuild,v 1.4 2003/02/13 12:56:09 vapier Exp $
4
5 IUSE=""
6
7 inherit eutils
8
9 S="${WORKDIR}/${P}"
10 DESCRIPTION="A library for running svga graphics on the console"
11 SRC_URI="http://www.arava.co.il/matan/${PN}/${P}.tar.gz"
12 HOMEPAGE="http://www.svgalib.org/"
13
14 SLOT="0"
15 LICENSE="BSD"
16 KEYWORDS="~x86 -ppc -sparc -alpha"
17
18 DEPEND="virtual/glibc"
19
20 pkg_setup() {
21
22 check_KV
23 }
24
25 src_unpack() {
26
27 unpack ${A}
28
29 cd ${S};
30 epatch ${FILESDIR}/${P}-gentoo.patch
31
32 # Get it to work with kernel 2.5
33 epatch ${FILESDIR}/${P}-kernel25.patch
34 }
35
36 check_kernel() {
37
38 local KV_MAJOR="`uname -r | cut -d. -f1`"
39 local KV_MINOR="`uname -r | cut -d. -f2`"
40 export INCLUDEDIR="/usr/src/linux/include"
41
42 # Are we running kernel 2.5 ?
43 if [ "${KV_MAJOR}${KV_MINOR}" -gt "24" ]
44 then
45 # Setup the proper mach include directory ...
46 if [ -d ${INCLUDEDIR}/asm/mach-default ]
47 then
48 export INCLUDEDIR="${INCLUDEDIR} -I${INCLUDEDIR}/asm/mach-default"
49
50 elif [ -d ${INCLUDEDIR}/asm/mach-generic ]
51 then
52 export INCLUDEDIR="${INCLUDEDIR} -I${INCLUDEDIR}/asm/mach-generic"
53 else
54 die "Cannot find kernel includes!"
55 fi
56 fi
57 }
58
59 src_compile() {
60
61 check_kernel
62
63 make OPTIMIZE="${CFLAGS}" static shared textutils lrmi utils || \
64 die "Failed to build libraries and utils!"
65 # Build the gl stuff tpp
66 make OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!"
67 make OPTIMIZE="${CFLAGS}" -C gl libvgagl.so.${PV} || \
68 die "Failed to build libvgagl.so.${PV}!"
69 rm -f src/svgalib_helper.h
70 make OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} || \
71 die "Failed to build libvga.so.${PV}!"
72 cp -a src/libvga.so.${PV} sharedlib/
73 make OPTIMIZE="${CFLAFS}" LDFLAGS='-L ../sharedlib' \
74 -C threeDKit lib3dkit.a || die "Failed to build threeDKit!"
75
76 make INCLUDEDIR="${INCLUDEDIR}" -C kernel/svgalib_helper || \
77 die "Failed to build kernel module!"
78
79 make OPTIMIZE="${CFLAGS}" LDFLAGS='-L ../sharedlib' demoprogs || \
80 die "Failed to build demoprogs!"
81
82 cp Makefile Makefile.orig
83 sed -e 's/\(install: $(INSTALLAOUTLIB) \)installheaders \(.*\)/\1\2/g' \
84 Makefile.orig > Makefile
85 }
86
87 src_install() {
88
89 dodir /etc/svgalib /usr/{include,lib,bin,share/man}
90
91 # Do not use 'hacked' INCLUDEDIR here ...
92 make TOPDIR=${D} OPTIMIZE="${CFLAGS}" \
93 INCLUDEDIR="/usr/src/linux/include" install || \
94 die "Failed to install svgalib!"
95
96 insinto /usr/include
97 doins gl/vgagl.h
98 dolib.a gl/libvgagl.a
99 dolib.a threeDKit/lib3dkit.a
100 dolib.so gl/libvgagl.so.${PV}
101 dosym libvgagl.so.${PV} /usr/lib/libvgagl.so
102 preplib
103
104 insinto /usr/include
105 doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h
106 doins src/keyboard/vgakeyboard.h
107
108 dodir /etc/modules.d
109 echo "probeall /dev/svga svgalib_helper" > ${D}/etc/modules.d/svgalib
110
111 cd ${S}/demos
112 exeinto /usr/lib/svgalib/demos
113 local DEMO_PROGS="fun testgl speedtest mousetest vgatest scrolltest \
114 testlinear \
115 keytest testaccel accel forktest eventtest spin bg_test printftest \
116 joytest mjoytest bankspeed lineart linearspeed addmodetest \
117 svidtune linearfork vgatweak"
118 doexe ${DEMO_PROGS}
119
120 cd ${S}/threeDKit
121 exeinto /usr/lib/svgalib/theeDKit
122 local THREED_PROGS="plane wrapdemo"
123 doexe ${THREED_PROGS}
124
125 cd ${S}/doc
126 dodoc CHANGES DESIGN TODO
127 docinto txt
128 dodoc Driver-programming-HOWTO README.* add_driver svgalib.lsm
129 }
130
131 pkg_postinst() {
132
133 [ "${ROOT}" = "/" ] && /sbin/modules-update &> /dev/null
134 }
135

  ViewVC Help
Powered by ViewVC 1.1.20