blob: 18967495e80e6ef3d204b28234425152ccdc4074 (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs desktop xdg
DESCRIPTION="Patcher for IPS and BPS files"
HOMEPAGE="https://www.smwcentral.net/?p=section&a=details&id=11474"
SRC_URI="https://dl.smwcentral.net/11474/floating.zip -> ${P}.zip"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+divsuf +gtk +pgo"
RDEPEND="
divsuf? ( dev-libs/libdivsufsort )
gtk? (
x11-libs/gtk+:3
)
"
DEPEND="${RDEPEND}"
BDEPEND="
app-arch/unzip
virtual/imagemagick-tools[png]
virtual/pkgconfig
"
src_unpack() {
__vecho ">>> Unpacking ${P}.zip to ${PWD}"
unzip -q "${DISTDIR}/${P}.zip" src.zip || die
mkdir "${P}" || die
unzip -q -d "${P}" src.zip || die
}
src_configure() { :; }
src_compile() {
local pkg_config="$(tc-getPKG_CONFIG)"
local myemakeargs=(
CXX="$(tc-getCXX)"
CFLAGS="${CPPFLAGS} ${CXXFLAGS}"
LFLAGS="${LDFLAGS}"
GTKFLAGS="$("${pkg_config}" --cflags --libs gtk+-3.0)"
TARGET=$(usex gtk gtk cli)
DIVSUF=$(usex divsuf)
)
if use divsuf; then
myemakeargs+=(
DIVSUF_CFLAGS="-DUSE_DIVSUFSORT $("${pkg_config}" --cflags libdivsufsort)"
DIVSUF_LFLAGS="$("${pkg_config}" --libs libdivsufsort)"
)
fi
if ! use pgo; then
emake "${myemakeargs[@]}"
else
# From make.sh
emake "${myemakeargs[@]}" CFLAGS="${CXXFLAGS} -fprofile-generate"
# Upstream is missing profiling data, use whatever's available
einfo "Running tests ..."
./profile/profile1.sh ./flips bps.ico ips.ico || die
./profile/profile1.sh ./flips libbps.cpp libips.cpp || die
rm flips || die
emake "${myemakeargs[@]}" CFLAGS="${CXXFLAGS} -fprofile-use"
fi
magick flips.ico flips.png || die
}
src_install() {
einstalldocs
dobin flips
# Using the category field from newer upstream
make_desktop_entry flips flips flips 'GNOME;GTK;Utility;RevisionControl'
newicon flips-2.png flips.png
}
|