diff options
author | kientzle <kientzle@FreeBSD.org> | 2006-03-08 01:56:06 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2006-03-08 01:56:06 +0000 |
commit | 101c7b294b2df1618ed60b110ea7e87e673daa00 (patch) | |
tree | 5a5f87eda55df5c7cd88b37896d26d228a3c8ee3 | |
parent | 85c8b06cbe7efe55ca9d6a18d623fa181f29b4b3 (diff) | |
download | FreeBSD-src-101c7b294b2df1618ed60b110ea7e87e673daa00.zip FreeBSD-src-101c7b294b2df1618ed60b110ea7e87e673daa00.tar.gz |
Remove configure.ac.in and reorganize a few other things. This is
part of a program to remove the non-FreeBSD autoconf/automake build
system for libarchive from the FreeBSD source tree.
-rw-r--r-- | lib/libarchive/INSTALL | 39 | ||||
-rw-r--r-- | lib/libarchive/Makefile | 118 | ||||
-rw-r--r-- | lib/libarchive/Makefile.am | 13 | ||||
-rw-r--r-- | lib/libarchive/archive_platform.h | 2 | ||||
-rw-r--r-- | lib/libarchive/configure.ac.in | 98 |
5 files changed, 38 insertions, 232 deletions
diff --git a/lib/libarchive/INSTALL b/lib/libarchive/INSTALL deleted file mode 100644 index 7da94c1..0000000 --- a/lib/libarchive/INSTALL +++ /dev/null @@ -1,39 +0,0 @@ -How you install this depends on which distribution you -are using and what target you're compiling for: - -FROM A PACKAGED DISTRIBUTION TO ANY SYSTEM - -If you unpacked this from a tar.gz archive and have a "configure" -file, then you should be able to install it using the following common -steps: - ./configure - make - make install - -If you need to customize the target directories, use - ./configure --help -to list the configure options. - -FROM CVS TO FreeBSD - -The source code from the FreeBSD CVS server can be -compiled as-is on any FreeBSD system, just use: - make - make install - -FROM CVS TO A PACKAGED DISTRIBUTION - -The source code from the FreeBSD CVS server can be used -to build a tar.gz archive suitable for later installation on -any system. You'll need the following GNU tools installed: - autoconf (including aclocal and autoheader) - automake - -You should be able to use the following command to build a distribution: - make distfile - -The result will be a file named libarchive-<version>.tar.gz in -the object directory. - -$FreeBSD$ - diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile index a677044..2c4bc2fd 100644 --- a/lib/libarchive/Makefile +++ b/lib/libarchive/Makefile @@ -1,40 +1,24 @@ # $FreeBSD$ -# This Makefile is for use with the FreeBSD buid system. For -# non-FreeBSD systems, you should first "make distfile" on FreeBSD, -# then use the resulting tar.gz archive--which contains a portable -# autoconf/automake-generated build system--on the other system. - LIB= archive DPADD= ${LIBBZ2} ${LIBZ} LDADD= -lbz2 -lz -# Versioning <sigh>. There are three distinct sets of version -# numbers: -# * libarchive version -# * libtool version (for shared libs built using configure script) -# * FreeBSD SHLIB_MAJOR -# The following logic helps ensure that there is some consistency across -# these three: - -# First, the libarchive version is in three parts: -# Bumped ONLY when API/ABI breakage happens (non-backwards-compatible change). -ARCHIVE_API_MAJOR= 1 -# Bumped when significant new features are added. -# Also used to bump SHLIB_MAJOR for reasons other than API/ABI breakage. -# Note: Do NOT reset this to zero after bumping ARCHIVE_API_MAJOR! -ARCHIVE_API_MINOR= 2 -# Bumped often. ;-) -ARCHIVE_API_REVISION= 37 -# Full libarchive version combines the above three numbers. -VERSION= ${ARCHIVE_API_MAJOR}.${ARCHIVE_API_MINOR}.${ARCHIVE_API_REVISION} +# The libarchive version stamp. +# Version is three numbers: +# Major: Bumped ONLY when API/ABI breakage happens. +# Minor: Bumped when significant new features are added (see SHLIB_MAJOR) +# Revision: Bumped on any notable change +VERSION= 1.2.41 +ARCHIVE_API_MAJOR!= echo ${VERSION} | sed -e 's/\..*//' +ARCHIVE_API_MINOR!= echo ${VERSION} | sed -e 's/[0-9]*\.//' | sed -e 's/\..*//' # The FreeBSD SHLIB_MAJOR is computed from the above values. +# To bump SHLIB_MAJOR, increase the MINOR number in "version" file. SHLIB_MAJOR!= echo $$((${ARCHIVE_API_MAJOR} + ${ARCHIVE_API_MINOR})) - -# The SHLIB_MAJOR computation above helps ensure that the libtool -# version (computed in configure.ac.in) provides the same -# shared library number as is used on FreeBSD. +# The SHLIB_MAJOR computation above attempts to match the +# version number generated by libtool. (This may change +# when the FreeBSD port of libtool gets fixed.) CFLAGS+= -DPACKAGE_NAME=\"lib${LIB}\" CFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\" @@ -50,8 +34,21 @@ WARNS?= 6 # Headers to be installed in /usr/include INCS= archive.h archive_entry.h -# C sources to be compiled. This is one part of SRCS below. -BASE_SRCS= archive_check_magic.c \ +# Build archive.h from archive.h.in by substituting version information. +archive.h: archive.h.in Makefile + cat ${.CURDIR}/archive.h.in | \ + sed 's/@VERSION@/${VERSION}/g' | \ + sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' | \ + sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' | \ + sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' | \ + cat > archive.h + +# archive.h needs to be cleaned +CLEANFILES+= archive.h + +# Sources to be compiled. +SRCS= archive.h \ + archive_check_magic.c \ archive_entry.c \ archive_read.c \ archive_read_data_into_buffer.c \ @@ -86,11 +83,6 @@ BASE_SRCS= archive_check_magic.c \ archive_write_set_format_shar.c \ archive_write_set_format_ustar.c -# Note: archive.h does need to be in SRCS, since it is built -# from archive.h.in. But it does not get included in DIST_FILES -# below, so I build up SRCS in two steps. -SRCS= ${BASE_SRCS} archive.h - # Man pages to be installed. MAN= archive_entry.3 \ archive_read.3 \ @@ -203,60 +195,4 @@ MLINKS+= archive_write.3 archive_write_set_format_shar.3 MLINKS+= archive_write.3 archive_write_set_format_ustar.3 MLINKS+= libarchive.3 archive.3 -# Build archive.h from archive.h.in by substituting version information. -archive.h: archive.h.in Makefile - cat ${.CURDIR}/archive.h.in | \ - sed 's/@VERSION@/${VERSION}/g' | \ - sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' | \ - sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' | \ - sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' | \ - sed 's/@ARCHIVE_API_REVISION@/${ARCHIVE_API_REVISION}/g' | \ - cat > archive.h - -# archive.h needs to be cleaned -CLEANFILES+= archive.h - -# -# Voodoo for building a distfile that uses autoconf/automake/etc. -# - -# Files that just get copied to the distfile build directory -DIST_WORK_DIR= ${.OBJDIR}/lib${LIB}-${VERSION} -CLEANDIRS+= ${DIST_WORK_DIR} -DISTFILE= lib${LIB}-${VERSION}.tar.gz -# DIST_FILES is the list of files to include in the distribution. -DIST_FILES= ${BASE_SRCS} -DIST_FILES+= ${MAN} -DIST_FILES+= archive.h.in -DIST_FILES+= archive_entry.h archive_platform.h -DIST_FILES+= archive_private.h archive_string.h -DIST_FILES+= Makefile.am - -distfile: - rm -rf ${DIST_WORK_DIR} - mkdir ${DIST_WORK_DIR} - # Copy the DIST_FILES; ignore errors, don't preserve permissions. - for f in ${DIST_FILES}; do \ - cat ${.CURDIR}/$$f >${DIST_WORK_DIR}/$$f || true; \ - done - # Build configure.ac from configure.ac.in - cat ${.CURDIR}/configure.ac.in | \ - sed 's/@VERSION@/${VERSION}/g' | \ - sed 's/@SHLIB_MAJOR@/${SHLIB_MAJOR}/g' | \ - sed 's/@ARCHIVE_API_MAJOR@/${ARCHIVE_API_MAJOR}/g' | \ - sed 's/@ARCHIVE_API_MINOR@/${ARCHIVE_API_MINOR}/g' | \ - sed 's/@ARCHIVE_API_REVISION@/${ARCHIVE_API_REVISION}/g' | \ - cat > ${DIST_WORK_DIR}/configure.ac - # Prepare some auxiliary files. - (cd ${DIST_WORK_DIR} && libtoolize) - (cd ${DIST_WORK_DIR} && aclocal && autoheader) - # Build the configure script and portable Makefile - (cd ${DIST_WORK_DIR} && autoconf && automake -a --foreign) - # Now, use automake-generated Makefile to build the final dist file. - (cd ${DIST_WORK_DIR} && ./configure && make distcheck && make dist) - mv ${DIST_WORK_DIR}/${DISTFILE} ${.OBJDIR} - @echo ================================================== - @echo Created ${.OBJDIR}/${DISTFILE} - @echo ================================================== - .include <bsd.lib.mk> diff --git a/lib/libarchive/Makefile.am b/lib/libarchive/Makefile.am index b000f29..d70411a 100644 --- a/lib/libarchive/Makefile.am +++ b/lib/libarchive/Makefile.am @@ -28,6 +28,7 @@ libarchive_la_SOURCES= \ archive_read_support_format_cpio.c \ archive_read_support_format_iso9660.c \ archive_read_support_format_tar.c \ + archive_read_support_format_tp.c \ archive_read_support_format_zip.c \ archive_string.c \ archive_string.h \ @@ -47,7 +48,7 @@ libarchive_la_SOURCES= \ archive_write_set_format_ustar.c libarchive_la_LIBADD=-lz -lbz2 -libarchive_la_LDFLAGS= -version-info $(LIBTOOL_VERSION) +libarchive_la_LDFLAGS= -version-info $(ARCHIVE_LIBTOOL_VERSION) dist_man_MANS= archive_entry.3 \ archive_read.3 \ @@ -61,5 +62,11 @@ distclean-local: -rm -rf autom4te.cache/ -rm -f *~ -maintainer-clean-local: - make -f Makefile.freebsd maintainer-clean +# +# Soon... The test framework is just getting started and still +# needs lots of work... +# +EXTRA_DIST= test version +dist-hook: + rm -f $(distdir)/test/*.out + rm -f $(distdir)/test/*~ diff --git a/lib/libarchive/archive_platform.h b/lib/libarchive/archive_platform.h index 7ccb6f1..e49ab5e 100644 --- a/lib/libarchive/archive_platform.h +++ b/lib/libarchive/archive_platform.h @@ -38,7 +38,7 @@ #define ARCHIVE_PLATFORM_H_INCLUDED #if HAVE_CONFIG_H -#include "config.h" +#include "../config.h" #else /* A default configuration for FreeBSD, used if there is no config.h. */ diff --git a/lib/libarchive/configure.ac.in b/lib/libarchive/configure.ac.in deleted file mode 100644 index 5e57a63..0000000 --- a/lib/libarchive/configure.ac.in +++ /dev/null @@ -1,98 +0,0 @@ -# $FreeBSD$ - -#Process this file with autoconf to produce a configure script. -AC_INIT(libarchive, @VERSION@, kientzle@freebsd.org) -AM_INIT_AUTOMAKE(libarchive, @VERSION@) -AC_CONFIG_SRCDIR([archive_write_set_format_ustar.c]) -AM_CONFIG_HEADER([config.h]) - -# Yes, libtool version numbering is somewhat strange. -LIBTOOL_VERSION=@SHLIB_MAJOR@:@ARCHIVE_API_REVISION@:@ARCHIVE_API_MINOR@ -AC_SUBST(LIBTOOL_VERSION) - -# Checks for programs. -AC_PROG_CC -AC_PROG_LIBTOOL -AC_CHECK_TOOL([STRIP],[strip]) - -# Checks for libraries. -# Since libarchive is a library, we don't need this for linkage, -# but we do need it for later ACL function tests. -AC_CHECK_LIB(acl,acl_set_file) - -# Checks for header files. -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([bzlib.h errno.h ext2fs/ext2_fs.h fcntl.h]) -AC_CHECK_HEADERS([inttypes.h limits.h linux/ext2_fs.h]) -AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/acl.h sys/ioctl.h]) -AC_CHECK_HEADERS([sys/time.h unistd.h wchar.h zlib.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_UID_T -AC_TYPE_MODE_T -AC_CHECK_TYPE(off_t, [int64_t]) -AC_TYPE_SIZE_T -AC_CHECK_TYPE(id_t, [unsigned long]) - -# -# If any of the common 64-bit types is defined, set "int64_t" -# -AC_CHECK_TYPE(__int64_t, [long long]) -AC_CHECK_TYPE(_int64_t, [__int64_t]) -AC_CHECK_TYPE(int64_t, [_int64_t]) - -# Likewise, consider defining "intmax_t" in terms of int64_t -AC_CHECK_TYPE(intmax_t, [int64_t]) - -# -# If any of the common 64-bit unsigned types is defined, set "uint64_t" -# -AC_CHECK_TYPE(__uint64_t, [unsigned long long]) -AC_CHECK_TYPE(_uint64_t, [__uint64_t]) -AC_CHECK_TYPE(u_int64_t, [_uint64_t]) -AC_CHECK_TYPE(uint64_t, [u_int64_t]) - -# Likewise, consider defining "uintmax_t" in terms of uint64_t -AC_CHECK_TYPE(uintmax_t, [uint64_t]) - -AC_CHECK_MEMBERS([struct stat.st_rdev, struct stat.st_mtimespec.tv_nsec, struct stat.st_mtim.tv_nsec]) - -AC_CHECK_DECL([EFTYPE], - [AC_DEFINE(HAVE_EFTYPE, 1, [A possible errno value for invalid file format errors])], - [], - [#include <errno.h>]) -AC_CHECK_DECL([EILSEQ], - [AC_DEFINE(HAVE_EILSEQ, 1, [A possible errno value for invalid file format errors])], - [], - [#include <errno.h>]) -AC_HEADER_TIME - -# Checks for library functions. -AC_PROG_GCC_TRADITIONAL -AC_HEADER_MAJOR -AC_FUNC_MEMCMP -AC_FUNC_STAT -AC_FUNC_STRERROR_R -AC_CHECK_FUNCS([acl_create_entry acl_init acl_set_fd acl_set_fd_np acl_set_file]) -AC_CHECK_FUNCS([chflags fchdir fchflags fchmod fchown futimes]) -AC_CHECK_FUNCS([lchflags lchmod lchown lutimes memmove]) -AC_CHECK_FUNCS([memset mkdir mkfifo strchr strdup strerror strrchr timegm]) - -# MacOS has an acl.h that isn't POSIX. It can be detected by -# checking for ACL_USER -AC_CHECK_DECL([ACL_USER], - [AC_DEFINE(HAVE_ACL_USER, 1, [True for systems with POSIX ACL support])], - [], - [#include <sys/acl.h>]) - - -# Additional requirements -AC_SYS_LARGEFILE -AC_SUBST(ARCHIVE_API_MAJOR,[@ARCHIVE_API_MAJOR@]) -AC_SUBST(ARCHIVE_API_MINOR,[@ARCHIVE_API_MINOR@]) - -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([archive.h]) -AC_OUTPUT |