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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Fri Apr 23 22:14:07 2010 UTC (9 years, 5 months ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.1.8.3/cvs/Linux i686)

1 # Copyright 1999-2009 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.25.ebuild,v 1.9 2009/07/23 14:51:59 vostorga Exp $
4
5 EAPI=1
6
7 inherit eutils flag-o-matic toolchain-funcs linux-mod
8
9 DESCRIPTION="A library for running svga graphics on the console"
10 HOMEPAGE="http://www.svgalib.org/"
11 SRC_URI="http://www.arava.co.il/matan/${PN}/${P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="-* x86"
16 IUSE="build +kernel-helper"
17
18 DEPEND=""
19 RDEPEND=""
20
21 MODULE_NAMES="svgalib_helper(misc:${S}/kernel/svgalib_helper)"
22 BUILD_TARGETS="default"
23
24 pkg_setup() {
25 linux-mod_pkg_setup
26 BUILD_PARAMS="KDIR=${KV_OUT_DIR}"
27 }
28
29 src_unpack() {
30 unpack ${A}
31 cd "${S}"
32 epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.patch
33 epatch "${FILESDIR}"/${PN}-1.9.19-pic.patch #51698
34 epatch "${FILESDIR}"/${PN}-1.9.25-build.patch
35 epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.28.patch
36 epatch "${FILESDIR}"/${PN}-1.9.25-glibc210.patch #274305
37 }
38
39 src_compile() {
40 use kernel-helper || export NO_HELPER=y
41
42 export CC=$(tc-getCC)
43
44 # First build static
45 make OPTIMIZE="${CFLAGS}" static || die "Failed to build static libraries!"
46 # Have to remove for shared to build ...
47 rm -f src/svgalib_helper.h
48 # Then build shared ...
49 make OPTIMIZE="${CFLAGS}" shared || die "Failed to build shared libraries!"
50 # Missing in some cases ...
51 ln -s libvga.so.${PV} sharedlib/libvga.so
52 # Build lrmi and tools ...
53 make OPTIMIZE="${CFLAGS}" LDFLAGS="-L../sharedlib" \
54 textutils lrmi utils \
55 || die "Failed to build libraries and utils!"
56 # Build the gl stuff tpp
57 make OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!"
58 make OPTIMIZE="${CFLAGS}" -C gl libvgagl.so.${PV} \
59 || die "Failed to build libvgagl.so.${PV}!"
60 # Missing in some cases ...
61 ln -s libvgagl.so.${PV} sharedlib/libvgagl.so
62 rm -f src/svgalib_helper.h
63 make OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} \
64 || die "Failed to build libvga.so.${PV}!"
65 cp -pPR src/libvga.so.${PV} sharedlib/
66 # Build threeDKit ...
67 make OPTIMIZE="${CFLAGS}" LDFLAGS='-L../sharedlib' \
68 -C threeDKit lib3dkit.a || die "Failed to build threeDKit!"
69 # Build demo's ...
70 make OPTIMIZE="${CFLAGS} -I../gl" LDFLAGS='-L../sharedlib' \
71 demoprogs || die "Failed to build demoprogs!"
72
73 ! use build && use kernel-helper && linux-mod_src_compile
74 }
75
76 src_install() {
77 local x=
78
79 dodir /etc/svgalib /usr/{include,lib,bin,share/man}
80
81 emake \
82 TOPDIR="${D}" OPTIMIZE="${CFLAGS}" INSTALLMODULE="" \
83 install || die "Failed to install svgalib!"
84 ! use build && use kernel-helper && linux-mod_src_install
85
86 insinto /usr/include
87 doins gl/vgagl.h
88 dolib.a staticlib/libvga.a || die "dolib.a libvga"
89 dolib.a gl/libvgagl.a || die "dolib.a libvgagl"
90 dolib.a threeDKit/lib3dkit.a
91 dolib.so gl/libvgagl.so.${PV} || die "dolib.so libvgagl.so"
92 local abiver=$(sed -n '/^MAJOR_VER.*=/{s:.*=[ ]*::;p}' Makefile.cfg)
93 for x in lib3dkit libvga libvgagl ; do
94 dosym ${x}.so.${PV} /usr/lib/${x}.so
95 dosym ${x}.so.${PV} /usr/lib/${x}.so.${abiver}
96 done
97
98 insinto /usr/include
99 doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h
100 doins src/keyboard/vgakeyboard.h
101
102 insinto /etc/udev/rules.d
103 newins "${FILESDIR}"/svgalib.udev.rules.d 30-svgalib.rules
104
105 exeinto /usr/lib/svgalib/demos
106 for x in "${S}"/demos/* ; do
107 [[ -x ${x} ]] && doexe ${x}
108 done
109
110 cd "${S}"/threeDKit
111 exeinto /usr/lib/svgalib/threeDKit
112 local THREED_PROGS="plane wrapdemo"
113 doexe ${THREED_PROGS}
114
115 cd "${S}"
116 dodoc 0-README
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 ! use build && use kernel-helper && linux-mod_pkg_postinst
125 }

  ViewVC Help
Powered by ViewVC 1.1.20