mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
misc/astrolog: fix build with clang
- Fix build with clang - WITHOUT_X11 -> PORT_OPTIONS:MX11 - Use PORTDOCS instead of pkg-plist - Simplify docs install commands Approved by: culot / jpaetzel (mentors, implicit)
This commit is contained in:
parent
69dcd5f21d
commit
5102a3de12
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=320970
@ -28,19 +28,23 @@ EPHE= sweph_00.tar.gz:ephe sweph_06.tar.gz:ephe \
|
||||
swephm36.tar.gz:ephe swephm42.tar.gz:ephe \
|
||||
swephm48.tar.gz:ephe swephm54.tar.gz:ephe
|
||||
|
||||
.if !defined(WITHOUT_X11)
|
||||
USE_XORG= x11
|
||||
MAKE_ARGS= -DX11
|
||||
.endif
|
||||
DIST_SUBDIR= astrolog
|
||||
ALL_TARGET= astrolog
|
||||
MAKEFILE= makefile
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
DOCS= helpfile.540 readme.541 changes.txt
|
||||
PORTDOCS= helpfile.540 readme.541 changes.txt
|
||||
|
||||
OPTIONS_DEFINE= X11
|
||||
OPTIONS_DEFAULT=X11
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MX11}
|
||||
USE_XORG= x11
|
||||
MAKE_ARGS= -DX11
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
${RM} ${WRKDIR}/swe[a-z]*
|
||||
|
||||
@ -56,9 +60,7 @@ do-install:
|
||||
cd ${WRKSRC} && ${INSTALL_PROGRAM} astrolog ${PREFIX}/bin
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
.for doc in ${DOCS}
|
||||
${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
|
||||
.endfor
|
||||
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
|
||||
.endif
|
||||
@${ECHO_MSG}
|
||||
@${ECHO_MSG} "See the file ${PREFIX}/share/doc/astrolog/helpfile.540 for help"
|
||||
|
@ -1,15 +1,17 @@
|
||||
--- astrolog.c.orig 1998-12-23 23:29:03.000000000 +0300
|
||||
+++ astrolog.c 2007-06-26 15:44:04.000000000 +0400
|
||||
@@ -35,6 +35,7 @@
|
||||
** Last code change made 12/20/1998.
|
||||
diff --git astrolog.c astrolog.c
|
||||
index 5a26c68..8294d3e 100644
|
||||
--- astrolog.c
|
||||
+++ astrolog.c
|
||||
@@ -38,6 +38,7 @@
|
||||
** Modifications from version 5.40 to 5.41 are by Alois Treindl.
|
||||
*/
|
||||
|
||||
+#include <ctype.h>
|
||||
#include "astrolog.h"
|
||||
|
||||
|
||||
@@ -234,7 +235,7 @@
|
||||
char *pch = szLine;
|
||||
@@ -255,7 +256,7 @@ byte **argv;
|
||||
byte *pch = szLine;
|
||||
|
||||
/* Split the entered line up into its individual switch strings. */
|
||||
- while (*pch >= ' ' || *pch == chTab) {
|
||||
@ -17,7 +19,7 @@
|
||||
if (*pch == ' ' || *pch == chTab) {
|
||||
if (fSpace)
|
||||
/* Skip over the current run of spaces between strings. */
|
||||
@@ -1146,8 +1147,18 @@
|
||||
@@ -1470,8 +1471,18 @@ byte **argv;
|
||||
case 'z':
|
||||
if (ch1 == '0') {
|
||||
if (argc <= 1 || RParseSz(argv[1], pmZon) == rLarge) {
|
||||
@ -38,7 +40,7 @@
|
||||
SS = us.dstDef = i ? 1.0 : 0.0;
|
||||
} else {
|
||||
SS = us.dstDef = RParseSz(argv[1], pmZon);
|
||||
@@ -1232,13 +1243,39 @@
|
||||
@@ -1556,13 +1567,39 @@ byte **argv;
|
||||
return fFalse;
|
||||
}
|
||||
ciCore.nam = SzPersist(argv[1]);
|
||||
@ -81,3 +83,12 @@
|
||||
ZZ = us.zonDef = RParseSz(argv[1], pmZon);
|
||||
if (!FValidZon(us.zonDef)) {
|
||||
ErrorValR("z", us.zonDef);
|
||||
@@ -2213,7 +2250,7 @@ byte **argv;
|
||||
#ifdef SWITCHES
|
||||
void main(argc, argv)
|
||||
int argc;
|
||||
-byte **argv;
|
||||
+char **argv;
|
||||
{
|
||||
#else
|
||||
void main()
|
||||
|
@ -57,8 +57,4 @@ lib/astrolog/seplm36.se1
|
||||
lib/astrolog/seplm42.se1
|
||||
lib/astrolog/seplm48.se1
|
||||
lib/astrolog/seplm54.se1
|
||||
%%PORTDOCS%%%%DOCSDIR%%/changes.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/helpfile.540
|
||||
%%PORTDOCS%%%%DOCSDIR%%/readme.541
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
@dirrmtry lib/astrolog
|
||||
|
Loading…
Reference in New Issue
Block a user