Hi,

Markus Uhlin <markus.uh...@bredband.net> writes:

> Second attempt.

It seems that your second mail ships the same tarball as the previous
one.  If the intent was only to re-send your initial submission, please
be more patient.  An interval of one week is appropriate.

> -------- Forwarded Message --------
> Subject:      Swirc IRC client
> Date:         Sat, 27 Aug 2016 23:07:39 +0200
> From:         Markus Uhlin <markus.uh...@bredband.net>
> To:   ports@openbsd.org
>
>
>
> Hi BSD folks,
>
> Lately I've been working hard on Swirc (IRC client written with the
> Ncurses UI framework). Today I released v1.1 with many improvements. I
> want to try to get it shipped with OpenBSD so I created a port for it.
>
> As more people that run the same code, the bigger are the chances to
> detect bugs and fix them. I would love to have comments.
>
> It uses pledge() if available.
>
> I attach a copy of the port I created. Feel free to modify it. I think
> this is a step to let more people to know that this software exist.

Your submission is a good start but needs more work.  I have started
tweaking it.

Please find an updated tarball attached and see the 4 points below.

1. Here is a diff between your tarball and the updated tarball

> diff -pruN swirc.orig/Makefile swirc/Makefile
> --- swirc.orig/Makefile       Sat Aug 27 22:14:09 2016
> +++ swirc/Makefile    Mon Aug 29 20:26:25 2016
> @@ -18,13 +18,16 @@ HOMEPAGE =        https://dataswamp.org/~markus/swirc/
>  # BSD 3 clause, ISC
>  PERMIT_PACKAGE_CDROM =       Yes
>  
> -#WANTLIB =           c crypto ncursesw pthread ssl

Shouldn't be commented.

> +# uses pledge()

"Standard" marker used for ports that use pledge().

> +WANTLIB += c crypto ncursesw panelw pthread ssl
>  
>  MASTER_SITES =               https://dataswamp.org/~markus/swirc/releases/
> -
>  EXTRACT_SUFX =               .tgz
>  
> -#MAKE_FLAGS =                E=@\# Q= CC="${CC}" CFLAGS="${CFLAGS}"

This could be a way to use MAKE_FLAGS:

> +MAKE_FLAGS =         E=@\# Q= \
> +                     CC="${CC}" \
> +                     extra_flags="${CFLAGS}" \

Here we can't really use CFLAGS directly without replicating the content
set by your configure script.

> +                     LDFLAGS="${LDFLAGS}"

Here we can use LDFLAGS (empty by default).

>  
>  NO_TEST =            Yes
>  
> @@ -32,10 +35,12 @@ MAKE_FILE =               unix.mk
>  WRKSRC =             ${WRKDIST}/src
>  
>  ALL_TARGET =         swirc

You could provide a standard default (as in, first) target.  Something
like:

  all: $(OUT)

> -INSTALL_TARGET =     install
> -#TEST_TARGET =               test

No tests, no need for TEST_TARGET.

>  pre-configure:
>       cd ${WRKDIST} && ./configure
> +
> +do-install:
> +     ${INSTALL_MAN} ${WRKSRC}/swirc.1 ${PREFIX}/man/man1
> +     ${INSTALL_PROGRAM} ${WRKSRC}/swirc ${PREFIX}/bin

Here instead of trying to tweak unix.mk so that it respects ports
conventions like DEBUG=-g (mk.conf(5)), I decided to just replicate
your install step.

>  .include <bsd.port.mk>


2. Here's the updated port Makefile, with comments inline

> # $OpenBSD$
> 
> COMMENT =     irc client written with the ncurses ui framework

I'd suggest "curses irc client".  You could add short but important
details here ("secure", "better", etc).

> 
> DISTNAME =    swirc-1.1
> 
> #GH_ACCOUNT = uhlin
> #GH_PROJECT = swirc
> #GH_TAGNAME = v1.1
> 
> CATEGORIES =  net
> 
> #HOMEPAGE =   https://github.com/uhlin/swirc
> HOMEPAGE =    https://dataswamp.org/~markus/swirc/

Choose between this HOMEPAGE and github & GH_* variables, no need to
leave stuff commented.

> #MAINTAINER =         Markus Uhlin <markus.uh...@bredband.net>

Same thing, don't leave this commented out, either uncomment or zap it.

> # BSD 3 clause, ISC
> PERMIT_PACKAGE_CDROM =        Yes
> 
> # uses pledge()
> WANTLIB += c crypto ncursesw panelw pthread ssl
> 
> MASTER_SITES =                https://dataswamp.org/~markus/swirc/releases/
> EXTRACT_SUFX =                .tgz
> 
> MAKE_FLAGS =          E=@\# Q= \
>                       CC="${CC}" \
>                       extra_flags="${CFLAGS}" \
>                       LDFLAGS="${LDFLAGS}"
> 
> NO_TEST =             Yes
> 
> MAKE_FILE =           unix.mk
> WRKSRC =              ${WRKDIST}/src
> 
> ALL_TARGET =          swirc
> 
> pre-configure:
>       cd ${WRKDIST} && ./configure

That's one way to handle it (using CONFIGURE_STYLE=simple would be the
canonical way, but it would need more work).

Do you really need to put the source code & the configure script and its
generated files in a different directory?  A flat tarball wouldn't make
things less readable IMHO.  Anyway, your call.

> do-install:
>       ${INSTALL_MAN} ${WRKSRC}/swirc.1 ${PREFIX}/man/man1

mandoc complains (not a critical concern I'd say):

$ mandoc -Tlint swirc.1
mandoc: swirc.1:87:2: WARNING: AUTHORS section without An macro

>       ${INSTALL_PROGRAM} ${WRKSRC}/swirc ${PREFIX}/bin
> 
> .include <bsd.port.mk>


3. pkg/DESCR:

> Swirc is a BSD licensed IRC client written in C with the Ncurses UI
> framework. IRC stands for Internet Relay Chat, and is a protocol for text
> communication in real time over the Internet.

I don't think you need to describe what IRC is here.

> Goals are to be portable, and to provide a secure & user-friendly experience 
> to
> its users. One significant difference is, for example, that it runs on Windows
> without Cygwin.

No need to talk about Windows support here, IMHO.


4. I haven't looked at the code in detail yet, but there are warnings:

cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c io-loop.c
io-loop.c: In function 'swirc_greeting':
io-loop.c:139: warning: zero-length printf format string
io-loop.c:148: warning: zero-length printf format string
io-loop.c:152: warning: zero-length printf format string
cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c irc.c
cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c libUtils.c
cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c main.c
cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c nestHome.c
cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c net-unix.c
cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c network.c
cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c options.c
cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c printtext.c
cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c pthrMutex.c
cc -Iinclude -DBSD=1 -DUNIX=1 -D_XOPEN_SOURCE_EXTENDED=1 -Wall -std=c99 -O2 
-pipe -g  -c readline.c
readline.c: In function 'session_destroy':
readline.c:276: warning: passing argument 1 of 'free_not_null' discards 
qualifiers from pointer target type


Attachment: swirc.tgz
Description: Binary data

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to