On 2019/09/06 01:11, Lucas wrote:
> Rafael Sadowski <[email protected]> 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 <[email protected]>
 
 # 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 via email to