codeblocks: rebuild for boost-1.80

This commit is contained in:
Đoàn Trần Công Danh 2022-08-26 17:00:29 +07:00
parent b7b47d5d68
commit bc7a9daacc
2 changed files with 53 additions and 17 deletions

View File

@ -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@

View File

@ -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