1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-03 06:04:53 +00:00

math/dsdp: adding a SONAME to the shared library

When building math/py-cvxopt the following error is displayed:
Error: /usr/local/lib/python3.9/site-packages/cvxopt/dsdp.cpython-39.so is
linked to /usr/local/lib/libdsdp.so which does not have a SONAME.
math/dsdp needs to be fixed.

Since I’m there, also install the static library.

PR:		274851
Approved by:	yuri 'maintainer)
This commit is contained in:
Thierry Thomas 2023-11-01 17:06:15 +01:00
parent 8f238ffa6c
commit 2a236ba2fb
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= dsdp
DISTVERSION= 5.8
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= math
MASTER_SITES= https://www.mcs.anl.gov/hs/software/${PORTNAME:tu}/
DISTNAME= ${PORTNAME:tu}${DISTVERSION}
@ -23,7 +23,7 @@ USE_LDCONFIG= yes
ALL_TARGET= all oshared all oshared
BINARY_ALIAS= make=${GMAKE} gcc=${CC}
MAKE_ENV= DSDPROOT=${WRKSRC} SH_LD="${CC} -shared"
MAKE_ENV= DSDPROOT=${WRKSRC} SH_LD="${CC} -shared -Wl,-soname,libdsdp.so.0"
CFLAGS+= -fPIC
PLIST_FILES= bin/dsdp5 \
@ -32,6 +32,7 @@ PLIST_FILES= bin/dsdp5 \
include/dsdp/dsdplapack.h \
include/dsdp/dsdpmem.h \
include/dsdp/dsdpsys.h \
lib/libdsdp.a \
lib/libdsdp.so.0 \
lib/libdsdp.so
@ -42,6 +43,7 @@ do-build: # the build fails to build all binaries without being called twice due
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/include/dsdp
${INSTALL_PROGRAM} ${WRKSRC}/bin/dsdp5 ${STAGEDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/lib/libdsdp.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_LIB} ${WRKSRC}/lib/libdsdp.so ${STAGEDIR}${PREFIX}/lib/libdsdp.so.0
(cd ${STAGEDIR}${PREFIX}/lib && ${LN} -s libdsdp.so.0 libdsdp.so)
${INSTALL_DATA} ${WRKSRC}/include/*.h ${STAGEDIR}${PREFIX}/include/dsdp

View File

@ -9,6 +9,6 @@
- ${SH_LD} ${DSDPLIBSO} *.o -o ${DSDPLIBSO}; \
+ echo "building ${DSDPLIBSO}"
+ ${AR} x ${DSDPLIB}
+ $(CC) -shared $(LDFLAGS) -llapack -lblas -lm *.o -o ${DSDPLIBSO}; \
+ $(SH_LD) $(LDFLAGS) -llapack -lblas -lm *.o -o ${DSDPLIBSO}; \
cd ../ ; \
${RM} tmp