Import libtar-1.2.11

libtar is a library for manipulating tar files from within C programs.
Here are some of its features:

  * Handles both POSIX tar file format and the GNU extensions.
  * API provides functions for easy use, such as tar_extract_all().
  * Also provides functions for more granular use, such as 
    tar_append_regfile().

Patches from pkgsrc.

requested by xsa@
WANTLIB and SHARED_LIB military look from kili@
ok kili@
This commit is contained in:
ajacoutot 2010-04-16 13:10:47 +00:00
parent d63253be4c
commit a33e6c9c96
7 changed files with 196 additions and 0 deletions

28
archivers/libtar/Makefile Executable file
View File

@ -0,0 +1,28 @@
# $OpenBSD: Makefile,v 1.1.1.1 2010/04/16 13:10:47 ajacoutot Exp $
COMMENT= C library for manipulating tar files
DISTNAME= libtar-1.2.11
SHARED_LIBS= tar 0.0 # .1.2
CATEGORIES= archivers devel
HOMEPAGE= http://www.feep.net/libtar/
# BSD-like
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c z
MASTER_SITES= ftp://ftp.feep.net/pub/software/libtar/
USE_LIBTOOL= Yes
NO_REGRESS= Yes
CONFIGURE_STYLE=gnu
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (libtar-1.2.11.tar.gz) = YEI46HNM5uJTR6WMTxodfg==
RMD160 (libtar-1.2.11.tar.gz) = IF0SE+0y+XCPshNQEK/dnhhMQw4=
SHA1 (libtar-1.2.11.tar.gz) = lhHyMCSw6JqtHP6jARIhhrPBYPg=
SHA256 (libtar-1.2.11.tar.gz) = Si7vtrcIj0HeVzVuUFnL8fkXUJtKgQ98YUYlo3joe7g=
SIZE (libtar-1.2.11.tar.gz) = 145354

View File

@ -0,0 +1,35 @@
$OpenBSD: patch-lib_Makefile_in,v 1.1.1.1 2010/04/16 13:10:47 ajacoutot Exp $
Enable shared library, from pkgsrc.
--- lib/Makefile.in.orig Sun Dec 15 19:02:30 2002
+++ lib/Makefile.in Thu Apr 15 17:58:07 2010
@@ -69,13 +69,15 @@ all: ${ALL}
.PHONY: clean distclean install
libtar.a: ${LIBTAR_OBJS} ${LIBOBJS}
- ${AR} rc libtar.a ${LIBTAR_OBJS} ${LIBOBJS}
- ${RANLIB} libtar.a
+ ${LIBTOOL} --mode=link --tag=CC \
+ ${CC} -o libtar.la ${LIBTAR_OBJS:.o=.lo} ${LIBOBJS:.o=.lo} \
+ ${LDFLAGS} -rpath ${PREFIX}/lib -version-info 1:2
${LIBTAR_OBJS}: ${LIBTAR_HDRS}
.c.o:
- ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
+ ${LIBTOOL} --mode=compile --tag=CC \
+ ${CC} ${CFLAGS} ${CPPFLAGS} -c -o ${@:.o=.lo} $< -prefer-pic
clean:
rm -f *~ *.o ${ALL} core
@@ -85,7 +87,8 @@ distclean: clean
install: ${ALL}
${MKDIR} ${DESTDIR}${libdir}
- ${INSTALL_DATA} libtar.a ${DESTDIR}${libdir}
+ ${LIBTOOL} --mode=install \
+ ${INSTALL_DATA} libtar.la ${DESTDIR}${libdir}
${MKDIR} ${DESTDIR}${includedir}
${BSD_INSTALL_DATA} ${srcdir}/libtar.h ${DESTDIR}${includedir}
${BSD_INSTALL_DATA} ../listhash/libtar_listhash.h ${DESTDIR}${includedir}

View File

