Import cvs-fast-export-1.29 as wip/cvs-fast-export.

Does not compile on NetBSD-7.99.4/amd64 due to:
revcvs.c:80:43: error: 'PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared here (not in a function)
 static pthread_mutex_t dir_bucket_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
                                           ^

Perhaps someone has an idea.

This program analyzes a collection of RCS files in a CVS
repository (or outside of one) and, when possible, emits an
equivalent history in the form of a fast-import stream. Not all
possible histories can be rendered this way; the program tries to
emit useful warnings when it can't. The program can also produce
a visualization of the resulting commit DAG in the DOT format
handled by the graphviz suite.
This commit is contained in:
Thomas Klausner 2015-01-14 17:37:03 +00:00
parent 514ceb53ff
commit e873403925
6 changed files with 94 additions and 0 deletions

7
cvs-fast-export/DESCR Normal file
View file

@ -0,0 +1,7 @@
This program analyzes a collection of RCS files in a CVS
repository (or outside of one) and, when possible, emits an
equivalent history in the form of a fast-import stream. Not all
possible histories can be rendered this way; the program tries to
emit useful warnings when it can't. The program can also produce
a visualization of the resulting commit DAG in the DOT format
handled by the graphviz suite.

21
cvs-fast-export/Makefile Normal file
View file

@ -0,0 +1,21 @@
# $NetBSD: Makefile,v 1.1 2015/01/14 17:37:03 thomasklausner Exp $
DISTNAME= cvs-fast-export-1.29
CATEGORIES= devel
MASTER_SITES= http://www.catb.org/~esr/cvs-fast-export/
MAINTAINER= apb@NetBSD.org
HOMEPAGE= http://www.catb.org/~esr/cvs-fast-export/
COMMENT= Export an RCS or CVS history as a fast-import stream
LICENSE= gnu-gpl-v2
USE_TOOLS+= flex yacc
BUILD_DEPENDS+= asciidoc-[0-9]*:../../textproc/asciidoc
REPLACE_PYTHON+= cvssync
USE_TOOLS+= gmake # for srcdir
MAKE_FLAGS+= prefix=${PREFIX}
MAKE_FLAGS+= mandir=${PKGMANDIR}
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"

5
cvs-fast-export/PLIST Normal file
View file

@ -0,0 +1,5 @@
@comment $NetBSD: PLIST,v 1.1 2015/01/14 17:37:03 thomasklausner Exp $
bin/cvs-fast-export
bin/cvssync
man/man1/cvs-fast-export.1
man/man1/cvssync.1

6
cvs-fast-export/TODO Normal file
View file

@ -0,0 +1,6 @@
Does not compile on NetBSD-7.99.4/amd64 due to:
revcvs.c:80:43: error: 'PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared here (not in a function)
static pthread_mutex_t dir_bucket_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
^
-- wiz 20150114

6
cvs-fast-export/distinfo Normal file
View file

@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.1 2015/01/14 17:37:03 thomasklausner Exp $
SHA1 (cvs-fast-export-1.29.tar.gz) = 07f953b86ff6a85dc3a4250d5fe27f988cdaa0d1
RMD160 (cvs-fast-export-1.29.tar.gz) = 4eccc4a25bc1ec6aaa1002dbb2b4861ce360d4a1
Size (cvs-fast-export-1.29.tar.gz) = 331467 bytes
SHA1 (patch-Makefile) = 15212b9e846cecbc34748a160e1da2e8d4440976

View file

@ -0,0 +1,49 @@
$NetBSD: patch-Makefile,v 1.1 2015/01/14 17:37:03 thomasklausner Exp $
* Add "all" target.
* Use ${PREFIX} variable.
* Install man pages in ${PREFIX}/${PKGMANDIR}, not ${PREFIX}/share/man.
--- Makefile.orig 2014-12-17 15:04:54.000000000 +0000
+++ Makefile
@@ -9,6 +9,7 @@
VERSION=1.29
prefix?=/usr/local
+mandir?=share/man
target=$(DESTDIR)$(prefix)
srcdir=$(dir $(abspath $(firstword $(MAKEFILE_LIST))))
VPATH=$(srcdir)
@@ -29,7 +30,7 @@ CFLAGS += -pthread
CPPFLAGS += -DTHREADS
# Optimizing for speed. Comment this out for distribution builds
-CFLAGS += -march=native
+#CFLAGS += -march=native
# To enable debugging of the Yacc grammar, uncomment the following line
#CPPFLAGS += -DYYDEBUG=1
@@ -77,6 +78,8 @@ OBJS=gram.o lex.o rbtree.o main.o import
cvsutil.o revdir.o revlist.o atom.o revcvs.o generate.o export.o \
nodehash.o tags.o authormap.o graph.o utils.o merge.o hash.o
+all: cvs-fast-export cvs-fast-export.1
+
cvs-fast-export: $(OBJS)
$(CC) $(CFLAGS) $(TARGET_ARCH) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
@@ -128,10 +131,10 @@ install-bin: cvs-fast-export cvssync cvs
$(INSTALL) -d "$(target)/bin"
$(INSTALL) $^ "$(target)/bin"
install-man: man
- $(INSTALL) -d "$(target)/share/man/man1"
- $(INSTALL) -m 644 cvs-fast-export.1 "$(target)/share/man/man1"
- $(INSTALL) -m 644 cvssync.1 "$(target)/share/man/man1"
- $(INSTALL) -m 644 cvsconvert.1 "$(target)/share/man/man1"
+ $(INSTALL) -d "$(target)/$(mandir)/man1"
+ $(INSTALL) -m 644 cvs-fast-export.1 "$(target)/$(mandir)/man1"
+ $(INSTALL) -m 644 cvssync.1 "$(target)/$(mandir)/man1"
+ $(INSTALL) -m 644 cvsconvert.1 "$(target)/$(mandir)/man1"
PROFILE_REPO = ~/software/groff-conversion/groff-mirror/groff
gmon.out: cvs-fast-export