0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-02-23 01:07:10 +00:00
Biswapriyo Nath e1a4efb116 fix(main/libhtmlcxx): Fix compiler and linker error
This fixes the following compiler error.

error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]

and the linker warning

*** Warning: Linking the shared library libhtmlcxx.la against the
*** static library libclang_rt.builtins-x86_64-android.a is not portable!
2024-07-29 11:35:44 +05:30

23 lines
905 B
Bash

TERMUX_PKG_HOMEPAGE=https://htmlcxx.sourceforge.net/
TERMUX_PKG_DESCRIPTION="A simple non-validating css1 and html parser for C++"
TERMUX_PKG_LICENSE="LGPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.87
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/sourceforge/htmlcxx/htmlcxx-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=5d38f938cf4df9a298a5346af27195fffabfef9f460fc2a02233cbcfa8fc75c8
TERMUX_PKG_DEPENDS="libc++, libiconv"
termux_step_pre_configure() {
autoreconf -fi
# error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
CXXFLAGS+=" -std=c++11"
# static library libclang_rt.builtins-x86_64-android.a is not portable
local _libgcc_file="$($CC -print-libgcc-file-name)"
local _libgcc_path="$(dirname $_libgcc_file)"
local _libgcc_name="$(basename $_libgcc_file)"
LDFLAGS+=" -L$_libgcc_path -l:$_libgcc_name"
}