--- Mk/Uses/libarchive.mk (revision 422769) +++ Mk/Uses/libarchive.mk (working copy) @@ -10,7 +10,7 @@ .if !defined(_INCLUDE_USES_LIBARCHIVE_MK) _INCLUDE_USES_LIBARCHIVE_MK= yes -.include "${USESDIR}/localbase.mk" +_USES_POST+= localbase LIB_DEPENDS+= libarchive.so.13:archivers/libarchive .endif --- Mk/Uses/libedit.mk (revision 422769) +++ Mk/Uses/libedit.mk (working copy) @@ -10,7 +10,7 @@ .if !defined(_INCLUDE_USES_LIBEDIT_MK) _INCLUDE_USES_LIBEDIT_MK= yes -.include "${USESDIR}/localbase.mk" +_USES_POST+= localbase LIB_DEPENDS+= libedit.so.0:devel/libedit .endif --- Mk/Uses/localbase.mk (revision 422769) +++ Mk/Uses/localbase.mk (working copy) @@ -3,18 +3,27 @@ # handle enforcing localbase in path # # Feature: localbase -# Usage: USES=localbase -# Valid ARGS: none +# Usage: USES=localbase or USES=localbase:args +# Valid ARGS: ldflags Set LDFLAGS instead of LIBS # # MAINTAINER: portmgr@FreeBSD.org .if !defined(_INCLUDE_USES_LOCALBASE_MK) _INCLUDE_USES_LOCALBASE_MK= yes +_USES_POST+= localbase +.endif + +.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LOCALBASE_POST_MK) +_INCLUDE_USES_LOCALBASE_POST_MK=yes CPPFLAGS+= -isystem ${LOCALBASE}/include CFLAGS+= -isystem ${LOCALBASE}/include CXXFLAGS+= -isystem ${LOCALBASE}/include +.if ${localbase_ARGS:Mldflags} LDFLAGS+= -L${LOCALBASE}/lib +.else +LIBS+= -L${LOCALBASE}/lib +.endif # Use CONFIGURE_ENV instead of CMAKE_ARGS because devel/cmake itself also needs # this, and CMAKE_ARGS is not used when bootstrapping CMake. --- archivers/pigz/Makefile (revision 422769) +++ archivers/pigz/Makefile (working copy) @@ -15,7 +15,7 @@ LICENSE= ZLIB LIB_DEPENDS= libzopfli.so:archivers/zopfli -USES= cpe gmake localbase +USES= cpe gmake localbase:ldflags CPE_VENDOR= zlib ALL_TARGET= dev MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" --- audio/fplib/Makefile (revision 422769) +++ audio/fplib/Makefile (working copy) @@ -22,6 +22,6 @@ LIB_DEPENDS= libcurl.so:ftp/curl \ MAKE_JOBS_UNSAFE= yes USE_LDCONFIG= yes -USES= cmake localbase tar:xz +USES= cmake localbase:ldflags tar:xz .include --- audio/listener/Makefile (revision 422769) +++ audio/listener/Makefile (working copy) @@ -24,7 +24,7 @@ post-patch: @${REINPLACE_CMD} -e \ 's|-g |$$(CPPFLAGS) | ; \ s|-O2 || ; \ - s|-ldl |$$(LDFLAGS) |' ${WRKSRC}/Makefile + s|-ldl |$$(LDFLAGS) $$(LIBS) |' ${WRKSRC}/Makefile do-install: ${INSTALL_PROGRAM} ${WRKSRC}/listener ${WRKSRC}/setlistener \ --- benchmarks/glmark2/Makefile (revision 422769) +++ benchmarks/glmark2/Makefile (working copy) @@ -13,7 +13,7 @@ LICENSE= GPLv3 LIB_DEPENDS= libpng.so:graphics/png -USES= jpeg localbase pkgconfig waf +USES= jpeg localbase:ldflags pkgconfig waf USE_GL= egl gl glesv2 CONFIGURE_ARGS= --with-flavors=x11-gl,x11-glesv2 --no-opt --no-debug WAF_CMD= ./waf -v --- databases/firebird25-server/Makefile (revision 422769) +++ databases/firebird25-server/Makefile (working copy) @@ -90,8 +90,7 @@ UDF_SQL= src/extlib/ib_udf2.sql src/extl PKGINSTALL?= ${PKGDIR}/pkg-install-server .else # Client part stuff -USES+= libedit -LDFLAGS+= -L${LOCALBASE}/lib # to link in lncurses pulled in by libedit +USES+= libedit CONFIGURE_ARGS+= --with-system-editline CONFIGURE_ENV+= ac_cv_lib_edit_readline="yes" --- databases/rocksdb/Makefile (revision 422769) +++ databases/rocksdb/Makefile (working copy) @@ -24,7 +24,7 @@ CPPFLAGS+= -DOS_FREEBSD MAKE_ENV= CXX=${CXX} USE_CXXSTD= c++11 USE_LDCONFIG= yes -USES= compiler:c++11-lib gmake localbase +USES= compiler:c++11-lib gmake localbase:ldflags PORTDATA= make_config.mk --- devel/efivar/files/patch-Make.rules (nonexistent) +++ devel/efivar/files/patch-Make.rules (working copy) @@ -0,0 +1,15 @@ +--- Make.rules.orig 2014-10-15 13:48:49 UTC ++++ Make.rules +@@ -2,10 +2,10 @@ + $(AR) -cvqs $@ $^ + + % : %.o +- $(CCLD) $(ccldflags) -o $@ $^ $(foreach lib,$(LIBS),-l$(lib)) ++ $(CCLD) $(ccldflags) -o $@ $^ $(LIBS) + + %.so.$(SONAME_VERSION) : +- $(CCLD) $(cflags) -Wl,-soname,$(SONAME) $(ccldflags) $(LIBFLAGS) $^ -o $@ $(foreach lib,$(LIBS),-l$(lib)) ++ $(CCLD) $(cflags) -Wl,-soname,$(SONAME) $(ccldflags) $(LIBFLAGS) $^ -o $@ $(LIBS) + + %.so : %.so.$(SONAME_VERSION) + ln -sf $^ $@ --- devel/efivar/files/patch-src-Makefile (revision 422769) +++ devel/efivar/files/patch-src-Makefile (working copy) @@ -1,6 +1,6 @@ ---- src/Makefile.orig 2015-01-19 15:35:31.000000000 +0100 -+++ src/Makefile 2015-01-19 15:35:42.000000000 +0100 -@@ -15,7 +15,6 @@ all : $(LIBTARGETS) $(PCTARGETS) $(BINTA +--- src/Makefile.orig 2014-10-15 13:48:49 UTC ++++ src/Makefile +@@ -15,14 +15,13 @@ all : $(LIBTARGETS) $(PCTARGETS) $(BINTA OBJECTS = lib.o vars.o efivarfs.o guid.o guidlist.o guid-symbols.o DEPS = .lib.c.P .efivar.c.P .efivar.h.P .vars.c.P .lib.h.P \ .generics.h.P .guid.h.P .guid.c.P @@ -8,3 +8,11 @@ libefivar.a :: $(OBJECTS) + libefivar.so.$(SONAME_VERSION) :: $(OBJECTS) + + efivar : efivar.o libefivar.so +- $(CCLD) $(ccldflags) -L. -lefivar -o $@ $^ -lpopt $(foreach lib,$(LIBS),-l$(lib)) ++ $(CCLD) $(ccldflags) -L. -lefivar -o $@ $^ -lpopt $(LIBS) + + efivar.pc : efivar.pc.in + sed -e "s,@@VERSION@@,$(VERSION),g" \ --- devel/efivar/files/patch-src-test-Makefile (nonexistent) +++ devel/efivar/files/patch-src-test-Makefile (working copy) @@ -0,0 +1,11 @@ +--- src/test/Makefile.orig 2014-10-15 13:48:49 UTC ++++ src/test/Makefile +@@ -4,7 +4,7 @@ TOPDIR = $(realpath $(SRCDIR)/../..) + include $(TOPDIR)/Make.defaults + + ccldflags += -L$(TOPDIR)/src/ -Wl,-rpath=$(TOPDIR)/src/ +-LIBS=efivar ++LIBS = -lefivar + + all : tester + --- dns/dnscrypt-wrapper/Makefile (revision 422769) +++ dns/dnscrypt-wrapper/Makefile (working copy) @@ -25,7 +25,7 @@ ETCDNSCRYPTWRAPPER= ${PREFIX}/etc/${PORT SUB_LIST+= ETCDNSCRYPTWRAPPER="${ETCDNSCRYPTWRAPPER}" USERS="${USERS}" USE_RC_SUBR= ${PORTNAME} -USES= gmake localbase +USES= gmake localbase:ldflags post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/* --- ftp/twoftpd/Makefile (revision 422769) +++ ftp/twoftpd/Makefile (working copy) @@ -16,7 +16,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= ${LOCALBASE}/bin/bg-installer:devel/bglibs LIB_DEPENDS= libcvm-v2client.so:security/cvm -USES= localbase +USES= localbase:ldflags BGLIBS_LIB= ${LOCALBASE}/lib/bglibs BGLIBS_INCLUDE= ${LOCALBASE}/include/bglibs --- games/corewars/Makefile (revision 422769) +++ games/corewars/Makefile (working copy) @@ -14,7 +14,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= ${LOCALBASE}/lib/libargp.a:devel/argp-standalone -USES= gmake localbase +USES= gmake localbase:ldflags USE_GNOME= gtk12 GNU_CONFIGURE= yes --- games/endless-sky/Makefile (revision 422769) +++ games/endless-sky/Makefile (working copy) @@ -19,7 +19,7 @@ BROKEN_FreeBSD_9= does not build # revis USE_GITHUB= yes -USES= compiler:c++11-lib jpeg localbase openal scons +USES= compiler:c++11-lib jpeg localbase:ldflags openal scons USE_SDL= sdl2 USE_GL= gl glew INSTALLS_ICONS= yes --- games/motogt/Makefile (revision 422769) +++ games/motogt/Makefile (working copy) @@ -19,7 +19,7 @@ LICENSE_COMB= multi LICENSE_FILE_GPLv20= ${WRKSRC}/doc/gpl.txt LICENSE_FILE_CC-BY-SA-3.0= ${WRKSRC}/doc/cc-by-sa.txt -USES= localbase zip +USES= localbase:ldflags zip USE_GL= gl BUILD_WRKSRC= ${WRKSRC}/src MAKEFILE= Makefile.lnx --- games/nighthawk/Makefile (revision 422769) +++ games/nighthawk/Makefile (working copy) @@ -12,7 +12,7 @@ COMMENT= X11 shoot-'em up which requires WRKSRC= ${WRKDIR}/${PORTNAME} -USES= gmake localbase tar:bzip2 +USES= gmake localbase:ldflags tar:bzip2 USE_GL= glut MAKE_ARGS= CC="${CC}" CPP="${CXX}" CC_FLAGS="${CXXFLAGS}" \ LIB_FLAGS="${LDFLAGS}" GCC="${CC}" CFLAGS="${CFLAGS}" --- graphics/bmeps/Makefile (revision 422769) +++ graphics/bmeps/Makefile (working copy) @@ -24,7 +24,7 @@ CONFIGURE_ENV= ac_cv_header_sys_termios_ ac_cv_header_db_h=no ALL_TARGET= bmpp -USES= gmake jpeg localbase +USES= gmake jpeg localbase:ldflags PLIST_FILES= bin/bmpp --- graphics/lcms/Makefile (revision 422769) +++ graphics/lcms/Makefile (working copy) @@ -25,7 +25,7 @@ GNU_CONFIGURE= yes INSTALL_TARGET= install-strip TEST_TARGET= check USE_LDCONFIG= yes -USES= libtool localbase pathfix +USES= libtool localbase:ldflags pathfix PORTDOCS= * --- graphics/lcms2/Makefile (revision 422769) +++ graphics/lcms2/Makefile (working copy) @@ -25,7 +25,7 @@ GNU_CONFIGURE= yes INSTALL_TARGET= install-strip TEST_TARGET= check USE_LDCONFIG= yes -USES= libtool localbase pathfix +USES= libtool localbase:ldflags pathfix PORTDOCS= * --- graphics/libprojectm/Makefile (revision 422769) +++ graphics/libprojectm/Makefile (working copy) @@ -15,7 +15,7 @@ LICENSE= LGPL21+ LIB_DEPENDS= libftgl.so:graphics/ftgl \ libfreetype.so:print/freetype2 -USES= cmake localbase +USES= cmake localbase:ldflags CMAKE_ARGS= -DUSE_OPENMP=OFF # openmp breaks build on 11.x USE_GL= glew USE_LDCONFIG= yes --- graphics/pngrewrite/Makefile (revision 422769) +++ graphics/pngrewrite/Makefile (working copy) @@ -22,7 +22,9 @@ NO_WRKSUBDIR= yes PLIST_FILES= bin/pngrewrite do-build: - ${CC} ${CFLAGS} ${LDFLAGS} -lm -lpng -lz -o ${WRKSRC}/pngrewrite ${WRKSRC}/libpngrewrite.c ${WRKSRC}/pngrewrite.c + ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} ${LIBS} -lm -lpng -lz \ + ${WRKSRC}/libpngrewrite.c ${WRKSRC}/pngrewrite.c \ + -o ${WRKSRC}/pngrewrite do-install: ${INSTALL_PROGRAM} ${WRKSRC}/pngrewrite ${STAGEDIR}${PREFIX}/bin/ --- graphics/py-ming/Makefile (revision 422769) +++ graphics/py-ming/Makefile (working copy) @@ -27,7 +27,7 @@ CONFIGURE_ARGS= --enable-python CONFIGURE_ENV= PYTHON_LDFLAGS="-L${PYTHON_LIBDIR} -l${PYTHON_VERSION}${PYTHON_ABIVER}" GNU_CONFIGURE= yes USE_PYTHON= autoplist concurrent distutils -USES= autoreconf libtool localbase python +USES= autoreconf libtool localbase:ldflags python BUILD_WRKSRC= ${WRKSRC}/py_ext INSTALL_WRKSRC= ${WRKSRC}/py_ext --- mail/neomutt/Makefile (revision 422769) +++ mail/neomutt/Makefile (working copy) @@ -81,6 +81,7 @@ DOCS_BUILD_DEPENDS= xsltproc:textproc/li post-patch: @${REINPLACE_CMD} -e "s/\`date/\`gdate/" ${WRKSRC}/Makefile.am ${WRKSRC}/doc/Makefile.am + @${REINPLACE_CMD} '/LIBS=$$/d' ${WRKSRC}/configure.ac post-install: ${RM} -f ${STAGEDIR}${PREFIX}/etc/mime* --- misc/getopt/Makefile (revision 422769) +++ misc/getopt/Makefile (working copy) @@ -24,7 +24,7 @@ PORTDOCS= Changelog README NLS_MAKE_ARGS= WITHOUT_GETTEXT=0 NLS_MAKE_ARGS_OFF= WITHOUT_GETTEXT=1 NLS_LDFLAGS= -lintl -NLS_USES= gettext localbase +NLS_USES= gettext localbase:ldflags post-patch: @${RM} ${WRKSRC}/gnu/*.o --- multimedia/oqtencoder/Makefile (revision 422769) +++ multimedia/oqtencoder/Makefile (working copy) @@ -13,7 +13,7 @@ COMMENT= Simple encoder using OpenQuickt LIB_DEPENDS= libopenquicktime.so:multimedia/openquicktime -USES= localbase tar:tgz +USES= localbase:ldflags tar:tgz WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} PLIST_FILES= bin/oqtencoder --- net/gnu-dico/Makefile (revision 422769) +++ net/gnu-dico/Makefile (working copy) @@ -16,7 +16,6 @@ USE_LDCONFIG= yes USES= tar:xz gmake libtool localbase pkgconfig GNU_CONFIGURE= yes -CONFIGURE_ARGS= --localstatedir=/var INFO= dico @@ -54,7 +53,10 @@ post-patch: @${REINPLACE_CMD} 's/@bindir@/@sbindir@/' ${WRKSRC}/dicod/Makefile.in @${REINPLACE_CMD} 's/(bindir)..dir/&\/gdico/' ${WRKSRC}/dico/Makefile.in @${REINPLACE_CMD} '/INSTALL.*charset/d' ${WRKSRC}/gnu/Makefile.in - @${REINPLACE_CMD} 's/python-config/$${PYTHON_CONFIG}/' ${WRKSRC}/configure + @${REINPLACE_CMD} \ + -e 's/mu_check_lib_save_LIBS/LIBS/' \ + -e 's/python-config/$${PYTHON_CONFIG}/' \ + ${WRKSRC}/configure @${REINPLACE_CMD} 's/conf.5in dico/conf.5 dico/' ${WRKSRC}/doc/Makefile.in post-install: --- net/ldap2dns/Makefile (revision 422769) +++ net/ldap2dns/Makefile (working copy) @@ -18,7 +18,7 @@ RUN_DEPENDS= p5-Net-DNS>=0:dns/p5-Net-DN USE_GITHUB= yes GH_ACCOUNT= bklang -USES= gmake localbase perl5 shebangfix +USES= gmake localbase:ldflags perl5 shebangfix SHEBANG_FILES= scripts/*.pl USE_PERL5= run USE_OPENLDAP= yes --- net-p2p/transmission-cli/files/patch-configure (nonexistent) +++ net-p2p/transmission-cli/files/patch-configure (working copy) @@ -0,0 +1,20 @@ +--- configure.orig 2016-03-06 20:24:37 UTC ++++ configure +@@ -19348,7 +19348,7 @@ $as_echo_n "checking µTP... " >&6; } + build_utp="no" + + ac_save_LIBS="$LIBS" +-LIBS="-lutp" ++LIBS="-lutp $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +@@ -19423,7 +19423,7 @@ $as_echo "$build_utp" >&6; } + + + ac_save_LIBS="$LIBS" +-LIBS="-lminiupnpc" ++LIBS="-lminiupnpc $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking system miniupnpc library" >&5 + $as_echo_n "checking system miniupnpc library... " >&6; } + --- net-p2p/transmission-cli/files/patch-daemon_Makefile.in (revision 422769) +++ net-p2p/transmission-cli/files/patch-daemon_Makefile.in (nonexistent) @@ -1,11 +0,0 @@ ---- daemon/Makefile.in.orig 2015-04-15 08:35:09 UTC -+++ daemon/Makefile.in -@@ -141,7 +141,7 @@ am__v_CC_1 = - CCLD = $(CC) - LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(LDFLAGS) $(AM_LDFLAGS) -o $@ - AM_V_CCLD = $(am__v_CCLD_@AM_V@) - am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) - am__v_CCLD_0 = @echo " CCLD " $@; --- sysutils/fusefs-unionfs/Makefile (revision 422769) +++ sysutils/fusefs-unionfs/Makefile (working copy) @@ -23,7 +23,7 @@ PLIST_FILES= bin/unionfs \ bin/unionfsctl \ man/man8/unionfs.8.gz -USES= fuse cmake localbase +USES= fuse cmake localbase:ldflags post-patch: @${REINPLACE_CMD} "s,share/man,man,g" ${WRKSRC}/man/CMakeLists.txt --- sysutils/pciutils/Makefile (revision 422769) +++ sysutils/pciutils/Makefile (working copy) @@ -21,7 +21,7 @@ ALL_TARGET= lspci lspci.8 setpci setpci. CPPFLAGS+= -fPIC LDFLAGS+= -lpci MAKE_ENV= LANG=C -USES= gmake localbase tar:xz +USES= gmake localbase:ldflags tar:xz PLIST_FILES= bin/lspci \ bin/setpci \ --- sysutils/xen-tools/Makefile (revision 422769) +++ sysutils/xen-tools/Makefile (working copy) @@ -28,8 +28,8 @@ OPTIONS_DEFINE= DOCS ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than amd64" -USES= cpe gmake libtool perl5 pkgconfig python shebangfix localbase \ - gettext +USES= cpe gettext gmake libtool localbase:ldflags perl5 pkgconfig \ + python shebangfix USE_GNOME= glib20 USE_LDCONFIG= yes GNU_CONFIGURE= yes