diff --git a/devel/mold/Makefile b/devel/mold/Makefile index 3d1270ef366d..71853f6e3d03 100644 --- a/devel/mold/Makefile +++ b/devel/mold/Makefile @@ -1,39 +1,39 @@ PORTNAME= mold DISTVERSIONPREFIX= v -DISTVERSION= 1.2 +DISTVERSION= 1.2.1 CATEGORIES= devel MAINTAINER= ashish@FreeBSD.org COMMENT= Modern Linker LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE NOT_FOR_ARCHS= armhf armv7 i386 LIB_DEPENDS= libtbb.so:devel/onetbb \ libmimalloc.so:devel/mimalloc USES= gmake ssl MAKE_ENV+= SYSTEM_TBB=1 MAKE_ENV+= SYSTEM_MIMALLOC=1 MAKE_ENV+= STRIP_CMD=${STRIP_CMD} CXXFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib MAKE_FLAGS+= "CXXFLAGS=${CXXFLAGS}" MAKE_FLAGS+= "LDFLAGS=${LDFLAGS}" USE_GITHUB= yes GH_ACCOUNT= rui314 PLIST_FILES= bin/ld.mold \ bin/ld64.mold \ bin/mold \ lib/mold/mold-wrapper.so \ libexec/mold/ld \ share/man/man1/mold.1.gz post-patch: ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \ ${WRKSRC}/Makefile .include diff --git a/devel/mold/distinfo b/devel/mold/distinfo index c7dc3d5eaaa9..e19b81efb296 100644 --- a/devel/mold/distinfo +++ b/devel/mold/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1650071825 -SHA256 (rui314-mold-v1.2_GH0.tar.gz) = 975ad37394e5c32661ee5da2817e5e8b8d40c6a73c78e23b30a57763c004a9f1 -SIZE (rui314-mold-v1.2_GH0.tar.gz) = 4759743 +TIMESTAMP = 1651457801 +SHA256 (rui314-mold-v1.2.1_GH0.tar.gz) = 41868663ff18afee3fa35e5e3fdf3d9575eb2e4ff49967b8f42f479c61c1ec34 +SIZE (rui314-mold-v1.2.1_GH0.tar.gz) = 4669615 diff --git a/devel/mold/files/patch-Makefile b/devel/mold/files/patch-Makefile index 5c82c0b734a7..0721117616fd 100644 --- a/devel/mold/files/patch-Makefile +++ b/devel/mold/files/patch-Makefile @@ -1,31 +1,44 @@ ---- Makefile.orig 2022-02-20 07:40:17 UTC +--- Makefile.orig 2022-04-28 09:51:29 UTC +++ Makefile @@ -4,7 +4,7 @@ - VERSION = 1.1 + VERSION = 1.2.1 -PREFIX = /usr/local +PREFIX = %%PREFIX%% BINDIR = $(PREFIX)/bin LIBDIR = $(PREFIX)/lib LIBEXECDIR = $(PREFIX)/libexec @@ -27,7 +27,7 @@ PKG_CONFIG = pkg-config # If you want to keep symbols in the installed binary, run make with # `STRIP=true` to run /bin/true instead of the strip command. -STRIP = strip +STRIP = $(STRIP_CMD) SRCS = $(wildcard *.cc elf/*.cc macho/*.cc) OBJS = $(SRCS:%.cc=out/%.o) @@ -103,8 +103,8 @@ ifneq ($(OS), Darwin) endif ifeq ($(NEEDS_LIBCRYPTO), 1) - MOLD_CXXFLAGS += $(shell $(PKG_CONFIG) --cflags-only-I openssl) - MOLD_LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L openssl) -lcrypto + MOLD_CXXFLAGS += -I${OPENSSLINC} + MOLD_LDFLAGS += -L${OPENSSLLIB} -lcrypto endif # '-latomic' flag is needed building on riscv64 system +@@ -205,11 +205,7 @@ install: all + + $(INSTALL) -d $D$(LIBEXECDIR)/mold + +-# We want to make a symblink with a relative path, so that users can +-# move the entire directory to other place without breaking the reference. +-# GNU ln supports `--relative` to do that, but that's not supported by +-# non-GNU systems. So we use Python to compute a relative path. +- ln -sf `python3 -c "import os.path; print(os.path.relpath('$(BINDIR)/mold', '$(LIBEXECDIR)/mold'))"` $D$(LIBEXECDIR)/mold/ld ++ ln -sf ../../bin/mold $D$(LIBEXECDIR)/mold/ld + + $(INSTALL) -d $D$(MANDIR)/man1 + $(INSTALL_DATA) docs/mold.1 $D$(MANDIR)/man1