diff options
author | Reuben Thomas <rrt@sc3d.org> | 2017-02-09 22:41:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-09 22:41:21 +0000 |
commit | 4fbead675f057e7cbb006b8d0d29edcc776c8375 (patch) | |
tree | 20c35ff0de3a41d621d70c281f85a2bfecbad119 | |
parent | a5f20c57b355b52a0810ca07911d6a3c1ae038d7 (diff) | |
parent | d2b9f6e6ff1c2f7c68d3c21069c2f57e0685bce5 (diff) | |
download | enchant-4fbead675f057e7cbb006b8d0d29edcc776c8375.tar.gz |
Merge pull request #80 from rrthomas/master
Miscellaneous tidy-up
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | appveyor.yml | 4 | ||||
-rw-r--r-- | configure.ac | 91 | ||||
-rw-r--r-- | enchant.spec.in | 96 | ||||
-rw-r--r-- | src/voikko/Makefile.am | 2 |
7 files changed, 42 insertions, 158 deletions
@@ -14,10 +14,7 @@ enchant-*.tar.gz /configure /config.* /depcomp -/enchant-uninstalled.pc /enchant.pc -/enchant.ps -/enchant.spec /gnulib /install-sh /lib diff --git a/MAINTAINERS b/MAINTAINERS deleted file mode 100644 index dfb7c2c..0000000 --- a/MAINTAINERS +++ /dev/null @@ -1 +0,0 @@ -Dom Lachowicz <cinamod@hotmail.com> diff --git a/Makefile.am b/Makefile.am index 56a468c..f3d09dc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,8 +8,6 @@ pkgconfig_DATA = enchant.pc EXTRA_DIST = \ autogen.sh \ enchant.pc.in \ - enchant.spec.in \ - enchant.spec \ lt-compile-resource \ compile-resource \ README \ @@ -18,7 +16,6 @@ EXTRA_DIST = \ NEWS \ BUGS \ ChangeLog \ - MAINTAINERS \ AUTHORS \ COPYING.LIB \ m4/gnulib-cache.m4 diff --git a/appveyor.yml b/appveyor.yml index 133d764..8c9e135 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ clone_folder: c:\projects\enchant environment: global: - CONFIGURE_FLAGS: --with-myspell-dir=/mingw64/share/hunspell + CONFIGURE_FLAGS: --with-myspell-dir=/mingw64/share/hunspell --disable-voikko VERBOSE: 1 # Get test logs in output # FIXME: Build on mingw-w64, mingw-w32 and MSYS2 @@ -19,4 +19,4 @@ install: # FIXME: add all available providers (just aspell?) build_script: - - C:\msys64\usr\bin\bash.exe -lc "cd c:/projects/enchant && ./autogen.sh %CONFIGURE_FLAGS% && make && make DISTCHECK_CONFIGURE_FLAGS=%CONFIGURE_FLAGS% distcheck" + - C:\msys64\usr\bin\bash.exe -lc "cd c:/projects/enchant && ./autogen.sh %CONFIGURE_FLAGS% && make && make DISTCHECK_CONFIGURE_FLAGS=\"%CONFIGURE_FLAGS%\" distcheck" diff --git a/configure.ac b/configure.ac index 8f1b93c..85ffc74 100644 --- a/configure.ac +++ b/configure.ac @@ -2,9 +2,8 @@ AC_INIT([enchant],[2.0.0]) AC_PACKAGE_VERSION AC_CONFIG_SRCDIR(src/enchant.h) AC_CONFIG_AUX_DIR([build-aux]) -AM_INIT_AUTOMAKE([no-define subdir-objects]) +AM_INIT_AUTOMAKE([subdir-objects]) AC_CANONICAL_HOST -AM_MAINTAINER_MODE AC_CONFIG_MACRO_DIR([m4]) dnl Release number rules: @@ -38,7 +37,6 @@ AC_SUBST(ENCHANT_MINOR_VERSION) AC_SUBST(ENCHANT_MICRO_VERSION) dnl Checks for programs. -AC_SEARCH_LIBS([strerror],[cposix]) AC_PROG_CC gl_EARLY AC_PROG_CXX @@ -46,7 +44,6 @@ AX_CXX_COMPILE_STDCXX(11) AC_PROG_OBJC AC_PROG_INSTALL AC_PROG_LN_S -AC_PROG_MAKE_SET AC_HEADER_STDC LT_INIT([win32-dll]) gl_INIT @@ -208,18 +205,6 @@ esac AC_MSG_RESULT([$native_win32]) AM_CONDITIONAL(OS_WIN32, test "x$native_win32" = "xyes") AC_SUBST([ENCHANT_WIN32_RESOURCE]) - -AC_MSG_CHECKING([for OS X]) -case ${host_os} in - *darwin*) - check_applespell=yes - ;; - *) - check_applespell=no - ;; -esac -AC_MSG_RESULT([$check_applespell]) - AC_SUBST(SOCKET_LIBS) # Courtesy of Glib: Ensure MSVC-compatible struct packing convention @@ -247,6 +232,17 @@ if test x"$native_win32" = xyes; then fi fi +AC_MSG_CHECKING([for macOS]) +case ${host_os} in + *darwin*) + check_applespell=yes + ;; + *) + check_applespell=no + ;; +esac +AC_MSG_RESULT([$check_applespell]) + dnl =========================================================================== m4_copy([AC_DEFUN],[glib_DEFUN]) @@ -317,6 +313,10 @@ dnl supporting this old version. AC_SUBST(UNITTESTPP_CFLAGS) AC_SUBST(UNITTESTPP_LIBS) + +dnl ======================================================================================= + +dnl Ispell build_ispell=yes AC_ARG_ENABLE(ispell, AS_HELP_STRING([--disable-ispell],[enable the ispell backend @<:@default=auto@:>@]), build_ispell="$enableval", build_ispell=yes) @@ -333,24 +333,27 @@ fi ISPELL_CFLAGS="-DENCHANT_ISPELL_DICT_DIR='\"$ispell_dir\"'" AC_SUBST(ISPELL_CFLAGS) -build_myspell=yes +dnl Hunspell AC_ARG_ENABLE(myspell, AS_HELP_STRING([--disable-myspell],[enable the myspell backend @<:@default=auto@:>@]), build_myspell="$enableval", build_myspell=yes) AM_CONDITIONAL(WITH_MYSPELL, test "x$build_myspell" = "xyes") myspell_dir=${datadir}/myspell/dicts AC_ARG_WITH(myspell-dir, AS_HELP_STRING([--with-myspell-dir=PATH],[path to installed myspell dicts])) - if test "x$with_myspell_dir" != "x" ; then myspell_dir=$with_myspell_dir fi -PKG_CHECK_MODULES(MYSPELL, [hunspell]) -AC_SUBST(MYSPELL_CFLAGS) -AC_SUBST(MYSPELL_LIBS) -MYSPELL_CFLAGS="$MYSPELL_CFLAGS -DENCHANT_MYSPELL_DICT_DIR='\"$myspell_dir\"'" +if test "x$build_myspell" = xyes; then + PKG_CHECK_MODULES(MYSPELL, [hunspell]) + AC_SUBST(MYSPELL_CFLAGS) + AC_SUBST(MYSPELL_LIBS) + MYSPELL_CFLAGS="$MYSPELL_CFLAGS -DENCHANT_MYSPELL_DICT_DIR='\"$myspell_dir\"'" +fi + +dnl Aspell check_aspell=yes build_aspell=no @@ -412,36 +415,21 @@ fi AM_CONDITIONAL(WITH_ASPELL, test "$build_aspell" = yes) -check_voikko=yes -build_voikko=no - -AC_ARG_ENABLE(voikko, AS_HELP_STRING([--disable-voikko],[enable the voikko backend @<:@default=auto@:>@]), check_voikko="$enableval", check_voikko=yes) - -AC_ARG_WITH(voikko-prefix, AS_HELP_STRING([--with-voikko-prefix=DIR],[specify under which prefix voikko is installed]), voikko_prefix="$withval", ) - -if test "x$check_voikko" != "xno"; then - saved_LDFLAGS=$LDFLAGS - VOIKKO_INC= - VOIKKO_LIBS="-lvoikko" - if test "x$voikko_prefix" != "x"; then - LDFLAGS="-L$voikko_prefix/lib "$LDFLAGS - VOIKKO_INC="-I$voikko_prefix/include" - VOIKKO_LIBS="-L$voikko_prefix/lib "$VOIKKO_LIBS - fi +dnl Voikko +AC_ARG_ENABLE(voikko, AS_HELP_STRING([--disable-voikko],[enable the voikko backend @<:@default=auto@:>@]), build_voikko="$enableval", build_voikko=yes) - AC_CHECK_LIB(voikko,voikko_init,build_voikko=yes) +AM_CONDITIONAL(WITH_VOIKKO, test "x$build_voikko" = "xyes") - LDFLAGS=$saved_LDFLAGS - - AC_SUBST(VOIKKO_INC) +if test "x$build_voikko" = xyes; then + PKG_CHECK_MODULES(VOIKKO, [libvoikko]) + AC_SUBST(VOIKKO_CFLAGS) AC_SUBST(VOIKKO_LIBS) fi -AM_CONDITIONAL(WITH_VOIKKO, test "$build_voikko" = yes) +dnl Uspell build_uspell=no - check_uspell=yes AC_ARG_ENABLE(uspell, AS_HELP_STRING([--disable-uspell],[enable the uspell backend @<:@default=auto@:>@]), check_uspell="$enableval", check_uspell=yes) @@ -462,6 +450,8 @@ AC_SUBST(USPELL_LIBS) AM_CONDITIONAL(WITH_USPELL, test "$build_uspell" = yes) + +dnl Hspell build_hspell=no check_hspell=yes AC_ARG_ENABLE(hspell, AS_HELP_STRING([--disable-hspell],[enable the hspell backend @<:@default=auto@:>@]), check_hspell="$enableval", check_hspell=yes) @@ -491,6 +481,8 @@ fi AM_CONDITIONAL(WITH_HSPELL, test "$build_hspell" = yes) + +dnl Zemberek build_zemberek=no AC_ARG_ENABLE(zemberek, AS_HELP_STRING([--enable-zemberek],[enable the experimental zemberek (turkish) backend @<:@default=auto@:>@]), build_zemberek="$enableval", build_zemberek=no) @@ -504,6 +496,8 @@ AM_CONDITIONAL(WITH_ZEMBEREK, test "x$build_zemberek" = "xyes") zemberek_dir=${datadir}/enchant/zemberek + +dnl Apple Spell APPLESPELL_CFLAGS="" APPLESPELL_LIBS="" APPLESPELL_LDFLAGS="" @@ -532,7 +526,6 @@ dnl ============================================================================ AC_CONFIG_FILES([ Makefile enchant.pc -enchant.spec lib/Makefile src/libenchant.rc src/Makefile @@ -556,11 +549,6 @@ AC_OUTPUT dnl =========================================================================================== -relocatable_library="no" -if test "x$native_win32" = "xyes"; then - relocatable_library="yes" -fi - echo " $PACKAGE-$VERSION @@ -574,8 +562,7 @@ $PACKAGE-$VERSION Build Myspell/Hunspell backend: ${build_myspell} Build Voikko backend (Linux only): ${build_voikko} Build Zemberek backend: ${build_zemberek} - Build Apple Spell backend (OS X only): ${build_applespell} - Build a relocatable library: ${relocatable_library}" + Build Apple Spell backend (OS X only): ${build_applespell}" if test "x$build_zemberek" = "xyes"; then echo " diff --git a/enchant.spec.in b/enchant.spec.in deleted file mode 100644 index 1b25cc0..0000000 --- a/enchant.spec.in +++ /dev/null @@ -1,96 +0,0 @@ -%define name enchant -%define version @VERSION@ -%define release 1 - -Summary: An Enchanting Spell Checking Library - -Name: %{name} -Version: %{version} -Release: %{release} -Group: System Environment/Libraries -License: LGPL - -Source: ftp://ftp.gnome.org/pub/GNOME/unstable/sources/libenchant/%{name}-%{version}.tar.gz -Buildroot: /var/tmp/%{name}-%{version}-%{release}-root -URL: http://www.abisource.com/ - -Requires: glib2 >= 2.0.0 -BuildRequires: glib2-devel >= 2.0.0 - -%description -A library that wraps other spell checking backends. - -%package devel -Summary: Support files necessary to compile applications with libenchant. -Group: Development/Libraries -Requires: enchant - -%description devel -Libraries, headers, and support files necessary to compile applications using libenchant. - -%prep - -%setup - -%build -%ifarch alpha - MYARCH_FLAGS="--host=alpha-redhat-linux" -%endif - -if [ ! -f configure ]; then -CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%{_prefix} -fi -CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \ -%{?_without_ispell:--disable-ispell} \ -%{?_without_myspell:--disable-myspell} \ -%{?_without_aspell:--disable-aspell} \ -%{?_with_uspell:--enable-uspell} - - -if [ "$SMP" != "" ]; then - (%__make "MAKE=%__make -k -j $SMP"; exit 0) - %__make -else -%__make -fi - -%install -if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi -%__make DESTDIR=$RPM_BUILD_ROOT install -find $RPM_BUILD_ROOT/%{_libdir} -name \*.la -exec rm -f \{\} \; - -%files -%defattr(644,root,root,755) -%doc AUTHORS COPYING.LIB README -%attr(755,root,root)%{_bindir}/* -%{_libdir}/lib*.so* -%{_prefix}/man/man1/enchant.1.gz -%{!?_without_ispell:%{_libdir}/enchant/*ispell.so*} -%{!?_without_myspell:%{_libdir}/enchant/*myspell.so*} -%{!?_without_aspell:%{_libdir}/enchant/*aspell.so*} -%{?_with_uspell:%{_libdir}/enchant/*uspell.so*} - -%files devel -%defattr(644,root,root,755) -%{_libdir}/*.a -%{!?_without_ispell:%{_libdir}/enchant/*ispell.a} -%{!?_without_myspell:%{_libdir}/enchant/*myspell.a} -%{!?_without_aspell:%{_libdir}/enchant/*aspell.a} -%{?_with_uspell:%{_libdir}/enchant/*uspell.a} -%{_libdir}/pkgconfig/enchant.pc -%{_includedir}/enchant/* - -%clean -%__rm -r $RPM_BUILD_ROOT - -%changelog -* Sun Aug 24 2003 Rui Miguel Seabra <rms@1407.org> -- update spec to current stat of affairs -- building from source rpm is now aware of --with and --without flags: -- --without aspell --without ispell --without myspell --with uspell - -* Wed Jul 16 2003 Rui Miguel Seabra <rms@1407.org> -- take advantage of environment rpm macros - -* Sun Jul 13 2003 Dom Lachowicz <cinamod@hotmail.com> -- Initial version diff --git a/src/voikko/Makefile.am b/src/voikko/Makefile.am index 3cda61a..739c36a 100644 --- a/src/voikko/Makefile.am +++ b/src/voikko/Makefile.am @@ -4,7 +4,7 @@ else target_lib = endif -AM_CPPFLAGS=-I$(top_srcdir)/src $(ENCHANT_CFLAGS) $(CC_WARN_CFLAGS) @VOIKKO_INC@ -D_ENCHANT_BUILD=1 +AM_CPPFLAGS=-I$(top_srcdir)/src $(ENCHANT_CFLAGS) $(CC_WARN_CFLAGS) $(VOIKKO_CFLAGS) -D_ENCHANT_BUILD=1 voikko_LTLIBRARIES = $(target_lib) voikkodir= $(libdir)/enchant |