Hi,

> http://build-failures.rhaalovely.net/sparc64/2020-02-01/security/opensc.log

The last update brought back `-Werror', so i took the matter upstream
[0] to avoid that in the future, port flags will be on top priority now.

I have not backported the `--enable-pedantic' change because it is
built without it by default. REVISION bump seems not needed as this
diff just changes the CFLAGS order and only overrides `-Werror'.

Comments/feedback are welcome :)

Charlène.


[0] https://github.com/OpenSC/OpenSC/pull/1933


Index: Makefile
===================================================================
RCS file: /cvs/ports/security/opensc/Makefile,v
retrieving revision 1.54
diff -u -p -u -p -r1.54 Makefile
--- Makefile    30 Jan 2020 07:15:08 -0000      1.54
+++ Makefile    7 Feb 2020 08:06:56 -0000
@@ -44,6 +44,9 @@ FAKE_FLAGS=   mandir="${PREFIX}/man/" \
 AUTOCONF_VERSION = 2.69
 AUTOMAKE_VERSION = 1.15
 
+# Allow building with base-gcc
+CFLAGS +=      -Wno-error
+
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/pkgconfig
        ${SUBST_CMD} -c -m ${NONBINMODE} -o ${BINOWN} -g ${BINGRP} \
Index: patches/patch-configure_ac
===================================================================
RCS file: /cvs/ports/security/opensc/patches/patch-configure_ac,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 patch-configure_ac
--- patches/patch-configure_ac  30 Jan 2020 07:15:08 -0000      1.10
+++ patches/patch-configure_ac  7 Feb 2020 08:06:56 -0000
@@ -4,7 +4,8 @@ Fix version string
 
 libdl is not required on OpenBSD
 
-Remove -Werror so it builds with gcc
+Put port supplied CFLAGS on top priority so it builds with gcc by
+supplying `-Wno-error' (upstreamed, can be removed for opensc > 0.20.0)
 
 Index: configure.ac
 --- configure.ac.orig
@@ -61,3 +62,13 @@ Index: configure.ac
  AM_CONDITIONAL([ENABLE_FUZZING], [test "${enable_fuzzing}" = "yes"])
  AM_CONDITIONAL([ENABLE_SHARED], [test "${enable_shared}" = "yes"])
  AS_IF([test "${enable_shared}" = "yes"], [AC_DEFINE([ENABLE_SHARED], [1], 
[Enable shared libraries])])
+@@ -1071,7 +1045,8 @@ if test "${enable_pedantic}" = "yes"; then
+       CFLAGS="${CFLAGS} -pedantic"
+ fi
+ if test "${enable_strict}" = "yes"; then
+-      CFLAGS="${CFLAGS} -Wall -Wextra -Wno-unused-parameter -Werror"
++      # XXX This can be removed with opensc > 0.20.0 (upstreamed)
++      CFLAGS="-Wall -Wextra -Wno-unused-parameter -Werror ${CFLAGS}"
+ fi
+ 
+ AC_CONFIG_FILES([

Reply via email to