Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jul 2023 22:59:39 GMT
From:      Robert Clausecker <fuz@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c735afd1b3c9 - main - x11/oscar: OpenSource CPAP Analysis Reporter
Message-ID:  <202307302259.36UMxdft001199@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c735afd1b3c96bb91d857a506998d8e3ce849fb6

commit c735afd1b3c96bb91d857a506998d8e3ce849fb6
Author:     Stephane D'Alu <sdalu@sdalu.com>
AuthorDate: 2023-07-28 18:24:48 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-07-30 22:59:05 +0000

    x11/oscar: OpenSource CPAP Analysis Reporter
    
    OpenSource CPAP Analysis Reporter
    
    OSCAR is a derivative of SleepyHead version 1.1.0, created when that
    was abandoned by Mark Watkins.
    
    SleepyHead was a cross platform, opensource sleep tracking program for
    reviewing CPAP and Oximetry data, which are devices used in the
    treatment of Sleep Disorders like Obstructive Sleep Apnea.
    
    PR:             271297
---
 x11/Makefile                                       |   1 +
 x11/oscar/Makefile                                 |  55 ++++++
 x11/oscar/distinfo                                 |   3 +
 x11/oscar/files/patch-SleepLib_common.cpp          |  11 ++
 .../files/patch-SleepLib_thirdparty_botan__all.h   |  11 ++
 .../patch-SleepLib_thirdparty_botan__freebsd.h     |  10 ++
 x11/oscar/files/patch-mainwindow.cpp               |  12 ++
 x11/oscar/files/patch-reports.cpp                  |  11 ++
 x11/oscar/files/patch-statistics.cpp               |  11 ++
 x11/oscar/files/patch-version.cpp                  |  13 ++
 x11/oscar/pkg-descr                                |   8 +
 x11/oscar/pkg-plist                                | 186 +++++++++++++++++++++
 12 files changed, 332 insertions(+)

diff --git a/x11/Makefile b/x11/Makefile
index df72b4a5eff4..5cc5347266eb 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -279,6 +279,7 @@
     SUBDIR += nwg-menu
     SUBDIR += nxcomp
     SUBDIR += openrgb
+    SUBDIR += oscar
     SUBDIR += p5-Clipboard
     SUBDIR += p5-X11-GUITest
     SUBDIR += p5-X11-IdleTime
