mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
dev-util/flips: New package
There's a distinct lack of IPS and BPS patching tools in the repository, this is the only linux-native tool of the sort I've used for years. I think it's time to add it. Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
This commit is contained in:
4 files changed
+174
No files matched your search
@@ -0,0 +1,2 @@
|
||||
DIST flips-1.31.zip 158223 BLAKE2B e553a92e3bd8f5c1cfc768b023211733a48e1394eed1f0a991563eccd304ce7607b8dac3ad618bf768e1e52c591a5f2cde9e29b0f9cfbf0ab09f8449c4aba274 SHA512 40c1e9e2c78ef8f30e1a146dd1b1bd1c49addb97c1bc55bd1b1c964f0ee78d2626704ff706c1eb60fc5cd20ffdb70b5188ff8ac6cf34193ef73f2ba48241deb2
|
||||
DIST flips-1.31_p202.tar.gz 44534139 BLAKE2B 9d9a3358432696cad19c976126ce51c3e4c0bcb0439779b5639caafd85974481a0d0f8b31039489d25c20c170f87e018cc5f30ceb81d05303053849a4d5bd429 SHA512 3468b477b075cd55189e3f993930cc4c6857227dd9a63e9f8a5ba51fb63d561df3d7914f2f7dd7093cf0ecf33204be571f127f340c0be8a1d03a07f844e570e5
|
||||
@@ -0,0 +1,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
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
# Copyright 2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit toolchain-funcs xdg
|
||||
|
||||
DESCRIPTION="Patcher for IPS and BPS files"
|
||||
HOMEPAGE="https://www.smwcentral.net/?p=section&a=details&id=11474"
|
||||
|
||||
MY_PV="${PV##*_p}"
|
||||
SRC_URI="https://git.disroot.org/Sir_Walrus/Flips/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/flips"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="+gtk +pgo"
|
||||
RDEPEND="
|
||||
dev-libs/libdivsufsort
|
||||
gtk? (
|
||||
x11-libs/gtk+:3
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
# Unbundle divsuf
|
||||
sed -e '/^DIVSUF :=/{N;N;d}' \
|
||||
-i Makefile || die
|
||||
|
||||
# Avoid traversing the filesystem to find a git repository
|
||||
sed -e '/^COMMIT_COUNT :=/s/:=.*$/:=/' \
|
||||
-i Makefile || die
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() { :; }
|
||||
|
||||
src_compile() {
|
||||
local pkg_config="$(tc-getPKG_CONFIG)"
|
||||
local DIVSUF_CFLAGS="$("${pkg_config}" --cflags libdivsufsort)"
|
||||
local DIVSUF_LIBS="$("${pkg_config}" --libs libdivsufsort)"
|
||||
local myemakeargs=(
|
||||
CXX="$(tc-getCXX)"
|
||||
PKG_CONFIG="$pkg_config"
|
||||
CFLAGS="${CPPFLAGS} ${DIVSUF_CFLAGS} ${CXXFLAGS}"
|
||||
LFLAGS="${LDFLAGS} ${DIVSUF_LIBS}"
|
||||
|
||||
TARGET=$(usex gtk gtk cli)
|
||||
)
|
||||
if ! use pgo; then
|
||||
emake "${myemakeargs[@]}"
|
||||
else
|
||||
# From make-linux.sh
|
||||
emake "${myemakeargs[@]}" CFLAGS="${CXXFLAGS} -fprofile-generate"
|
||||
einfo "Running tests ..."
|
||||
./flips --create --bps-delta \
|
||||
profile/firefox-10.0esr.tar \
|
||||
profile/firefox-17.0esr.tar /dev/null || die
|
||||
./flips --create --bps-delta-moremem \
|
||||
profile/firefox-10.0esr.tar \
|
||||
profile/firefox-17.0esr.tar /dev/null || die
|
||||
rm flips || die
|
||||
emake "${myemakeargs[@]}" CFLAGS="${CXXFLAGS} -fprofile-use"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
einstalldocs
|
||||
|
||||
if ! use gtk; then
|
||||
dobin flips
|
||||
else
|
||||
emake TARGET=gtk DESTDIR="${ED}" install
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>esteve.varela@gmail.com</email>
|
||||
<name>Esteve Varela Colominas</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="divsuf">Uses the more performant <pkg>dev-libs/libdivsufsort</pkg> instead of a bundled modified copy of yuta256's sais algorithm.</flag>
|
||||
<flag name="pgo">Optimize the build using Profile Guided Optimization (PGO)</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
Reference in new issue
Block a user