git: 62a530d3162e - main - astro/cfitsio: Simplify Makefile

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 07 Mar 2022 18:16:14 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=62a530d3162e2dc0e95c318a8ed77712e40bc869

commit 62a530d3162e2dc0e95c318a8ed77712e40bc869
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-03-07 17:50:09 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-03-07 18:10:54 +0000

    astro/cfitsio: Simplify Makefile
    
    - Use hard-coded shlib version
      It helps remind maintainer to bump PORTREVISION of dependent ports.
---
 astro/cfitsio/Makefile  | 13 ++++---------
 astro/cfitsio/pkg-plist |  4 ++--
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/astro/cfitsio/Makefile b/astro/cfitsio/Makefile
index 79e59239f022..9f2daa893f1f 100644
--- a/astro/cfitsio/Makefile
+++ b/astro/cfitsio/Makefile
@@ -22,14 +22,9 @@ CONFIGURE_ARGS=	ac_cv_prog_FC=f2c
 GNU_CONFIGURE=	yes
 USE_LDCONFIG=	yes
 
-PLIST_SUB=	SHLIB_MAJOR=${SHLIB_MAJOR} \
-		SHLIB_MINOR=${SHLIB_MINOR}
-
+PLIST_SUB=	PORTVERSION=${PORTVERSION}
 CPE_VENDOR=	nasa
 
-SHLIB_MAJOR=	9
-SHLIB_MINOR=	${PORTVERSION}
-
 OPTIONS_DEFINE=	DOCS
 
 post-patch:
@@ -38,10 +33,10 @@ post-patch:
 do-install:
 	cd ${WRKSRC}/ && ${INSTALL_DATA} drvrsmem.h fitsio.h fitsio2.h longnam.h ${STAGEDIR}${PREFIX}/include/
 	${INSTALL_DATA} ${WRKSRC}/libcfitsio.a ${STAGEDIR}${PREFIX}/lib/
-	${INSTALL_LIB} ${WRKSRC}/libcfitsio.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${STAGEDIR}${PREFIX}/lib/
+	${INSTALL_LIB} ${WRKSRC}/libcfitsio.so.9.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/
 	${INSTALL_DATA} ${WRKSRC}/cfitsio.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/
-	${LN} -fs libcfitsio.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${STAGEDIR}${PREFIX}/lib/libcfitsio.so.${SHLIB_MAJOR}
-	${LN} -fs libcfitsio.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${STAGEDIR}${PREFIX}/lib/libcfitsio.so
+	${LN} -fs libcfitsio.so.9.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libcfitsio.so.9
+	${LN} -fs libcfitsio.so.9.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libcfitsio.so
 
 do-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}/
diff --git a/astro/cfitsio/pkg-plist b/astro/cfitsio/pkg-plist
index f8ee6e6117a9..c91dfcd3843b 100644
--- a/astro/cfitsio/pkg-plist
+++ b/astro/cfitsio/pkg-plist
@@ -4,8 +4,8 @@ include/fitsio2.h
 include/longnam.h
 lib/libcfitsio.a
 lib/libcfitsio.so
-lib/libcfitsio.so.%%SHLIB_MAJOR%%
-lib/libcfitsio.so.%%SHLIB_MAJOR%%.%%SHLIB_MINOR%%
+lib/libcfitsio.so.9
+lib/libcfitsio.so.9.%%PORTVERSION%%
 libdata/pkgconfig/cfitsio.pc
 %%PORTDOCS%%%%DOCSDIR%%/cfortran.doc
 %%PORTDOCS%%%%DOCSDIR%%/fitsio.doc