astro/xephem: Update to 4.2.0

- Switch to DISTVERSION
- Move manpage to $PREFIX/share/man
- Take maintainership

ChangeLog: https://xephem.github.io/XEphem/Site/changes.html
This commit is contained in:
Nuno Teixeira 2024-02-17 16:28:32 +00:00
parent f4acbe24fb
commit de395fedbf
4 changed files with 18 additions and 60 deletions

View file

@ -1,37 +1,32 @@
PORTNAME= xephem
PORTVERSION= 4.1.0
PORTREVISION= 1
DISTVERSION= 4.2.0
CATEGORIES= astro
MAINTAINER= ports@FreeBSD.org
MAINTAINER= eduardo@FreeBSD.org
COMMENT= Interactive astronomical ephemeris program
WWW= http://www.clearskyinstitute.com/xephem/xephem.html
LICENSE= MIT
LICENSE_FILE= ${WRKDIR}/XEphem-${PORTVERSION}/LICENSE
LIB_DEPENDS= libpng.so:graphics/png \
libfontconfig.so:x11-fonts/fontconfig
USES= gmake groff jpeg motif tar:tgz ssl xorg
USE_XORG= xt xext xmu x11 xft
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libpng16.so:graphics/png
USES= gmake groff localbase:ldflags motif shebangfix ssl tar:tgz xorg
USE_GITHUB= yes
GH_PROJECT= XEphem
USE_XORG= x11 xext xft xmu xt
SHEBANG_GLOB= *.pl
MAKE_ARGS= CC=${CC}
LDFLAGS+= -lfontconfig
WRKSRC_SUBDIR= GUI/xephem
MAKE_JOBS_UNSAFE= yes
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
-e 's|/usr/X11R6|${LOCALBASE}|g' \
${WRKSRC}/Makefile
@${FIND} ${WRKSRC}/../.. -name Makefile -type f | \
${XARGS} ${REINPLACE_CMD} -e 's|CC = gcc|CC?= ${CC}|g ; \
s|CFLAGS =|CFLAGS+=|g ; \
${XARGS} ${REINPLACE_CMD} -e 's|CFLAGS =|CFLAGS+=|g ; \
s|CFLAGS=|CFLAGS+=|g ; \
s|LDFLAGS =|LDFLAGS+=|g ; \
s|-O2 ||g'
@ -39,14 +34,10 @@ pre-build:
@${ECHO_CMD} 'XEphem.ShareDir: ${PREFIX}/lib/X11/xephem' \
> ${WRKSRC}/XEphem.ad
pre-install:
@${FIND} ${WRKSRC}/../.. -name Makefile.bak -type f -delete
@${CP} ${WRKSRC}/xephem.man ${STAGEDIR}${PREFIX}/man/man1/xephem.1
@${FIND} ${WRKSRC} -name "*.pl" -exec ${SED} -i "" -e 's|/usr/bin/perl|/usr/local/bin/perl|' {} \;
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xephem ${STAGEDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/XEphem.ad ${STAGEDIR}${PREFIX}/lib/X11/app-defaults/XEphem
${INSTALL_MAN} ${WRKSRC}/xephem.man ${STAGEDIR}${PREFIX}/share/man/man1/xephem.1
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/X11/xephem
@cd ${WRKSRC}; ${COPYTREE_SHARE} \
"auxil catalogs fifos fits gallery help lo" \

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1651558430
SHA256 (xephem-XEphem-4.1.0_GH0.tar.gz) = 8ab3670e303bdf209a673d5e091d1cd6e4577a0574da26a3c3d6629825f98241
SIZE (xephem-XEphem-4.1.0_GH0.tar.gz) = 17213750
TIMESTAMP = 1708181054
SHA256 (xephem-XEphem-4.2.0_GH0.tar.gz) = 4d67b923e342e56b2a4a49f574e576fc183f1747edb693bab3709e83c8ad9c1b
SIZE (xephem-XEphem-4.2.0_GH0.tar.gz) = 17317398

View file

@ -1,39 +1,6 @@
--- Makefile.orig 2022-05-03 02:30:02 UTC
--- Makefile.orig 2024-02-13 14:35:36 UTC
+++ Makefile
@@ -22,18 +22,18 @@ MOTIFI = $(MOTIF)
MOTIFL = $(MOTIF)
endif
ifndef MOTIFI
-MOTIFI = /usr/include
+MOTIFI = %%LOCALBASE%%/include
endif
ifndef MOTIFL
-MOTIFL = /usr/lib
+MOTIFL = %%LOCALBASE%%/lib
endif
# for linux and Apple OS X
-CC = gcc
-CLDFLAGS = -g
-CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -Wall -I$(MOTIFI) -I/opt/X11/include
-LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L/opt/X11/lib
-XLIBS = -lXm -lXt -lXext -lXmu -lX11
+CC? = cc
+CLDFLAGS += -g
+CFLAGS += $(LIBINC) $(CLDFLAGS) -O2 -Wall -I$(MOTIFI) -I%%LOCALBASE%%/include
+LDFLAGS += $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L%%LOCALBASE%%/lib
+XLIBS = -lXm -lXt -lXext -lXmu -lX11 -lXft
LIBS = $(XLIBS) $(LIBLIB) -lm -lssl
# static linking on Apple using X11 libs from ports
@@ -188,18 +188,18 @@ OBJS = \
all: libs xephem xephem.1
xephem: $(INCS) $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
xephem.1: xephem.man
@@ -201,12 +201,12 @@ libs:
nroff -man $? > $@
libs:

View file

@ -170,4 +170,4 @@ lib/X11/xephem/help/png/valid-html401.png
lib/X11/xephem/help/png/wcssolver.png
lib/X11/xephem/help/xephem.html
lib/X11/xephem/lo/lodb.xml
man/man1/xephem.1.gz
share/man/man1/xephem.1.gz