Commit cd7ead0f authored by amdmi3's avatar amdmi3
Browse files

Standalone Nomos license scanner from fossology project

WWW: https://www.fossology.org/
parent 218cbbf4
......@@ -576,6 +576,7 @@
SUBDIR += fortran-utils
SUBDIR += fortytwo-encore
SUBDIR += fossil
SUBDIR += fossology-nomos-standalone
SUBDIR += fpc-bfd
SUBDIR += fpc-dbus
SUBDIR += fpc-fcl-async
......@@ -1274,8 +1275,8 @@
SUBDIR += libestr
SUBDIR += libev
SUBDIR += libevdev
SUBDIR += libevent-hiphop
SUBDIR += libevent
SUBDIR += libevent-hiphop
SUBDIR += libevt
SUBDIR += libevtx
SUBDIR += libewf
......
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
# $FreeBSD$
PORTNAME= fossology
PORTVERSION= 3.1.0rc2
CATEGORIES= devel
PKGNAMESUFFIX= -nomos-standalone
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Standalone Nomos license scanner from fossology project
LICENSE= GPLv2 LGPL21
LICENSE_COMB= multi
LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING
LICENSE_FILE_LGPL21= ${WRKSRC}/COPYING.LGPL
BUILD_DEPENDS= gawk:lang/gawk
USE_GITHUB= yes
USES= gmake gettext pkgconfig
USE_GNOME= glib20
BUILD_WRKSRC= ${WRKSRC}/src/nomos/agent
MAKEFILE= Makefile.sa
MAKE_JOBS_UNSAFE= yes
PLIST_FILES= bin/nomossa
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/nomos/agent/nomossa ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>
TIMESTAMP = 1488270305
SHA256 (fossology-fossology-3.1.0rc2_GH0.tar.gz) = d1876170b290a43a44199fedd71ae27438f81a20905af28c1307613e84a37af4
SIZE (fossology-fossology-3.1.0rc2_GH0.tar.gz) = 11949927
--- src/nomos/agent/GENSEARCHDATA.orig 2017-02-28 09:04:41 UTC
+++ src/nomos/agent/GENSEARCHDATA
@@ -84,7 +84,7 @@ sed -e 's/ =FEW= /.{0,30}/g' -e 's/ =SOM
@EOF@
chmod 755 _STRFILTER
## awk --lint '
-awk -v SRC=$NEW_C -v HDR=$NEW_H '
+gawk -v SRC=$NEW_C -v HDR=$NEW_H '
#####
# All strings to be encoded MUST be include double-quotes; this way,
# we can check for syntax-errors and bail out when an error is found.
--- src/nomos/agent/Makefile.sa.orig 2016-05-05 13:46:14 UTC
+++ src/nomos/agent/Makefile.sa
@@ -2,10 +2,6 @@
# This is to make a version of nomos that does not require any of the fossology build dependencies.
# Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
-TOP = ../../..
-VARS = $(TOP)/Makefile.conf
-include $(VARS)
-
EXE = nomossa
SPEC = STRINGS.in
@@ -19,33 +15,34 @@ GENOBJS = _precheck.o _autodata.o
HDRS = nomos.h $(OBJS:.o=.h) _autodefs.h
#CFLAGS_LOCAL = -DSTANDALONE -g -O2 -Wall -D_FILE_OFFSET_BITS=64
-CFLAGS_LOCAL = -DSTANDALONE -Wall -D_FILE_OFFSET_BITS=64 `pkg-config glib-2.0 --cflags --libs`
+CFLAGS_LOCAL = -DSTANDALONE -Wall -D_FILE_OFFSET_BITS=64 `pkg-config glib-2.0 --cflags`
+LDFLAGS_LOCAL = `pkg-config glib-2.0 --libs`
-all: encode nomos
+all: $(EXE)
debug: nomos-gl
-nomos: nomos.o $(OBJS) $(GENOBJS)
- $(CC) nomos.o $(OBJS) $(GENOBJS) $(CFLAGS_LOCAL) -o $(EXE)
+$(EXE): nomos.o $(OBJS) $(GENOBJS)
+ $(CC) nomos.o $(OBJS) $(GENOBJS) $(LDFLAGS) $(LDFLAGS_LOCAL) -o $(EXE)
-nomos.o: nomos.c $(HDRS) $(DB) $(REPO) $(AGENTLIB) $(VARS)
- $(CC) -c $< $(CFLAGS_LOCAL) $(DEFS)
+nomos.o: nomos.c $(HDRS) $(REPO) $(AGENTLIB) $(VARS)
+ $(CC) -c $< $(CFLAGS) $(CFLAGS_LOCAL)
nomos-gl: nomos-g.o $(OBJS) $(GENOBJS)
- $(CC) nomos.o $(OBJS) $(GENOBJS) $(CFLAGS_LOCAL) -o $@
+ $(CC) nomos.o $(OBJS) $(GENOBJS) $(CFLAGS) $(CFLAGS_LOCAL) -o $@
-nomos-g.o: nomos.c $(HDRS) $(DB) $(REPO) $(AGENTLIB) $(VARS)
- $(CC) -c -l /usr/lib/libefence.a $< $(CFLAGS_LOCAL)
+nomos-g.o: nomos.c $(HDRS) $(REPO) $(AGENTLIB) $(VARS)
+ $(CC) -c -l /usr/lib/libefence.a $< $(CFLAGS) $(CFLAGS_LOCAL)
-$(OBJS) $(GENOBJS): %.o: %.c $(HDRS) $(DB) $(VARS)
- $(CC) -c $< $(CFLAGS_LOCAL)
+$(OBJS) $(GENOBJS): %.o: %.c $(HDRS)
+ $(CC) -c $< $(CFLAGS) $(CFLAGS_LOCAL)
#
# Non "standard" preprocessing stuff starts here...
#
encode: encode.o
- $(CC) $(CFLAGS) -o $@ $@.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.c
_precheck.c: _autodata.c $(PRE) $(CHECK)
# @echo "NOTE: _autodata.c has changed --> regenerate _precheck.c"
@@ -53,7 +50,7 @@ _precheck.c: _autodata.c $(PRE) $(CHECK)
./$(CHECK)
# @$(MAKE) $(STRINGS) $(KEYS)
-_autodefs.h _autodata.c: $(SPEC) $(LICFIX)
+_autodefs.h _autodata.c: $(SPEC) $(LICFIX) encode
@echo "NOTE: GENSEARCHDATA takes 1-2 minutes to run"
./$(LICFIX)
@@ -82,5 +79,3 @@ clean:
split.OTHER checkstr.OK
.PHONY: all install uninstall clean test
-
-include $(DEPS)
Standalone Nomos license scanner from fossology project
WWW: https://www.fossology.org/
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