update net/profanity

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

update net/profanity

Lucas-2
Hello ports@,

Here is an update for profanity to release 0.7.0, including OMEMO
support. It builds, passes the tests and runs fine on amd64.

While there:
* Change HOMEPAGE to GitHub's site, as it's updated more frequently (old
  HOMEPAGE still shows 0.6.0 as latest version, despite 0.7.0 being
  released more than a month ago) and the repo description points to it.
* Change the port to GH_*.
* Add a master site, as the release tarball is different from the source
  tarball.
* Enable OMEMO support by default. Thought about making a flavor but OTR
  is already enabled by default, so followed that route.
* Remove the deletion of #include "ui/stub_ui.h" from test files. Tests
  build and run fine with it. That line comes from first import, which
  points to release 0.4.7. Even there, I couldn't find the reasaon
  behind "there is no stub_ui.h", as it was present in the repo. Didn't
  check the release tarball tho.
* Synchronize feature list with the one in the site.
* Tried to remove AUTO{CONF,MAKE}_VERSION but built failed with:

Running autoconf-2.13 in /home/cvs/ports/pobj/profanity-0.7.0/profanity-0.7.0
fgrep: configure.in: No such file or directory
autoconf: configure.in: No such file or directory

  Also tried setting CONFIGURE_STYLE to gnu, which runs configure just
  fine but then fails building:

WARNING: 'aclocal-1.16' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <https://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <https://www.gnu.org/software/autoconf>
         <https://www.gnu.org/software/m4/>
         <https://www.perl.org/>

  Should I just stick with those versions? Is something desirable to
  try to avoid depending much in versions? If not, any advice about
  what to try out to get rid of it?


This is my first time sending a mail to ports@, so any feedback is more
than welcome. :)

Big thanks to Solene, both for documenting and for personally helping
with this before hitting the list.

Cheers,
-Lucas

Index: net/profanity/Makefile
===================================================================
RCS file: /cvs/ports/net/profanity/Makefile,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 Makefile
--- net/profanity/Makefile 12 Jul 2019 20:48:44 -0000 1.10
+++ net/profanity/Makefile 3 Sep 2019 00:55:46 -0000
@@ -1,22 +1,25 @@
 # $OpenBSD: Makefile,v 1.10 2019/07/12 20:48:44 sthen Exp $
 
 COMMENT = console based XMPP client
-DISTNAME = profanity-0.6.0
 CATEGORIES = net
-REVISION = 0
 
-HOMEPAGE = http://www.profanity.im/
+GH_ACCOUNT = profanity-im
+GH_PROJECT = profanity
+GH_TAGNAME = 0.7.0
+
+HOMEPAGE = https://profanity-im.github.io/
 MAINTAINER = Rafael Sadowski <[hidden email]>
 
 # GPLv3+
 PERMIT_PACKAGE = Yes
 
-MASTER_SITES = http://www.profanity.im/
+# Release tarballs are different from source code tarballs.
+MASTER_SITES = https://profanity-im.github.io/
 
 WANTLIB += assuan c crypto curl curses ereadline expat ffi gcrypt
 WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gpg-error
 WANTLIB += gpgme iconv intl m mesode nghttp2 otr pcre pthread
-WANTLIB += ${MODPY_WANTLIB} ssl util z
+WANTLIB += ${MODPY_WANTLIB} signal-protocol-c ssl util z
 
 MODULES += lang/python
 
@@ -29,6 +32,7 @@ LIB_DEPENDS += devel/glib2 \
  devel/readline \
  net/curl \
  net/libmesode \
+ net/libsignal-protocol-c \
  security/gpgme \
  security/libotr
 
@@ -44,6 +48,7 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}
 CONFIGURE_ARGS += --with-xscreensaver=no \
  --enable-icons=no \
  --enable-plugins=yes \
+ --enable-omemo=yes \
  --enable-otr=yes
 
 MAKE_FLAGS = CC="${CC}" \
@@ -54,10 +59,7 @@ AUTOMAKE_VERSION = 1.11
 
 SEPARATE_BUILD = Yes
 
-# there is no stub_ui.h and is not needed
 post-patch:
- find ${WRKSRC} -type f -name "*.c" \
- -exec sed -i '/stub\_ui.h/d' "{}" \;
  sed -i s,${TRUEPREFIX},${LOCALBASE}, ${WRKSRC}/configure.ac
 
 post-install:
Index: net/profanity/distinfo
===================================================================
RCS file: /cvs/ports/net/profanity/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- net/profanity/distinfo 3 Mar 2019 19:40:04 -0000 1.4
+++ net/profanity/distinfo 3 Sep 2019 00:55:46 -0000
@@ -1,2 +1,2 @@
-SHA256 (profanity-0.6.0.tar.gz) = 8bJ3O3nrKUKXaG85E+lInCDv+uXjozXIlW2xj27i9mA=
-SIZE (profanity-0.6.0.tar.gz) = 741812
+SHA256 (profanity-0.7.0.tar.gz) = 8euZvgFoPUG4kbD5l/TIc8m7h7C2uEALf8y45VPVFLs=
+SIZE (profanity-0.7.0.tar.gz) = 789373
Index: net/profanity/pkg/DESCR
===================================================================
RCS file: /cvs/ports/net/profanity/pkg/DESCR,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 DESCR
--- net/profanity/pkg/DESCR 25 Apr 2016 17:46:38 -0000 1.1.1.1
+++ net/profanity/pkg/DESCR 3 Sep 2019 00:55:46 -0000
@@ -3,14 +3,10 @@ libstrophe, inspired by irssi.
 
 Features:
 
