Create a proper library with a SONAME

PR:		208472
Submitted by:	phd_kimberlite@yahoo.co.jp (maintainer)
MFH:		2016Q2
This commit is contained in:
Baptiste Daroussin 2016-04-04 20:46:22 +00:00
parent dbb56f6a52
commit 34d4baa56c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=412529
3 changed files with 36 additions and 8 deletions

View file

@ -4,6 +4,7 @@
PORTNAME= openblas
PORTVERSION= 0.2.15
DISTVERSIONPREFIX= v
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= math
MASTER_SITES= GH NL/lapack/timing/:lapack_tmg

View file

@ -8,7 +8,25 @@
MD5SUM = md5 -r
endif
@@ -1020,15 +1021,6 @@ ifndef LIBSUFFIX
@@ -889,9 +890,17 @@ SYMBOLSUFFIX =
endif
ifndef LIBNAMESUFFIX
+ifndef SMP
LIBPREFIX = lib$(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)
else
+LIBPREFIX = lib$(SYMBOLPREFIX)openblasp$(SYMBOLSUFFIX)
+endif
+else
+ifndef SMP
LIBPREFIX = lib$(SYMBOLPREFIX)openblas$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
+else
+LIBPREFIX = lib$(SYMBOLPREFIX)openblasp$(SYMBOLSUFFIX)_$(LIBNAMESUFFIX)
+endif
endif
KERNELDIR = $(TOPDIR)/kernel/$(ARCH)
@@ -1020,24 +1029,8 @@ ifndef LIBSUFFIX
LIBSUFFIX = a
endif
@ -21,18 +39,19 @@
-LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)p$(REVISION)_p.$(LIBSUFFIX)
-endif
-else
ifndef SMP
-ifndef SMP
LIBNAME = $(LIBPREFIX)$(REVISION).$(LIBSUFFIX)
LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX)
@@ -1036,7 +1028,6 @@ else
LIBNAME = $(LIBPREFIX)p$(REVISION).$(LIBSUFFIX)
LIBNAME_P = $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX)
endif
-else
-LIBNAME = $(LIBPREFIX)p$(REVISION).$(LIBSUFFIX)
-LIBNAME_P = $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX)
-endif
-endif
-
LIBDLLNAME = $(LIBPREFIX).dll
@@ -1067,7 +1058,7 @@ LIB_COMPONENTS = CBLAS
LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so)
@@ -1067,7 +1060,7 @@ LIB_COMPONENTS = CBLAS
endif
export OSNAME

View file

@ -8,3 +8,11 @@
so : ../$(LIBSONAME)
ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
@@ -151,6 +152,7 @@ else
endif
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
-Wl,--whole-archive $< -Wl,--no-whole-archive \
+ -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) \
$(FEXTRALIB) $(EXTRALIB)
$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
rm -f linktest