Question: sloccount port

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Question: sloccount port

Dan-Simon Myrland-2
Hi, I'm interested in porting sloccount (https://dwheeler.com/sloccount/)to
OpenBSD, but I have a few questions:

The developer says he is using GPLv2+, but this license is not
included in the source, so I assume that these PERMIT lines are
accurate:

PERMIT_PACKAGE_CDROM = claims GPLv2+, but no copyright notice in
source files

PERMIT_PACKAGE_FTP = claims GPLv2+, but no copyright notice in
source files

PERMIT_DISTFILES_FTP = claims GPLv2+, but no copyright notice in
source files

The source files are a bit cluttered, there are a few redundant
*.orig files, and the Makefile is called "makefile". What is the
best way to remove and rename source files in ports?

Reply | Threaded
Open this post in threaded view
|

Re: Question: sloccount port

Stuart Henderson
On 2019/09/27 17:14, Dan-Simon Myrland wrote:

> Hi, I'm interested in porting sloccount (https://dwheeler.com/sloccount/)to
> OpenBSD, but I have a few questions:
>
> The developer says he is using GPLv2+, but this license is not
> included in the source, so I assume that these PERMIT lines are
> accurate:
>
> PERMIT_PACKAGE_CDROM = claims GPLv2+, but no copyright notice in
> source files
>
> PERMIT_PACKAGE_FTP = claims GPLv2+, but no copyright notice in
> source files
>
> PERMIT_DISTFILES_FTP = claims GPLv2+, but no copyright notice in
> source files
>
> The source files are a bit cluttered, there are a few redundant
> *.orig files, and the Makefile is called "makefile". What is the
> best way to remove and rename source files in ports?
>

There is a copyright notice in the main script:

# This is part of SLOCCount, a toolsuite that counts
# source lines of code (SLOC).
# Copyright (C) 2001-2004 David A. Wheeler.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

- this is fine for PERMIT_PACKAGE=Yes with a GPLv2+ license marker comment.

(PERMIT_PACKAGE_CDROM/PERMIT_PACKAGE_FTP/PERMIT_DISTFILES_FTP are no longer
used in -current, it is now just PERMIT_PACKAGE and optionally PERMIT_DISTFILES).

You can use a different suffix for any ports-related patches, then the .orig
files will just be ignored. e.g. set PATCHORIG=.orig.port

We already have cloc in ports; is this better in some way? cloc seems a lot
more actively maintained upstream.

Reply | Threaded
Open this post in threaded view
|

Re: Question: sloccount port

Klemens Nanni-2
On Fri, Sep 27, 2019 at 04:27:15PM +0100, Stuart Henderson wrote:
> We already have cloc in ports; is this better in some way? cloc seems a lot
> more actively maintained upstream.
And there is

Information for inst:loccount-2.8

Comment:
count lines of codes in many languages

Description:
loccount counts physical source lines of code.

Identifying over 60 languages by file extension and filename pattern, it can
also emit results as self-describing JSON and perform cost estimation using the
COCOMO I model.

loccount is a re-implementation of David A. Wheeler's sloccount tool in Go. Bugs
excepted, the largely unchanged algorithms can be expected to produce identical
output while supporting more languages.

Maintainer: Klemens Nanni <[hidden email]>

WWW: https://gitlab.com/esr/loccount