diff --git a/x11/oscar/Makefile b/x11/oscar/Makefile
new file mode 100644
index 000000000000..cd277c8ab6f8
--- /dev/null
+++ b/x11/oscar/Makefile
@@ -0,0 +1,55 @@
+PORTNAME=	OSCAR
+DISTVERSIONPREFIX=	v
+DISTVERSION=    1.4.0
+CATEGORIES=	x11
+
+MAINTAINER=	sdalu@sdalu.com
+COMMENT=	Open Source CPAP Analysis Reporter
+WWW=		https://www.sleepfiles.com/OSCAR/
+
+LICENSE=	GPLv3
+
+BUILD_DEPENDS=	bash:shells/bash
+
+USES=		gmake qmake:outsource qt:5 shebangfix xorg gl desktop-file-utils
+USE_XORG=       x11
+USE_GL=         gl glu
+USE_QT=		gui printsupport opengl widgets network xml serialport core linguisttools:build buildtools:build
+
+USE_GITLAB=     yes
+GL_ACCOUNT=     pholy
+GL_PROJECT=     OSCAR-code
+
+WRKSRC_SUBDIR=  oscar
+
+SHEBANG_FILES=  update_gitinfo.sh
+
+REPLACE_ARGS_BASH=	-e 's,/bin/bash,${LOCALBASE}/bin/bash,'
+REPLACE_ARGS_SHARE=     -e 's,/usr/share,${LOCALBASE}/share,'
+
+QMAKE_ARGS+=	CONFIG+=warn_off
+
+pre-patch:
+	@${REINPLACE_CMD} ${REPLACE_ARGS_BASH} ${WRKSRC}/oscar.pro
+	@${REINPLACE_CMD} ${REPLACE_ARGS_SHARE} ${WRKSRC}/../Building/Linux/OSCAR.desktop
+	@${CP} ${WRKSRC}/SleepLib/thirdparty/botan_linux.h \
+		${WRKSRC}/SleepLib/thirdparty/botan_freebsd.h
+
+do-install:
+	(cd ${BUILD_WRKSRC} && ${INSTALL_PROGRAM} OSCAR \
+		${STAGEDIR}${PREFIX}/bin)
+	(cd ${BUILD_WRKSRC} && \
+		${COPYTREE_SHARE} "Html Translations" ${STAGEDIR}${DATADIR})
+	(cd ${WRKSRC} && \
+		${COPYTREE_SHARE} "icons help" ${STAGEDIR}${DATADIR})
+
+	${MKDIR} ${STAGEDIR}${LOCALBASE}/share/icons/hicolor/scalable/apps
+	${MKDIR} ${STAGEDIR}${LOCALBASE}/share/icons/hicolor/48x48/apps
+	${INSTALL_DATA} ${WRKSRC}/../Building/Linux/OSCAR.svg \
+		${STAGEDIR}${LOCALBASE}/share/icons/hicolor/scalable/apps/OSCAR.svg
+	${INSTALL_DATA} ${WRKSRC}/../Building/Linux/OSCAR.png \
+		${STAGEDIR}${LOCALBASE}/share/icons/hicolor/48x48/apps/OSCAR.png
+	${INSTALL_DATA} ${WRKSRC}/../Building/Linux/OSCAR.desktop \
+		${STAGEDIR}${LOCALBASE}/share/applications/OSCAR.desktop
+
+.include <bsd.port.mk>
diff --git a/x11/oscar/distinfo b/x11/oscar/distinfo
new file mode 100644
index 000000000000..808887ed3580
--- /dev/null
+++ b/x11/oscar/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1690568543
+SHA256 (OSCAR-code-v1.4.0.tar.bz2) = a13fdc89fe332e133fcadfdb36c146b3e32f8c6eeadaf3c8148033b1e0074650
+SIZE (OSCAR-code-v1.4.0.tar.bz2) = 6333003
diff --git a/x11/oscar/files/patch-SleepLib_common.cpp b/x11/oscar/files/patch-SleepLib_common.cpp
new file mode 100644
index 000000000000..fb5de5c17145
--- /dev/null
+++ b/x11/oscar/files/patch-SleepLib_common.cpp
@@ -0,0 +1,11 @@
+--- SleepLib/common.cpp
++++ SleepLib/common.cpp
+@@ -248,7 +248,7 @@ QString appResourcePath()
+     // This one will be used if the Html and Translations folders 
+     // are in the same folder as  the OSCAR executable
+     paths.append( QCoreApplication::applicationDirPath() );
+-#ifdef Q_OS_LINUX    
++#if defined (Q_OS_LINUX) || defined (Q_OS_FREEBSD)
+     QString appName = QCoreApplication::applicationName();
+     if (appName != QString("OSCAR"))
+         appName = QString("OSCAR-test");
diff --git a/x11/oscar/files/patch-SleepLib_thirdparty_botan__all.h b/x11/oscar/files/patch-SleepLib_thirdparty_botan__all.h
new file mode 100644
index 000000000000..9df9a36697ec
--- /dev/null
+++ b/x11/oscar/files/patch-SleepLib_thirdparty_botan__all.h
@@ -0,0 +1,11 @@
+--- SleepLib/thirdparty/botan_all.h
++++ SleepLib/thirdparty/botan_all.h
+@@ -22,5 +22,8 @@
+ #ifdef Q_OS_MACOS
+ #include "botan_macos.h"
+ #endif
++#ifdef Q_OS_FREEBSD
++#include "botan_freebsd.h"
++#endif
+ 
+ #endif // BOTAN_ALL_H
diff --git a/x11/oscar/files/patch-SleepLib_thirdparty_botan__freebsd.h b/x11/oscar/files/patch-SleepLib_thirdparty_botan__freebsd.h
new file mode 100644
index 000000000000..55256942199a
--- /dev/null
+++ b/x11/oscar/files/patch-SleepLib_thirdparty_botan__freebsd.h
@@ -0,0 +1,10 @@
+--- SleepLib/thirdparty/botan_freebsd.h
++++ SleepLib/thirdparty/botan_freebsd.h
+@@ -75,7 +75,6 @@
+ #define BOTAN_TARGET_OS_HAS_CLOCK_GETTIME
+ #define BOTAN_TARGET_OS_HAS_DEV_RANDOM
+ #define BOTAN_TARGET_OS_HAS_FILESYSTEM
+-#define BOTAN_TARGET_OS_HAS_GETAUXVAL
+ #define BOTAN_TARGET_OS_HAS_POSIX1
+ #define BOTAN_TARGET_OS_HAS_POSIX_MLOCK
+ #define BOTAN_TARGET_OS_HAS_PROC_FS
diff --git a/x11/oscar/files/patch-mainwindow.cpp b/x11/oscar/files/patch-mainwindow.cpp
new file mode 100644
index 000000000000..f29d289ab498
--- /dev/null
+++ b/x11/oscar/files/patch-mainwindow.cpp
@@ -0,0 +1,12 @@
+--- mainwindow.cpp
++++ mainwindow.cpp
+@@ -859,6 +859,9 @@ QStringList getDriveList()
+ #if QT_VERSION >= QT_VERSION_CHECK(5,4,0)
+ #if defined(Q_OS_LINUX)
+     #define VFAT "vfat"
++#elif defined(Q_OS_FREEBSD)
++    #define VFAT "msdosfs"
++    Q_UNUSED(crostini_detected)
+ #elif defined(Q_OS_WIN)
+     #define VFAT "FAT32"
+     Q_UNUSED(crostini_detected)
diff --git a/x11/oscar/files/patch-reports.cpp b/x11/oscar/files/patch-reports.cpp
new file mode 100644
index 000000000000..e6568875aaba
--- /dev/null
+++ b/x11/oscar/files/patch-reports.cpp
@@ -0,0 +1,11 @@
+--- reports.cpp
++++ reports.cpp
+@@ -74,7 +74,7 @@ void Report::PrintReport(gGraphView *gv, QString name, QDate date)
+ 
+     printer = new QPrinter(QPrinter::HighResolution);
+ 
+-#ifdef Q_OS_LINUX
++#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
+     QString username = p_profile->Get(QString("_{") + QString(STR_UI_UserName) + "}_");
+     printer->setPrinterName("Print to File (PDF)");
+     printer->setOutputFormat(QPrinter::PdfFormat);
diff --git a/x11/oscar/files/patch-statistics.cpp b/x11/oscar/files/patch-statistics.cpp
new file mode 100644
index 000000000000..7d1fcd582642
--- /dev/null
+++ b/x11/oscar/files/patch-statistics.cpp
@@ -0,0 +1,11 @@
+--- statistics.cpp
++++ statistics.cpp
+@@ -1315,7 +1315,7 @@ void Statistics::printReport(QWidget * parent) {
+ 
+     QPrinter printer(QPrinter::ScreenResolution); // ScreenResolution required for graphics sizing
+ 
+-#ifdef Q_OS_LINUX
++#if defined (Q_OS_LINUX) || defined(Q_OS_FREEBSD)
+     printer.setPrinterName("Print to File (PDF)");
+     printer.setOutputFormat(QPrinter::PdfFormat);
+     QString name = "Statistics";
diff --git a/x11/oscar/files/patch-version.cpp b/x11/oscar/files/patch-version.cpp
new file mode 100644
index 000000000000..766dee25542d
--- /dev/null
+++ b/x11/oscar/files/patch-version.cpp
@@ -0,0 +1,13 @@
+When building port, ensure that version always resolve to
+the same app name
+
+--- version.cpp
++++ version.cpp
+@@ -63,6 +63,7 @@ QString getPrereleaseSuffix()
+ #endif
+     }
+ 
++    suffix = "";
+     return suffix;
+ }
+ 
diff --git a/x11/oscar/pkg-descr b/x11/oscar/pkg-descr
new file mode 100644
index 000000000000..4c053c0e7ff9
--- /dev/null
+++ b/x11/oscar/pkg-descr
@@ -0,0 +1,8 @@
+OpenSource CPAP Analysis Reporter
+
+OSCAR is a derivative of SleepyHead version 1.1.0, created when that
+was abandoned by Mark Watkins.
+
+SleepyHead was a cross platform, opensource sleep tracking program for
+reviewing CPAP and Oximetry data, which are devices used in the
+treatment of Sleep Disorders like Obstructive Sleep Apnea.
diff --git a/x11/oscar/pkg-plist b/x11/oscar/pkg-plist
new file mode 100644
index 000000000000..2d0604527c33
--- /dev/null
+++ b/x11/oscar/pkg-plist
@@ -0,0 +1,186 @@
+bin/OSCAR
+%%DATADIR%%/Html/about-af.html
+%%DATADIR%%/Html/about-ar.html
+%%DATADIR%%/Html/about-bg.html
+%%DATADIR%%/Html/about-da.html
+%%DATADIR%%/Html/about-de.html
+%%DATADIR%%/Html/about-el.html
+%%DATADIR%%/Html/about-es.html
+%%DATADIR%%/Html/about-fi.html
+%%DATADIR%%/Html/about-fr.html
+%%DATADIR%%/Html/about-he.html
+%%DATADIR%%/Html/about-hu.html
+%%DATADIR%%/Html/about-it.html
+%%DATADIR%%/Html/about-nl.html
+%%DATADIR%%/Html/about-no.html
+%%DATADIR%%/Html/about-ph.html
+%%DATADIR%%/Html/about-pl.html
+%%DATADIR%%/Html/about-pt.html
+%%DATADIR%%/Html/about-pt_BR.html
+%%DATADIR%%/Html/about-ro.html
+%%DATADIR%%/Html/about-sv.html
+%%DATADIR%%/Html/about-th.html
+%%DATADIR%%/Html/about-tr.html
+%%DATADIR%%/Html/about-zh.html
+%%DATADIR%%/Html/about.html
+%%DATADIR%%/Html/credits.html
+%%DATADIR%%/Html/release_notes.html
+%%DATADIR%%/Translations/Afrikaans.af.qm
+%%DATADIR%%/Translations/Arabic.ar.qm
+%%DATADIR%%/Translations/Bulgarian.bg.qm
+%%DATADIR%%/Translations/Chinese.zh_CN.qm
+%%DATADIR%%/Translations/Chinese.zh_TW.qm
+%%DATADIR%%/Translations/Dansk.da.qm
+%%DATADIR%%/Translations/Deutsch.de.qm
+%%DATADIR%%/Translations/English.en_UK.qm
+%%DATADIR%%/Translations/Espaniol.es.qm
+%%DATADIR%%/Translations/Espaniol.es_MX.qm
+%%DATADIR%%/Translations/Filipino.ph.qm
+%%DATADIR%%/Translations/Francais.fr.qm
+%%DATADIR%%/Translations/Greek.el.qm
+%%DATADIR%%/Translations/Hebrew.he.qm
+%%DATADIR%%/Translations/Italiano.it.qm
+%%DATADIR%%/Translations/Korean.ko.qm
+%%DATADIR%%/Translations/Magyar.hu.qm
+%%DATADIR%%/Translations/Nederlands.nl.qm
+%%DATADIR%%/Translations/Norsk.no.qm
+%%DATADIR%%/Translations/Polski.pl.qm
+%%DATADIR%%/Translations/Portugues.pt.qm
+%%DATADIR%%/Translations/Portugues.pt_BR.qm
+%%DATADIR%%/Translations/Romanian.ro.qm
+%%DATADIR%%/Translations/Russkiy.ru.qm
+%%DATADIR%%/Translations/Suomi.fi.qm
+%%DATADIR%%/Translations/Svenska.sv.qm
+%%DATADIR%%/Translations/Thai.th.qm
+%%DATADIR%%/Translations/Turkish.tr.qm
+%%DATADIR%%/Translations/oscar_qt_af.qm
+%%DATADIR%%/Translations/oscar_qt_ar.qm
+%%DATADIR%%/Translations/oscar_qt_bg.qm
+%%DATADIR%%/Translations/oscar_qt_da.qm
+%%DATADIR%%/Translations/oscar_qt_de.qm
+%%DATADIR%%/Translations/oscar_qt_el.qm
+%%DATADIR%%/Translations/oscar_qt_es.qm
+%%DATADIR%%/Translations/oscar_qt_fi.qm
+%%DATADIR%%/Translations/oscar_qt_fr.qm
+%%DATADIR%%/Translations/oscar_qt_he.qm
+%%DATADIR%%/Translations/oscar_qt_it.qm
+%%DATADIR%%/Translations/oscar_qt_ko.qm
+%%DATADIR%%/Translations/oscar_qt_nl.qm
+%%DATADIR%%/Translations/oscar_qt_no.qm
+%%DATADIR%%/Translations/oscar_qt_ph.qm
+%%DATADIR%%/Translations/oscar_qt_pl.qm
+%%DATADIR%%/Translations/oscar_qt_pt.qm
+%%DATADIR%%/Translations/oscar_qt_ro.qm
+%%DATADIR%%/Translations/oscar_qt_ru.qm
+%%DATADIR%%/Translations/oscar_qt_sv.qm
+%%DATADIR%%/Translations/oscar_qt_th.qm
+%%DATADIR%%/Translations/oscar_qt_tr.qm
+%%DATADIR%%/Translations/oscar_qt_zh.qm
+%%DATADIR%%/help/help_en/OSCAR_Guide_en.qhp
+%%DATADIR%%/help/help_en/daily.html
+%%DATADIR%%/help/help_en/default.css
+%%DATADIR%%/help/help_en/faq.html
+%%DATADIR%%/help/help_en/gettingstarted.html
+%%DATADIR%%/help/help_en/glossary.html
+%%DATADIR%%/help/help_en/import.html
+%%DATADIR%%/help/help_en/index.html
+%%DATADIR%%/help/help_en/overview.html
+%%DATADIR%%/help/help_en/oximetry.html
+%%DATADIR%%/help/help_en/reportingbugs.html
+%%DATADIR%%/help/help_en/statistics.html
+%%DATADIR%%/help/help_en/supported.html
+%%DATADIR%%/help/help_en/tipsntricks.html
+%%DATADIR%%/help/help_nl/OSCAR_Guide_nl.qhp
+%%DATADIR%%/help/help_nl/daily.html
+%%DATADIR%%/help/help_nl/default.css
+%%DATADIR%%/help/help_nl/faq.html
+%%DATADIR%%/help/help_nl/gettingstarted.html
+%%DATADIR%%/help/help_nl/glossary.html
+%%DATADIR%%/help/help_nl/import.html
+%%DATADIR%%/help/help_nl/index.html
+%%DATADIR%%/help/help_nl/overview.html
+%%DATADIR%%/help/help_nl/oximetry.html
+%%DATADIR%%/help/help_nl/reportingbugs.html
+%%DATADIR%%/help/help_nl/statistics.html
+%%DATADIR%%/help/help_nl/supported.html
+%%DATADIR%%/help/help_nl/tipsntricks.html
+%%DATADIR%%/help/images/aircurve.png
+%%DATADIR%%/help/images/airsense10.png
+%%DATADIR%%/help/images/cms50f.png
+%%DATADIR%%/help/images/dreamstation.png
+%%DATADIR%%/help/images/dv64.png
+%%DATADIR%%/help/images/fp_icon.png
+%%DATADIR%%/help/images/intellipap.png
+%%DATADIR%%/help/images/logo.png
+%%DATADIR%%/help/images/oximeter.png
+%%DATADIR%%/help/images/prs1.png
+%%DATADIR%%/help/images/prs1_60s.png
+%%DATADIR%%/help/images/prs1_960.png
+%%DATADIR%%/help/images/rms9.png
+%%DATADIR%%/help/index.qhcp
+%%DATADIR%%/icons/OSCAR.icns
+%%DATADIR%%/icons/README.txt
+%%DATADIR%%/icons/aircurve.png
+%%DATADIR%%/icons/airsense10.png
+%%DATADIR%%/icons/arrow-end.png
+%%DATADIR%%/icons/arrow-left.png
+%%DATADIR%%/icons/arrow-right.png
+%%DATADIR%%/icons/back.png
+%%DATADIR%%/icons/bookmark.png
+%%DATADIR%%/icons/cms50f.png
+%%DATADIR%%/icons/cubeoximeter.png
+%%DATADIR%%/icons/daily.png
+%%DATADIR%%/icons/dreamstation.png
+%%DATADIR%%/icons/dv64.png
+%%DATADIR%%/icons/edit-find.png
+%%DATADIR%%/icons/eye.png
+%%DATADIR%%/icons/forward.png
+%%DATADIR%%/icons/fp_icon.png
+%%DATADIR%%/icons/go-home.png
+%%DATADIR%%/icons/help.png
+%%DATADIR%%/icons/intellipap.png
+%%DATADIR%%/icons/last.png
+%%DATADIR%%/icons/logo-lg.png
+%%DATADIR%%/icons/logo-lm.png
+%%DATADIR%%/icons/logo-md.png
+%%DATADIR%%/icons/logo-sm.png
+%%DATADIR%%/icons/logo.ico
+%%DATADIR%%/icons/mask.png
+%%DATADIR%%/icons/moon.png
+%%DATADIR%%/icons/overview-page.png
+%%DATADIR%%/icons/overview.png
+%%DATADIR%%/icons/oximeter.png
+%%DATADIR%%/icons/prds2.png
+%%DATADIR%%/icons/preferences.png
+%%DATADIR%%/icons/prs1.png
+%%DATADIR%%/icons/prs1_60s.png
+%%DATADIR%%/icons/prs1_960.png
+%%DATADIR%%/icons/prs1vent.png
+%%DATADIR%%/icons/pushpin.png
+%%DATADIR%%/icons/refresh.png
+%%DATADIR%%/icons/rms9.png
+%%DATADIR%%/icons/sadface.png
+%%DATADIR%%/icons/save.png
+%%DATADIR%%/icons/sdcard-lock.png
+%%DATADIR%%/icons/sdcard.png
+%%DATADIR%%/icons/session-off.png
+%%DATADIR%%/icons/session-on.png
+%%DATADIR%%/icons/smileyface.png
+%%DATADIR%%/icons/statistics.png
+%%DATADIR%%/icons/svg/applications-viewers.svg
+%%DATADIR%%/icons/svg/back.svg
+%%DATADIR%%/icons/svg/calendar.svg
+%%DATADIR%%/icons/svg/close-window.svg
+%%DATADIR%%/icons/svg/edit-find.svg
+%%DATADIR%%/icons/svg/emblem-marketing.svg
+%%DATADIR%%/icons/svg/forward.svg
+%%DATADIR%%/icons/svg/gnome-dev-media-sdmmc.svg
+%%DATADIR%%/icons/svg/media.svg
+%%DATADIR%%/icons/svg/moon.svg
+%%DATADIR%%/icons/svg/preferences.svg
+%%DATADIR%%/icons/trophy.png
+%%DATADIR%%/icons/up-down.png
+%%DATADIR%%/icons/warning.png
+share/applications/OSCAR.desktop
+share/icons/hicolor/48x48/apps/OSCAR.png
+share/icons/hicolor/scalable/apps/OSCAR.svg



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