-* Supports XMPP chat services.
-* Command driven user interface.
-* Customizable functionality and user interface.
-* OTR (Off The Record) message encryption.
-* Chat room support.
-* Roster management.
-* Flexible resource and priority settings.
-* Desktop notifications.
-* Unicode support.
-* Integrated DuckDuckGo searching.
-* Send tiny URLs.
+* Supports XMPP chat services
+* MUC chat room support
+* OTR, PGP and OMEMO message encryption
+* Roster management
+* Flexible resource and priority settings
+* Desktop notifications
+* Plugins in Python and C

Reply | Threaded
Open this post in threaded view
|

Re: update net/profanity

Stuart Henderson
CC'ing maintainer.

On 2019/09/03 14:01, Lucas wrote:

> Hello ports@,
>
> Here is an update for profanity to release 0.7.0, including OMEMO
> support. It builds, passes the tests and runs fine on amd64.
>
> While there:
> * Change HOMEPAGE to GitHub's site, as it's updated more frequently (old
>   HOMEPAGE still shows 0.6.0 as latest version, despite 0.7.0 being
>   released more than a month ago) and the repo description points to it.
> * Change the port to GH_*.
> * Add a master site, as the release tarball is different from the source
>   tarball.

Please only use GH_* if using github's autogenerated tarball. If you are
setting MASTER_SITES anyway then it's not wanted/needed - for this it should
just have DISTNAME/MASTER_SITES/HOMEPAGE.

> * Tried to remove AUTO{CONF,MAKE}_VERSION but built failed with:
>
> Running autoconf-2.13 in /home/cvs/ports/pobj/profanity-0.7.0/profanity-0.7.0
> fgrep: configure.in: No such file or directory
> autoconf: configure.in: No such file or directory
>
>   Also tried setting CONFIGURE_STYLE to gnu, which runs configure just
>   fine but then fails building:
>
> WARNING: 'aclocal-1.16' is missing on your system.
>          You should only need it if you modified 'acinclude.m4' or
>          'configure.ac' or m4 files included by 'configure.ac'.
>          The 'aclocal' program is part of the GNU Automake package:
>          <https://www.gnu.org/software/automake>
>          It also requires GNU Autoconf, GNU m4 and Perl in order to run:
>          <https://www.gnu.org/software/autoconf>
>          <https://www.gnu.org/software/m4/>
>          <https://www.perl.org/>
>
>   Should I just stick with those versions? Is something desirable to
>   try to avoid depending much in versions? If not, any advice about
>   what to try out to get rid of it?

This is because of the post-patch target using a sed -i on configure.ac,
causing it to have a newer timestamp than the generated files. This
can be fixed by removing that post-patch target (it doesn't make sense
anyway), the AUTO* lines, and change to CONFIGURE_STYLE=gnu.

>  WANTLIB += assuan c crypto curl curses ereadline expat ffi gcrypt
>  WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gpg-error
>  WANTLIB += gpgme iconv intl m mesode nghttp2 otr pcre pthread
> -WANTLIB += ${MODPY_WANTLIB} ssl util z
> +WANTLIB += ${MODPY_WANTLIB} signal-protocol-c ssl util z

"make port-lib-depends-check" says this:

profanity-0.7.0(net/profanity):
Extra:  python3.7m.0 util.13

This isn't new but from what I see it's not building any of the python
parts. rsadowski, any idea what's going on there?

Reply | Threaded
Open this post in threaded view
|

Re: update net/profanity

Lucas-2
Stuart Henderson <[hidden email]> wrote:
> Please only use GH_* if using github's autogenerated tarball. If you are
> setting MASTER_SITES anyway then it's not wanted/needed - for this it should
> just have DISTNAME/MASTER_SITES/HOMEPAGE.

Fixed. There are some other packages that define both GH_* and
MASTER_SITES and could be fixed. If there is interest, I can send a
different email addressing that.

Maybe it should be added to bsd.port.mk(5)?

> This is because of the post-patch target using a sed -i on configure.ac,
> causing it to have a newer timestamp than the generated files. This
> can be fixed by removing that post-patch target (it doesn't make sense
> anyway), the AUTO* lines, and change to CONFIGURE_STYLE=gnu.

Thanks for pointing this. As you said, removing that target and setting
CONFIGURE_STYLE=gnu builds, passes the tests and runs fine. Also we can
drop BUILD_DEPENDS+=${MODGNU_AUTO*} because of it.

