svn commit: r337461 - head/math/matio
Tijl Coosemans
tijl at FreeBSD.org
Wed Dec 25 22:40:55 UTC 2013
Author: tijl
Date: Wed Dec 25 22:40:54 2013
New Revision: 337461
URL: http://svnweb.freebsd.org/changeset/ports/337461
Log:
- USES=fortran pathfix.
- Pass --enable-shared to configure instead of building a shared library
in post-build. This decreases the library version to zero so patch the
Makefile to force it back to one. The shared library also links with
Fortran runtime libraries correctly now.
- Remove -fPIC from CFLAGS and FFLAGS now that the shared library is no
longer created from the static library.
- Remove do-install. Normal make install works just fine.
Modified:
head/math/matio/Makefile (contents, props changed)
Modified: head/math/matio/Makefile
==============================================================================
--- head/math/matio/Makefile Wed Dec 25 22:13:09 2013 (r337460)
+++ head/math/matio/Makefile Wed Dec 25 22:40:54 2013 (r337461)
@@ -3,6 +3,7 @@
PORTNAME= matio
PORTVERSION= 1.3.4
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= SF
@@ -10,55 +11,37 @@ MAINTAINER= ports at FreeBSD.org
COMMENT= Library for reading/writing Matlab files
GNU_CONFIGURE= yes
+USES= pathfix
USE_LDCONFIG= yes
-CFLAGS+= -fPIC
-
OPTIONS_DEFINE= FORTRAN
FORTRAN_DESC= Build Fortran bindings
-.include <bsd.port.options.mk>
+CONFIGURE_ARGS= --enable-shared
PLIST_FILES= include/matio.h \
include/matioConfig.h \
lib/libmatio.a \
lib/libmatio.la \
+ lib/libmatio.so \
lib/libmatio.so.1 \
libdata/pkgconfig/matio.pc
-.if ${PORT_OPTIONS:MFORTRAN}
-USE_FORTRAN= yes
+.include <bsd.port.options.mk>
-FFLAGS+= -fPIC
+.if ${PORT_OPTIONS:MFORTRAN}
+USES+= fortran
CONFIGURE_ARGS+= --enable-fortran
CONFIGURE_ENV+= FCFLAGS="${FFLAGS}"
PLIST_FILES+= include/matio.mod
-USES+= gmake
MAKE_JOBS_UNSAFE=yes
.endif
-post-build:
-.if !${PORT_OPTIONS:MFORTRAN}
- (cd ${WRKSRC}/src && ${CC} ${CFLAGS} -shared -o libmatio.so.1 snprintf.o \
- endian.o io.o inflate.o read_data.o mat5.o mat4.o mat.o)
-.else
- (cd ${WRKSRC}/src && ${CC} ${CFLAGS} -shared -o libmatio.so.1 snprintf.o \
- endian.o io.o inflate.o read_data.o mat5.o mat4.o mat.o matio_internal.o \
- matio.o)
-.endif
-
-do-install:
- ${INSTALL_DATA} ${WRKSRC}/src/.libs/libmatio.lai ${STAGEDIR}${PREFIX}/lib/libmatio.la
- ${INSTALL_DATA} ${WRKSRC}/src/.libs/libmatio.a ${STAGEDIR}${PREFIX}/lib
- ${INSTALL_DATA} ${WRKSRC}/src/matio.h ${STAGEDIR}${PREFIX}/include
- ${INSTALL_DATA} ${WRKSRC}/src/matioConfig.h ${STAGEDIR}${PREFIX}/include
- ${INSTALL_PROGRAM} ${WRKSRC}/src/libmatio.so.1 ${STAGEDIR}${PREFIX}/lib
- ${INSTALL_DATA} ${WRKSRC}/matio.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig
-.if ${PORT_OPTIONS:MFORTRAN}
- ${INSTALL_DATA} ${WRKSRC}/src/matio.mod ${STAGEDIR}${PREFIX}/include
-.endif
+post-patch:
+ @${REINPLACE_CMD} -e '/AM_LDFLAGS = /s/$$/ -version-info 1/' \
+ ${WRKSRC}/src/Makefile.in
.include <bsd.port.mk>
More information about the svn-ports-all
mailing list