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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Sep 14 20:29:28 2012 UTC (7 years, 1 month ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Drop old, thanks to Andrew Savchenko for remembering.

(Portage version: 2.1.11.14/cvs/Linux x86_64)

1 # Copyright 1999-2011 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-r1.ebuild,v 1.4 2011/10/03 17:01:40 mr_bones_ 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 epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.36.patch
38 sed -i -e '/linux\/smp_lock.h/d' kernel/svgalib_helper/main.c || die
39 }
40
41 src_compile() {
42 use kernel-helper || export NO_HELPER=y
43
44 export CC=$(tc-getCC)
45
46 # First build static
47 make OPTIMIZE="${CFLAGS}" static || die "Failed to build static libraries!"
48 # Have to remove for shared to build ...
49 rm -f src/svgalib_helper.h
50 # Then build shared ...
51 make OPTIMIZE="${CFLAGS}" shared || die "Failed to build shared libraries!"
52 # Missing in some cases ...
53 ln -s libvga.so.${PV} sharedlib/libvga.so
54 # Build lrmi and tools ...
55 make OPTIMIZE="${CFLAGS}" LDFLAGS="-L../sharedlib" \
56 textutils lrmi utils \
57 || die "Failed to build libraries and utils!"
58 # Build the gl stuff tpp
59 make OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!"
60 make OPTIMIZE="${CFLAGS}" -C gl libvgagl.so.${PV} \
61 || die "Failed to build libvgagl.so.${PV}!"
62 # Missing in some cases ...
63 ln -s libvgagl.so.${PV} sharedlib/libvgagl.so
64 rm -f src/svgalib_helper.h
65 make OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} \
66 || die "Failed to build libvga.so.${PV}!"
67 cp -pPR src/libvga.so.${PV} sharedlib/
68 # Build threeDKit ...
69 make OPTIMIZE="${CFLAGS}" LDFLAGS='-L../sharedlib' \
70 -C threeDKit lib3dkit.a || die "Failed to build threeDKit!"
71 # Build demo's ...
72 make OPTIMIZE="${CFLAGS} -I../gl" LDFLAGS='-L../sharedlib' \
73 demoprogs || die "Failed to build demoprogs!"
74
75 ! use build && use kernel-helper && linux-mod_src_compile
76 }
77
78 src_install() {
79 local x=
80
81 dodir /etc/svgalib /usr/{include,lib,bin,share/man}
82
83 emake \
84 TOPDIR="${D}" OPTIMIZE="${CFLAGS}" INSTALLMODULE="" \
85 install || die "Failed to install svgalib!"
86 ! use build && use kernel-helper && linux-mod_src_install
87
88 insinto /usr/include
89 doins gl/vgagl.h
90 dolib.a staticlib/libvga.a || die "dolib.a libvga"
91 dolib.a gl/libvgagl.a || die "dolib.a libvgagl"
92 dolib.a threeDKit/lib3dkit.a
93 dolib.so gl/libvgagl.so.${PV} || die "dolib.so libvgagl.so"
94 local abiver=$(sed -n '/^MAJOR_VER.*=/{s:.*=[ ]*::;p}' Makefile.cfg)
95 for x in lib3dkit libvga libvgagl ; do
96 dosym ${x}.so.${PV} /usr/lib/${x}.so
97 dosym ${x}.so.${PV} /usr/lib/${x}.so.${abiver}
98 done
99
100 insinto /usr/include
101 doins src/vga.h gl/vgagl.h src/mouse/vgamouse.h src/joystick/vgajoystick.h
102 doins src/keyboard/vgakeyboard.h
103
104 insinto /etc/udev/rules.d
105 newins "${FILESDIR}"/svgalib.udev.rules.d.2 30-svgalib.rules
106
107 exeinto /usr/lib/svgalib/demos
108 for x in "${S}"/demos/* ; do
109 [[ -x ${x} ]] && doexe ${x}
110 done
111
112 cd "${S}"/threeDKit
113 exeinto /usr/lib/svgalib/threeDKit
114 local THREED_PROGS="plane wrapdemo"
115 doexe ${THREED_PROGS}
116
117 cd "${S}"
118 dodoc 0-README
119 cd "${S}"/doc
120 dodoc CHANGES DESIGN TODO
121 docinto txt
122 dodoc Driver-programming-HOWTO README.* add_driver svgalib.lsm
123 }
124
125 pkg_postinst() {
126 ! use build && use kernel-helper && linux-mod_pkg_postinst
127 }

  ViewVC Help
Powered by ViewVC 1.1.20