On 29/05/2020 2:30 p.m., Stuart Henderson wrote:
On 2020/05/29 13:12, Steve Williams wrote:
Hi

I am working on understanding the ports environment and at the same time,
creating a port for guacamole.  I know it's not going to fully work at this
point in time because of issues with freerdp, but I'm working on freerdp as
well.  However, Stuart gave patches that I've updated to get freerdp2.1.1 to
build.
Here's one I made earlier.. probably needs more patches, totally untested
beyond building.


Hi,

That's fantastic to provide me with your port after I've managed to get mine working!  Now I can compare and improve from the expert :)

Is it OK to ask questions on this list about the "best way" to patch?

For example, your port has a patch "patch-src_libguac_string_c " that just provides prototypes for strlcpy and strlcat.

I looked at why the define wasn't brought in from the OpenBSD include files.
string.h -> strlcpy et al inside a #if __BSD_VISIBLE

__BSD_VISIBLE is set in cdefs.h (included from string.h)
#if !defined(_BSD_SOURCE) && \
   (defined(_ANSI_SOURCE) || defined(__XPG_VISIBLE) || defined(__POSIX_VISIBLE))
# define __BSD_VISIBLE          0
#endif

So, the approach I took was to add -D_BSD_SOURCE to the Makefile:
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include -D_BSD_SOURCE" \
                LDFLAGS="-L${LOCALBASE}/lib"

and
CFLAGS +=               -D_BSD_SOURCE


There are various other ports that took this approach.

The big difference between my approach and yours is that I used the provided configure.  I used CONFIGURE_STYLE=simple whereas you used CONFIGURE_STYPE=autoreconf.

Is there a preferable way?

Thanks,
Steve Williams



Reply via email to