svn commit: r437495 - in head/finance/R-cran-RFinanceYJ: . files

TAKATSU Tomonari tota at FreeBSD.org
Sat Apr 1 22:10:04 UTC 2017


Author: tota
Date: Sat Apr  1 22:10:03 2017
New Revision: 437495
URL: https://svnweb.freebsd.org/changeset/ports/437495

Log:
  - Fix the patch to make fetchable with getURL (from RCurl)
    to support HTTPS because Yahoo! JAPAN services have been
    migrated to AOSSL
  - Update RUN_DEPENDS, accordingly
  
  MFH:	2017Q2

Added:
  head/finance/R-cran-RFinanceYJ/files/patch-DESCRIPTION   (contents, props changed)
Modified:
  head/finance/R-cran-RFinanceYJ/Makefile   (contents, props changed)
  head/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R   (contents, props changed)

Modified: head/finance/R-cran-RFinanceYJ/Makefile
==============================================================================
--- head/finance/R-cran-RFinanceYJ/Makefile	Sat Apr  1 22:05:39 2017	(r437494)
+++ head/finance/R-cran-RFinanceYJ/Makefile	Sat Apr  1 22:10:03 2017	(r437495)
@@ -3,7 +3,7 @@
 
 PORTNAME=	RFinanceYJ
 PORTVERSION=	0.3.1
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	finance
 DISTNAME=	${PORTNAME}_${PORTVERSION}
 
@@ -12,7 +12,8 @@ COMMENT=	Japanese stock market from Yaho
 
 LICENSE=	BSD3CLAUSE
 
-RUN_DEPENDS=	R-cran-XML>0:textproc/R-cran-XML \
+RUN_DEPENDS=	R-cran-RCurl>0:ftp/R-cran-RCurl \
+		R-cran-XML>0:textproc/R-cran-XML \
 		R-cran-xts>0:math/R-cran-xts
 
 USES=	cran:auto-plist

Added: head/finance/R-cran-RFinanceYJ/files/patch-DESCRIPTION
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/finance/R-cran-RFinanceYJ/files/patch-DESCRIPTION	Sat Apr  1 22:10:03 2017	(r437495)
@@ -0,0 +1,11 @@
+--- DESCRIPTION.orig	2013-12-23 12:54:37 UTC
++++ DESCRIPTION
+@@ -8,7 +8,7 @@ Maintainer: Yohei Sato <yohei0511 at gmail.
+ Description: Japanese stock market from Yahoo!-finance-Japan
+ License: BSD 3-clause License
+ LazyLoad: yes
+-Depends: XML,xts
++Depends: RCurl,XML,xts
+ Repository: CRAN
+ Date/Publication: 2013-08-13 09:37:24
+ Packaged: 2013-08-12 15:06:46 UTC; yokkuns

Modified: head/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R
==============================================================================
--- head/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R	Sat Apr  1 22:05:39 2017	(r437494)
+++ head/finance/R-cran-RFinanceYJ/files/patch-R-quoteStockTsData.R	Sat Apr  1 22:10:03 2017	(r437495)
@@ -1,6 +1,6 @@
---- R/quoteStockTsData.R.orig	2013-08-13 00:05:58.000000000 +0900
-+++ R/quoteStockTsData.R	2015-01-24 20:34:35.000000000 +0900
-@@ -46,42 +46,33 @@
+--- R/quoteStockTsData.R.orig	2013-08-12 15:05:58 UTC
++++ R/quoteStockTsData.R
+@@ -46,42 +46,34 @@ quoteFXTsData <- function(x, since=NULL,
  #get time series data from Yahoo! Finance.
  quoteTsData <- function(x,function.financialproduct,since,start.num,date.end,time.interval,type="stock"){
    r <- NULL
@@ -27,10 +27,12 @@
 +  while( 1 ){
      start.num <- start.num + 1
      quote.table <- NULL
-     quote.url <- paste('http://info.finance.yahoo.co.jp/history/?code=',x,start,end,'&p=',start.num,'&tm=',substr(time.interval,1,1),sep="")
+-    quote.url <- paste('http://info.finance.yahoo.co.jp/history/?code=',x,start,end,'&p=',start.num,'&tm=',substr(time.interval,1,1),sep="")
++    quote.url <- paste('https://info.finance.yahoo.co.jp/history/?code=',x,start,end,'&p=',start.num,'&tm=',substr(time.interval,1,1),sep="")
++    quote.html <- getURL(quote.url)
    
 -    try( r <- xmlRoot(htmlTreeParse(quote.url,error=xmlErrorCumulator(immediate=F))), TRUE)
-+    try( r <- htmlParse(quote.url) )
++    try( r <- htmlParse(quote.html) )
      if( is.null(r) ) stop(paste("Can not access :", quote.url))
  
 -    #try( quote.table <- r[[2]][[1]][[1]][[16]][[1]][[1]][[1]][[4]][[1]][[1]][[1]], TRUE )
@@ -54,7 +56,7 @@
        }
      }
  
-@@ -90,7 +81,6 @@
+@@ -90,7 +82,6 @@ quoteTsData <- function(x,function.finan
        financial.data <- rbind(financial.data,function.financialproduct(quote.table[[i]]))
      }
      
@@ -62,7 +64,7 @@
      Sys.sleep(1)
    }
    financial.data <- financial.data[order(financial.data$date),]
-@@ -120,5 +110,3 @@
+@@ -120,5 +111,3 @@ endOfMonth <- function(date.obj)
    return(startOfNextMonth-1)
  }
  


More information about the svn-ports-head mailing list