Index: head/astro/xephem/Makefile =================================================================== --- head/astro/xephem/Makefile (revision 496693) +++ head/astro/xephem/Makefile (revision 496694) @@ -1,64 +1,67 @@ # Created by: erich@FreeBSD.org # $FreeBSD$ PORTNAME= xephem PORTVERSION= 3.7.7 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= astro MASTER_SITES= http://www.clearskyinstitute.com/xephem/ MAINTAINER= jpaetzel@FreeBSD.org COMMENT= Interactive astronomical ephemeris program LIB_DEPENDS= libpng.so:graphics/png \ libfontconfig.so:x11-fonts/fontconfig -USES= gmake groff jpeg motif tar:tgz -LDFLAGS+= -lfontconfig +USES= gmake groff jpeg motif tar:tgz ssl USE_XORG= xp xt xext xmu x11 xft + +LDFLAGS+= -lfontconfig + MAKE_JOBS_UNSAFE= yes WRKSRC= ${WRKDIR}/${DISTNAME}/GUI/xephem RESTRICTED= Personal use only # XXX needs to be the same as DISTFILES XEPHEMSRC= ${PORTNAME}-${PORTVERSION}.tgz .include .for file in ${XEPHEMSRC} .if !exists(${DISTDIR}/${file}) IGNORE= because of licensing restrictions, you must manually fetch ${file}\ from http://www.clearskyinstitute.com/xephem/,\ place it in ${DISTDIR} and then run make again .endif .endfor 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 ; \ s|LDFLAGS =|LDFLAGS+=|g ; \ s|-O2 ||g' 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 @${MKDIR} ${STAGEDIR}${PREFIX}/lib/X11/xephem @cd ${WRKSRC}; ${COPYTREE_SHARE} \ "auxil catalogs fifos fits gallery help lo" \ ${STAGEDIR}${PREFIX}/lib/X11/xephem .include Index: head/astro/xephem/files/patch-Makefile =================================================================== --- head/astro/xephem/files/patch-Makefile (revision 496693) +++ head/astro/xephem/files/patch-Makefile (revision 496694) @@ -1,52 +1,141 @@ ---- Makefile.orig 2015-09-14 09:37:09.737810488 -0500 -+++ Makefile 2015-09-14 09:45:54.470774555 -0500 -@@ -23,18 +23,18 @@ +--- Makefile.orig 2015-08-09 21:36:50 UTC ++++ Makefile +@@ -23,44 +23,44 @@ MOTIFI = $(MOTIF) MOTIFL = $(MOTIF) endif ifndef MOTIFI -MOTIFI = /usr/include -+MOTIFI = %%LOCALBASE%%/include ++MOTIFI = /usr/local/include endif ifndef MOTIFL -MOTIFL = /usr/lib +MOTIFL = %%/LOCALBASE%%/lib endif # for linux and Apple OS X - CC = gcc - CLDFLAGS = -g +-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 -lXp -lXt -lXext -lXmu -lX11 -+CFLAGS = $(LIBINC) $(CLDFLAGS) -Wall -I$(MOTIFI) -I%%LOCALBASE%%/include -+LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L%%LOCALBASE%%/lib +-LIBS = $(XLIBS) $(LIBLIB) -lm ++CC?= cc ++CLDFLAGS+= -g ++CFLAGS+= $(LIBINC) $(CLDFLAGS) -Wall -I$(MOTIFI) -I/usr/local/include ++LDFLAGS+= $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L/usr/local/lib +XLIBS = -lXm -lXp -lXt -lXext -lXmu -lX11 -lXft - LIBS = $(XLIBS) $(LIBLIB) -lm ++LIBS = $(XLIBS) $(LIBLIB) -lm -lssl # static linking on Apple using X11 libs from ports -@@ -189,18 +189,18 @@ +-# CC = gcc ++# CC?= cc + # OLI = /opt/local/include + # OLL = /opt/local/lib +-# CLDFLAGS = -g +-# CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -Wall -I$(MOTIFI) -I$(OLI) +-# LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L$(OLL) ++# CLDFLAGS+= -g ++# CFLAGS+= $(LIBINC) $(CLDFLAGS) -Wall -I$(MOTIFI) -I$(OLI) ++# LDFLAGS+= $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L$(OLL) + # XLIBS = -lXm $(OLL)/libXp.a $(OLL)/libXt.a $(OLL)/libSM.a $(OLL)/libICE.a $(OLL)/libXext.a $(OLL)/libXmu.a $(OLL)/libX11.a $(OLL)/libxcb.a $(OLL)/libXau.a $(OLL)/libXdmcp.a + # LIBS = $(XLIBS) $(LIBLIB) -lm + + # for ppc Apple OS X to make universal (i386 and ppc binary), requires + # Xcode 2.2, /Developers/SDK/MacOSX10.4u.sdk and all libs, including libXm, + # built similarly +-# CLDFLAGS = -arch i386 -arch ppc +-# CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -Wall -isysroot /Developer/SDKs/MacOSX10.4u.sdk -I$(MOTIFI) -I/usr/X11R6/include +-# LDFLAGS = $(LIBLNK) $(CLDFLAGS) -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -L$(MOTIFL) -L/usr/X11R6/lib ++# CLDFLAGS+= -arch i386 -arch ppc ++# CFLAGS+= $(LIBINC) $(CLDFLAGS) -Wall -isysroot /Developer/SDKs/MacOSX10.4u.sdk -I$(MOTIFI) -I/usr/local/include ++# LDFLAGS+= $(LIBLNK) $(CLDFLAGS) -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -L$(MOTIFL) -L/usr/local/lib + + # MKS Enterprise toolkit + # MOTIFI = -I/usr/include + # MOTIFL = -L/usr/lib + # CC = cc +-# CLDFLAGS = +-# CFLAGS = $(LIBINC) $(CLDFLAGS) -O -I$(MOTIFI) +-# LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -W/subsystem:windows -s ++# CLDFLAGS+= ++# CFLAGS+= $(LIBINC) $(CLDFLAGS) -O -I$(MOTIFI) ++# LDFLAGS+= $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -W/subsystem:windows -s + # XLIBS = -lXm -lXt -lX11 + # LIBS = $(XLIBS) $(LIBLIB) -lm + +@@ -68,9 +68,9 @@ LIBS = $(XLIBS) $(LIBLIB) -lm + # MOTIFI = -I/usr/include + # MOTIFL = -L/usr/lib + # CC = cc +-# CLDFLAGS = +-# CFLAGS = $(LIBINC) $(CLDFLAGS) -O -I$(MOTIFI) +-# LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) ++# CLDFLAGS+= ++# CFLAGS+= $(LIBINC) $(CLDFLAGS) -O -I$(MOTIFI) ++# LDFLAGS+= $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) + # XLIBS = -lXm -lXt -lX11 + # LIBS = $(XLIBS) $(LIBLIB) -lsocket -lnsl -lc -lm /usr/ucblib/libucb.a + # Note: if you get regex undefined, add -lgen to the end of LIBS. +@@ -81,9 +81,9 @@ LIBS = $(XLIBS) $(LIBLIB) -lm + # MOTIFI = -I/usr/dt/include + # MOTIFL = -L/usr/dt/lib -R/usr/dt/lib + # CC = cc +-# CLDFLAGS = +-# CFLAGS = $(LIBINC) $(CLDFLAGS) -O -I$(MOTIFI) -I/usr/openwin/include +-# LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L/usr/openwin/lib ++# CLDFLAGS+= ++# CFLAGS+= $(LIBINC) $(CLDFLAGS) -O -I$(MOTIFI) -I/usr/openwin/include ++# LDFLAGS+= $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L/usr/openwin/lib + # XLIBS = -lXm -lXt -lX11 + # LIBS = $(XLIBS) $(LIBLIB) -lm -lsocket -lnsl + +@@ -91,17 +91,17 @@ LIBS = $(XLIBS) $(LIBLIB) -lm + # MOTIFI = -I/usr/include + # MOTIFL = -L/usr/lib + # CC = cc +-# CLDFLAGS = +-# CFLAGS = $(LIBINC) $(CLDFLAGS) -Aa -fast -I$(MOTIFI) +-# LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) ++# CLDFLAGS+= ++# CFLAGS+= $(LIBINC) $(CLDFLAGS) -Aa -fast -I$(MOTIFI) ++# LDFLAGS+= $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) + + # AIX + # MOTIFI = -I/usr/include + # MOTIFL = -L/usr/lib + # CC = xlc +-# CLDFLAGS = +-# CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -qlanglvl=ansi -qarch=com -qmaxmem=16384 -I$(MOTIFI) +-# LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) ++# CLDFLAGS+= ++# CFLAGS+= $(LIBINC) $(CLDFLAGS) -qlanglvl=ansi -qarch=com -qmaxmem=16384 -I$(MOTIFI) ++# LDFLAGS+= $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) + + .PRECIOUS: xephem + +@@ -189,18 +189,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 nroff -man $? > $@ libs: - cd ../../libastro; make - cd ../../libip; make - cd ../../libjpegd; make - cd ../../liblilxml; make - cd ../../libpng; make - cd ../../libz; make + cd ../../libastro; $(MAKE) + cd ../../libip; $(MAKE) + cd ../../libjpegd; $(MAKE) + cd ../../liblilxml; $(MAKE) + cd ../../libpng; $(MAKE) + cd ../../libz; $(MAKE) clean: rm -fr *.o ../../lib*/*.[ao] Index: head/astro/xephem/files/patch-auxil_mpcorb2edb.pl =================================================================== --- head/astro/xephem/files/patch-auxil_mpcorb2edb.pl (nonexistent) +++ head/astro/xephem/files/patch-auxil_mpcorb2edb.pl (revision 496694) @@ -0,0 +1,11 @@ +--- auxil/mpcorb2edb.pl.orig 2014-07-11 02:46:35 UTC ++++ auxil/mpcorb2edb.pl +@@ -78,7 +78,7 @@ EOF + # setup cutoff mag + my $dimmag = 13; # dimmest mag to be saved in "bright" file + # set site and file in case of -f +-my $MPCSITE = "http://www.minorplanetcenter.net"; ++my $MPCSITE = "https://www.minorplanetcenter.net"; + my $MPCFTPDIR = "/iau/MPCORB"; + my $MPCFILE = "MPCORB.DAT"; + my $MPCZIPFILE = "MPCORB.DAT.gz"; Property changes on: head/astro/xephem/files/patch-auxil_mpcorb2edb.pl ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/astro/xephem/files/patch-earthmenu.c =================================================================== --- head/astro/xephem/files/patch-earthmenu.c (nonexistent) +++ head/astro/xephem/files/patch-earthmenu.c (revision 496694) @@ -0,0 +1,81 @@ +--- earthmenu.c.orig 2012-11-23 04:15:39 UTC ++++ earthmenu.c +@@ -4886,8 +4886,11 @@ e_getwxgif() + int nrawgif; + char buf[1024]; + int w, h; ++ XE_SSL_FD ssl_fd; + int fd; + ++ memset(&ssl_fd, 0, sizeof(ssl_fd)); ++ + /* open test case, else real network */ + fd = openh ("/tmp/latest_cmoll.gif", O_RDONLY); + if (fd >= 0) { +@@ -4902,12 +4905,12 @@ e_getwxgif() + stopd_up(); + + /* make connection to server for the file */ +- xe_msg (0, "Getting\nhttp://%s%s", wxhost, wxfile); +- (void) sprintf (buf, "GET http://%s%s HTTP/1.0\r\nUser-Agent: xephem/%s\r\n\r\n", +- wxhost, wxfile, PATCHLEVEL); +- fd = httpGET (wxhost, buf, buf); ++ xe_msg (0, "Getting\nhttps://%s%s", wxhost, wxfile); ++ (void) sprintf (buf, "GET %s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\nUser-Agent: xephem/%s\r\n\r\n", ++ wxfile, wxhost, PATCHLEVEL); ++ fd = httpsGET (wxhost, buf, buf, &ssl_fd); + if (fd < 0) { +- xe_msg (1, "http get:\n%s", buf); ++ xe_msg (1, "https get:\n%s", buf); + stopd_down(); + return (-1); + } +@@ -4915,7 +4918,7 @@ e_getwxgif() + /* read header, looking for some header info */ + isgif = 0; + length = 0; +- while (recvline (fd, buf, sizeof(buf)) > 1) { ++ while (ssl_recvline (&ssl_fd, buf, sizeof(buf)) > 1) { + xe_msg (0, "Rcv: %s", buf); + if (strstr (buf, "image/gif")) + isgif = 1; +@@ -4923,9 +4926,10 @@ e_getwxgif() + length = atoi (buf+15); + } + if (!isgif) { +- while (recvline (fd, buf, sizeof(buf)) > 1) ++ while (ssl_recvline (&ssl_fd, buf, sizeof(buf)) > 1) + xe_msg (0, "Rcv: %s", buf); +- close (fd); ++ SSL_free (ssl_fd.ssl); ++ close (ssl_fd.fd); + stopd_down(); + return (-1); + } +@@ -4936,12 +4940,13 @@ e_getwxgif() + pm_up(); + for (nrawgif = 0; nrawgif < sizeof(rawgif); nrawgif += nr) { + pm_set (100*nrawgif/length); +- nr = readbytes (fd, rawgif+nrawgif, 4096); ++ nr = SSL_read (ssl_fd.ssl, rawgif+nrawgif, 4096); + if (nr < 0) { +- xe_msg (1, "%s:\n%s", wxhost, syserrstr()); ++ xe_msg (1, "%s: ssl read error code: %d", wxhost, SSL_get_error(ssl_fd.ssl, nr)); + stopd_down(); + pm_down(); +- close (fd); ++ SSL_free (ssl_fd.ssl); ++ close (ssl_fd.fd); + return (-1); + } + if (nr == 0) +@@ -4949,7 +4954,8 @@ e_getwxgif() + } + stopd_down(); + pm_down(); +- close (fd); ++ SSL_free (ssl_fd.ssl); ++ close (ssl_fd.fd); + if (nr > 0) { + xe_msg (1, "File too large"); + return (-1); Property changes on: head/astro/xephem/files/patch-earthmenu.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/astro/xephem/files/patch-fallbacks.c =================================================================== --- head/astro/xephem/files/patch-fallbacks.c (nonexistent) +++ head/astro/xephem/files/patch-fallbacks.c (revision 496694) @@ -0,0 +1,17 @@ +--- fallbacks.c.orig 2015-04-09 00:20:19 UTC ++++ fallbacks.c +@@ -747,10 +747,10 @@ String fallbacks[] = { + "XEphem*WebDB*URL1.value: http://celestrak.com/NORAD/elements/science.txt", + "XEphem*WebDB*URL2.value: http://celestrak.com/NORAD/elements/tle-new.txt", + "XEphem*WebDB*URL3.value: http://celestrak.com/NORAD/elements/amateur.txt", +- "XEphem*WebDB*URL4.value: http://www.minorplanetcenter.org/iau/Ephemerides/Comets/Soft03Cmt.txt", +- "XEphem*WebDB*URL5.value: http://www.minorplanetcenter.org/iau/Ephemerides/CritList/Soft03CritList.txt", +- "XEphem*WebDB*URL6.value: http://www.minorplanetcenter.org/iau/Ephemerides/Distant/Soft03Distant.txt", +- "XEphem*WebDB*URL7.value: http://www.minorplanetcenter.org/iau/Ephemerides/Unusual/Soft03Unusual.txt", ++ "XEphem*WebDB*URL4.value: https://www.minorplanetcenter.org/iau/Ephemerides/Comets/Soft03Cmt.txt", ++ "XEphem*WebDB*URL5.value: https://www.minorplanetcenter.org/iau/Ephemerides/CritList/Soft03CritList.txt", ++ "XEphem*WebDB*URL6.value: https://www.minorplanetcenter.org/iau/Ephemerides/Distant/Soft03Distant.txt", ++ "XEphem*WebDB*URL7.value: https://www.minorplanetcenter.org/iau/Ephemerides/Unusual/Soft03Unusual.txt", + "XEphem*WebDB.x: 200", + "XEphem*WebDB.y: 200", + "XEphem*WeekStart.Monday.set: False", Property changes on: head/astro/xephem/files/patch-fallbacks.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/astro/xephem/files/patch-net.h =================================================================== --- head/astro/xephem/files/patch-net.h (nonexistent) +++ head/astro/xephem/files/patch-net.h (revision 496694) @@ -0,0 +1,30 @@ +--- net.h.orig 2005-03-20 11:04:50 UTC ++++ net.h +@@ -20,6 +20,13 @@ + #include + #endif + ++#include ++ ++typedef struct { ++ int fd; //file desciptor for the underlying connection socket ++ SSL *ssl; //ssl connection for use with SSL_read( )and SSL_write() ++} XE_SSL_FD; ++ + /* support functions */ + + extern int httpGET (char *host, char *GETcmd, char msg[]); +@@ -29,8 +36,11 @@ extern int readbytes (int fd, unsigned char buf[], int + extern int recvline (int fd, char buf[], int max); + extern int recvlineb (int sock, char *buf, int size); + extern int sendbytes (int fd, unsigned char buf[], int n); +- +- ++extern int httpsGET (char *host, char *GETcmd, char msg[], XE_SSL_FD *ssl_fd); ++extern int ssl_recvbytes (XE_SSL_FD *ssl_fd, unsigned char buf[], int n); ++extern int ssl_readbytes (XE_SSL_FD *ssl_fd, unsigned char buf[], int n); ++extern int ssl_recvline (XE_SSL_FD *ssl_fd, char buf[], int max); ++extern int ssl_recvlineb (XE_SSL_FD *ssl_fd, char *buf, int size); + + /* For RCS Only -- Do Not Edit + * @(#) $RCSfile: net.h,v $ $Date: 2003/03/17 07:26:21 $ $Revision: 1.3 $ $Name: $ Property changes on: head/astro/xephem/files/patch-net.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/astro/xephem/files/patch-sunmenu.c =================================================================== --- head/astro/xephem/files/patch-sunmenu.c (nonexistent) +++ head/astro/xephem/files/patch-sunmenu.c (revision 496694) @@ -0,0 +1,87 @@ +--- sunmenu.c.orig 2012-04-01 22:38:50 UTC ++++ sunmenu.c +@@ -884,9 +884,11 @@ readSOHOImage() + int isjpeg, jpegl; + int njpeg; + unsigned char *jpeg; ++ XE_SSL_FD ssl_fd; + int fd, nr; + struct tm tm; + ++ memset(&ssl_fd, 0, sizeof(ssl_fd)); + memset(&tm, 0, sizeof(struct tm)); + + /* get desired type and size */ +@@ -899,18 +901,18 @@ readSOHOImage() + + /* build GET command */ + sprintf (get, "GET http://%s%s HTTP/1.0\r\nUser-Agent: xephem/%s\r\n\r\n", sohohost, fn, PATCHLEVEL); +- ++ + /* query server */ +- fd = httpGET (sohohost, get, buf); ++ fd = httpsGET (sohohost, get, buf, &ssl_fd); + if (fd < 0) { +- xe_msg (1, "http get: %s", buf); ++ xe_msg (1, "https get: %s", buf); + return (-1); + } + + /* read header (everything to first blank line), looking for jpeg */ + isjpeg = 0; + jpegl = 0; +- while (recvline (fd, buf, sizeof(buf)) > 1) { ++ while (ssl_recvline (&ssl_fd, buf, sizeof(buf)) > 1) { + xe_msg (0, "Rcv: %s", buf); + if (strstr (buf, "Content-Type:") && strstr (buf, "image/jpeg")) + isjpeg = 1; +@@ -923,15 +925,17 @@ readSOHOImage() + } + } + if (!isjpeg) { +- while (recvline (fd, buf, sizeof(buf)) > 0) ++ while (ssl_recvline (&ssl_fd, buf, sizeof(buf)) > 0) + xe_msg (0, "Rcv: %s", buf); + xe_msg (1, "Error talking to SOHO .. see File->System log\n"); +- close (fd); ++ SSL_free (ssl_fd.ssl); ++ close (ssl_fd.fd); + return (-1); + } + if (jpegl == 0) { + xe_msg (1, "No Content-Length in header"); +- close (fd); ++ SSL_free (ssl_fd.ssl); ++ close (ssl_fd.fd); + return (-1); + } + +@@ -941,20 +945,22 @@ readSOHOImage() + for (njpeg = 0; njpeg < jpegl; njpeg += nr) { + pm_set (100*njpeg/jpegl); + jpeg = (unsigned char *) XtRealloc ((char*)jpeg, njpeg+NSREAD); +- nr = readbytes (fd, jpeg+njpeg, NSREAD); +- if (nr < 0) { +- xe_msg (1, "%s:\n%s", sohohost, syserrstr()); ++ nr = SSL_read (ssl_fd.ssl, jpeg+njpeg, NSREAD); ++ if (nr <= 0) { ++ xe_msg (1, "%s: ssl read error code: %d", sohohost, SSL_get_error(ssl_fd.ssl, nr)); + pm_down(); +- close (fd); ++ SSL_free (ssl_fd.ssl); ++ close (ssl_fd.fd); + return (-1); + } + if (nr == 0) + break; + } + pm_down(); +- close (fd); ++ SSL_free (ssl_fd.ssl); ++ close (ssl_fd.fd); + +- sprintf (fn, "/%s_%s.jpg", filetime, filetype); ++ sprintf (fn, "/%s_%s.jpg", filetime, filetype); + /* display jpeg */ + if (displayPic (fn, jpeg, njpeg) < 0) + return (-1); Property changes on: head/astro/xephem/files/patch-sunmenu.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/astro/xephem/files/patch-usno.c =================================================================== --- head/astro/xephem/files/patch-usno.c (nonexistent) +++ head/astro/xephem/files/patch-usno.c (revision 496694) @@ -0,0 +1,49 @@ +--- usno.c.orig 2005-03-20 11:04:51 UTC ++++ usno.c +@@ -14,8 +14,8 @@ + #define CATBPR 12 /* bytes per star record in .cat file */ + #define ACCBPR 30 /* bytes per record in .acc file */ + +-typedef unsigned int UI; +-typedef unsigned char UC; ++typedef unsigned int XE_UI; ++typedef unsigned char XE_UC; + + /* One Field star */ + typedef struct { +@@ -36,7 +36,7 @@ static int corner (double r0, double d0, double rov, i + double lr[2], int *nd, double fd[2], double ld[2], int zone[2], char msg[]); + static int fetchSwath (int zone, double maxmag, double fr, double lr, + double fd, double ld, StarArray *sap, char msg[]); +-static int crackCatBuf (UC buf[CATBPR], FieldStar *fsp); ++static int crackCatBuf (XE_UC buf[CATBPR], FieldStar *fsp); + static int addGS (StarArray *sap, FieldStar *fsp); + + static char *cdpath; /* where CD rom is mounted */ +@@ -236,7 +236,7 @@ double ld, StarArray *sap, char msg[]) + { + char fn[1024]; + char buf[ACCBPR]; +- UC catbuf[CATBPR]; ++ XE_UC catbuf[CATBPR]; + FieldStar fs; + long frec; + long os; +@@ -314,13 +314,13 @@ double ld, StarArray *sap, char msg[]) + * return 0 if ok, else -1. + */ + static int +-crackCatBuf (UC buf[CATBPR], FieldStar *fsp) ++crackCatBuf (XE_UC buf[CATBPR], FieldStar *fsp) + { +-#define BEUPACK(b) (((UI)((b)[0])<<24) | ((UI)((b)[1])<<16) | ((UI)((b)[2])<<8)\ +- | ((UI)((b)[3]))) ++#define BEUPACK(b) (((XE_UI)((b)[0])<<24) | ((XE_UI)((b)[1])<<16) | ((XE_UI)((b)[2])<<8)\ ++ | ((XE_UI)((b)[3]))) + double ra, dec; + int red, blu; +- UI mag; ++ XE_UI mag; + + /* first 4 bytes are packed RA, big-endian */ + ra = BEUPACK(buf)/(100.0*3600.0*15.0); Property changes on: head/astro/xephem/files/patch-usno.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/astro/xephem/files/patch-webdbmenu.c =================================================================== --- head/astro/xephem/files/patch-webdbmenu.c (nonexistent) +++ head/astro/xephem/files/patch-webdbmenu.c (revision 496694) @@ -0,0 +1,104 @@ +--- webdbmenu.c.orig 2012-11-23 05:22:09 UTC ++++ webdbmenu.c +@@ -404,6 +404,10 @@ getURL (url) + char *url; + { + static char http[] = "http://"; ++ static char https[] = "https://"; ++ char *transport = http; ++ int ltransport = strlen (transport); ++ int ishttp = 0; + char buf[512], msg[1024]; + char l0[512], l1[512], l2[512]; + char *l0p = l0, *l1p = l1, *l2p = l2; +@@ -411,21 +415,31 @@ char *url; + char *slash, *dot; + char filename[256]; + FILE *fp; ++ XE_SSL_FD ssl_fd; + int sockfd; + int nfound; + ++ memset(&ssl_fd, 0, sizeof(ssl_fd)); ++ + /* start */ + watch_cursor(1); + l0[0] = l1[0] = l2[0] = '\0'; + + /* find transport and host */ +- if (strncmp (url, http, 7)) { +- xe_msg (1, "URL must begin with %s", http); ++ if (!strncmp (url, transport, ltransport)) { ++ ishttp = 1; ++ } else { ++ transport = https; ++ ltransport = strlen (transport); ++ } ++ ++ if ((!ishttp) && (strncmp (url, transport, ltransport))) { ++ xe_msg (1, "URL must begin with %s or %s", http, https); + watch_cursor (0); + return; + } + +- slash = strchr (url+7, '/'); ++ slash = strchr (url+ltransport, '/'); + dot = strrchr (url, '.'); + if (!slash || !dot) { + xe_msg (1, "Badly formed URL"); +@@ -434,11 +448,16 @@ char *url; + } + + /* connect to check url */ +- sprintf (host, "%.*s", (int)(slash-url-7), url+7); ++ sprintf (host, "%.*s", (int)(slash-url-ltransport), url+ltransport); + sprintf (buf, "GET %s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\nUser-Agent: xephem/%s\r\n\r\n", + url, host, PATCHLEVEL); + stopd_up(); +- sockfd = httpGET (host, buf, msg); ++ if (ishttp) { ++ sockfd = httpGET (host, buf, msg); ++ ssl_fd.fd = sockfd; ++ } else { ++ sockfd = httpsGET (host, buf, msg, &ssl_fd); ++ } + if (sockfd < 0) { + xe_msg (1, "http GET to %s failed: %s%s\n", host, buf, msg); + stopd_down(); +@@ -447,20 +466,22 @@ char *url; + } + + /* create local file */ +- slash = strrchr (url+7, '/'); ++ slash = strrchr (url+ltransport, '/'); + sprintf (filename, "%s/%.*sedb", getPrivateDir(), (int)(dot-slash), slash+1); + fp = fopen (filename, "w"); + if (!fp) { + xe_msg (1, "%s:\n%s", filename, syserrstr()); + watch_cursor (0); +- close (sockfd); ++ if (!ishttp) ++ SSL_free (ssl_fd.ssl); ++ close (ssl_fd.fd); + return; + } + + /* copy to file, insuring only .edb lines. + */ + nfound = 0; +- while (recvlineb (sockfd, l2p, sizeof(l2)) > 0) { ++ while (ssl_recvlineb (&ssl_fd, l2p, sizeof(l2)) > 0) { + char *lrot; + Obj o; + +@@ -484,7 +505,9 @@ char *url; + + /* tidy up and done */ + fclose (fp); +- close (sockfd); ++ if (!ishttp) ++ SSL_free (ssl_fd.ssl); ++ close (ssl_fd.fd); + if (!nfound) { + xe_msg (1, "No objects in file"); + remove (filename); Property changes on: head/astro/xephem/files/patch-webdbmenu.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/astro/xephem/files/patch-xephem.h =================================================================== --- head/astro/xephem/files/patch-xephem.h (nonexistent) +++ head/astro/xephem/files/patch-xephem.h (revision 496694) @@ -0,0 +1,16 @@ +--- xephem.h.orig 2012-12-30 17:01:12 UTC ++++ xephem.h +@@ -12,12 +12,12 @@ + + #include /* be kind to those who don't use xe_msg() */ + ++#include "net.h" /* has to be included before astro.h because of openssl */ + #include "astro.h" + #include "ip.h" + + /* local glue files */ + #include "map.h" +-#include "net.h" + #include "patchlevel.h" + #include "preferences.h" + #include "db.h" Property changes on: head/astro/xephem/files/patch-xephem.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/astro/xephem/pkg-plist =================================================================== --- head/astro/xephem/pkg-plist (revision 496693) +++ head/astro/xephem/pkg-plist (revision 496694) @@ -1,171 +1,171 @@ bin/xephem lib/X11/app-defaults/XEphem lib/X11/xephem/auxil/HAReyfigs.csf lib/X11/xephem/auxil/README lib/X11/xephem/auxil/SOHO_512_20090703_1900_eit_171.gif lib/X11/xephem/auxil/analemma.plt lib/X11/xephem/auxil/annotation.ano -lib/X11/xephem/auxil/astorb2edb.pl +@(,,0755) lib/X11/xephem/auxil/astorb2edb.pl lib/X11/xephem/auxil/classicfigs.csf lib/X11/xephem/auxil/dearth.gif lib/X11/xephem/auxil/favorites.fav lib/X11/xephem/auxil/jupiter.1020 lib/X11/xephem/auxil/jupiter.9910 lib/X11/xephem/auxil/jupitermap.gif lib/X11/xephem/auxil/logo.gif lib/X11/xephem/auxil/mars.1020 lib/X11/xephem/auxil/mars.9910 lib/X11/xephem/auxil/mars_db lib/X11/xephem/auxil/marsmap.jpg lib/X11/xephem/auxil/moon.fts -lib/X11/xephem/auxil/mpcorb2edb.pl +@(,,0755) lib/X11/xephem/auxil/mpcorb2edb.pl lib/X11/xephem/auxil/nearth.gif lib/X11/xephem/auxil/sample.hzn lib/X11/xephem/auxil/saturn00.gif lib/X11/xephem/auxil/saturn04.gif lib/X11/xephem/auxil/saturn10.gif lib/X11/xephem/auxil/saturn16.gif lib/X11/xephem/auxil/saturn20.gif lib/X11/xephem/auxil/saturn24.gif lib/X11/xephem/auxil/saturne.1020 lib/X11/xephem/auxil/saturne.9910 lib/X11/xephem/auxil/starcensus.txt lib/X11/xephem/auxil/uranus.1020 lib/X11/xephem/auxil/uranus.9910 lib/X11/xephem/auxil/wmm.cof lib/X11/xephem/auxil/xephem_sites lib/X11/xephem/auxil/xephem_skyhist lib/X11/xephem/auxil/._wmm.cof lib/X11/xephem/catalogs/Messier.edb lib/X11/xephem/catalogs/SKY2k65.edb lib/X11/xephem/fifos/Makefile lib/X11/xephem/fifos/README lib/X11/xephem/fits/Abell426.fts lib/X11/xephem/fits/horsehead.fts lib/X11/xephem/gallery/1999-41-a-web_print.jpg lib/X11/xephem/gallery/I0059-1.jpg lib/X11/xephem/gallery/I1613-1.jpg lib/X11/xephem/gallery/I1848-1.jpg lib/X11/xephem/gallery/I2118-2.jpg lib/X11/xephem/gallery/M013-2.jpg lib/X11/xephem/gallery/M034-1.jpg lib/X11/xephem/gallery/M053-1.jpg lib/X11/xephem/gallery/N2174-1.jpg lib/X11/xephem/gallery/N6633-1.jpg lib/X11/xephem/gallery/N6791-1.jpg lib/X11/xephem/gallery/N6820-2.jpg lib/X11/xephem/gallery/N6946-1.jpg lib/X11/xephem/gallery/N7023-2.jpg lib/X11/xephem/gallery/N7129-2.jpg lib/X11/xephem/gallery/S115-1.jpg lib/X11/xephem/gallery/abell1656-1.jpg lib/X11/xephem/gallery/abell2151-1.jpg lib/X11/xephem/gallery/arp295_kelly_c1.jpg lib/X11/xephem/gallery/gallery.gly lib/X11/xephem/gallery/hickson68-1.jpg lib/X11/xephem/gallery/ic5146-2002sep12-hall.jpg lib/X11/xephem/gallery/m103-2002sep13-lrgb.jpg lib/X11/xephem/gallery/m29-2002sep05.jpg lib/X11/xephem/gallery/m3-2003may07-ddp.jpg lib/X11/xephem/gallery/m35-11dec01-grgb.jpg lib/X11/xephem/gallery/m76-07dec01-lrgb-nr.jpg lib/X11/xephem/gallery/m82-03apr02-rgb.jpg lib/X11/xephem/gallery/m92-01jun02.jpg lib/X11/xephem/gallery/m97-03apr02-lrgb.jpg lib/X11/xephem/gallery/ngc457-2002sep13-lrgb.jpg lib/X11/xephem/gallery/ngc6819-25aug01-lrgb.jpg lib/X11/xephem/gallery/ngc6888-27jul02-ha.jpg lib/X11/xephem/gallery/ngc869-2002oct06-lrgb.jpg lib/X11/xephem/gallery/pui-17-virgo-anno1000.jpg lib/X11/xephem/help/png/aavso.png lib/X11/xephem/help/png/annotation.png lib/X11/xephem/help/png/close-pairs.png lib/X11/xephem/help/png/coordconv.png lib/X11/xephem/help/png/data-index.png lib/X11/xephem/help/png/data-table-setup.png lib/X11/xephem/help/png/data-table.png lib/X11/xephem/help/png/db.png lib/X11/xephem/help/png/each-control-objects.png lib/X11/xephem/help/png/earth.png lib/X11/xephem/help/png/external-input.png lib/X11/xephem/help/png/favorites.png lib/X11/xephem/help/png/fieldstars.png lib/X11/xephem/help/png/gallery.png lib/X11/xephem/help/png/imreg.png lib/X11/xephem/help/png/indiconfig.png lib/X11/xephem/help/png/indicontrol.png lib/X11/xephem/help/png/internet-update.png lib/X11/xephem/help/png/jupiter-view-more-info.png lib/X11/xephem/help/png/jupiter.png lib/X11/xephem/help/png/listing.png lib/X11/xephem/help/png/lo.png lib/X11/xephem/help/png/logo.png lib/X11/xephem/help/png/main-calendar.png lib/X11/xephem/help/png/main-local.png lib/X11/xephem/help/png/main-looping.png lib/X11/xephem/help/png/main-night.png lib/X11/xephem/help/png/main-time.png lib/X11/xephem/help/png/main.png lib/X11/xephem/help/png/mars-moon-more-info.png lib/X11/xephem/help/png/mars-moons.png lib/X11/xephem/help/png/mars-more-info.png lib/X11/xephem/help/png/mars.png lib/X11/xephem/help/png/moon-more-info.png lib/X11/xephem/help/png/moon.png lib/X11/xephem/help/png/movie.png lib/X11/xephem/help/png/naag.png lib/X11/xephem/help/png/network-setup.png lib/X11/xephem/help/png/obslog-list.png lib/X11/xephem/help/png/obslog.png lib/X11/xephem/help/png/plot-sample.png lib/X11/xephem/help/png/plot.png lib/X11/xephem/help/png/print.png lib/X11/xephem/help/png/saturn-more-info.png lib/X11/xephem/help/png/saturn.png lib/X11/xephem/help/png/save-colors.png lib/X11/xephem/help/png/save-fonts.png lib/X11/xephem/help/png/save-resources.png lib/X11/xephem/help/png/seti@home.png lib/X11/xephem/help/png/sites.png lib/X11/xephem/help/png/sky-binary.png lib/X11/xephem/help/png/sky-control-eyepieces.png lib/X11/xephem/help/png/sky-control-filter.png lib/X11/xephem/help/png/sky-control-horizon.png lib/X11/xephem/help/png/sky-control-list.png lib/X11/xephem/help/png/sky-control-options.png lib/X11/xephem/help/png/sky-history.png lib/X11/xephem/help/png/sky-images-fits.png lib/X11/xephem/help/png/sky-images-ia-contrast-tb.png lib/X11/xephem/help/png/sky-images-ia-contrast.png lib/X11/xephem/help/png/sky-images-ia-gauss-tb.png lib/X11/xephem/help/png/sky-images-ia-gauss.png lib/X11/xephem/help/png/sky-images-ia-glass-tb.png lib/X11/xephem/help/png/sky-images-ia-glass.png lib/X11/xephem/help/png/sky-images-ia-roi-tb.png lib/X11/xephem/help/png/sky-images-ia-roi.png lib/X11/xephem/help/png/sky-images-ia-slice-tb.png lib/X11/xephem/help/png/sky-images-ia-slice.png lib/X11/xephem/help/png/sky-images-ia-snap-tb.png lib/X11/xephem/help/png/sky-popup-menu.png lib/X11/xephem/help/png/sky-upperleft-delta-roaming.png lib/X11/xephem/help/png/sky-upperleft-roaming.png lib/X11/xephem/help/png/sky-upperright-delta-roaming.png lib/X11/xephem/help/png/sky-upperright-roaming.png lib/X11/xephem/help/png/sky-view-how-tb.png lib/X11/xephem/help/png/sky-view-what-tb.png lib/X11/xephem/help/png/sky-view-where-tb.png lib/X11/xephem/help/png/sky-view.png lib/X11/xephem/help/png/solsys.png lib/X11/xephem/help/png/solver.png lib/X11/xephem/help/png/stepsize.png lib/X11/xephem/help/png/sun-view.png lib/X11/xephem/help/png/syslog.png lib/X11/xephem/help/png/trails.png lib/X11/xephem/help/png/uranus-more-info.png lib/X11/xephem/help/png/uranus.png 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 lib/X11/xephem/lo/._lodb.xml man/man1/xephem.1.gz