vapier      14/10/19 08:20:55

  Modified:             .cvsignore .gitignore Makefile porting.h
  Added:                Makefile.am autogen.sh configure.ac
  Log:
  add autotools support
  
  URL: https://bugs.gentoo.org/413967

Revision  Changes    Path
1.8                  pax-utils/.cvsignore

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/.cvsignore?rev=1.8&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/.cvsignore?rev=1.8&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/.cvsignore?r1=1.7&r2=1.8

Index: .cvsignore
===================================================================
RCS file: /var/cvsroot/gentoo-projects/pax-utils/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- .cvsignore  12 Nov 2012 21:57:23 -0000      1.7
+++ .cvsignore  19 Oct 2014 08:20:55 -0000      1.8
@@ -1,14 +1,43 @@
-.cvsignore
+*bz2
+*~
+*.[adio]
+*.l[ao]
+*.gdb
+*.pyc
+*.deps
+*.libs
+
+*.patch
+*.orig
+*.rej
+*.diff
+pax-utils-*
+contrib
+
+a.out*
+lib*.so*
+core
+.gdb_history
+.gdbinit
+
+aclocal.m4
+autom4te.cache
+build
+config.cache
+config.h
+config.h.in
+config.log
+config.status
+configure
+autotools
+libtool
+Makefile.in
+stamp-h1
+
 dumpelf
 pspax
 scanelf
 scanmacho
-*.x
-pax-utils-*.tar.*
-.gdb_history
-.gdbinit
+
 .git
-.gitignore
-a.out
-*.gdb
-*.pyc
+*.x



1.3                  pax-utils/.gitignore

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/.gitignore?rev=1.3&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/.gitignore?rev=1.3&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/.gitignore?r1=1.2&r2=1.3

Index: .gitignore
===================================================================
RCS file: /var/cvsroot/gentoo-projects/pax-utils/.gitignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .gitignore  12 Nov 2012 21:57:23 -0000      1.2
+++ .gitignore  19 Oct 2014 08:20:55 -0000      1.3
@@ -1,24 +1,44 @@
-*.o
+*bz2
+*~
+*.[adio]
+*.l[ao]
 *.gdb
 *.pyc
+*.deps
+*.libs
 
-a.out
-core
-
-*.diff
 *.patch
 *.orig
 *.rej
+*.diff
+/pax-utils-*
+contrib
+
+a.out*
+lib*.so*
+core
+.gdb_history
+.gdbinit
+
+aclocal.m4
+autom4te.cache
+build
+config.cache
+config.h
+config.h.in
+config.log
+config.status
+configure
+autotools
+libtool
+Makefile.in
+stamp-h1
 
 /dumpelf
 /pspax
 /scanelf
 /scanmacho
