From 5102a3de12fafef8724b2039be0734692b441b91 Mon Sep 17 00:00:00 2001 From: William Grzybowski Date: Fri, 14 Jun 2013 22:22:51 +0000 Subject: [PATCH] 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) --- misc/astrolog/Makefile | 18 ++++++++++-------- misc/astrolog/files/patch-ac | 27 +++++++++++++++++++-------- misc/astrolog/pkg-plist | 4 ---- 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/misc/astrolog/Makefile b/misc/astrolog/Makefile index 05799dfc3b0b..8b52416dcf08 100644 --- a/misc/astrolog/Makefile +++ b/misc/astrolog/Makefile @@ -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 +.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" diff --git a/misc/astrolog/files/patch-ac b/misc/astrolog/files/patch-ac index 48b0f839bf0e..d0fec280a4c3 100644 --- a/misc/astrolog/files/patch-ac +++ b/misc/astrolog/files/patch-ac @@ -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 #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() diff --git a/misc/astrolog/pkg-plist b/misc/astrolog/pkg-plist index a43edfb771d2..e4810eaefc6c 100644 --- a/misc/astrolog/pkg-plist +++ b/misc/astrolog/pkg-plist @@ -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