That line was changed from /usr/local to ${TRUEPREFIX} in r1.4, and I
think it tries to address a hardcoded /usr/local in the project's
configure.ac, line 190:

      [test "x$PLATFORM" = xopenbsd],
      [AC_CHECK_FILE([/usr/local/include/ereadline],
          [LIBS="-lereadline $LIBS"
              AM_CPPFLAGS="-I/usr/local/include/ereadline $AM_CPPFLAGS"
              AM_LDFLAGS="-L/usr/local/lib $AM_LDFLAGS"
              AC_SUBST(AM_LDFLAGS)])],

I think that using ${TRUEPREFIX} in that line is a mistake, but I'm not
sure (out of ignorance) if such replacement doesn't make sense. Maybe
the correct approach is to try to upstream a fix for it, relying on
pkg_info -qe devel/readline.

> >  WANTLIB += assuan c crypto curl curses ereadline expat ffi gcrypt
> >  WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gpg-error
> >  WANTLIB += gpgme iconv intl m mesode nghttp2 otr pcre pthread
> > -WANTLIB += ${MODPY_WANTLIB} ssl util z
> > +WANTLIB += ${MODPY_WANTLIB} signal-protocol-c ssl util z
>
> "make port-lib-depends-check" says this:
>
> profanity-0.7.0(net/profanity):
> Extra:  python3.7m.0 util.13
>
> This isn't new but from what I see it's not building any of the python
> parts. rsadowski, any idea what's going on there?

Dunno if it helps, but configure shows

checking for python-config... no
configure: Python development package not found, Python plugin support disabled.

This happens on line 83 of configure.ac, which just check for
python-config instead of python[23]-config. I went back to autoconf
configure and added

        sed -i s,python-config,python${MODPY_VERSION}-config, \
            ${WRKSRC}/configure.ac

to post-configure. It correctly detects python support and builds fine,
passes the tests, runs and can load and use python plugins, thing that
didn't happen before.

Now, I don't know if patching configure.ac in post-configure target is
the right thing(TM). Is it correct to override pre-configure instead?
Should I use patch target and write a proper patch for configure.ac?

After we have consensus about all this I'll send an updated patch.

Thanks for all the input!

-Lucas

Reply | Threaded
Open this post in threaded view
|

Re: update net/profanity

Rafael Sadowski
On Tue Sep 03, 2019 at 10:38:17PM +0000, Lucas wrote:

> Stuart Henderson <[hidden email]> wrote:
> > Please only use GH_* if using github's autogenerated tarball. If you are
> > setting MASTER_SITES anyway then it's not wanted/needed - for this it should
> > just have DISTNAME/MASTER_SITES/HOMEPAGE.
>
> Fixed. There are some other packages that define both GH_* and
> MASTER_SITES and could be fixed. If there is interest, I can send a
> different email addressing that.
>
> Maybe it should be added to bsd.port.mk(5)?

First of all thanks for your work here. Please just replace the out-dated URL:

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/profanity/Makefile,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 Makefile
--- Makefile 12 Jul 2019 20:48:44 -0000 1.10
+++ Makefile 3 Sep 2019 19:41:22 -0000
@@ -1,22 +1,21 @@
 # $OpenBSD: Makefile,v 1.10 2019/07/12 20:48:44 sthen Exp $
 
 COMMENT = console based XMPP client
-DISTNAME = profanity-0.6.0
+DISTNAME = profanity-0.7.0
 CATEGORIES = net
-REVISION = 0
 
-HOMEPAGE = http://www.profanity.im/
+HOMEPAGE = https://profanity-im.github.io/
 MAINTAINER = Rafael Sadowski <[hidden email]>
 
 # GPLv3+
 PERMIT_PACKAGE = Yes
 
-MASTER_SITES = http://www.profanity.im/
+MASTER_SITES = https://profanity-im.github.io/
 

>
> > This is because of the post-patch target using a sed -i on configure.ac,
> > causing it to have a newer timestamp than the generated files. This
> > can be fixed by removing that post-patch target (it doesn't make sense
> > anyway), the AUTO* lines, and change to CONFIGURE_STYLE=gnu.
>
> Thanks for pointing this. As you said, removing that target and setting
> CONFIGURE_STYLE=gnu builds, passes the tests and runs fine. Also we can
> drop BUILD_DEPENDS+=${MODGNU_AUTO*} because of it.
>
> That line was changed from /usr/local to ${TRUEPREFIX} in r1.4, and I
> think it tries to address a hardcoded /usr/local in the project's
> configure.ac, line 190:
>
>       [test "x$PLATFORM" = xopenbsd],
>       [AC_CHECK_FILE([/usr/local/include/ereadline],
>           [LIBS="-lereadline $LIBS"
>               AM_CPPFLAGS="-I/usr/local/include/ereadline $AM_CPPFLAGS"
>               AM_LDFLAGS="-L/usr/local/lib $AM_LDFLAGS"
>               AC_SUBST(AM_LDFLAGS)])],

Exactly, that was the idea.

>
> I think that using ${TRUEPREFIX} in that line is a mistake, but I'm not
> sure (out of ignorance) if such replacement doesn't make sense. Maybe
> the correct approach is to try to upstream a fix for it, relying on
> pkg_info -qe devel/readline.

