Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jun 2017 21:10:00 +0000 (UTC)
From:      Thierry Thomas <thierry@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r443600 - in head/math/mumps: . files
Message-ID:  <201706142110.v5ELA0p9082710@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thierry
Date: Wed Jun 14 21:10:00 2017
New Revision: 443600
URL: https://svnweb.freebsd.org/changeset/ports/443600

Log:
  Rename the shared libraries correctly.
  
  Reported by:	pfg

Modified:
  head/math/mumps/Makefile
  head/math/mumps/files/patch-Makefile
  head/math/mumps/files/patch-PORD_lib_Makefile
  head/math/mumps/files/patch-libseq_Makefile
  head/math/mumps/files/patch-src_Makefile
  head/math/mumps/pkg-plist

Modified: head/math/mumps/Makefile
==============================================================================
--- head/math/mumps/Makefile	Wed Jun 14 20:18:38 2017	(r443599)
+++ head/math/mumps/Makefile	Wed Jun 14 21:10:00 2017	(r443600)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mumps
 PORTVERSION=	4.10.0	# Please do not upgrade to 5+: if needed repocopy to math/mumps5
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	math
 MASTER_SITES=	http://mumps.enseeiht.fr/		\
 		http://graal.ens-lyon.fr/MUMPS/		\
@@ -39,6 +39,8 @@ MAKE_JOBS_UNSAFE=yes
 FORTRANLIBS=	-lgfortran
 GCCLIBDIR=	${LDFLAGS}
 USE_LDCONFIG=	yes
+VEM=		${PORTVERSION:R:R}
+LIBS=		cmumps dmumps mumps_common pord smumps zmumps
 
 .if defined(WITH_OPTIMIZED_FLAGS)
 FFLAGS+=	-O3 -ffast-math
@@ -49,7 +51,7 @@ BUILD_DEPENDS+=	${LOCALBASE}/bin/oemetis:math/metis4
 MAKE_ENV+=	ORDERINGSF=-Dmetis
 .endif
 
-PLIST_SUB+=	MUMPSVERSION=${PORTVERSION}
+PLIST_SUB+=	MUMPSVERSION=${PORTVERSION} MUMPSV=${VEM}
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
@@ -85,6 +87,7 @@ CONFLICTS=	mumps-mpich-4*
 
 .ifndef WITH_MPI
 PLIST_SUB+=	WITH_LIBSEQ=""
+LIBS+=		mpiseq
 .else
 PLIST_SUB+=	WITH_LIBSEQ="@comment "
 .endif
