mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 11:37:20 -08:00
dev-util/codeblocks: DisplayEvents.cpp fix linking wxGTK
Ref. https://sourceforge.net/p/codeblocks/code/13653/ Upstream patch to fix 'undefined reference' linker errors by adding missing wxGTK libraries to the linker flags. This resolves errors such as: DisplayEvents.cpp:(.text+0x150b): undefined reference to `wxConvLibcPtr' See the included patch for additional details and comments. Package-Manager: portage-3.0.82.2 Closes: https://bugs.gentoo.org/983198 Signed-off-by: Matthew White <mehw.is.me@proton.me> Part-of: https://github.com/gentoo/gentoo/pull/46831 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
WX_GTK_VER="3.2-gtk3"
|
||||
|
||||
inherit autotools flag-o-matic multiprocessing wxwidgets xdg
|
||||
|
||||
REV=13518
|
||||
REV_DATE="2024-05-05 20:30:28"
|
||||
FP_NAME=fortranproject
|
||||
FP_REV=378
|
||||
|
||||
DESCRIPTION="The open source, cross platform, free C, C++ and Fortran IDE"
|
||||
HOMEPAGE="https://www.codeblocks.org/"
|
||||
SRC_URI="https://downloads.sourceforge.net/${PN}/${P/-/_}.tar.xz -> ${P}.tar.xz"
|
||||
S="${WORKDIR}/${P/-/_}"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
|
||||
IUSE="fortran contrib debug"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
RDEPEND="
|
||||
app-arch/zip
|
||||
dev-libs/glib:2
|
||||
>=dev-libs/tinyxml-2.6.2-r3
|
||||
>=dev-util/astyle-3.1-r2:0=
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/wxGTK:${WX_GTK_VER}=[X]
|
||||
contrib? (
|
||||
app-arch/bzip2
|
||||
app-text/hunspell:=
|
||||
media-libs/fontconfig
|
||||
virtual/zlib:=
|
||||
)
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
x11-base/xorg-proto
|
||||
contrib? ( dev-libs/boost:= )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}_env.patch"
|
||||
"${FILESDIR}/${PN}-20.03_p13518_FortranProject-r378-autotools-build.patch"
|
||||
"${FILESDIR}/${PN}-25.03_DisplayEvents.cpp-fix-linking-wxGTK-r13653.patch"
|
||||
"${FILESDIR}/${P}_fix_boost-1.89.0.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Let's make the autorevision work.
|
||||
echo "m4_define([SVN_REV], ${REV})" > revision.m4
|
||||
echo "m4_define([SVN_DATE], ${REV_DATE})" >> revision.m4
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Bug 858338
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
setup-wxwidgets
|
||||
|
||||
# USE="contrib -fortran" setup:
|
||||
use fortran || CONF_WITH_LST=$(use_with contrib contrib-plugins all,-FortranProject)
|
||||
# USE="contrib fortran" setup:
|
||||
use fortran && CONF_WITH_LST=$(use_with contrib contrib-plugins all)
|
||||
# USE="-contrib fortran" setup:
|
||||
use contrib || CONF_WITH_LST=$(use_with fortran contrib-plugins FortranProject)
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-pch
|
||||
--disable-static
|
||||
$(use_with contrib boost-libdir "${ESYSROOT}/usr/$(get_libdir)")
|
||||
$(use_enable debug)
|
||||
${CONF_WITH_LST}
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use contrib; then
|
||||
if (( $(get_makeopts_jobs) > 8 )); then
|
||||
emake -j8 # Bug 930819
|
||||
else
|
||||
emake
|
||||
fi
|
||||
else
|
||||
emake
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
DisplayEvents: Fix compilation with Autotools on Ubuntu.
|
||||
|
||||
Sort plugins/Makefile.am alphabetically.
|
||||
|
||||
Authored by: wh11204 2025-04-10
|
||||
|
||||
https://sourceforge.net/p/codeblocks/code/13653/
|
||||
|
||||
$ svn diff -r r13652:r13653 > r13653.patch
|
||||
|
||||
Patch amended to apply on Gentoo (adds 'a/' and 'b/' prefixes).
|
||||
|
||||
This should fix dev-util/codeblocks-25.03 'undefined reference'
|
||||
compile errors such as the following:
|
||||
|
||||
make[3]: Entering directory '/var/tmp/portage/dev-util/codeblocks-25.03-r2/work/codeblocks_25.03/src/plugins/displayevents'
|
||||
/bin/sh ../../../libtool --tag=CXX --mode=compile x86_64-pc-linux-gnu-g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib64/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../src/include -DCB_AUTOCONF -DNDEBUG -DPIC -DTIXML_USE_STL=YES -O2 -pipe -march=x86-64 -mtune=generic -fno-strict-aliasing -fPIC -fexceptions -c -o DisplayEvents.lo DisplayEvents.cpp
|
||||
PWD=`pwd` cd . && zip -R /var/tmp/portage/dev-util/codeblocks-25.03-r2/work/codeblocks_25.03/src/plugins/displayevents/DisplayEvents.zip manifest.xml > /dev/null
|
||||
libtool: compile: x86_64-pc-linux-gnu-g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib64/wx/include/gtk3-unicode-3.2 -I/usr/include/wx-3.2 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../src/include -DCB_AUTOCONF -DNDEBUG -DPIC -DTIXML_USE_STL=YES -O2 -pipe -march=x86-64 -mtune=generic -fno-strict-aliasing -fPIC -fexceptions -c DisplayEvents.cpp -fPIC -DPIC -o .libs/DisplayEvents.o
|
||||
/bin/sh ../../../libtool --tag=CXX --mode=link x86_64-pc-linux-gnu-g++ -std=c++11 -O2 -pipe -march=x86-64 -mtune=generic -fno-strict-aliasing -fPIC -fexceptions -module -version-info 0:1:0 -shared -no-undefined -avoid-version -Wl,--no-undefined -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -o libDisplayEvents.la -rpath /usr/lib64/codeblocks/plugins DisplayEvents.lo ../../sdk/libcodeblocks.la -lpthread -ldl
|
||||
libtool: link: x86_64-pc-linux-gnu-g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/15/crtbeginS.o .libs/DisplayEvents.o -Wl,-rpath -Wl,/var/tmp/portage/dev-util/codeblocks-25.03-r2/work/codeblocks_25.03/src/sdk/.libs -Wl,--as-needed ../../sdk/.libs/libcodeblocks.so -L/usr/lib64 -lpthread -ldl -L/usr/lib/gcc/x86_64-pc-linux-gnu/15 -L/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../.. -L/lib -L/usr/lib -lstdc++ -lm -lgcc_s -lc -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/15/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/crtn.o -O2 -march=x86-64 -mtune=generic -Wl,--no-undefined -Wl,-O1 -Wl,-z -Wl,pack-relative-relocs -pthread -Wl,-soname -Wl,libDisplayEvents.so -o .libs/libDisplayEvents.so
|
||||
/usr/x86_64-pc-linux-gnu/binutils-bin/2.47/ld: .libs/DisplayEvents.o: in function `wxString::append(char const*) [clone .isra.0]':
|
||||
DisplayEvents.cpp:(.text+0x150b): undefined reference to `wxConvLibcPtr'
|
||||
|
||||
$ find /usr/lib64/ -name 'libwx*.so' | xargs -I {} sh -c 'nm -D --defined-only ${1} 2>/dev/null | grep wxConvLibcPtr && echo ${1}' _ {}
|
||||
0000000000145e90 T _Z19wxGet_wxConvLibcPtrv@@WXU_3.2
|
||||
00000000002d2cc0 B wxConvLibcPtr@@WXU_3.2
|
||||
/usr/lib64/libwx_baseu-3.2.so
|
||||
|
||||
Index: src/plugins/Makefile.am
|
||||
===================================================================
|
||||
--- a/src/plugins/Makefile.am (revision 13652)
|
||||
+++ b/src/plugins/Makefile.am (revision 13653)
|
||||
@@ -26,12 +26,20 @@
|
||||
MAYBE_DEBUGGER=debuggergdb
|
||||
endif
|
||||
|
||||
+if BUILD_DISPLAYEVENTS
|
||||
+MAYBE_DISPLAYEVENTS=displayevents
|
||||
+endif
|
||||
+
|
||||
+if BUILD_MANIFEST
|
||||
+MAYBE_MANIFEST=xpmanifest
|
||||
+endif
|
||||
+
|
||||
if BUILD_MIMEHANDLER
|
||||
MAYBE_MIMEHANDLER=defaultmimehandler
|
||||
endif
|
||||
|
||||
-if BUILD_DISPLAYEVENTS
|
||||
-MAYBE_DISPLAYEVENTS=displayevents
|
||||
+if BUILD_OCCURRENCESHIGHLIGHTING
|
||||
+MAYBE_OCCURRENCESHIGHLIGHTING=occurrenceshighlighting
|
||||
endif
|
||||
|
||||
if BUILD_OPENFILESLIST
|
||||
@@ -38,10 +46,6 @@
|
||||
MAYBE_OPENFILESLIST=openfileslist
|
||||
endif
|
||||
|
||||
-if BUILD_OCCURRENCESHIGHLIGHTING
|
||||
-MAYBE_OCCURRENCESHIGHLIGHTING=occurrenceshighlighting
|
||||
-endif
|
||||
-
|
||||
if BUILD_PROJECTSIMPORTER
|
||||
MAYBE_PROJECTSIMPORTER=projectsimporter
|
||||
endif
|
||||
@@ -54,12 +58,8 @@
|
||||
MAYBE_TODO=todo
|
||||
endif
|
||||
|
||||
-if BUILD_MANIFEST
|
||||
-MAYBE_MANIFEST=xpmanifest
|
||||
-endif
|
||||
-
|
||||
SUBDIRS=$(MAYBE_ABBREVIATIONS) \
|
||||
- $(MAYBE_ASTYLE) \
|
||||
+ $(MAYBE_ASTYLE) \
|
||||
$(MAYBE_AUTOSAVE) \
|
||||
$(MAYBE_CLASSWIZARD) \
|
||||
$(MAYBE_CODECOMPLETION) \
|
||||
@@ -66,13 +66,13 @@
|
||||
$(MAYBE_COMPILER) \
|
||||
$(MAYBE_DEBUGGER) \
|
||||
$(MAYBE_DISPLAYEVENTS) \
|
||||
+ $(MAYBE_MANIFEST) \
|
||||
$(MAYBE_MIMEHANDLER) \
|
||||
- $(MAYBE_SCRIPTEDWIZARD) \
|
||||
$(MAYBE_PROJECTSIMPORTER) \
|
||||
+ $(MAYBE_OCCURRENCESHIGHLIGHTING) \
|
||||
$(MAYBE_OPENFILESLIST) \
|
||||
- $(MAYBE_OCCURRENCESHIGHLIGHTING) \
|
||||
+ $(MAYBE_SCRIPTEDWIZARD) \
|
||||
$(MAYBE_TODO) \
|
||||
- $(MAYBE_MANIFEST) \
|
||||
contrib
|
||||
# the 'contrib' subdir contains its own filtering
|
||||
|
||||
@@ -85,8 +85,8 @@
|
||||
debuggergdb \
|
||||
defaultmimehandler \
|
||||
displayevents \
|
||||
+ occurrenceshighlighting \
|
||||
openfileslist \
|
||||
- occurrenceshighlighting \
|
||||
projectsimporter \
|
||||
scriptedwizard \
|
||||
todo \
|
||||
@@ -97,3 +97,4 @@
|
||||
loghacker \
|
||||
modpoller \
|
||||
tidycmt
|
||||
+
|
||||
Index: src/plugins/displayevents/Makefile.am
|
||||
===================================================================
|
||||
--- a/src/plugins/displayevents/Makefile.am (revision 13652)
|
||||
+++ b/src/plugins/displayevents/Makefile.am (revision 13653)
|
||||
@@ -5,10 +5,9 @@
|
||||
|
||||
pluginlib_LTLIBRARIES = libDisplayEvents.la
|
||||
|
||||
-libDisplayEvents_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version
|
||||
+libDisplayEvents_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -shared -no-undefined -avoid-version
|
||||
|
||||
-libDisplayEvents_la_LIBADD = $(PLUGIN_WX_LIBS) \
|
||||
- ../../sdk/libcodeblocks.la
|
||||
+libDisplayEvents_la_LIBADD = ../../sdk/libcodeblocks.la $(WX_LIBS)
|
||||
|
||||
libDisplayEvents_la_SOURCES = DisplayEvents.cpp
|
||||
|
||||
Reference in New Issue
Block a user