Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 May 2023 22:46:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 271214] net-mgmt/net-snmp: LDFLAGS/PKG_PREFIX bugs
Message-ID:  <bug-271214-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271214

            Bug ID: 271214
           Summary: net-mgmt/net-snmp: LDFLAGS/PKG_PREFIX bugs
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: zi@FreeBSD.org
          Reporter: ngie@FreeBSD.org
             Flags: maintainer-feedback?(zi@FreeBSD.org)
          Assignee: zi@FreeBSD.org

As part of getting OpenSSL from ports and base to play well with one anothe=
r, I
moved OpenSSL from ports to /usr/local/lib/openssl . This has exposed the f=
act
that LDFLAGS from USES+=3Dssl isn't honored/passed through to configure pro=
perly.

Moreover, the port uses PKG_PREFIX, a non-existent variable, instead of PRE=
FIX
or LOCALBASE.

```
$ (cd ../freebsd-ports/net-mgmt/net-snmp; make -VPKG_PREFIX)

$
```

The patch below addresses both of those issues:
```
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index 0af9bccd05ee..e2e91ff73eac 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -50,7 +50,7 @@ CPE_PRODUCT=3D  net-snmp
 USE_PERL5=3D     build run
 USE_CSTD=3D      c99

-CFLAGS+=3D       -I${LOCALBASE}/include -I${PKG_PREFIX}/include
+CFLAGS+=3D       -I${LOCALBASE}/include -I${PREFIX}/include
 LDFLAGS+=3D      -L${LOCALBASE}/lib
 CONFIGURE_ENV+=3D        PERLPROG=3D"${PERL}" PSPROG=3D"${PS_CMD}" SED=3D"=
${SED}"
 CONFIGURE_ARGS+=3D--enable-shared --enable-internal-md5 \
@@ -60,7 +60,7 @@ CONFIGURE_ARGS+=3D--enable-shared --enable-internal-md5 \
                --with-logfile=3D"${NET_SNMP_LOGFILE}" \
                --with-persistent-directory=3D"${NET_SNMP_PERSISTENTDIR}" \
                --with-gnu-ld --without-libwrap \
-               --with-ldflags=3D"-lm -lkvm -ldevstat -L${PKG_PREFIX}/lib
-L${LOCALBASE}/lib ${LCRYPTO}"
+               --with-ldflags=3D"-lm -lkvm -ldevstat -L${PREFIX}/lib ${LDF=
LAGS}"
 SUB_FILES=3D     pkg-message

 .if !defined(WITHOUT_SSP)
```

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271214-7788>