Because of the not up to date wxwidgets I always use wxwidgets trunk which I install in /opt/wx. There, wxwidgets trunk can coexist with the version provided by the Linux distro. That way you still can install other programs of your distro which rely on its original wxwidgets. I use it on Ubuntu as well as on Arch, Raspberry PI OS. It has been a while that I used it on FreeBSD also. It is an out of tree build in order to keep trunk relatively clean, apart from the changes made by bootstrap.
On distros based on apt-packages I install wxwidgets and cb with checkinstall. This probably isn't suitable for being used in a PPA repository though. I never bothered to make one because I just call checkinstall which creates and installs a debian package for me.
a snippet out of my wxwidgets Makefile:
trunk=trunk
build=build
WX_PREFIX=/opt/wx
config:
@mkdir -p $(build)
@(cd $(build) && ../$(trunk)/configure --prefix=$(WX_PREFIX) --with-cxx=14)
a snippet out of my cb Makefile:
trunk=trunk
build=build
WX_PREFIX=/opt/wx
bootstrap:
(cd $(trunk) && ACLOCAL_FLAGS="-I `$(WX_PREFIX)/bin/wx-config --prefix`/share/aclocal" ./bootstrap )
config:
@mkdir -p $(build)
(cd $(build) && \
LT_SYS_LIBRARY_PATH=$(WX_PREFIX)/lib \
../$(trunk)/configure \
--with-wx-config=$(WX_PREFIX)/bin/wx-config --with-wx-prefix=$(WX_PREFIX) \
--disable-code-completion \
--with-contrib-plugins=all,-NassiShneiderman,-codesnippets)
Have a nice day.
Hi.
Well, the problem is not wxWidgets related : it is only the call to the "PKG_CHECK_MODULES" macro.
It appears only once in the configure script for Ubuntu (see attached configure file):
19863 : PKG_CHECK_MODULES(zlib, zlib, HAVE_ZLIB=yes, HAVE_ZLIB=no)
And this is the line causing the error:
......
checking for vsnprintf... yes
/<<PKGBUILDDIR>>/./configure: line 19863: syntax error near unexpected token `zlib,'
/<<PKGBUILDDIR>>/./configure: line 19863: `PKG_CHECK_MODULES(zlib, zlib, HAVE_ZLIB=yes, HAVE_ZLIB=no)'
make: *** [/usr/share/cdbs/1/class/autotools.mk:46: debian/stamp-autotools] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
Regards
Xav'
Then the first part of setup_control.sh should be similar to this...
if [ "$#" -ne 1 ] || [ -z "${1##*detect*}" ]; then
echo "Doing version detection"
test -e /etc/os-release && os_release='/etc/os-release' || os_release='/usr/lib/os-release'
. "$os_release"
if [ $ID = "debian" ] || [ $ID = "ubuntu" ]; then
version=$VERSION_CODENAME
else
version=`cat /etc/debian_version`
fi
else
version=$1
fi
echo "Found version: $version"