diff options
author | tijl <tijl@FreeBSD.org> | 2016-10-01 03:24:30 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2016-10-01 03:24:30 +0800 |
commit | f493fce6a3261de0136fe170a7b704c4fe236b88 (patch) | |
tree | 8b44219153a720f367633c8fe248933750735b7d /devel | |
parent | 70cc79c60e2f5a9e208b1727c67b6fe406e80c61 (diff) | |
download | freebsd-ports-gnome-f493fce6a3261de0136fe170a7b704c4fe236b88.tar.gz freebsd-ports-gnome-f493fce6a3261de0136fe170a7b704c4fe236b88.tar.zst freebsd-ports-gnome-f493fce6a3261de0136fe170a7b704c4fe236b88.zip |
Let USES=localbase add -L${LOCALBASE}/lib to LIBS instead of LDFLAGS.
USES=localbase:ldflags can be used to set LDFLAGS. Normally LDFLAGS
appears too early on the command line causing some ports to link with
their own libraries in LOCALBASE (if installed) instead of WRKSRC.
Also make use of _USES_POST so -L${LOCALBASE}/lib is added as late as
possible after anything a port Makefile might set. Use _USES_POST
instead of .include in libedit.mk and libarchive.mk so things like
'USES=libedit localbase:ldflags' work correctly.
Fix some issues with LIBS in some ports.
Switch ports that don't support LIBS to localbase:ldflags.
PR: 212987
Exp-run by: antoine
Approved by: portmgr (antoine)
Diffstat (limited to 'devel')
-rw-r--r-- | devel/efivar/files/patch-Make.rules | 15 | ||||
-rw-r--r-- | devel/efivar/files/patch-src-Makefile | 14 | ||||
-rw-r--r-- | devel/efivar/files/patch-src-test-Makefile | 11 | ||||
-rw-r--r-- | devel/sdl20/Makefile | 2 |
4 files changed, 38 insertions, 4 deletions
diff --git a/devel/efivar/files/patch-Make.rules b/devel/efivar/files/patch-Make.rules new file mode 100644 index 000000000000..24d302516477 --- /dev/null +++ b/devel/efivar/files/patch-Make.rules @@ -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 $^ $@ diff --git a/devel/efivar/files/patch-src-Makefile b/devel/efivar/files/patch-src-Makefile index 10009c41ebad..f0fdf02e6ac4 100644 --- a/devel/efivar/files/patch-src-Makefile +++ b/devel/efivar/files/patch-src-Makefile @@ -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" \ diff --git a/devel/efivar/files/patch-src-test-Makefile b/devel/efivar/files/patch-src-test-Makefile new file mode 100644 index 000000000000..22c70f7c9a73 --- /dev/null +++ b/devel/efivar/files/patch-src-test-Makefile @@ -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 + diff --git a/devel/sdl20/Makefile b/devel/sdl20/Makefile index 71a53484aade..b8439ed6df4c 100644 --- a/devel/sdl20/Makefile +++ b/devel/sdl20/Makefile @@ -13,7 +13,7 @@ LICENSE= ZLIB LICENSE_FILE= ${WRKSRC}/COPYING.txt GNU_CONFIGURE= yes -USES= gmake iconv libtool localbase pathfix pkgconfig +USES= gmake iconv libtool localbase:ldflags pathfix pkgconfig USE_LDCONFIG= yes CONFIGURE_ARGS+= --disable-video-opengles \ |