-/pax-utils-*.tar.*
 
 /man/*.1
 
-.gdb_history
-.gdbinit
-
 CVS



1.85                 pax-utils/Makefile

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/Makefile?rev=1.85&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/Makefile?rev=1.85&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/Makefile?r1=1.84&r2=1.85

Index: Makefile
===================================================================
RCS file: /var/cvsroot/gentoo-projects/pax-utils/Makefile,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- Makefile    1 Aug 2014 01:39:20 -0000       1.84
+++ Makefile    19 Oct 2014 08:20:55 -0000      1.85
@@ -1,6 +1,6 @@
 # Copyright 2003-2006 Ned Ludd <so...@linbsd.net>
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-projects/pax-utils/Makefile,v 1.84 2014/08/01 
01:39:20 vapier Exp $
+# $Header: /var/cvsroot/gentoo-projects/pax-utils/Makefile,v 1.85 2014/10/19 
08:20:55 vapier Exp $
 ####################################################################
 
 check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 
2>&1; \
@@ -131,11 +131,19 @@
        cd $(P) && cvs up
        echo "<releaseinfo>$(PV)</releaseinfo>" > $(P)/man/fragment/version
        $(MAKE) -C $(P)/man
+       sed -i '/AC_INIT/s:git:$(PV):' $(P)/configure.ac
+       $(MAKE) -C $(P) autotools
        tar cf - $(P) --exclude=CVS --exclude=.cvsignore | xz > $(P).tar.xz
        @printf "\n ..... Making sure clean cvs build works ..... \n\n"
+       set -e; \
        unset CFLAGS; \
-       for t in all check clean debug check ; do \
-               $(MAKE) -C $(P) $$t || exit $$? ; \
+       for t in all check clean debug check clean; do \
+               $(MAKE) -C $(P) $$t; \
+       done; \
+       cd $(P); \
+       ./configure -C; \
+       for t in all check; do \
+               $(MAKE) $$t; \
        done
        rm -rf $(P)
        du -b $(P).tar.xz
@@ -146,3 +154,28 @@
        $(MAKE) -C tests
 
 .PHONY: all check clean dist install test
+
+#
+# All logic related to autotools is below here
+#
+GEN_MARK_START = \# @@@ GEN START @@@ \#
+GEN_MARK_END   = \# @@@ GEN START @@@ \#
+EXTRA_DIST = \
+       $(shell find '(' -name CVS -prune ')' -o '(' -type f -print ')')
+MAKE_MULTI_LINES = $(patsubst %,\\\\\n\t%,$(sort $(1)))
+# 2nd level of indirection here is so the $(find) doesn't pick up
+# files in EXTRA_DIST that get cleaned up ...
+autotools-update: clean
+       $(MAKE) _autotools-update
+_autotools-update:
+       sed -i '/^$(GEN_MARK_START)$$/,/^$(GEN_MARK_END)$$/d' Makefile.am
+       printf '%s\ndist_man_MANS += %b\nEXTRA_DIST += %b\n%s\n' \
+               "$(GEN_MARK_START)" \
+               "$(call MAKE_MULTI_LINES,$(wildcard man/*.1))" \
+               "$(call MAKE_MULTI_LINES,$(EXTRA_DIST))" \
+               "$(GEN_MARK_END)" \
+               >> Makefile.am
+autotools: autotools-update
+       ./autogen.sh --from=make
+
+.PHONY: autotools autotools-update _autotools-update



1.46                 pax-utils/porting.h

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/porting.h?rev=1.46&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/porting.h?rev=1.46&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/porting.h?r1=1.45&r2=1.46

Index: porting.h
===================================================================
RCS file: /var/cvsroot/gentoo-projects/pax-utils/porting.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- porting.h   11 Jan 2014 00:29:11 -0000      1.45
+++ porting.h   19 Oct 2014 08:20:55 -0000      1.46
@@ -1,7 +1,7 @@
 /*
  * Copyright 2005-2012 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/porting.h,v 1.45 2014/01/11 
00:29:11 vapier Exp $
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/porting.h,v 1.46 2014/10/19 
08:20:55 vapier Exp $
  *
  * Copyright 2005-2012 Ned Ludd        - <so...@gentoo.org>
  * Copyright 2005-2012 Mike Frysinger  - <vap...@gentoo.org>
@@ -12,6 +12,10 @@
 #ifndef _PORTING_H
 #define _PORTING_H
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*arr))
 #undef __PAX_UTILS_CLEANUP
 



1.1                  pax-utils/Makefile.am

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/Makefile.am?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/Makefile.am?rev=1.1&content-type=text/plain

Index: Makefile.am
===================================================================
ACLOCAL_AMFLAGS = -I autotools/m4

SUBDIRS = autotools/gnulib

AM_CPPFLAGS = \
        -I$(top_builddir)/autotools/gnulib \
        -I$(top_srcdir)/autotools/gnulib

noinst_LTLIBRARIES = libpaxutils.la
libpaxutils_la_LDFLAGS = -no-undefined
libpaxutils_la_SOURCES = \
        paxelf.c \
        paxinc.c \
        paxmacho.c \
        xfuncs.c
LDADD = libpaxutils.la

bin_PROGRAMS = scanelf dumpelf pspax scanmacho

install-exec-hook:
        cd $(DESTDIR)$(bindir); \
        for applet in $(APPLETS) ; do \
                [ ! -e "$$applet" ] && ln -s q $${applet} ; \
        done

TMAKE = \
        $(MAKE) -C $(abs_top_srcdir)/tests \
                AUTOTOOLS=true \
                abs_top_builddir="$(abs_top_builddir)" \
                abs_top_srcdir="$(abs_top_srcdir)"
check-hook:
        $(TMAKE) check
clean-local:
        $(TMAKE) clean
        -rmdir tests/*/ tests/
        rm -f $(APPLETS)