This was my solution better diffs welcome. I think pkg_info is not the
right way.

>
> > >  WANTLIB += assuan c crypto curl curses ereadline expat ffi gcrypt
> > >  WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gpg-error
> > >  WANTLIB += gpgme iconv intl m mesode nghttp2 otr pcre pthread
> > > -WANTLIB += ${MODPY_WANTLIB} ssl util z
> > > +WANTLIB += ${MODPY_WANTLIB} signal-protocol-c ssl util z
> >
> > "make port-lib-depends-check" says this:
> >
> > profanity-0.7.0(net/profanity):
> > Extra:  python3.7m.0 util.13
> >
> > This isn't new but from what I see it's not building any of the python
> > parts. rsadowski, any idea what's going on there?

I don't have the problem, because placed the links:

ln -sf /usr/local/bin/python3.7 /usr/local/bin/python
ln -sf /usr/local/bin/python3.7-config /usr/local/bin/python-config
ln -sf /usr/local/bin/pydoc3.7 /usr/local/bin/pydoc

on my system.

>
> Dunno if it helps, but configure shows
>
> checking for python-config... no
> configure: Python development package not found, Python plugin support disabled.
>
> This happens on line 83 of configure.ac, which just check for
> python-config instead of python[23]-config. I went back to autoconf
> configure and added
>
> sed -i s,python-config,python${MODPY_VERSION}-config, \
>    ${WRKSRC}/configure.ac

This works for me without my placed links.

>
> to post-configure. It correctly detects python support and builds fine,
> passes the tests, runs and can load and use python plugins, thing that
> didn't happen before.
>
> Now, I don't know if patching configure.ac in post-configure target is
> the right thing(TM). Is it correct to override pre-configure instead?

I think if you do this in post-configure your are to late and the party
is over but I'm not very familiar with the GNU autotools.

> Should I use patch target and write a proper patch for configure.ac?
>
> After we have consensus about all this I'll send an updated patch.
>
> Thanks for all the input!
>
> -Lucas
>

Reply | Threaded
Open this post in threaded view
|

Re: update net/profanity

Lucas-2
Rafael Sadowski <[hidden email]> wrote:
> I think if you do this in post-configure your are to late and the party
> is over but I'm not very familiar with the GNU autotools.

Ugh, meant to say post-patch in there. Anyway, find an updated patch
incorporating the fixes below.

I opted to stick to CONFIGURE_STYLE=autoconf to have working python
support: current ports' profanity can't load python plugins and isn't
linked against python because I assume that the build machines doesn't
have such symbolic links. Patching the generated configure seemed more
difficult.

While there, I removed

BUILD_DEPENDS +=${MODGNU_AUTOCONF_DEPENDS} \
                ${MODGNU_AUTOMAKE_DEPENDS}

as CONFIGURE_STYLE=autoconf does add ${MODGNU_AUTOCONF_DEPENDS} to
BUILD_DEPENDS, and it builds and works fine without
${MODGNU_AUTOMAKE_DEPENDS}. Still, let me know if doing so is a mistake
for other reasons.

Also I changed the non-default localbase install fix to substitute
/usr/local instead of ${TRUEPREFIX}, as /usr/local is hard-coded in
configure.ac.

Changes list:

* Change HOMEPAGE to GitHub's site, as it's updated more frequently (old
  HOMEPAGE still show 0.6.0 as latest version, despite 0.7.0 being
  released more than a month ago) and the repo description points to it.
* Enable OMEMO support by default
* Remove the deletion of #include "ui/stub_ui.h" from test files.
* Synchronize feature list with the one in the site.
* Fix non-default localbase correction.
* Fix python detection, actually enabling support for python plugins.
* No PLIST changes.

-Lucas

Index: net/profanity/Makefile
===================================================================
RCS file: /cvs/ports/net/profanity/Makefile,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 Makefile
--- net/profanity/Makefile 12 Jul 2019 20:48:44 -0000 1.10
+++ net/profanity/Makefile 6 Sep 2019 01:09:10 -0000
@@ -1,34 +1,31 @@
 # $OpenBSD: Makefile,v 1.10 2019/07/12 20:48:44 sthen Exp $
 
 COMMENT = console based XMPP client
-DISTNAME = profanity-0.6.0
+DISTNAME = profanity-0.7.0
 CATEGORIES = net
-REVISION = 0
 
-HOMEPAGE = http://www.profanity.im/
+HOMEPAGE = https://profanity-im.github.io/
 MAINTAINER = Rafael Sadowski <[hidden email]>
 
 # GPLv3+
 PERMIT_PACKAGE = Yes
 
-MASTER_SITES = http://www.profanity.im/
+MASTER_SITES = ${HOMEPAGE}
 
 WANTLIB += assuan c crypto curl curses ereadline expat ffi gcrypt
 WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gpg-error
 WANTLIB += gpgme iconv intl m mesode nghttp2 otr pcre pthread
-WANTLIB += ${MODPY_WANTLIB} ssl util z
+WANTLIB += signal-protocol-c ssl util z ${MODPY_WANTLIB}
 
 MODULES += lang/python
 
 MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
 
