```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.7 KiB
Bash
50 lines
1.7 KiB
Bash
# Template file for 'codeblocks'
|
|
pkgname=codeblocks
|
|
version=20.03
|
|
revision=1
|
|
build_style=gnu-configure
|
|
configure_args="--with-wx-config=wx-config-gtk3 --with-contrib-plugins
|
|
--with-boost=${XBPS_CROSS_BASE}/usr --with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib"
|
|
hostmakedepends="automake libtool pkg-config zip"
|
|
makedepends="gtk+3-devel wxWidgets-gtk3-devel tinyxml-devel hunspell-devel
|
|
gamin-devel boost-devel boost-build"
|
|
short_desc="Free C, C++ and Fortran IDE"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-3.0-only"
|
|
homepage="http://www.codeblocks.org"
|
|
distfiles="${SOURCEFORGE_SITE}/${pkgname}/Sources/${version}/${pkgname}-${version}.tar.xz"
|
|
checksum=15eeb3e28aea054e1f38b0c7f4671b4d4d1116fd05f63c07aa95a91db89eaac5
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" wxWidgets-devel tinyxml-devel"
|
|
configure_args+=" ac_cv_exeext=no --with-gnu-ld"
|
|
fi
|
|
|
|
pre_configure() {
|
|
./bootstrap
|
|
if [ "$CROSS_BUILD" ]; then
|
|
# Patch auto_revision's Makefile.am to use the host compiler and flags
|
|
cd src/build_tools/autorevision
|
|
sed -i Makefile.am \
|
|
-e "/noinst_PROGRAMS = auto_revision/a CC = gcc" \
|
|
-e "/noinst_PROGRAMS = auto_revision/a CXX = g++" \
|
|
-e "/noinst_PROGRAMS = auto_revision/a LD = g++" \
|
|
-e "/noinst_PROGRAMS = auto_revision/a CFLAGS = -O2 -pipe" \
|
|
-e "/noinst_PROGRAMS = auto_revision/a CXXFLAGS = -O2 -pipe" \
|
|
-e "/noinst_PROGRAMS = auto_revision/a LDFLAGS = -s"
|
|
fi
|
|
}
|
|
|
|
post_install() {
|
|
vinstall debian/codeblocks.sharedmime 644 /usr/share/mime/packages codeblocks.xml
|
|
vinstall src/mime/codeblocks.desktop 644 /usr/share/applications
|
|
}
|
|
|
|
codeblocks-devel_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/include/codeblocks
|
|
}
|
|
}
|