check: check-hook

# Start off with base values which we append below
dist_man_MANS =
APPLETS =
EXTRA_DIST = autotools/m4/gnulib-cache.m4

# @@@ GEN START @@@ #
dist_man_MANS += 
EXTRA_DIST += \
        tests/CVS/Entries \
        tests/CVS/Repository \
        tests/CVS/Root \
        tests/Makefile \
        tests/lddtree/CVS/Entries \
        tests/lddtree/CVS/Repository \
        tests/lddtree/CVS/Root \
        tests/lddtree/Makefile \
        tests/lddtree/dotest.cmp \
        tests/lddtree/dotest.py \
        tests/lddtree/dotest.sfx \
        tests/lddtree/dotest.sh \
        tests/lib.sh \
        tests/scanelf/CVS/Entries \
        tests/scanelf/CVS/Repository \
        tests/scanelf/CVS/Root \
        tests/scanelf/Makefile \
        tests/scanelf/dotest \
        tests/scanelf/scanelf.simple.good \
        tests/source/CVS/Entries \
        tests/source/CVS/Repository \
        tests/source/CVS/Root \
        tests/source/Makefile \
        tests/source/dotest \
        tests/source/space
# @@@ GEN START @@@ #



1.1                  pax-utils/autogen.sh

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/autogen.sh?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/autogen.sh?rev=1.1&content-type=text/plain

Index: autogen.sh
===================================================================
#!/bin/bash -e

v() { echo "$@"; "$@"; }

m4dir="autotools/m4"

v rm -rf autotools
if [[ $1 != "--from=make" ]] ; then
        v ${MAKE:-make} autotools-update
fi

# reload the gnulib code if possible
PATH=/usr/local/src/gnu/gnulib:${PATH}
mods="
        alloca
        faccessat
        fdopendir
        fstatat
        futimens
        getline
        getopt-posix
        mkdirat
        openat
        progname
        readlinkat
        renameat
        stat-time
        strcasestr-simple
        strncat
        symlinkat
        sys_stat
        unlinkat
        utimensat
        vasprintf-posix
"
v gnulib-tool \
        --source-base=autotools/gnulib --m4-base=autotools/m4 \
        --import \
        ${mods}

# not everyone has sys-devel/autoconf-archive installed
for macro in $(grep -o '\<AX[A-Z_]*\>' configure.ac | sort -u) ; do
        if m4=$(grep -rl "\[${macro}\]" /usr/share/aclocal/) ; then
                v cp $m4 ${m4dir}/
        fi
done

export AUTOMAKE="automake --foreign"
v autoreconf -i -f

if [[ -x ./test.sh ]] ; then
        exec ./test.sh "$@"
fi



1.1                  pax-utils/configure.ac

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/configure.ac?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/configure.ac?rev=1.1&content-type=text/plain

Index: configure.ac
===================================================================
AC_PREREQ([2.65])
AC_INIT([pax-utils], [git])
AC_CONFIG_AUX_DIR([autotools])
AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip silent-rules -Wall])
AM_SILENT_RULES([yes]) # AM_INIT_AUTOMAKE([silent-rules]) is broken atm
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([autotools/m4])

AC_PROG_CC_C99
AM_PROG_CC_C_O
AM_PROG_AR
AC_USE_SYSTEM_EXTENSIONS
LT_INIT

gl_EARLY
gl_INIT

AX_CFLAGS_WARN_ALL
AC_DEFUN([PT_CHECK_CFLAG],[AX_CHECK_COMPILER_FLAGS([$1],[CFLAGS="$CFLAGS $1"])])
m4_foreach_w([flag], [
        -Wunused
        -Wimplicit
        -Wshadow
        -Wformat=2
        -Wmissing-declarations
        -Wno-missing-prototypes
        -Wwrite-strings
        -Wbad-function-cast
        -Wnested-externs
        -Wcomment
        -Winline
        -Wchar-subscripts
        -Wcast-align
        -Wno-format-nonliteral
        -Wsequence-point
        -Wold-style-definition
        -Wextra
], [
        AX_CHECK_COMPILE_FLAG(flag, AS_VAR_APPEND([CFLAGS], " flag"))
])

AC_CONFIG_FILES([
        Makefile
        autotools/gnulib/Makefile
])
AC_OUTPUT




Reply via email to