7fc9190f0e
* gcc is kept at -Np0, because of void-cross ```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 ```
50 lines
1.5 KiB
Bash
50 lines
1.5 KiB
Bash
# Template file for 'gpsbabel'
|
|
pkgname=gpsbabel
|
|
version=1.7.0
|
|
revision=1
|
|
wrksrc="gpsbabel-gpsbabel_${version//./_}"
|
|
build_style=gnu-configure
|
|
build_helper=qmake
|
|
makedepends="qt5-devel qt5-webkit-devel libusb-compat-devel"
|
|
depends="desktop-file-utils"
|
|
short_desc="Converts waypoints, tracks, and routes between popular GPS formats"
|
|
maintainer="Philipp Hirsch <itself@hanspolo.net>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://www.gpsbabel.org/"
|
|
distfiles="https://github.com/gpsbabel/${pkgname}/archive/${pkgname}_${version//./_}.tar.gz"
|
|
checksum=30b186631fb43db576b8177385ed5c31a5a15c02a6bc07bae1e0d7af9058a797
|
|
|
|
replaces="gpsbabel-gui>=0"
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" qt5-devel qt5-webkit-devel"
|
|
configure_args+=" ac_cv_prog_QMAKE=${XBPS_WRAPPERDIR}/qmake"
|
|
fi
|
|
|
|
do_build() {
|
|
sed -i 's|langPath_ = QApplication::applicationDirPath();|langPath_ = "/usr/share/gpsbabel";|' gui/mainwindow.cc
|
|
|
|
make ${makejobs}
|
|
cd gui
|
|
qmake-qt5
|
|
lrelease-qt5 *.ts
|
|
sed -i Makefile \
|
|
-e"s;^\(CFLAGS.*=.*\);& $CFLAGS;" \
|
|
-e"s;^\(CXXFLAGS.*=.*\);& $CXXFLAGS;" \
|
|
-e"s;^\(LFLAGS.*=.*\);& $LDFLAGS;"
|
|
make ${makejobs}
|
|
}
|
|
|
|
do_install() {
|
|
make install DESTDIR=${DESTDIR}
|
|
vbin gui/objects/gpsbabelfe
|
|
vinstall gui/gpsbabel.desktop 644 usr/share/applications
|
|
vinstall gui/images/appicon.png 644 usr/share/pixmaps gpsbabel.png
|
|
vmkdir usr/share/gpsbabel/translations
|
|
mv gui/*.qm ${DESTDIR}/usr/share/gpsbabel/translations
|
|
}
|
|
|
|
post_pkg() {
|
|
# Remove temporary stuff from masterdir
|
|
rm -rf ${XBPS_BUILDDIR}/babelweb
|
|
}
|