@@ -101,11 +104,11 @@ pre-configure:
 
 pre-build:
 	${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
-.for MF in Makefile.inc PORD/lib/Makefile libseq/Makefile src/Makefile
+.for MF in Makefile Makefile.inc PORD/lib/Makefile libseq/Makefile src/Makefile
 	${REINPLACE_CMD} -e 's+@CC@+${CC}+g ; s+@FC@+${FC}+g ; \
 	s+@CFLAGS@+${CFLAGS} -fPIC+g; \
 	s+@FCFLAGS@+${FCFLAGS} -fPIC+g; \
-	s+@SOVER@+${PORTVERSION}+g; \
+	s+@SOVER@+${VEM}+g; \
 	s+@GCCLIBDIR@+${GCCLIBDIR}+g; \
 	s+@FORTRANLIBS@+${FORTRANLIBS}+g; \
 	s+@BLAS_LIBS@+${BLAS_LIBS}+ ; \
@@ -122,11 +125,14 @@ pre-build:
 do-install:
 	${INSTALL_DATA} ${WRKSRC}/include/*.h ${STAGEDIR}${PREFIX}/include
 	${INSTALL_DATA} ${WRKSRC}/lib/lib*.a ${STAGEDIR}${PREFIX}/lib
-	${INSTALL_LIB} ${WRKSRC}/lib/lib*.so ${STAGEDIR}${PREFIX}/lib
+	${INSTALL_LIB} ${WRKSRC}/lib/lib*.so.${VEM} ${STAGEDIR}${PREFIX}/lib
 .ifndef WITH_MPI
 	${INSTALL_DATA} ${WRKSRC}/libseq/libmpiseq.a ${STAGEDIR}${PREFIX}/lib
-	${INSTALL_LIB} ${WRKSRC}/libseq/libmpiseq*.so ${STAGEDIR}${PREFIX}/lib
+	${INSTALL_LIB} ${WRKSRC}/libseq/libmpiseq*.so.${VEM} ${STAGEDIR}${PREFIX}/lib
 .endif
+.for lib in ${LIBS}
+	(cd ${STAGEDIR}${PREFIX}/lib && ${LN} -sf lib${lib}.so.${VEM} ${STAGEDIR}${PREFIX}/lib/lib${lib}.so)
+. endfor
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.pdf ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.ps ${STAGEDIR}${DOCSDIR}

Modified: head/math/mumps/files/patch-Makefile
==============================================================================
--- head/math/mumps/files/patch-Makefile	Wed Jun 14 20:18:38 2017	(r443599)
+++ head/math/mumps/files/patch-Makefile	Wed Jun 14 21:10:00 2017	(r443600)
@@ -5,7 +5,7 @@
  
  
 -requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
-+requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) $(libdir)/libpord$(PLAT).so
++requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) $(libdir)/libpord$(PLAT).so.@SOVER@
  
  # dummy MPI library (sequential version)
  

Modified: head/math/mumps/files/patch-PORD_lib_Makefile
==============================================================================
--- head/math/mumps/files/patch-PORD_lib_Makefile	Wed Jun 14 20:18:38 2017	(r443599)
+++ head/math/mumps/files/patch-PORD_lib_Makefile	Wed Jun 14 21:10:00 2017	(r443600)
@@ -1,20 +1,19 @@
 --- PORD/lib/Makefile.orig	2011-05-10 12:56:32 UTC
 +++ PORD/lib/Makefile
-@@ -21,10 +21,16 @@ OBJS = graph.o gbipart.o gbisect.o ddcre
+@@ -21,10 +21,15 @@ OBJS = graph.o gbipart.o gbisect.o ddcre
  .c.o:
  	$(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o
  
 -libpord$(LIBEXT):$(OBJS)
 -	$(AR)$@ $(OBJS)
-+all: libpord$(LIBEXT) libpord.so
++all: libpord$(LIBEXT) libpord.so.@SOVER@
 +
 +libpord$(LIBEXT): $(OBJS)
 +	$(AR) $@ $(OBJS)
  	$(RANLIB) $@
  
-+libpord.so: $(OBJS)
-+	$(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT)-@SOVER@.so -o libpord$(PLAT)-@SOVER@.so -Wl,-z,defs
-+	ln -s libpord$(PLAT)-@SOVER@.so $@
++libpord.so.@SOVER@: $(OBJS)
++	$(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT).so.@SOVER@ -o libpord$(PLAT).so.@SOVER@ -Wl,-z,defs
 +
  clean:
  	rm -f *.o

Modified: head/math/mumps/files/patch-libseq_Makefile
==============================================================================
--- head/math/mumps/files/patch-libseq_Makefile	Wed Jun 14 20:18:38 2017	(r443599)
+++ head/math/mumps/files/patch-libseq_Makefile	Wed Jun 14 21:10:00 2017	(r443600)
@@ -1,20 +1,19 @@
 --- libseq/Makefile.orig	2011-05-10 12:56:39 UTC
 +++ libseq/Makefile
-@@ -7,13 +7,19 @@ all: libmpiseq
+@@ -7,13 +7,18 @@ all: libmpiseq
  
  include ../Makefile.inc
  
 -libmpiseq: libmpiseq$(PLAT)$(LIBEXT)
-+libmpiseq: libmpiseq$(PLAT)$(LIBEXT) libmpiseq$(PLAT).so
++libmpiseq: libmpiseq$(PLAT)$(LIBEXT) libmpiseq$(PLAT).so.@SOVER@
  
  libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o
 -	$(AR)$@ mpi.o mpic.o elapse.o
 +	$(AR) $@ mpi.o mpic.o elapse.o
  	$(RANLIB) $@
 +
-+libmpiseq$(PLAT).so: mpi.o mpic.o elapse.o
-+	$(FC) -shared ${.ALLSRC} -Wl,-soname,libmpiseq$(PLAT)-@SOVER@.so -o libmpiseq$(PLAT)-@SOVER@.so -Wl,-z,defs
-+	ln -s libmpiseq$(PLAT)-@SOVER@.so $@
++libmpiseq$(PLAT).so.@SOVER@: mpi.o mpic.o elapse.o
++	$(FC) -shared ${.ALLSRC} -Wl,-soname,libmpiseq$(PLAT).so.@SOVER@ -o libmpiseq$(PLAT).so.@SOVER@ -Wl,-z,defs
 +
  .f.o:
  	$(FC) $(OPTF)              -c $*.f $(OUTF)$*.o

Modified: head/math/mumps/files/patch-src_Makefile
==============================================================================
--- head/math/mumps/files/patch-src_Makefile	Wed Jun 14 20:18:38 2017	(r443599)
+++ head/math/mumps/files/patch-src_Makefile	Wed Jun 14 21:10:00 2017	(r443600)
@@ -5,13 +5,13 @@
  
  mumps_lib:    $(libdir)/libmumps_common$(PLAT)$(LIBEXT) \
 -              $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT)
-+              $(libdir)/libmumps_common$(PLAT).so \
++              $(libdir)/libmumps_common$(PLAT).so.@SOVER@ \
 +              $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT) \
-+              $(libdir)/lib$(ARITH)mumps$(PLAT).so
++              $(libdir)/lib$(ARITH)mumps$(PLAT).so.@SOVER@
  
  OBJS_COMMON = \
          mumps_part9.o\
-@@ -53,13 +55,21 @@ OBJS = 	$(ARITH)mumps_part1.o\
+@@ -53,13 +55,19 @@ OBJS = 	$(ARITH)mumps_part1.o\
  
  
  $(libdir)/libmumps_common$(PLAT)$(LIBEXT):	$(OBJS_COMMON)
@@ -19,18 +19,16 @@
 +	$(AR) $@ $?
  	$(RANLIB) $@
  
-+$(libdir)/libmumps_common$(PLAT).so:	$(OBJS_COMMON)
-+	$(FC) -shared ${.ALLSRC} -Wl,-soname,libmumps_common$(PLAT)-@SOVER@.so -L$(libdir) $(LORDERINGS) $(LIBPAR) $(LIBOTHERS) -o $(libdir)/libmumps_common$(PLAT)-@SOVER@.so -Wl,-z,defs
-+	ln -s libmumps_common$(PLAT)-@SOVER@.so $@
++$(libdir)/libmumps_common$(PLAT).so.@SOVER@:	$(OBJS_COMMON)
++	$(FC) -shared ${.ALLSRC} -Wl,-soname,libmumps_common$(PLAT).so.@SOVER@ -L$(libdir) $(LORDERINGS) $(LIBPAR) $(LIBOTHERS) -o $(libdir)/libmumps_common$(PLAT).so.@SOVER@ -Wl,-z,defs
 +
  $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT):    $(OBJS)
 -	$(AR)$@ $?
 +	$(AR) $@ $?
  	$(RANLIB) $@
  
-+$(libdir)/lib$(ARITH)mumps$(PLAT).so:    $(OBJS)
-+	$(FC) -shared ${.ALLSRC} -Wl,-soname,lib$(ARITH)mumps$(PLAT)-@SOVER@.so -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(LIBPAR) -lblas $(SCALAP) $(LIBOTHERS) -o $(libdir)/lib$(ARITH)mumps$(PLAT)-@SOVER@.so -Wl,-z,defs
-+	ln -s lib$(ARITH)mumps$(PLAT)-@SOVER@.so $@
++$(libdir)/lib$(ARITH)mumps$(PLAT).so.@SOVER@:    $(OBJS)
++	$(FC) -shared ${.ALLSRC} -Wl,-soname,lib$(ARITH)mumps$(PLAT).so.@SOVER@ -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(LIBPAR) -lblas $(SCALAP) $(LIBOTHERS) -o $(libdir)/lib$(ARITH)mumps$(PLAT).so.@SOVER@ -Wl,-z,defs
 +
  $(ARITH)mumps_load.o:		$(ARITH)mumps_comm_buffer.o \
  				$(ARITH)mumps_struc_def.o

Modified: head/math/mumps/pkg-plist
==============================================================================
--- head/math/mumps/pkg-plist	Wed Jun 14 20:18:38 2017	(r443599)
+++ head/math/mumps/pkg-plist	Wed Jun 14 21:10:00 2017	(r443600)
@@ -12,27 +12,27 @@ include/smumps_struc.h
 include/zmumps_c.h
 include/zmumps_root.h
 include/zmumps_struc.h
-lib/libcmumps-%%MUMPSVERSION%%.so
 lib/libcmumps.a
 lib/libcmumps.so
-lib/libdmumps-%%MUMPSVERSION%%.so
+lib/libcmumps.so.4
 lib/libdmumps.a
 lib/libdmumps.so
-%%WITH_LIBSEQ%%lib/libmpiseq-%%MUMPSVERSION%%.so
+lib/libdmumps.so.4
 %%WITH_LIBSEQ%%lib/libmpiseq.a
 %%WITH_LIBSEQ%%lib/libmpiseq.so
-lib/libmumps_common-%%MUMPSVERSION%%.so
+%%WITH_LIBSEQ%%lib/libmpiseq.so.4
 lib/libmumps_common.a
 lib/libmumps_common.so
-lib/libpord-%%MUMPSVERSION%%.so
+lib/libmumps_common.so.4
 lib/libpord.a
 lib/libpord.so
-lib/libsmumps-%%MUMPSVERSION%%.so
+lib/libpord.so.4
 lib/libsmumps.a
 lib/libsmumps.so
-lib/libzmumps-%%MUMPSVERSION%%.so
+lib/libsmumps.so.4
 lib/libzmumps.a
 lib/libzmumps.so
+lib/libzmumps.so.4
 %%PORTDOCS%%%%DOCSDIR%%/userguide_%%MUMPSVERSION%%.pdf
 %%PORTDOCS%%%%DOCSDIR%%/userguide_%%MUMPSVERSION%%.ps.gz
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706142110.v5ELA0p9082710>