summaryrefslogtreecommitdiff
blob: 2829d62b2f359160190005078d6edd6cb71a97e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools

DESCRIPTION="Kryoflux SPS Decoder Library"
HOMEPAGE="https://www.kryoflux.com/"
SRC_URI="https://www.kryoflux.com/download/${PN}_${PV}_source.zip"

KEYWORDS="amd64 x86"
LICENSE="Kryoflux-MAME"
SLOT="0"

DEPEND="app-arch/unzip"

S="${WORKDIR}/capsimg_source_linux_macosx/CAPSImg"

DOCS=( "${WORKDIR}"/{DONATIONS,HISTORY,RELEASE}.txt )

PATCHES=( "${FILESDIR}"/add_symlink.patch )

src_unpack() {
	unpack ${A}

	# Unpacked ZIP-file contains two ZIP files, use the one for Linux
	unpack "${WORKDIR}"/capsimg_source_linux_macosx.zip
}

src_prepare() {
	default

	# Respect users CFLAGS and CXXFLAGS
	sed -i -e 's/-g//' configure.in || die
	sed -i -e 's/CXXFLAGS="${CFLAGS}/CXXFLAGS="${CXXFLAGS}/' configure.in || die

	# Remove MSVC compiler-specific attribute
	sed -i -e 's/__cdecl //' ../LibIPF/Caps{Lib,FDC}.h || die

	mv configure.in configure.ac || die
	eautoconf

	# Fix permissions, as configure is not marked executable
	chmod +x configure || die
}

src_install() {
	default

	insinto /usr/include/caps5
	doins ../Core/CommonTypes.h ../LibIPF/*.h
}