Commit 4837b361 authored by Rene Ladan's avatar Rene Ladan
Browse files

MFH: r536408

devel/cscout: unexpire and update to 3.01

- Leave out the DOCS option for now because the required conversion
  of XML to HTML has not been figured out yet.
- No more dependency on compat6x
- Fetch sources from GitHub
- update license to GPLv3

PR:		242402
Submitted by:	Joachim Werner
Approved by:	maintainer (dds@)

Approved by:	ports-secteam (joneum)
parent 77507f82
......@@ -2,55 +2,43 @@
# $FreeBSD$
PORTNAME= cscout
PORTVERSION= 2.7
PORTREVISION= 2
PORTVERSION= 3.01
CATEGORIES= devel
MASTER_SITES= http://www.spinellis.gr/cscout/ \
http://www.dmst.aueb.gr/dds/cscout/
DISTFILES= ${DISTNAME}-neutral${EXTRACT_SUFX} \
${DISTNAME}-fbsd-${ARCH}${EXTRACT_SUFX}
MAINTAINER= dds@FreeBSD.org
COMMENT= Source code analyzer and refactoring browser for C program collections
BROKEN= unfetchable
LICENSE= GPLv3
LIB_DEPENDS+= libc.so.6:misc/compat6x
BUILD_DEPENDS= unzip:archivers/unzip
RUN_DEPENDS= dot:graphics/graphviz
NO_BUILD= yes
ONLY_FOR_ARCHS= i386 amd64 sparc64
ONLY_FOR_ARCHS_REASON= The port fetches and installs precompiled binaries
USES= perl5 shebangfix
USE_PERL5= run
SHEBANG_FILES= bin/csmake bin/cswc
USES= gmake perl5 shebangfix
USE_GITHUB= yes
GH_ACCOUNT= dspinellis dspinellis:swill,btyacc
GH_PROJECT= cscout swill:swill btyacc:btyacc
GH_TAGNAME= bd7dfac fafde76:swill 4d0be15:btyacc
GH_SUBDIR= swill:swill btyacc:btyacc
USE_PERL5= run build
SHEBANG_FILES= src/csmake.pl src/cswc.pl
OPTIONS_DEFINE= DOCS EXAMPLES
# DOCS temporary disabled, need XML -> HTML conversion
OPTIONS_DEFINE= EXAMPLES #DOCS
SUB_FILES= pkg-message
post-patch:
.if exists(/usr/include/g++/)
${REINPLACE_CMD} -i "" -e 's:g++-3:g++:g' \
${WRKSRC}/etc/cscout_incs.FBSD_GCC
.endif
(${SED} -n '1,/Platform defines begin/p' \
${WRKSRC}/etc/cscout_defs.FBSD_GCC && \
${CPP} -O -dM /dev/null | ${SORT} && \
${SED} -n '/Platform defines end/,$$p' \
${WRKSRC}/etc/cscout_defs.FBSD_GCC ) \
> ${WRKDIR}/cscout_defs.h
${CP} ${WRKDIR}/cscout_defs.h ${WRKSRC}/etc/cscout_defs.FBSD_GCC
${REINPLACE_CMD} -e 's|install -d \"|install -d \"${STAGEDIR}/|g' ${WRKSRC}/src/Makefile
${REINPLACE_CMD} -e 's|install -Ds $$< \"|install -s $$< \"${STAGEDIR}/|g' ${WRKSRC}/src/Makefile
${REINPLACE_CMD} -e 's|./dest-install.sh \"|./dest-install.sh \"${STAGEDIR}/|g' ${WRKSRC}/src/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bin/cscout ${STAGEDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/bin/cswc ${STAGEDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/bin/csmake ${STAGEDIR}${PREFIX}/bin
cd ${WRKSRC}/etc && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/etc/cscout_incs.FBSD_GCC ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/
${INSTALL_DATA} ${WRKSRC}/etc/cscout_defs.FBSD_GCC ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/
${INSTALL_MAN} ${WRKSRC}/man/cscout.1 ${STAGEDIR}${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/man/cswc.1 ${STAGEDIR}${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/man/cscc.1 ${STAGEDIR}${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/man/csmake.1 ${STAGEDIR}${PREFIX}/man/man1
do-install-DOCS-on:
cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
#do-install-DOCS-on:
# cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
do-install-EXAMPLES-on:
cd ${WRKSRC}/example && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
......
SHA256 (cscout-2.7-fbsd-i386.tar.gz) = e6cc7d5f0bc5dd7b787865ece4a9b2d1672617b2ab8cc66ef481c4b1e2a6426c
SIZE (cscout-2.7-fbsd-i386.tar.gz) = 652845
SHA256 (cscout-2.7-fbsd-amd64.tar.gz) = 2197bee348e0dd163cdc233dc0ae283acf9e09e237699b55857a23fded08bf6f
SIZE (cscout-2.7-fbsd-amd64.tar.gz) = 680558
SHA256 (cscout-2.7-fbsd-sparc64.tar.gz) = ed18ee49cd533151075adbe62ec37c96539fdc5ceea649634254b5ca9461cad7
SIZE (cscout-2.7-fbsd-sparc64.tar.gz) = 692352
SHA256 (cscout-2.7-neutral.tar.gz) = ef0d3442756077f0623be3e5f9592d78bcd702c215a6766d1c6fc3b39b753cf2
SIZE (cscout-2.7-neutral.tar.gz) = 730328
TIMESTAMP = 1575242282
SHA256 (dspinellis-cscout-3.01-bd7dfac_GH0.tar.gz) = d2e0af80a0e581e36020c319931cac67337b5c6d6d33b73d2d1cd4c7edef116d
SIZE (dspinellis-cscout-3.01-bd7dfac_GH0.tar.gz) = 1165610
SHA256 (dspinellis-swill-fafde76_GH0.tar.gz) = 52303d4e83f170f1c454314471b5d4c76cfbb3e41828272416d6370e8bac4052
SIZE (dspinellis-swill-fafde76_GH0.tar.gz) = 119107
SHA256 (dspinellis-btyacc-4d0be15_GH0.tar.gz) = 18d71bcfff135167f7a3997bdf36796ed0a53f3a82b97aa6c06cf378599b78b2
SIZE (dspinellis-btyacc-4d0be15_GH0.tar.gz) = 87570
--- Makefile.orig 2019-11-04 16:42:35 UTC
+++ Makefile
@@ -25,6 +25,8 @@ HSQLDB_URL=http://downloads.sourceforge.net/project/hs
DEFAULT_HSQLDB_DIR=$(CSCOUT_DIR)/hsqldb-$(HSQLDB_VERSION)/hsqldb
export HSQLDB_DIR?=$(DEFAULT_HSQLDB_DIR)
+all: .PHONY install
+
.PHONY: src/build/cscout swill/libswill.a btyacc/btyacc
src/build/cscout: swill/libswill.a btyacc/btyacc
@@ -33,15 +35,16 @@ src/build/cscout: swill/libswill.a btyacc/btyacc
swill/libswill.a: swill
cd swill && $(MAKE)
-swill:
- git clone https://github.com/dspinellis/swill.git
+swill: swillconfig
+
+swillconfig:
cd swill && ./configure
btyacc/btyacc: btyacc
cd btyacc && $(MAKE)
btyacc:
- git clone https://github.com/dspinellis/btyacc
+ #git clone https://github.com/dspinellis/btyacc
# Default installation of HSQLDB
$(DEFAULT_HSQLDB_DIR): hsqldb-$(HSQLDB_VERSION).zip
--- example/.cscout/host-incs.h.orig 2019-12-02 21:11:13 UTC
+++ example/.cscout/host-incs.h
@@ -8,6 +8,6 @@
*/
-#pragma includepath "../../include/stdc"
+#pragma includepath "/usr/local/include/cscout/stdc"
/* To avoid unused include file warnings */
static void _cscout_dummy2(void) { _cscout_dummy2(); }
--- src/Makefile.orig 2019-11-04 16:42:35 UTC
+++ src/Makefile
@@ -207,12 +207,13 @@ mkerr:
# This ensures that the version.cpp is regenerated iff its SHA doesn't
# match the current one.
-ifneq ($(shell sed -n '/Version::revision/s/.* = "\(.*\)";/\1/p' version.cpp), $(shell git log -n 1 --format='%H' || sed -n '/Version::revision/s/.* = "\(.*\)";/\1/p' version.cpp))
+# Without git available, we will just generate a semi-static version.cpp
+#ifneq ($(shell sed -n '/Version::revision/s/.* = "\(.*\)";/\1/p' version.cpp), $(shell git log -n 1 --format='%H' || sed -n '/Version::revision/s/.* = "\(.*\)";/\1/p' version.cpp))
version.cpp:
sh make-version.sh >$@
-.PHONY: version.cpp
-endif
+#.PHONY: version.cpp
+#endif
test:
@@ -264,6 +265,7 @@ obfuscation:
)
install: build/cscout
+ install -d "${INSTALL_PREFIX}/bin"
install -Ds $< "$(INSTALL_PREFIX)/bin/cscout"
./dest-install.sh "$(INSTALL_PREFIX)"
--- src/dest-install.sh.orig 2019-12-02 12:30:03 UTC
+++ src/dest-install.sh
@@ -35,6 +35,7 @@ INSTALL_PREFIX="${1-/usr/local}"
TMPFILE="/tmp/$0-$$"
INC=../include
INCLUDE_DIR="$INSTALL_PREFIX/include/cscout"
+FINAL_INCLUDE_DIR="/usr/local/include/cscout"
# Permissions for header files
HMODE=644
@@ -52,7 +53,7 @@ install -m $HMODE $TMPFILE "$INCLUDE_DIR/stdc-defs.h"
# Generic C include path specification
cat <<EOF >$TMPFILE
-#pragma includepath "$INCLUDE_DIR/stdc"
+#pragma includepath "$LATER_INCLUDE_DIR/stdc"
/* Avoid unused include file warnings */
static void _cscout_dummy2(void) { _cscout_dummy2(); }
@@ -93,7 +94,7 @@ install -m $HMODE $TMPFILE "$INCLUDE_DIR/host-incs.h"
# Perl scripts (keep csmake.pl in the end)
for f in cswc.pl csmake.pl ; do
- sed "s|INSTALL_INCLUDE|$INCLUDE_DIR|g" $f >$TMPFILE
+ sed "s|INSTALL_INCLUDE|$LATER_INCLUDE_DIR|g" $f >$TMPFILE
install $TMPFILE "$INSTALL_PREFIX/bin/$(basename $f .pl)"
done
# Install as cscc
--- src/make-version.sh.orig 2019-12-01 11:12:07 UTC
+++ src/make-version.sh
@@ -11,7 +11,7 @@ using namespace std;
#include "version.h"
-char Version::revision[] = "$(git log -n 1 --format='%H' || echo UNKNOWN)";
-char Version::date[] = "$(git log -n 1 --format='%ci' || echo UNKNOWN)";
+char Version::revision[] = "bd7dfac09b760b87b86158e903459a765b0acf43";
+char Version::date[] = "2019-11-04 18:42:35 +0200";
char Version::compiled[] = "$(date +'%F %T')";
EOF
The include files cscout needs in its installation directory (e.g. ~/.cscout/)
can be found in %%PREFIX%%/include/cscout/.
For an example, go to %%EXAMPLESDIR%% and try "cscout awk.cs".
......@@ -12,8 +12,5 @@ scopes and namespaces. CScout has already been applied on projects
ranging from tens of thousands of lines, like the FreeBSD and
Linux kernels, and the Apache web server.
This free unsupported version of CScout is distributed under the terms
of the CScout Public License, which is available in the accompanying
documentation.
WWW: https://www.spinellis.gr/cscout/
WWW: https://github.com/dspinellis/cscout
bin/cscc
bin/cscout
bin/csmake
bin/cswc
etc/cscout/SWILL-License
etc/cscout/acl
etc/cscout/cscout_defs.BORLAND
@sample etc/cscout/cscout_defs.FBSD_GCC etc/cscout/cscout_defs.h
etc/cscout/cscout_defs.GENERIC
etc/cscout/cscout_defs.GENERIC_GCC
etc/cscout/cscout_defs.LINUX_GCC
etc/cscout/cscout_defs.WIN32_MINGW
etc/cscout/cscout_defs.WIN32_MSC
@sample etc/cscout/cscout_incs.FBSD_GCC etc/cscout/cscout_incs.h
etc/cscout/cscout_incs.GENERIC
etc/cscout/cscout_incs.LINUX_GCC
etc/cscout/cscout_incs.WIN32_MINGW
etc/cscout/cscout_incs.WIN32_MSC
include/cscout/csmake-post-defs.h
include/cscout/csmake-pre-defs.h
include/cscout/host-defs.h
include/cscout/host-incs.h
include/cscout/stdc-defs.h
include/cscout/stdc-incs.h
include/cscout/stdc/_ansi.h
include/cscout/stdc/assert.h
include/cscout/stdc/complex.h
include/cscout/stdc/ctype.h
include/cscout/stdc/errno.h
include/cscout/stdc/float.h
include/cscout/stdc/limits.h
include/cscout/stdc/locale.h
include/cscout/stdc/math.h
include/cscout/stdc/setjmp.h
include/cscout/stdc/signal.h
include/cscout/stdc/stdarg.h
include/cscout/stdc/stddef.h
include/cscout/stdc/stdio.h
include/cscout/stdc/stdlib.h
include/cscout/stdc/string.h
include/cscout/stdc/time.h
man/man1/cscc.1.gz
man/man1/cscout.1.gz
man/man1/csmake.1.gz
man/man1/cswc.1.gz
%%PORTDOCS%%%%DOCSDIR%%/access.html
%%PORTDOCS%%%%DOCSDIR%%/awkinc.gif
%%PORTDOCS%%%%DOCSDIR%%/bib.html
%%PORTDOCS%%%%DOCSDIR%%/cg.html
%%PORTDOCS%%%%DOCSDIR%%/change.html
%%PORTDOCS%%%%DOCSDIR%%/concept.html
%%PORTDOCS%%%%DOCSDIR%%/contents.html
%%PORTDOCS%%%%DOCSDIR%%/context.png
%%PORTDOCS%%%%DOCSDIR%%/copy_file.gif
%%PORTDOCS%%%%DOCSDIR%%/csmake.html
%%PORTDOCS%%%%DOCSDIR%%/cvs.html
%%PORTDOCS%%%%DOCSDIR%%/dbschema.html
%%PORTDOCS%%%%DOCSDIR%%/egglos.html
%%PORTDOCS%%%%DOCSDIR%%/error.html
%%PORTDOCS%%%%DOCSDIR%%/ext.html
%%PORTDOCS%%%%DOCSDIR%%/faq.html
%%PORTDOCS%%%%DOCSDIR%%/fgraph-opt.png
%%PORTDOCS%%%%DOCSDIR%%/file.html
%%PORTDOCS%%%%DOCSDIR%%/filefuncall.gif
%%PORTDOCS%%%%DOCSDIR%%/fileq.html
%%PORTDOCS%%%%DOCSDIR%%/flow.gif
%%PORTDOCS%%%%DOCSDIR%%/flow.html
%%PORTDOCS%%%%DOCSDIR%%/fun.html
%%PORTDOCS%%%%DOCSDIR%%/funarg.html
%%PORTDOCS%%%%DOCSDIR%%/funq.html
%%PORTDOCS%%%%DOCSDIR%%/geglos.html
%%PORTDOCS%%%%DOCSDIR%%/hedit.html
%%PORTDOCS%%%%DOCSDIR%%/id.html
%%PORTDOCS%%%%DOCSDIR%%/idq.html
%%PORTDOCS%%%%DOCSDIR%%/idxprint.html
%%PORTDOCS%%%%DOCSDIR%%/ig.html
%%PORTDOCS%%%%DOCSDIR%%/index.html
%%PORTDOCS%%%%DOCSDIR%%/indexw.html
%%PORTDOCS%%%%DOCSDIR%%/intro.html
%%PORTDOCS%%%%DOCSDIR%%/license.html
%%PORTDOCS%%%%DOCSDIR%%/main-inc.gif
%%PORTDOCS%%%%DOCSDIR%%/maincall.gif
%%PORTDOCS%%%%DOCSDIR%%/mainpage.png
%%PORTDOCS%%%%DOCSDIR%%/mancscout.html
%%PORTDOCS%%%%DOCSDIR%%/mancswc.html
%%PORTDOCS%%%%DOCSDIR%%/metrics.html
%%PORTDOCS%%%%DOCSDIR%%/mismash.gif
%%PORTDOCS%%%%DOCSDIR%%/name.html
%%PORTDOCS%%%%DOCSDIR%%/obf.html
%%PORTDOCS%%%%DOCSDIR%%/op.html
%%PORTDOCS%%%%DOCSDIR%%/opt.html
%%PORTDOCS%%%%DOCSDIR%%/optf.html
%%PORTDOCS%%%%DOCSDIR%%/pragma.html
%%PORTDOCS%%%%DOCSDIR%%/proto-inc.gif
%%PORTDOCS%%%%DOCSDIR%%/qeg.html
%%PORTDOCS%%%%DOCSDIR%%/re.html
%%PORTDOCS%%%%DOCSDIR%%/run.html
%%PORTDOCS%%%%DOCSDIR%%/setfile.gif
%%PORTDOCS%%%%DOCSDIR%%/setup.html
%%PORTDOCS%%%%DOCSDIR%%/short.html
%%PORTDOCS%%%%DOCSDIR%%/simul.html
%%PORTDOCS%%%%DOCSDIR%%/smlogo.png
%%PORTDOCS%%%%DOCSDIR%%/sql.html
%%PORTDOCS%%%%DOCSDIR%%/style.css
%%PORTDOCS%%%%DOCSDIR%%/tree.png
%%PORTDOCS%%%%DOCSDIR%%/walk.html
%%PORTDOCS%%%%DOCSDIR%%/web.html
%%PORTDOCS%%%%DOCSDIR%%/wrk-inc.gif
%%PORTDOCS%%%%DOCSDIR%%/wsp.html
%%PORTDOCS%%%%DOCSDIR%%/wspd.html
%%PORTDOCS%%%%DOCSDIR%%/yacc.html
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/cscout_defs.h
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/cscout_incs.h
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/host-defs.h
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/host-incs.h
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/options
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/.cscout/style.css
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README.md
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/awk.cs
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/awk.prj
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/awk/FIXES
......@@ -115,5 +60,4 @@ man/man1/cswc.1.gz
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/awk/ytabc.bak
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/awk/ytabh.bak
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bin.prj
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mkproj
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sh.prj
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment