From bc7a9daaccf2203ef0ed3871790ed71c3a4352f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 26 Aug 2022 17:00:29 +0700 Subject: [PATCH] codeblocks: rebuild for boost-1.80 --- .../patches/cross-autorevision.patch | 51 +++++++++++++++++++ srcpkgs/codeblocks/template | 19 +------ 2 files changed, 53 insertions(+), 17 deletions(-) create mode 100644 srcpkgs/codeblocks/patches/cross-autorevision.patch diff --git a/srcpkgs/codeblocks/patches/cross-autorevision.patch b/srcpkgs/codeblocks/patches/cross-autorevision.patch new file mode 100644 index 00000000000..7d3ef3acfd2 --- /dev/null +++ b/srcpkgs/codeblocks/patches/cross-autorevision.patch @@ -0,0 +1,51 @@ +--- a/src/build_tools/autorevision/Makefile.am ++++ b/src/build_tools/autorevision/Makefile.am +@@ -1,3 +1,10 @@ ++CC = cc ++CXX = g++ ++LD = g++ ++CFLAGS = -O2 -pipe ++CXXFLAGS = -O2 -pipe ++LDFLAGS = -s ++ + noinst_PROGRAMS = auto_revision + auto_revision_SOURCES = autorevision.cpp + +--- a/src/build_tools/autorevision/Makefile.in ++++ b/src/build_tools/autorevision/Makefile.in +@@ -240,17 +240,17 @@ CB_SQUIRREL_CFLAGS = @CB_SQUIRREL_CFLAGS + CB_SQUIRREL_LIBS = @CB_SQUIRREL_LIBS@ + CB_TINYXML_CFLAGS = @CB_TINYXML_CFLAGS@ + CB_TINYXML_LIBS = @CB_TINYXML_LIBS@ +-CC = @CC@ ++CC = cc + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = @CFLAGS@ ++CFLAGS = -O2 -pipe + CODEBLOCKS_PLATFORM = @CODEBLOCKS_PLATFORM@ + CODEBLOCKS_VERSION_INFO = @CODEBLOCKS_VERSION_INFO@ +-CPP = @CPP@ +-CPPFLAGS = @CPPFLAGS@ +-CXX = @CXX@ +-CXXCPP = @CXXCPP@ ++CPP = cpp ++CPPFLAGS := ++CXX = g++ ++CXXCPP = g++ + CXXDEPMODE = @CXXDEPMODE@ +-CXXFLAGS = @CXXFLAGS@ ++CXXFLAGS = -O2 -pipe + CYGPATH_W = @CYGPATH_W@ + DATE = @DATE@ + DEFS = @DEFS@ +@@ -288,8 +288,8 @@ INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +-LD = @LD@ +-LDFLAGS = @LDFLAGS@ ++LD = g++ ++LDFLAGS = -s + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ diff --git a/srcpkgs/codeblocks/template b/srcpkgs/codeblocks/template index 33b9b9a7785..26487b40f79 100644 --- a/srcpkgs/codeblocks/template +++ b/srcpkgs/codeblocks/template @@ -1,11 +1,11 @@ # Template file for 'codeblocks' pkgname=codeblocks version=20.03 -revision=1 +revision=2 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" +hostmakedepends="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" @@ -20,21 +20,6 @@ if [ "$CROSS_BUILD" ]; then 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