200bed5c06
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
38 lines
1.1 KiB
Bash
38 lines
1.1 KiB
Bash
# Template file for 'hardinfo'
|
|
pkgname=hardinfo
|
|
version=0.5.1
|
|
revision=12
|
|
build_style=gnu-configure
|
|
hostmakedepends="pkg-config which"
|
|
makedepends="gtk+-devel libsoup-devel desktop-file-utils"
|
|
depends="desktop-file-utils"
|
|
short_desc="System information and benchmark tool"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="http://sourceforge.net/projects/hardinfo.berlios/"
|
|
distfiles="${SOURCEFORGE_SITE}/${pkgname}.berlios/${pkgname}-${version}.tar.bz2"
|
|
checksum=a0df6c0d7c92a7d20710b8eb551197398a965aaae053782b89a32a160b731b7a
|
|
lib32disabled=yes
|
|
|
|
post_patch() {
|
|
local _arch
|
|
_arch="${XBPS_TARGET_MACHINE%-*}"
|
|
if [ "$_arch" == aarch64 ]; then
|
|
_arch=armv8
|
|
fi
|
|
vsed -i -e "s|^CC =.*|CC = $CC|" \
|
|
-e "s|^CCSLOW =.*|CCSLOW = $CC -O0|" \
|
|
-e "s|-o hardinfo|$LDFLAGS &|" \
|
|
Makefile.in
|
|
vsed -i -e "s|^LIBDIR=.*|LIBDIR=/usr/lib${XBPS_TARGET_WORDSIZE}|" \
|
|
-e "s|^PROC=.*|PROC=$_arch|" \
|
|
configure
|
|
vsed -i "s/\"lib\"/\"lib${XBPS_TARGET_WORDSIZE}\"/" binreloc.c
|
|
vsed -i '/distro_db/a { "/etc/hardinfo.distro", "Void" },' \
|
|
computer.h
|
|
}
|
|
|
|
post_install() {
|
|
vmkdir etc
|
|
echo "Void Linux" > ${DESTDIR}/etc/hardinfo.distro
|
|
}
|