Date: Tue, 5 Oct 2004 11:33:08 +0400 (MSD) From: Oleg Sharoiko <os@rsu.ru> To: FreeBSD-gnats-submit@FreeBSD.org, archie@FreeBSD.org Cc: and@rsu.ru Subject: ports/72346: [PATCH] net/mpd doesn't pass COPTS to make Message-ID: <200410050733.i957X86r034716@brain.cc.rsu.ru> Resent-Message-ID: <200410050740.i957eOJk029555@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 72346 >Category: ports >Synopsis: [PATCH] net/mpd doesn't pass COPTS to make >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 05 07:40:23 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Oleg Sharoiko >Release: FreeBSD 5.2-CURRENT i386 >Organization: Computer Center of Rostov State University >Environment: System: FreeBSD brain.cc.rsu.ru 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Fri Aug 6 11:16:48 MSD 2004 os@brain.cc.rsu.ru:/usr/obj/usr/src/sys/brain.athlon-xp.HEAD.2004-08-02.10:30:00 i386 >Description: Makefile of net/mpd has a line: MAKE_ENV= COPTS+=-I${OPENSSLINC} LDADD+=-L${OPENSSLLIB} This creates environment variables 'COPTS+' and 'LDADD+', what is not what really needed, because ${MAKE} which builds mpd uses COPTS and LDADD, but not those with plus. This, in particular, breaks builds when openssl is installed from ports. I propose the following solution: MAKE_ENV= COPTS="${COPTS} -I${OPENSSLINC}" LDADD="${LDADD} -L${OPENSSLLIB}" Besides, bsd.port.mk doesn't allow auto detection of openssl when it's installed from ports, where combination of bsd.port.pre.mk and bsd.port.post.mk do. >How-To-Repeat: build and install base system without openssl cd /usr/ports/net/mpd make >Fix: Please note that this patch shouldn't break current behavior as bsd.openssl.mk handles WITH_OPENSS_(BASE|PORT) and sets OPENSSLINC and OPENSSLLIB correctly. --- Makefile.old Tue Oct 5 10:42:36 2004 +++ Makefile Tue Oct 5 11:12:47 2004 @@ -21,13 +21,9 @@ MANCOMPRESSED= maybe USE_OPENSSL =yes -.if defined(WITH_OPENSSL_PORT) -USE_OPENSSL_PORT=yes -MAKE_ENV= COPTS+=-I${OPENSSLINC} LDADD+=-L${OPENSSLLIB} -.else -USE_OPENSSL_BASE=yes -MAKE_ENV= COPTS+=-I${OPENSSLINC} -.endif +MAKE_ENV= COPTS="${COPTS} -I${OPENSSLINC}" LDADD="${LDADD} -L${OPENSSLLIB}" + +.include <bsd.port.pre.mk> pre-build: @${ECHO} @@ -37,4 +33,4 @@ post-install: @${INSTALL_SCRIPT} -m 751 ${FILESDIR}/mpd.sh ${PREFIX}/etc/rc.d/mpd.sh.sample -.include <bsd.port.mk> +.include <bsd.port.post.mk> >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410050733.i957X86r034716>