diff --git a/finance/Makefile b/finance/Makefile index 44f66db5e402..2d8e468d755e 100644 --- a/finance/Makefile +++ b/finance/Makefile @@ -1,124 +1,125 @@ COMMENT = Monetary, financial, and related applications SUBDIR += R-cran-AER SUBDIR += R-cran-PerformanceAnalytics SUBDIR += R-cran-RFinanceYJ SUBDIR += R-cran-TTR SUBDIR += R-cran-ccgarch SUBDIR += R-cran-fBasics SUBDIR += R-cran-fGarch SUBDIR += R-cran-gmm SUBDIR += R-cran-lmtest SUBDIR += R-cran-plm SUBDIR += R-cran-quantmod SUBDIR += R-cran-strucchange SUBDIR += R-cran-timeDate SUBDIR += R-cran-timeSeries SUBDIR += R-cran-tseries SUBDIR += R-cran-urca SUBDIR += R-cran-vars SUBDIR += alkimia SUBDIR += aqbanking SUBDIR += beancount SUBDIR += beanie SUBDIR += chiapos SUBDIR += cointop SUBDIR += electrum SUBDIR += expense SUBDIR += fava SUBDIR += fixc SUBDIR += frontaccounting SUBDIR += gnucash SUBDIR += gnucash-docs SUBDIR += grisbi SUBDIR += homebank SUBDIR += hs-hledger SUBDIR += hs-hledger-ui SUBDIR += hs-hledger-web SUBDIR += jgnash SUBDIR += kmymoney SUBDIR += kraft SUBDIR += ktoblzcheck SUBDIR += ledger SUBDIR += ledgersmb12 SUBDIR += libbtc SUBDIR += libofx SUBDIR += libstocks SUBDIR += moneymanagerex SUBDIR += myphpmoney SUBDIR += nextcloud-cospend SUBDIR += odoo + SUBDIR += odoo14 SUBDIR += p5-Business-CreditCard SUBDIR += p5-Business-MaxMind-CreditCardFraudDetection SUBDIR += p5-Business-OCV SUBDIR += p5-Business-OnlinePayment SUBDIR += p5-Business-OnlinePayment-2CheckOut SUBDIR += p5-Business-OnlinePayment-AuthorizeNet SUBDIR += p5-Business-OnlinePayment-BankOfAmerica SUBDIR += p5-Business-OnlinePayment-Beanstream SUBDIR += p5-Business-OnlinePayment-Cardstream SUBDIR += p5-Business-OnlinePayment-Jettis SUBDIR += p5-Business-OnlinePayment-LinkPoint SUBDIR += p5-Business-OnlinePayment-MerchantCommerce SUBDIR += p5-Business-OnlinePayment-Network1Financial SUBDIR += p5-Business-OnlinePayment-OCV SUBDIR += p5-Business-OnlinePayment-PayConnect SUBDIR += p5-Business-OnlinePayment-PaymenTech SUBDIR += p5-Business-OnlinePayment-PaymentsGateway SUBDIR += p5-Business-OnlinePayment-SurePay SUBDIR += p5-Business-OnlinePayment-TCLink SUBDIR += p5-Business-OnlinePayment-VirtualNet SUBDIR += p5-Business-OnlinePayment-eSec SUBDIR += p5-Business-OnlinePayment-iAuthorizer SUBDIR += p5-Business-PayPal-IPN SUBDIR += p5-Business-Stripe SUBDIR += p5-Business-TW-Invoice-U420 SUBDIR += p5-Business-TW-TSIB-CStorePayment SUBDIR += p5-Business-TW-TSIB-VirtualAccount SUBDIR += p5-Business-WorldPay-Junior SUBDIR += p5-Data-Currency SUBDIR += p5-Finance-Amortization SUBDIR += p5-Finance-Bitcoin SUBDIR += p5-Finance-Currency-Convert SUBDIR += p5-Finance-Currency-Convert-WebserviceX SUBDIR += p5-Finance-Currency-Convert-XE SUBDIR += p5-Finance-Quote SUBDIR += p5-Finance-QuoteHist SUBDIR += p5-Finance-QuoteTW SUBDIR += p5-Finance-TW-EmergingQuote SUBDIR += p5-Finance-TW-TSEQuote SUBDIR += p5-Finance-YahooQuote SUBDIR += p5-Locale-Currency-Format SUBDIR += p5-Math-Financial SUBDIR += p5-PayflowPro SUBDIR += pear_Payment_DTA SUBDIR += prestashop SUBDIR += py-Nasdaq-Data-Link SUBDIR += py-backtrader SUBDIR += py-bitcoin SUBDIR += py-ebaysdk SUBDIR += py-mplfinance SUBDIR += py-ofxparse SUBDIR += py-pycoin SUBDIR += py-python-bitcoinlib SUBDIR += py-python-obelisk SUBDIR += py-quantecon SUBDIR += py-stripe SUBDIR += py-ta-lib SUBDIR += py-vatnumber SUBDIR += py-yfinance SUBDIR += py-ystockquote SUBDIR += qtbitcointrader SUBDIR += quantlib SUBDIR += quickfix SUBDIR += rubygem-money SUBDIR += skrooge SUBDIR += sql-ledger SUBDIR += ticker SUBDIR += tickrs SUBDIR += vanitygen SUBDIR += venice SUBDIR += weberp SUBDIR += xtrader .include diff --git a/finance/odoo14/Makefile b/finance/odoo14/Makefile new file mode 100644 index 000000000000..e6e4e8894142 --- /dev/null +++ b/finance/odoo14/Makefile @@ -0,0 +1,106 @@ +PORTNAME= odoo +PORTVERSION= 14.0 +CATEGORIES= finance www +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +PKGNAMESUFFIX= 14 + +MAINTAINER= acm@FreeBSD.org +COMMENT= Suite of web based open source business apps + +LICENSE= LGPL3 + +USE_GITHUB= yes +GH_TAGNAME= c976a0920dd8d7910c7635cc1e2bbff47edcafa9 + +LIB_DEPENDS= libxml2.so:textproc/libxml2 \ + libxslt.so:textproc/libxslt \ + libevent.so:devel/libevent \ + libsasl2.so:security/cyrus-sasl2 +RUN_DEPENDS= wkhtmltopdf>0:converters/wkhtmltopdf \ + ${PYTHON_PKGNAMEPREFIX}psycopg2>0:databases/py-psycopg2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyserial>=0:comms/py-pyserial@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}vobject>=0:deskutils/py-vobject@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Babel>=1.3:devel/py-babel@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dateutil>=0:devel/py-dateutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gevent>=0:devel/py-gevent@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}greenlet>=0:devel/py-greenlet@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>=0:devel/py-Jinja2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}lxml>=0:devel/py-lxml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mako>=0:textproc/py-mako@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}num2words>=0:devel/py-num2words@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}polib>=0:devel/py-polib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyparsing>=0:devel/py-pyparsing@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytz>=0:devel/py-pytz@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyusb>=0:devel/py-pyusb@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}vatnumber>=0:finance/py-vatnumber@${PY_FLAVOR} \ + ${PY_PILLOW} \ + ${PYTHON_PKGNAMEPREFIX}pydot>=0:graphics/py-pydot@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ldap>=0:net/py-ldap@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}zeep>=0:net/py-zeep@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}chardet>=0:textproc/py-chardet@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}docutils>=0:textproc/py-docutils@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}feedparser>=0:textproc/py-feedparser@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}html2text>=0:textproc/py-html2text@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}markupsafe>=0:textproc/py-markupsafe@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}qrcode>=0:textproc/py-qrcode@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xlrd>=0:textproc/py-xlrd@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xlwt>=0:textproc/py-xlwt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}XlsxWriter>=0:textproc/py-xlsxwriter@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}decorator>0:devel/py-decorator@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pypdf2>0:print/py-pypdf2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}reportlab>0:print/py-reportlab@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}passlib>0:security/py-passlib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}libsass>0:www/py-libsass@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}werkzeug>0:www/py-werkzeug@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}secure-cookie>0:www/py-secure-cookie@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}XlsxWriter>=0:textproc/py-xlsxwriter@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xlrd>=1.2.0:textproc/py-xlrd@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xlwt>=1.3.0:textproc/py-xlwt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ofxparse>=0.20:finance/py-ofxparse@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ebaysdk>=2.1.3:finance/py-ebaysdk@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}idna>0:dns/py-idna@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}stdnum>0:devel/py-stdnum@${PY_FLAVOR} + +USES= cpe python:3.5+ pgsql shebangfix +USE_PYTHON= distutils +USE_OPENLDAP= yes + +SHEBANG_LANG= python +SHEBANG_FILES= ${WRKSRC}/${PORTNAME}-bin + +USERS= odoo +GROUPS= ${USERS} + +USE_RC_SUBR= ${PORTNAME} +SUB_FILES= pkg-message + +CONFLICTS= odoo + +ETCDIR= ${PREFIX}/etc/odoo + +post-patch: + @${REINPLACE_CMD} -i "" -e '25d' ${WRKSRC}/odoo/service/wsgi_server.py + @${REINPLACE_CMD} -i "" -e 's|werkzeug.url_quote_plus|werkzeug.urls.url_quote_plus|g' \ + ${WRKSRC}/odoo/addons/base/models/ir_ui_view.py + @${REINPLACE_CMD} -i "" -e 's|werkzeug.url_unquote_plus|werkzeug.urls.url_quote_plus|g' \ + -e 's|.NumberConverter|.converters.NumberConverter|g' \ + ${WRKSRC}/odoo/addons/base/models/ir_http.py \ + ${WRKSRC}/odoo/addons/http_routing/models/ir_http.py + @${REINPLACE_CMD} -i "" -e 's|from werkzeug import url_encode|from werkzeug.urls import url_encode|g' \ + ${WRKSRC}/odoo/addons/mail/models/mail_thread.py \ + ${WRKSRC}/odoo/addons/mail/controllers/main.py \ + ${WRKSRC}/odoo/addons/hr/models/hr_employee.py + +post-extract: + @cd ${WRKSRC}/addons/ && ${MV} * ${WRKSRC}/odoo/addons/ + +pre-install: + @${MKDIR} ${STAGEDIR}${ETCDIR} + +post-install: + @${INSTALL_SCRIPT} ${FILESDIR}/odoo.conf ${STAGEDIR}${ETCDIR}/odoo.conf.sample + +.include diff --git a/finance/odoo14/distinfo b/finance/odoo14/distinfo new file mode 100644 index 000000000000..00da1159078d --- /dev/null +++ b/finance/odoo14/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1661572023 +SHA256 (odoo-odoo-14.0-c976a0920dd8d7910c7635cc1e2bbff47edcafa9_GH0.tar.gz) = 11fe5377821286e8da821472212223df6680579265727c0be36fd0107f049fb3 +SIZE (odoo-odoo-14.0-c976a0920dd8d7910c7635cc1e2bbff47edcafa9_GH0.tar.gz) = 133672722 diff --git a/finance/odoo14/files/odoo.conf b/finance/odoo14/files/odoo.conf new file mode 100644 index 000000000000..cdbc35e17995 --- /dev/null +++ b/finance/odoo14/files/odoo.conf @@ -0,0 +1,7 @@ +[options] +#admin_passwd = secretpassword +db_host = localhost +db_port = 5432 +db_user = odoouser +db_password = odoopwd +;addons_path = /usr/local/lib/python3.7/site-packages/odoo/addons/ diff --git a/finance/odoo14/files/odoo.in b/finance/odoo14/files/odoo.in new file mode 100644 index 000000000000..17dcf6d6b05b --- /dev/null +++ b/finance/odoo14/files/odoo.in @@ -0,0 +1,113 @@ +#!/bin/sh + +# PROVIDE: odoo +# REQUIRE: NETWORKING +# KEYWORD: shutdown +# +# Configuration settings for odoo in /etc/rc.conf: +# +# odoo_enable: run odoo server (default=NO) +# odoo_database: define odoo database name (default=odoodb) +# odoo_datadir: directory where odoo store data (default=/var/lib/odoo) +# odoo_flags: additional flags for odoo server (default=--without-demo=all) +# + +. /etc/rc.subr + +name=odoo +rcvar=odoo_enable + +load_rc_config ${name} + +: ${odoo_enable:=NO} +: ${odoo_database:="odoodb"} +: ${odoo_datadir:="/var/lib/${name}"} +: ${odoo_flags="--without-demo=all"} + +odoo_user="odoo" +pidfile=/var/run/odoo.pid +extra_commands="initdb" + +su_cmd="/usr/bin/su" +chown_cmd="/usr/sbin/chown" +mkdir_cmd="/bin/mkdir" + +start_cmd="odoo_start" +stop_cmd="odoo_stop" +status_cmd="odoo_status" +restart_cmd="odoo_restart" +initdb_cmd="odoo_initdb" +start_precmd="odoo_start_precmd" + +command=/usr/local/bin/odoo +command_args="--database=${odoo_database} --data-dir=${odoo_datadir} --logfile=/var/log/${name}.log --config=%%LOCALBASE%%/etc/odoo.conf ${odoo_flags}" + +odoo_start_precmd() { + odoo_datadir_check + touch ${pidfile} + ${chown_cmd} -R ${odoo_user}:${odoo_user} ${pidfile} +} + +odoo_start() +{ + daemon -p ${pidfile} -u ${odoo_user} \ + ${command} ${command_args} + echo "Starting ${name}" +} + +odoo_datadir_check() +{ + if [ ! -d "${odoo_datadir}" ]; then + ${mkdir_cmd} -p ${odoo_datadir} + ${chown_cmd} -R ${odoo_user}:${odoo_user} ${odoo_datadir} + echo "${name} data directory created" + fi +} + +odoo_initdb() +{ + echo " " + echo "#################################################################" + echo "# #" + echo "# Don't use initdb if you are updating from previous version of #" + echo "# Odoo. Cancel if this is your case (Ctrl + C) #" + echo "# #" + echo "#################################################################" + echo " " + sleep 10 + odoo_start_precmd + daemon -p ${pidfile} -u ${odoo_user} \ + ${command} ${command_args} -i all + echo "Initializing database and starting ${name} server" +} + +odoo_restart() +{ + echo "Performing restart ${name}" + odoo_stop + sleep 5 + odoo_start +} + +odoo_status() +{ + # If running, show pid + if [ -f ${pidfile} ] + then + echo "${name} is running as pid" `cat ${pidfile}` + else + echo "${name} is not running" + fi +} + +odoo_stop() +{ + if [ -f ${pidfile} ] + then + kill `cat ${pidfile}` + rm ${pidfile} + echo "Stopping ${name}" + fi +} + +run_rc_command "$1" diff --git a/finance/odoo14/files/patch-odoo_tools__vendor_sessions.py b/finance/odoo14/files/patch-odoo_tools__vendor_sessions.py new file mode 100644 index 000000000000..dcac41974344 --- /dev/null +++ b/finance/odoo14/files/patch-odoo_tools__vendor_sessions.py @@ -0,0 +1,19 @@ +--- odoo/tools/_vendor/sessions.py 2021-09-04 18:46:08.432901000 -0500 ++++ odoo/tools/_vendor/sessions.py 2021-09-04 18:46:25.423822000 -0500 +@@ -26,7 +26,6 @@ + from time import time + + from werkzeug.datastructures import CallbackDict +-from werkzeug.posixemulation import rename + + _sha1_re = re.compile(r"^[a-f0-9]{40}$") + +@@ -198,7 +197,7 @@ + finally: + f.close() + try: +- rename(tmp, fn) ++ os.rename(tmp, fn) + os.chmod(fn, self.mode) + except (IOError, OSError): + pass diff --git a/finance/odoo14/files/pkg-message.in b/finance/odoo14/files/pkg-message.in new file mode 100644 index 000000000000..afea313561cf --- /dev/null +++ b/finance/odoo14/files/pkg-message.in @@ -0,0 +1,44 @@ +[ +{ type: install + message: <