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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Jun 16 09:59:36 2012 UTC (7 years, 3 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fix QA warnings and installation of some files, by Andrew Savchenko. Drop old.

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 # Copyright 1999-2012 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-r3.ebuild,v 1.1 2012/04/07 12:10:38 pacho Exp $
4
5 EAPI="4"
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_prepare() {
30 epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.patch
31 epatch "${FILESDIR}"/${PN}-1.9.19-pic.patch #51698
32 epatch "${FILESDIR}"/${PN}-1.9.25-build.patch
33 epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.28.patch
34 epatch "${FILESDIR}"/${PN}-1.9.25-glibc210.patch #274305
35 epatch "${FILESDIR}"/${PN}-1.9.25-linux2.6.36-r1.patch
36 epatch "${FILESDIR}"/${PN}-1.9.25-segfault.patch
37 epatch "${FILESDIR}"/${PN}-1.9.25-build2.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 emake OPTIMIZE="${CFLAGS}" static || die "Failed to build static libraries!"
48 # Then build shared ...
49 emake 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 emake OPTIMIZE="${CFLAGS}" LDFLAGS+=" -L../sharedlib" \
54 textutils lrmi utils \
55 || die "Failed to build libraries and utils!"
56 # Build the gl stuff tpp
57 emake OPTIMIZE="${CFLAGS}" -C gl || die "Failed to build gl!"
58 emake 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 emake OPTIMIZE="${CFLAGS}" -C src libvga.so.${PV} \
63 || die "Failed to build libvga.so.${PV}!"
64 cp -pPR src/libvga.so.${PV} sharedlib/
65 # Build threeDKit ...
66 emake OPTIMIZE="${CFLAGS}" LDFLAGS+=" -L../sharedlib" \
67 -C threeDKit lib3dkit.a || die "Failed to build threeDKit!"
68 # Build demo's ...
69 emake OPTIMIZE="${CFLAGS} -I../gl" LDFLAGS+=" -L../sharedlib" \
70 demoprogs || die "Failed to build demoprogs!"
71
72 ! use build && use kernel-helper && linux-mod_src_compile
73 }
74
75 src_install() {
76 local x=
77
78 dodir /etc/svgalib /usr/{include,lib,bin,share/man}
79
80 emake \
81 TOPDIR="${D}" OPTIMIZE="${CFLAGS}" INSTALLMODULE="" \
82 install || die "Failed to install svgalib!"
83 ! use build && use kernel-helper && linux-mod_src_install
84
85 insinto /usr/include
86 doins gl/vgagl.h
87 dolib.a staticlib/libvga.a || die "dolib.a libvga"
88 dolib.a gl/libvgagl.a || die "dolib.a libvgagl"
89 dolib.a threeDKit/lib3dkit.a
90 dolib.so gl/libvgagl.so.${PV} || die "dolib.so libvgagl.so"
91 local abiver=$(sed -n '/^MAJOR_VER.*=/{s:.*=[ ]*::;p}' Makefile.cfg)
92 for x in lib3dkit libvga libvgagl ; do
93 dosym ${x}.so.${PV} /usr/lib/${x}.so
94 dosym ${x}.so.${PV} /usr/lib/${x}.so.${abiver}
95 done
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 kernel/svgalib_helper/svgalib_helper.h
100
101 insinto /etc/udev/rules.d
102 newins "${FILESDIR}"/svgalib.udev.rules.d.2 30-svgalib.rules
103
104 exeinto /usr/lib/svgalib/demos
105 for x in "${S}"/demos/* ; do
106 [[ -x ${x} ]] && doexe ${x}
107 done
108
109 cd "${S}"/threeDKit
110 exeinto /usr/lib/svgalib/threeDKit
111 local THREED_PROGS="plane wrapdemo"
112 doexe ${THREED_PROGS}
113
114 cd "${S}"
115 dodoc 0-README
116 cd "${S}"/doc
117 dodoc CHANGES DESIGN TODO
118 docinto txt
119 dodoc Driver-programming-HOWTO README.* add_driver svgalib.lsm
120 }
121
122 pkg_postinst() {
123 ! use build && use kernel-helper && linux-mod_pkg_postinst
124 }

  ViewVC Help
Powered by ViewVC 1.1.20