-BUILD_DEPENDS +=${MODGNU_AUTOCONF_DEPENDS} \
- ${MODGNU_AUTOMAKE_DEPENDS}
-
 LIB_DEPENDS += devel/glib2 \
  devel/readline \
  net/curl \
  net/libmesode \
+ net/libsignal-protocol-c \
  security/gpgme \
  security/libotr
 
@@ -44,6 +41,7 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}
 CONFIGURE_ARGS += --with-xscreensaver=no \
  --enable-icons=no \
  --enable-plugins=yes \
+ --enable-omemo=yes \
  --enable-otr=yes
 
 MAKE_FLAGS = CC="${CC}" \
@@ -54,11 +52,13 @@ AUTOMAKE_VERSION = 1.11
 
 SEPARATE_BUILD = Yes
 
-# there is no stub_ui.h and is not needed
+# * Assumes that devel/readline is installed in the default LOCALBASE.
+# * Assumes there is a python-config, while we usually have
+#   python$VERSION-config
 post-patch:
- find ${WRKSRC} -type f -name "*.c" \
- -exec sed -i '/stub\_ui.h/d' "{}" \;
- sed -i s,${TRUEPREFIX},${LOCALBASE}, ${WRKSRC}/configure.ac
+ sed -i -e s,/usr/local,${LOCALBASE}, \
+    -e s,python-config,python${MODPY_VERSION}-config, \
+    ${WRKSRC}/configure.ac
 
 post-install:
  ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/profanity/
Index: net/profanity/distinfo
===================================================================
RCS file: /cvs/ports/net/profanity/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- net/profanity/distinfo 3 Mar 2019 19:40:04 -0000 1.4
+++ net/profanity/distinfo 6 Sep 2019 01:09:10 -0000
@@ -1,2 +1,2 @@
-SHA256 (profanity-0.6.0.tar.gz) = 8bJ3O3nrKUKXaG85E+lInCDv+uXjozXIlW2xj27i9mA=
-SIZE (profanity-0.6.0.tar.gz) = 741812
+SHA256 (profanity-0.7.0.tar.gz) = 8euZvgFoPUG4kbD5l/TIc8m7h7C2uEALf8y45VPVFLs=
+SIZE (profanity-0.7.0.tar.gz) = 789373
Index: net/profanity/pkg/DESCR
===================================================================
RCS file: /cvs/ports/net/profanity/pkg/DESCR,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 DESCR
--- net/profanity/pkg/DESCR 25 Apr 2016 17:46:38 -0000 1.1.1.1
+++ net/profanity/pkg/DESCR 6 Sep 2019 01:09:10 -0000
@@ -3,14 +3,10 @@ libstrophe, inspired by irssi.
 
 Features:
 
-* Supports XMPP chat services.
-* Command driven user interface.
-* Customizable functionality and user interface.
-* OTR (Off The Record) message encryption.
-* Chat room support.
-* Roster management.
-* Flexible resource and priority settings.
-* Desktop notifications.
-* Unicode support.
-* Integrated DuckDuckGo searching.
-* Send tiny URLs.
+* Supports XMPP chat services
+* MUC chat room support
+* OTR, PGP and OMEMO message encryption
+* Roster management
+* Flexible resource and priority settings
+* Desktop notifications
+* Plugins in Python and C

Reply | Threaded
Open this post in threaded view
|

Re: update net/profanity

Stuart Henderson
On 2019/09/06 01:11, Lucas wrote:

> Rafael Sadowski <[hidden email]> wrote:
> > I think if you do this in post-configure your are to late and the party
> > is over but I'm not very familiar with the GNU autotools.
>
> Ugh, meant to say post-patch in there. Anyway, find an updated patch
> incorporating the fixes below.
>
> I opted to stick to CONFIGURE_STYLE=autoconf to have working python
> support: current ports' profanity can't load python plugins and isn't
> linked against python because I assume that the build machines doesn't
> have such symbolic links. Patching the generated configure seemed more
> difficult.

The build machines don't have those symlinks, and neither should ports
developers.

> While there, I removed
>
> BUILD_DEPENDS +=${MODGNU_AUTOCONF_DEPENDS} \
> ${MODGNU_AUTOMAKE_DEPENDS}
>
> as CONFIGURE_STYLE=autoconf does add ${MODGNU_AUTOCONF_DEPENDS} to
> BUILD_DEPENDS, and it builds and works fine without
> ${MODGNU_AUTOMAKE_DEPENDS}. Still, let me know if doing so is a mistake
> for other reasons.

Yes that's correct.

> Also I changed the non-default localbase install fix to substitute
> /usr/local instead of ${TRUEPREFIX}, as /usr/local is hard-coded in
> configure.ac.

Usual approach is to patch and use SUBST_CMD on the file; the problem
with sed expressions is they tend to get stale after an update or two,
whereas patching means that changes in the surrounding area in the
file will be obvious when updating patches. Exception would be if there
are a large number of files involved, or if the same change is made a
very large number of times in one file, in which case sed makes more
sense.

