Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jun 2013 22:22:52 +0000 (UTC)
From:      William Grzybowski <wg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r320970 - in head/misc/astrolog: . files
Message-ID:  <201306142222.r5EMMq4v000377@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wg
Date: Fri Jun 14 22:22:51 2013
New Revision: 320970
URL: http://svnweb.freebsd.org/changeset/ports/320970

Log:
  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)

Modified:
  head/misc/astrolog/Makefile
  head/misc/astrolog/files/patch-ac
  head/misc/astrolog/pkg-plist

Modified: head/misc/astrolog/Makefile
==============================================================================
--- head/misc/astrolog/Makefile	Fri Jun 14 22:22:31 2013	(r320969)
+++ head/misc/astrolog/Makefile	Fri Jun 14 22:22:51 2013	(r320970)
@@ -28,19 +28,23 @@ EPHE=		sweph_00.tar.gz:ephe sweph_06.tar
 		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"

Modified: head/misc/astrolog/files/patch-ac
==============================================================================
--- head/misc/astrolog/files/patch-ac	Fri Jun 14 22:22:31 2013	(r320969)
+++ head/misc/astrolog/files/patch-ac	Fri Jun 14 22:22:51 2013	(r320970)
@@ -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()

Modified: head/misc/astrolog/pkg-plist
==============================================================================
--- head/misc/astrolog/pkg-plist	Fri Jun 14 22:22:31 2013	(r320969)
+++ head/misc/astrolog/pkg-plist	Fri Jun 14 22:22:51 2013	(r320970)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306142222.r5EMMq4v000377>