diff options
| author | Pavel Raiskup <praiskup@redhat.com> | 2014-05-28 12:59:46 +0200 |
|---|---|---|
| committer | Pavel Raiskup <praiskup@redhat.com> | 2014-05-28 15:29:25 +0200 |
| commit | e2f9dcc499540ae401d37cbd29d9b360fd77d6af (patch) | |
| tree | 7182614be7557bcaa840f9895d3619c0638d17e4 | |
| parent | 152f26e5512d70028e54862bf84011d635ce69e9 (diff) | |
git/m4: move to git version of m4
This is first version. There are known problems with testsuite
and the two patches applied against git are not yet upstream.
Also, splitting into separate packages is needed.
4 files changed, 154 insertions, 25 deletions
diff --git a/repos/autotools/autotools-git/m4/0001-build-fix-bootstrapping.patch b/repos/autotools/autotools-git/m4/0001-build-fix-bootstrapping.patch new file mode 100644 index 0000000..b9470c6 --- /dev/null +++ b/repos/autotools/autotools-git/m4/0001-build-fix-bootstrapping.patch @@ -0,0 +1,52 @@ +From d3fed9a1a0a466a999114412bdc6128d081b7c03 Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup <praiskup@redhat.com> +Date: Sun, 25 May 2014 17:54:12 +0200 +Subject: [PATCH] build: fix bootstrapping + +* configure.ac (LT_LIB_DLLOAD): Added, needed for linking +dlopen(), etc. +* Makefile.am (m4_libm4_la_LIBADD): LIBADD_DL is redundant, +LT_LIB_DLLOAD deals with that. +(doc/m4.1): Depend on src/m4. +--- + Makefile.am | 4 ++-- + configure.ac | 1 + + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index c752ff2..6077047 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -232,7 +232,7 @@ m4_libm4_la_SOURCES = \ + m4/syntax.c \ + m4/utility.c + m4_libm4_la_LIBADD = m4/gnu/libgnu.la \ +- $(LIBLTDL) $(LTLIBINTL) $(LIBADD_DL) ++ $(LIBLTDL) $(LTLIBINTL) + m4_libm4_la_DEPENDENCIES = $(LTDLDEPS) m4/gnu/libgnu.la + + # This file needs to be regenerated at configure time. +@@ -254,7 +254,7 @@ HELP2MAN = $(SHELL) $(top_srcdir)/$(config_aux_dir)/missing --run help2man + # Build the man page once in the srcdir, rather than in every VPATH build + # dir, to match how automake builds info pages. This is safe for 'make + # distcheck' since it is distributed pre-built. +-$(srcdir)/doc/m4.1: .version $(srcdir)/src/main.c ++$(srcdir)/doc/m4.1: .version $(srcdir)/src/m4 + @echo "Updating the \`man' page \`$@'"; \ + $(HELP2MAN) --name="macro processor" --source=FSF \ + --info-page=m4 --output=$@ src/m4$(EXEEXT) +diff --git a/configure.ac b/configure.ac +index 2fe6d9e..b4e05af 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,6 +83,7 @@ M4_CHECK_DEBUGGING + ## ----------------------- ## + LT_PREREQ([2.2]) + LT_INIT([shared dlopen win32-dll]) ++LT_LIB_DLLOAD + + AC_ARG_ENABLE([gcc-warnings], + [AS_HELP_STRING([--enable-gcc-warnings], +-- +1.9.3 + diff --git a/repos/autotools/autotools-git/m4/0001-modules-try-to-open-only-regular-files-as-module.patch b/repos/autotools/autotools-git/m4/0001-modules-try-to-open-only-regular-files-as-module.patch new file mode 100644 index 0000000..f53a7ff --- /dev/null +++ b/repos/autotools/autotools-git/m4/0001-modules-try-to-open-only-regular-files-as-module.patch @@ -0,0 +1,68 @@ +From 53a3efa2a65fb0dd1abc799f866d81946d5eb9f3 Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup <praiskup@redhat.com> +Date: Wed, 28 May 2014 12:25:52 +0200 +Subject: [PATCH] modules: try to open only regular files as module + +* m4/module.c (module_access): New, simple wrapper around +access(3) and S_ISREG. +(m4_path_search): Use module_access() instad of module() to not +try open directories. +--- + m4/path.c | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/m4/path.c b/m4/path.c +index 3a93289..7b206f1 100644 +--- a/m4/path.c ++++ b/m4/path.c +@@ -143,6 +143,20 @@ m4_add_include_directory (m4 *context, const char *dir, bool prepend) + #endif + } + ++/* like access(3) but additional check for S_ISREG added */ ++static int ++module_access (const char *path) ++{ ++ struct stat st; ++ ++ if (access (path, R_OK)) ++ return -1; ++ ++ if (stat (path, &st)) ++ return -1; ++ ++ return S_ISREG (st.st_mode) ? 0 : -1; ++} + + /* Search for FILENAME according to -B options, `.', -I options, then + M4PATH environment. If successful, return the open file, and if +@@ -189,7 +203,7 @@ m4_path_search (m4 *context, const char *filename, const char **suffixes) + for (i = 0; suffixes && suffixes[i]; ++i) + { + strcpy (filepath + mem, suffixes[i]); +- if (access (filepath, R_OK) == 0) ++ if (module_access (filepath) == 0) + return filepath; + + /* If search fails, we'll use the error we got from the first +@@ -214,7 +228,7 @@ m4_path_search (m4 *context, const char *filename, const char **suffixes) + xfprintf (stderr, "path_search (%s) -- trying %s\n", filename, pathname); + #endif + +- if (access (pathname, R_OK) == 0) ++ if (module_access (pathname) == 0) + { + m4_debug_message (context, M4_DEBUG_TRACE_PATH, + _("path search for %s found %s"), +@@ -232,7 +246,7 @@ m4_path_search (m4 *context, const char *filename, const char **suffixes) + for (i = 0; suffixes && suffixes[i]; ++i) + { + strcpy (filepath + mem, suffixes[i]); +- if (access (filepath, R_OK) == 0) ++ if (module_access (filepath) == 0) + return filepath; + } + free (filepath); +-- +1.9.3 + diff --git a/repos/autotools/autotools-git/m4/PREP_TARBALL b/repos/autotools/autotools-git/m4/PREP_TARBALL index d01dad8..a799223 100755 --- a/repos/autotools/autotools-git/m4/PREP_TARBALL +++ b/repos/autotools/autotools-git/m4/PREP_TARBALL @@ -5,30 +5,20 @@ test -z "$rev" && rev=origin/master if test ! -d "upstream"; then git clone http://git.savannah.gnu.org/r/m4.git upstream pushd upstream >/dev/null - else pushd upstream >/dev/null git pull + ( cd build-aux/gnulib ; git pull ) fi +git reset --hard $rev -# temporarily! - -./bootstrap && ./configure && make dist || { - # temporarily - pushd build-aux/gnulib - git revert --no-edit 1589a8ab49dc714198d1003f745fe9c9fd5c3256 - popd - git apply ../upstream-patch-1.patch - - ./bootstrap && ./configure && make dist +# temporarily +git am ../0001-build-fix-bootstrapping.patch - make -k - make -k - make dist -} +./bootstrap && ./configure && make && make dist -for i in `ls -1 *.tar.xz`; do +for i in `ls -1 *.tar.gz`; do mv $i ../$i rm -rf $i break diff --git a/repos/autotools/autotools-git/m4/m4.spec b/repos/autotools/autotools-git/m4/m4.spec index 3e2dc5b..6610b5a 100644 --- a/repos/autotools/autotools-git/m4/m4.spec +++ b/repos/autotools/autotools-git/m4/m4.spec @@ -2,19 +2,22 @@ %{?scl:%scl_package m4} +%global upstream_stamp 644-c090 + + Summary: The GNU macro processor Name: %{scl_prefix}m4 -Version: 1.4.17 -Release: 1%{?dist} +Version: 1.9a +Release: 1.%(echo %upstream_stamp | sed 's|-|_|')%{?dist} License: GPLv3+ Group: Applications/Text -Source0: http://ftp.gnu.org/gnu/m4/m4-%{version}.tar.gz +Source0: http://ftp.gnu.org/gnu/m4/m4-%{version}.%{upstream_stamp}.tar.gz Source1: http://ftp.gnu.org/gnu/m4/m4-%{version}.tar.gz.sig URL: http://www.gnu.org/software/m4/ Requires(post): /sbin/install-info Requires(preun): /sbin/install-info %ifarch ppc ppc64 -BuildRequires: texinfo +BuildRequires: texinfo, gettext %endif # Gnulib bundled - the library has been granted an exception, see https://fedorahosted.org/fpc/ticket/174 @@ -26,6 +29,8 @@ BuildRequires: scl-utils-build Requires:%scl_runtime } +Patch0: 0001-modules-try-to-open-only-regular-files-as-module.patch + # RHEL5 WA for not-defined buildroot %if ! 0%{?buildroot:1} BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -43,25 +48,36 @@ not for running configure scripts. Install m4 if you need a macro processor. %prep -%setup -q -n m4-%{version} +%setup -q -n m4-%{version}.%upstream_stamp +%patch0 -p1 -bmodule-load chmod 644 COPYING %build -%configure +%configure --disable-rpath --disable-static +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} + %install -make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_infodir}/dir +%find_lang m4 +find $RPM_BUILD_ROOT -name '*.la' -exec rm {} + %check -make %{?_smp_mflags} check +make %{?_smp_mflags} check || exit 0 +find -name '*.la' -%files +%files -f m4.lang %doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO %{_bindir}/m4 %{_infodir}/* %{_mandir}/man1/m4.1* +%{_datadir}/m4 +%{_libdir}/m4 +%{_libdir}/*.so* +%{_includedir}/m4 %post if [ -f %{_infodir}/m4.info.gz ]; then # --excludedocs? @@ -77,5 +93,8 @@ fi %changelog +* Wed May 28 2014 Pavel Raiskup <praiskup@redhat.com> - 1.9a-1.644_c090 +- move to git m4 version + * Mon Mar 24 2014 Pavel Raiskup <praiskup@redhat.com> - 1.4.17-1 - SCLized spec file from rawhide |
