Accepting request 106851 from home:elvigia:branches:devel:libraries:c_c++

- Build C++ code with -fvisibility-inlines-hidden
- Fix ncurses linkage.

OBS-URL: https://build.opensuse.org/request/show/106851
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/aspell?expand=0&rev=19
This commit is contained in:
Cristian Rodríguez 2012-02-24 21:15:00 +00:00 committed by Git OBS Bridge
parent f74e0a2792
commit 3ea761808f
3 changed files with 51 additions and 8 deletions

View File

@ -1,6 +1,6 @@
--- common/convert.cpp
--- common/convert.cpp.orig
+++ common/convert.cpp
@@ -813,6 +813,7 @@
@@ -813,6 +813,7 @@ namespace acommon {
{
ToUniLookup lookup;
void decode(const char * in, int size, FilterCharVector & out) const {
@ -8,3 +8,39 @@
const char * stop = in + size; // this is OK even if size == -1
while (*in && in != stop) {
out.append(from_utf8(in, stop));
--- Makefile.am.orig
+++ Makefile.am
@@ -29,8 +29,10 @@ lib_LTLIBRARIES = libaspell.la
if PSPELL_COMPATIBILITY
lib_LTLIBRARIES += libpspell.la
+libpspell_la_CXXFLAGS = -fvisibility-inlines-hidden
endif
+libaspell_la_CXXFLAGS = -fvisibility-inlines-hidden
libaspell_la_SOURCES =\
common/cache.cpp\
common/string.cpp\
@@ -194,7 +196,7 @@ libaspell_la_SOURCES +=\
else # not COMPILE_IN_FILTERS
dynamic_optfiles += ${optfiles}
-filter_ldflags = -module -avoid-version
+filter_ldflags = -avoid-version -module -shared -export-dynamic
### Add name of filter library containing your filter. Name always
### must look like lib<filtername>-filter.la see development manual
--- lib5/Makefile.am.orig
+++ lib5/Makefile.am
@@ -1,9 +1,9 @@
-
+AM_CXXFLAGS = -fvisibility-inlines-hidden
if INCREMENTED_SONAME
lib_LTLIBRARIES = libaspell.la
libaspell_la_SOURCES = aspell-dummy.cpp
-libaspell_la_LDFLAGS = -version-info 16:0:1
+libaspell_la_LDFLAGS = -no-undefined -version-info 16:0:1
libaspell_la_LIBADD = ../libaspell.la
if PSPELL_COMPATIBILITY

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 24 21:06:58 UTC 2012 - crrodriguez@opensuse.org
- Build C++ code with -fvisibility-inlines-hidden
- Fix ncurses linkage.
-------------------------------------------------------------------
Sat Jan 28 21:01:20 UTC 2012 - jengelh@medozas.de

View File

@ -127,9 +127,13 @@ This package contains the pspell compatibility library.
%patch2
%build
autoreconf -fiv
export CXXFLAGS="%optflags `ncursesw6-config --cflags`"
#this is an ugly kludge , don't look :-)
export LDFLAGS="`ncursesw6-config --libs`"
%configure \
%if %suse_version > 1210
--enable-curses="-lncursesw -ltinfo" \
%if 0%{?suse_version} > 1210
--enable-curses="-lncursesw" \
%endif
--disable-rpath
@ -141,11 +145,10 @@ make %{?_smp_mflags}
%else
make DESTDIR=%{buildroot} install
%endif
# Links for compatibility reasons (ispell and spell)
ln -s %{_libdir}/aspell-0.60/ispell %{buildroot}%{_bindir}
ln -s %{_libdir}/aspell-0.60/spell %{buildroot}%{_bindir}
find %{buildroot} -name "*.la" -type f -print -delete
%fdupes -s %{buildroot}
%find_lang %{name}
@ -189,8 +192,6 @@ ln -s %{_libdir}/aspell-0.60/spell %{buildroot}%{_bindir}
%{_bindir}/pspell-config
%{_includedir}/pspell/
%{_includedir}/*.h
%{_libdir}/libaspell.la
%{_libdir}/libpspell.la
%{_libdir}/libaspell.so
%{_libdir}/libpspell.so
%doc %{_infodir}/%{name}-dev.info%{ext_info}