If (as seems to have been the default in previous versions of the port) the SM option is unset, the compile fails. libtool: compile: cc -DHAVE_CONFIG_H -I. -I../.. -DOPENSC_CONF_PATH=\"/usr/local/etc/opensc.conf\" -I../../src -I/usr/include -I/usr/local/include/PCSC -D_THREAD_SAFE -pthread -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -Wextra -Wno-unused-parameter -Werror=declaration-after-statement -MT libopensc_la-card-authentic.lo -MD -MP -MF .deps/libopensc_la-card-authentic.Tpo -c card-authentic.c -o libopensc_la-card-authentic.o >/dev/null 2>&1 card-sc-hsm.c:287:2: warning: implicit declaration of function 'sc_sm_stop' is invalid in C99 [-Wimplicit-function-declaration] sc_sm_stop(card); ^ card-sc-hsm.c:566:13: error: no member named 'sm_ctx' in 'struct sc_card' && card->sm_ctx.sm_mode != SM_MODE_TRANSMIT) { ~~~~ ^ card-sc-hsm.c:566:31: error: use of undeclared identifier 'SM_MODE_TRANSMIT' && card->sm_ctx.sm_mode != SM_MODE_TRANSMIT) { ^ card-sc-hsm.c:608:15: error: no member named 'sm_ctx' in 'struct sc_card' && (card->sm_ctx.sm_mode == SM_MODE_TRANSMIT)) { ~~~~ ^ card-sc-hsm.c:608:33: error: use of undeclared identifier 'SM_MODE_TRANSMIT' && (card->sm_ctx.sm_mode == SM_MODE_TRANSMIT)) { ^ card-sc-hsm.c:630:14: error: no member named 'sm_ctx' in 'struct sc_card' if (card->sm_ctx.sm_mode != SM_MODE_TRANSMIT) { ~~~~ ^ card-sc-hsm.c:630:32: error: use of undeclared identifier 'SM_MODE_TRANSMIT' if (card->sm_ctx.sm_mode != SM_MODE_TRANSMIT) { ^ 1 warning and 6 errors generated. gmake[5]: *** [Makefile:1532: libopensc_la-card-sc-hsm.lo] Error 1
A commit references this bug: Author: ale Date: Fri Nov 3 08:38:19 UTC 2017 New revision: 453391 URL: https://svnweb.freebsd.org/changeset/ports/453391 Log: Fix build with disabled SM option. PR: 223384 Submitted by: Martin Birgmeier <la5lbtyi@aon.at> Changes: head/security/opensc/Makefile head/security/opensc/distinfo