Diff below does that, removes the surplus AUTOMAKE_VERSION variable,
and groups the autoconf-related variables together in the Makefile,
otherwise as-is from yours.

(As the patches directory is added, use -p0 if applying with patch
so that it creates the directory properly).

> * Change HOMEPAGE to GitHub's site, as it's updated more frequently (old
>   HOMEPAGE still show 0.6.0 as latest version, despite 0.7.0 being
>   released more than a month ago) and the repo description points to it.
> * Enable OMEMO support by default
> * Remove the deletion of #include "ui/stub_ui.h" from test files.
> * Synchronize feature list with the one in the site.
> * Fix non-default localbase correction.
> * Fix python detection, actually enabling support for python plugins.
> * No PLIST changes.

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/profanity/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- Makefile 12 Jul 2019 20:48:44 -0000 1.10
+++ Makefile 6 Sep 2019 11:01:18 -0000
@@ -1,34 +1,31 @@
 # $OpenBSD: Makefile,v 1.10 2019/07/12 20:48:44 sthen Exp $
 
 COMMENT = console based XMPP client
-DISTNAME = profanity-0.6.0
+DISTNAME = profanity-0.7.0
 CATEGORIES = net
-REVISION = 0
 
-HOMEPAGE = http://www.profanity.im/
+HOMEPAGE = https://profanity-im.github.io/
 MAINTAINER = Rafael Sadowski <[hidden email]>
 
 # GPLv3+
 PERMIT_PACKAGE = Yes
 
-MASTER_SITES = http://www.profanity.im/
+MASTER_SITES = ${HOMEPAGE}
 
 WANTLIB += assuan c crypto curl curses ereadline expat ffi gcrypt
 WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gpg-error
 WANTLIB += gpgme iconv intl m mesode nghttp2 otr pcre pthread
-WANTLIB += ${MODPY_WANTLIB} ssl util z
+WANTLIB += signal-protocol-c ssl util z ${MODPY_WANTLIB}
 
 MODULES += lang/python
 
 MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
 
-BUILD_DEPENDS +=${MODGNU_AUTOCONF_DEPENDS} \
- ${MODGNU_AUTOMAKE_DEPENDS}
-
 LIB_DEPENDS += devel/glib2 \
  devel/readline \
  net/curl \
  net/libmesode \
+ net/libsignal-protocol-c \
  security/gpgme \
  security/libotr
 
@@ -36,7 +33,9 @@ LIB_DEPENDS += devel/glib2 \
 # Check must be present at build time for tests to work.
 BUILD_DEPENDS += devel/cmocka
 
-CONFIGURE_STYLE = autoconf
+CONFIGURE_STYLE = autoconf
+AUTOCONF_VERSION = 2.69
+SEPARATE_BUILD = Yes
 
 CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
  LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
@@ -44,21 +43,14 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}
 CONFIGURE_ARGS += --with-xscreensaver=no \
  --enable-icons=no \
  --enable-plugins=yes \
+ --enable-omemo=yes \
  --enable-otr=yes
 
 MAKE_FLAGS = CC="${CC}" \
  CFLAGS="${CFLAGS}"
 
-AUTOCONF_VERSION = 2.69
-AUTOMAKE_VERSION = 1.11
-
-SEPARATE_BUILD = Yes
-
-# there is no stub_ui.h and is not needed
 post-patch:
