From 946e649b15c9d1f943b8a23399a7840b7835a0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sun, 31 Dec 2017 14:22:10 +0100 Subject: [PATCH] codeblocks: use system tinyxml; fix cross build --- srcpkgs/codeblocks/template | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/srcpkgs/codeblocks/template b/srcpkgs/codeblocks/template index ba6ed66534c..6fefdb9f0ab 100644 --- a/srcpkgs/codeblocks/template +++ b/srcpkgs/codeblocks/template @@ -1,10 +1,10 @@ # Template file for 'codeblocks' pkgname=codeblocks version=17.12 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="automake libtool pkg-config zip" -makedepends="gtk+-devel wxWidgets-devel" +makedepends="gtk+-devel wxWidgets-devel tinyxml-devel" configure_args="--with-wx-config=wx-config-3.0" short_desc="Free C, C++ and Fortran IDE" maintainer="Jürgen Buchmüller " @@ -12,12 +12,27 @@ license="GPL-3" homepage="http://www.codeblocks.org" distfiles="${SOURCEFORGE_SITE}/${pkgname}/Sources/${version}/${pkgname}_${version}.tar.xz" checksum=13881a0a72769694e82e531b8e7814d51fbf1fa122c73c5004e186560fbc57e0 -nocross="executes binary 'auto_revision' when building" CXXFLAGS="-std=c++11 -fpermissive" +if [ -n "$CROSS_BUILD" ]; then + hostmakedepends+=" wxWidgets-devel tinyxml-devel" + configure_args+=" ac_cv_exeext=no cb_cv_gcc_version=$XBPS_GCC_VERSION --with-gnu-ld" +fi + pre_configure() { ./bootstrap + if [ -n "$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() {