cad/ghdl: Link to libgnat-12.so via rpath and do not require it via pkg

Reported by:	pkg-devel exp-run
This commit is contained in:
Gleb Popov 2025-03-17 21:09:25 +03:00
parent 853acc201a
commit 60988c14d9
2 changed files with 15 additions and 0 deletions

View file

@ -1,6 +1,7 @@
PORTNAME= ghdl
DISTVERSIONPREFIX= v
DISTVERSION= 5.0.1
PORTREVISION= 1
CATEGORIES= cad
MAINTAINER= yuri@FreeBSD.org
@ -18,6 +19,7 @@ TEST_DEPENDS= bash:shells/bash \
USES= ada:run gmake python:test shebangfix
SHEBANG_FILES= testsuite/testsuite.sh
USE_LDCONFIG= yes
NO_SHLIB_REQUIRES_GLOB= libgnat-12.so
USE_GITHUB= yes

View file

@ -0,0 +1,13 @@
Allow setting rpath to libgnat-12.so, because it isn't added to ldconfig directories.
--- Makefile.in.orig 2025-03-01 16:49:42 UTC
+++ Makefile.in
@@ -485,7 +485,7 @@ lib/$(libghdl_name): $(GRT_SRC_DEPS) $(LIBGHDL_GRT_OBJ
lib/$(libghdl_name): $(GRT_SRC_DEPS) $(LIBGHDL_GRT_OBJS) version.ads force
# Use -g for gnatlink so that the binder file is not removed. We need
# it for libghdl.a
- $(GNATMAKE) -I- -aI. -D pic -z libghdl -o $@ -gnat12 $(GNATFLAGS) $(PIC_FLAGS) $(LIBGHDL_INCFLAGS) -bargs -shared -Llibghdl_ -largs -R -g -shared $(SHLIB_FLAGS) $(filter-out -static,$(LDFLAGS)) $(LIBGHDL_GRT_OBJS)
+ $(GNATMAKE) -I- -aI. -D pic -z libghdl -o $@ -gnat12 $(GNATFLAGS) $(PIC_FLAGS) $(LIBGHDL_INCFLAGS) -bargs -shared -Llibghdl_ -largs -g -shared $(SHLIB_FLAGS) $(filter-out -static,$(LDFLAGS)) $(LIBGHDL_GRT_OBJS)
# On windows, gnatmake (via Osint.Executable_Name) always appends .exe
# Adjust. (Other solution: use gnatmake for compilation and binding,
# then use gnatlink directly for linking).