@ -0,0 +1,40 @@
$OpenBSD: patch-libtar_Makefile_in,v 1.1.1.1 2010/04/16 13:10:47 ajacoutot Exp $
Enable shared library, from pkgsrc.
--- libtar/Makefile.in.orig Sun Dec 15 19:02:30 2002
+++ libtar/Makefile.in Thu Apr 15 17:58:09 2010
@@ -45,7 +45,7 @@ LIBTAR_HDRS = ../config.h \
${top_srcdir}/compat/compat.h \
${top_srcdir}/lib/libtar.h \
../listhash/libtar_listhash.h
-LIBTAR_LIBS = ../lib/libtar.a
+LIBTAR_LIBS = ../lib/libtar.la
ALL = libtar
@@ -54,12 +54,15 @@ all: ${ALL}
.PHONY: clean distclean install
libtar: ${LIBTAR_OBJS} ${LIBTAR_LIBS} ${LIBTAR_HDRS}
- ${CC} ${CFLAGS} ${LDFLAGS} -o libtar libtar.o ${LIBTAR_LIBS} ${LIBS}
+ ${LIBTOOL} --mode=link --tag=CC \
+ ${CC} ${CFLAGS} ${LDFLAGS} -o libtar libtar.lo \
+ ${LIBTAR_LIBS} ${LIBS}
${LIBTAR_OBJS}: ${LIBTAR_HDRS}
.c.o:
- ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
+ ${LIBTOOL} --mode=compile \
+ ${CC} ${CFLAGS} ${CPPFLAGS} -c -o ${@:.o=.lo} $< -prefer-pic
clean:
rm -f *~ *.o ${ALL} core
@@ -69,5 +72,5 @@ distclean: clean
install: ${ALL}
${MKDIR} ${DESTDIR}${bindir}
- ${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir}
+ ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir}

7
archivers/libtar/pkg/DESCR Executable file
View File

@ -0,0 +1,7 @@
libtar is a library for manipulating tar files from within C programs.
Here are some of its features:
* Handles both POSIX tar file format and the GNU extensions.
* API provides functions for easy use, such as tar_extract_all().
* Also provides functions for more granular use, such as
tar_append_regfile().

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2010/04/16 13:10:47 ajacoutot Exp $
@lib lib/libtar.so.${LIBtar_VERSION}

View File

@ -0,0 +1,79 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/04/16 13:10:47 ajacoutot Exp $
%%SHARED%%
@bin bin/libtar
include/libtar.h
include/libtar_listhash.h
lib/libtar.a
lib/libtar.la
@man man/man3/TH_ISBLK.3
@man man/man3/TH_ISCHR.3
@man man/man3/TH_ISDIR.3
@man man/man3/TH_ISFIFO.3
@man man/man3/TH_ISLNK.3
@man man/man3/TH_ISLONGLINK.3
@man man/man3/TH_ISLONGNAME.3
@man man/man3/TH_ISREG.3
@man man/man3/TH_ISSYM.3
@man man/man3/libtar_hash_add.3
@man man/man3/libtar_hash_del.3
@man man/man3/libtar_hash_free.3
@man man/man3/libtar_hash_getkey.3
@man man/man3/libtar_hash_new.3
@man man/man3/libtar_hash_next.3
@man man/man3/libtar_hash_prev.3
@man man/man3/libtar_hash_search.3
@man man/man3/libtar_list_add.3
@man man/man3/libtar_list_add_str.3
@man man/man3/libtar_list_del.3
@man man/man3/libtar_list_dup.3
@man man/man3/libtar_list_free.3
@man man/man3/libtar_list_merge.3
@man man/man3/libtar_list_new.3
@man man/man3/libtar_list_next.3
@man man/man3/libtar_list_prev.3
@man man/man3/libtar_list_search.3
@man man/man3/tar_append_eof.3
@man man/man3/tar_append_file.3
@man man/man3/tar_append_regfile.3
@man man/man3/tar_append_tree.3
@man man/man3/tar_block_read.3
@man man/man3/tar_block_write.3
@man man/man3/tar_close.3
@man man/man3/tar_extract_all.3
@man man/man3/tar_extract_blockdev.3
@man man/man3/tar_extract_chardev.3
@man man/man3/tar_extract_dir.3
@man man/man3/tar_extract_fifo.3
@man man/man3/tar_extract_file.3
@man man/man3/tar_extract_glob.3
@man man/man3/tar_extract_hardlink.3
@man man/man3/tar_extract_regfile.3
@man man/man3/tar_extract_symlink.3
@man man/man3/tar_fd.3
@man man/man3/tar_fdopen.3
@man man/man3/tar_open.3
@man man/man3/tar_set_file_perms.3
@man man/man3/tar_skip_regfile.3
@man man/man3/th_finish.3
@man man/man3/th_get_crc.3
@man man/man3/th_get_devmajor.3
@man man/man3/th_get_devminor.3
@man man/man3/th_get_gid.3
@man man/man3/th_get_linkname.3
@man man/man3/th_get_mode.3
@man man/man3/th_get_mtime.3
@man man/man3/th_get_pathname.3
@man man/man3/th_get_size.3
@man man/man3/th_get_uid.3
@man man/man3/th_print.3
@man man/man3/th_print_long_ls.3
@man man/man3/th_read.3
@man man/man3/th_set_device.3
@man man/man3/th_set_from_stat.3
@man man/man3/th_set_group.3
@man man/man3/th_set_link.3
@man man/man3/th_set_mode.3
@man man/man3/th_set_path.3
@man man/man3/th_set_type.3
@man man/man3/th_set_user.3
@man man/man3/th_write.3