- find ${WRKSRC} -type f -name "*.c" \
- -exec sed -i '/stub\_ui.h/d' "{}" \;
- sed -i s,${TRUEPREFIX},${LOCALBASE}, ${WRKSRC}/configure.ac
+ ${SUBST_CMD} ${WRKSRC}/configure.ac
 
 post-install:
  ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/profanity/
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/profanity/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 3 Mar 2019 19:40:04 -0000 1.4
+++ distinfo 6 Sep 2019 11:01:18 -0000
@@ -1,2 +1,2 @@
-SHA256 (profanity-0.6.0.tar.gz) = 8bJ3O3nrKUKXaG85E+lInCDv+uXjozXIlW2xj27i9mA=
-SIZE (profanity-0.6.0.tar.gz) = 741812
+SHA256 (profanity-0.7.0.tar.gz) = 8euZvgFoPUG4kbD5l/TIc8m7h7C2uEALf8y45VPVFLs=
+SIZE (profanity-0.7.0.tar.gz) = 789373
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac 6 Sep 2019 11:01:18 -0000
@@ -0,0 +1,28 @@
+$OpenBSD$
+
+Index: configure.ac
+--- configure.ac.orig
++++ configure.ac
+@@ -80,7 +80,7 @@ elif test "x$enable_python_plugins" != xno; then
+         AC_MSG_NOTICE([Symlinking Python.framework to $PYTHON_FRAMEWORK])
+         rm -f Python.framework
+         ln -s $PYTHON_FRAMEWORK Python.framework ])
+-    AC_CHECK_PROG(PYTHON_CONFIG_EXISTS, python-config, yes, no)
++    AC_CHECK_PROG(PYTHON_CONFIG_EXISTS, python${MODPY_VERSION}-config, yes, no)
+     if test "$PYTHON_CONFIG_EXISTS" == "yes"; then
+         AX_PYTHON_DEVEL
+         AM_CONDITIONAL([BUILD_PYTHON_API], [true])
+@@ -188,10 +188,10 @@ AS_IF([test "x$PLATFORM" = xosx],
+         [AC_MSG_ERROR([libreadline is required for profanity])])],
+
+       [test "x$PLATFORM" = xopenbsd],
+-      [AC_CHECK_FILE([/usr/local/include/ereadline],
++      [AC_CHECK_FILE([${LOCALBASE}/include/ereadline],
+           [LIBS="-lereadline $LIBS"
+-              AM_CPPFLAGS="-I/usr/local/include/ereadline $AM_CPPFLAGS"
+-              AM_LDFLAGS="-L/usr/local/lib $AM_LDFLAGS"
++              AM_CPPFLAGS="-I${LOCALBASE}/include/ereadline $AM_CPPFLAGS"
++              AM_LDFLAGS="-L${LOCALBASE}/lib $AM_LDFLAGS"
+               AC_SUBST(AM_LDFLAGS)])],
+
+     [AC_CHECK_LIB([readline], [main], [],
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/net/profanity/pkg/DESCR,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 DESCR
--- pkg/DESCR 25 Apr 2016 17:46:38 -0000 1.1.1.1
+++ pkg/DESCR 6 Sep 2019 11:01:18 -0000
@@ -3,14 +3,10 @@ libstrophe, inspired by irssi.
 
 Features:
 
-* Supports XMPP chat services.
-* Command driven user interface.
-* Customizable functionality and user interface.
-* OTR (Off The Record) message encryption.
-* Chat room support.
-* Roster management.
-* Flexible resource and priority settings.
-* Desktop notifications.
-* Unicode support.
-* Integrated DuckDuckGo searching.
-* Send tiny URLs.
+* Supports XMPP chat services
+* MUC chat room support
+* OTR, PGP and OMEMO message encryption
+* Roster management
+* Flexible resource and priority settings
+* Desktop notifications
+* Plugins in Python and C

Reply | Threaded
Open this post in threaded view
|

Re: update net/profanity

Lucas-2
Stuart Henderson <[hidden email]> wrote:
> Usual approach is to patch and use SUBST_CMD on the file; the problem
> with sed expressions is they tend to get stale after an update or two,
> whereas patching means that changes in the surrounding area in the
> file will be obvious when updating patches. Exception would be if there
> are a large number of files involved, or if the same change is made a
> very large number of times in one file, in which case sed makes more
> sense.

Thanks for explaining this.

> Diff below does that, removes the surplus AUTOMAKE_VERSION variable,
> and groups the autoconf-related variables together in the Makefile,
> otherwise as-is from yours.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/profanity/Makefile,v
> retrieving revision 1.10
> diff -u -p -r1.10 Makefile
> --- Makefile 12 Jul 2019 20:48:44 -0000 1.10
> +++ Makefile 6 Sep 2019 11:01:18 -0000
> @@ -1,34 +1,31 @@
>  # $OpenBSD: Makefile,v 1.10 2019/07/12 20:48:44 sthen Exp $
>  
>  COMMENT = console based XMPP client
> -DISTNAME = profanity-0.6.0
> +DISTNAME = profanity-0.7.0
>  CATEGORIES = net
> -REVISION = 0
>  
> -HOMEPAGE = http://www.profanity.im/
> +HOMEPAGE = https://profanity-im.github.io/
>  MAINTAINER = Rafael Sadowski <[hidden email]>
>  
>  # GPLv3+
>  PERMIT_PACKAGE = Yes
>  
> -MASTER_SITES = http://www.profanity.im/
> +MASTER_SITES = ${HOMEPAGE}
>  
>  WANTLIB += assuan c crypto curl curses ereadline expat ffi gcrypt
>  WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gpg-error
>  WANTLIB += gpgme iconv intl m mesode nghttp2 otr pcre pthread
> -WANTLIB += ${MODPY_WANTLIB} ssl util z
> +WANTLIB += signal-protocol-c ssl util z ${MODPY_WANTLIB}
>  
>  MODULES += lang/python
>  
>  MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
>  
> -BUILD_DEPENDS +=${MODGNU_AUTOCONF_DEPENDS} \
> - ${MODGNU_AUTOMAKE_DEPENDS}
> -
>  LIB_DEPENDS += devel/glib2 \
>   devel/readline \
>   net/curl \
>   net/libmesode \
> + net/libsignal-protocol-c \
>   security/gpgme \
>   security/libotr
>  
> @@ -36,7 +33,9 @@ LIB_DEPENDS += devel/glib2 \
>  # Check must be present at build time for tests to work.
>  BUILD_DEPENDS += devel/cmocka
>  
> -CONFIGURE_STYLE = autoconf
> +CONFIGURE_STYLE = autoconf
> +AUTOCONF_VERSION = 2.69
> +SEPARATE_BUILD = Yes
>  
>  CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
>   LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
> @@ -44,21 +43,14 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}
>  CONFIGURE_ARGS += --with-xscreensaver=no \
>   --enable-icons=no \
>   --enable-plugins=yes \
> + --enable-omemo=yes \
>   --enable-otr=yes
>  
>  MAKE_FLAGS = CC="${CC}" \
>   CFLAGS="${CFLAGS}"
>  
> -AUTOCONF_VERSION = 2.69
> -AUTOMAKE_VERSION = 1.11
> -
> -SEPARATE_BUILD = Yes
> -
> -# there is no stub_ui.h and is not needed
>  post-patch:
> - find ${WRKSRC} -type f -name "*.c" \
> - -exec sed -i '/stub\_ui.h/d' "{}" \;
> - sed -i s,${TRUEPREFIX},${LOCALBASE}, ${WRKSRC}/configure.ac
> + ${SUBST_CMD} ${WRKSRC}/configure.ac
>  
>  post-install:
>   ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/profanity/
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/net/profanity/distinfo,v
> retrieving revision 1.4
> diff -u -p -r1.4 distinfo
> --- distinfo 3 Mar 2019 19:40:04 -0000 1.4
> +++ distinfo 6 Sep 2019 11:01:18 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (profanity-0.6.0.tar.gz) = 8bJ3O3nrKUKXaG85E+lInCDv+uXjozXIlW2xj27i9mA=
> -SIZE (profanity-0.6.0.tar.gz) = 741812
> +SHA256 (profanity-0.7.0.tar.gz) = 8euZvgFoPUG4kbD5l/TIc8m7h7C2uEALf8y45VPVFLs=
> +SIZE (profanity-0.7.0.tar.gz) = 789373
> Index: patches/patch-configure_ac
> ===================================================================
> RCS file: patches/patch-configure_ac
> diff -N patches/patch-configure_ac
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-configure_ac 6 Sep 2019 11:01:18 -0000
> @@ -0,0 +1,28 @@
> +$OpenBSD$
> +
> +Index: configure.ac
> +--- configure.ac.orig
> ++++ configure.ac
> +@@ -80,7 +80,7 @@ elif test "x$enable_python_plugins" != xno; then
> +         AC_MSG_NOTICE([Symlinking Python.framework to $PYTHON_FRAMEWORK])
> +         rm -f Python.framework
> +         ln -s $PYTHON_FRAMEWORK Python.framework ])
> +-    AC_CHECK_PROG(PYTHON_CONFIG_EXISTS, python-config, yes, no)
> ++    AC_CHECK_PROG(PYTHON_CONFIG_EXISTS, python${MODPY_VERSION}-config, yes, no)
> +     if test "$PYTHON_CONFIG_EXISTS" == "yes"; then
> +         AX_PYTHON_DEVEL
> +         AM_CONDITIONAL([BUILD_PYTHON_API], [true])
> +@@ -188,10 +188,10 @@ AS_IF([test "x$PLATFORM" = xosx],
> +         [AC_MSG_ERROR([libreadline is required for profanity])])],
> +
> +       [test "x$PLATFORM" = xopenbsd],
> +-      [AC_CHECK_FILE([/usr/local/include/ereadline],
> ++      [AC_CHECK_FILE([${LOCALBASE}/include/ereadline],
> +           [LIBS="-lereadline $LIBS"
> +-              AM_CPPFLAGS="-I/usr/local/include/ereadline $AM_CPPFLAGS"
> +-              AM_LDFLAGS="-L/usr/local/lib $AM_LDFLAGS"
> ++              AM_CPPFLAGS="-I${LOCALBASE}/include/ereadline $AM_CPPFLAGS"
> ++              AM_LDFLAGS="-L${LOCALBASE}/lib $AM_LDFLAGS"
> +               AC_SUBST(AM_LDFLAGS)])],
> +
> +     [AC_CHECK_LIB([readline], [main], [],
> Index: pkg/DESCR
> ===================================================================
> RCS file: /cvs/ports/net/profanity/pkg/DESCR,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 DESCR
> --- pkg/DESCR 25 Apr 2016 17:46:38 -0000 1.1.1.1
> +++ pkg/DESCR 6 Sep 2019 11:01:18 -0000
> @@ -3,14 +3,10 @@ libstrophe, inspired by irssi.
>  
>  Features:
>  
> -* Supports XMPP chat services.
> -* Command driven user interface.
> -* Customizable functionality and user interface.
> -* OTR (Off The Record) message encryption.
> -* Chat room support.
> -* Roster management.
> -* Flexible resource and priority settings.
> -* Desktop notifications.
> -* Unicode support.
> -* Integrated DuckDuckGo searching.
> -* Send tiny URLs.
> +* Supports XMPP chat services
> +* MUC chat room support
> +* OTR, PGP and OMEMO message encryption
> +* Roster management
> +* Flexible resource and priority settings
> +* Desktop notifications
> +* Plugins in Python and C

Patch applies fine, builds, passes the tests and everything works, so
fine with me. :)

-Lucas

Reply | Threaded
Open this post in threaded view
|

Re: update net/profanity

Klemens Nanni-2
In reply to this post by Stuart Henderson
OK kn